Implement continuous tape labels and path-based label shapes.

- Added "roll" as a special paper id
- Added roll_width attribute to draw tape in previews
- Updated Brother QL-500/* label templates
- Preserve print dialog settings between print jobs.
- Added path based labels for arbitrary shaped labels.
- Fleshed out implementation of continuous labels.
This commit is contained in:
Jim Evins
2018-08-11 14:05:26 -04:00
parent b9a1f2e150
commit 467ca9fc62
135 changed files with 41934 additions and 13681 deletions
+24 -14
View File
@@ -86,22 +86,32 @@ namespace glabels
}
bool Layout::isSimilarTo( const Layout *other )
bool Layout::isSimilarTo( const Layout& other ) const
{
return ( (mNx == other->mNx) &&
(mNy == other->mNy) &&
(fabs(mX0 - other->mX0) < EPSILON) &&
(fabs(mY0 - other->mY0) < EPSILON) &&
(fabs(mDx - other->mDx) < EPSILON) &&
(fabs(mDy - other->mDy) < EPSILON) );
}
Layout* Layout::dup() const
{
auto *other = new Layout( *this );
return other;
return ( (mNx == other.mNx) &&
(mNy == other.mNy) &&
(fabs(mX0 - other.mX0) < EPSILON) &&
(fabs(mY0 - other.mY0) < EPSILON) &&
(fabs(mDx - other.mDx) < EPSILON) &&
(fabs(mDy - other.mDy) < EPSILON) );
}
}
}
QDebug operator<<( QDebug dbg, const glabels::model::Layout& layout )
{
QDebugStateSaver saver(dbg);
dbg.nospace() << "Layout{ "
<< layout.nx() << ","
<< layout.ny() << ","
<< layout.x0() << ","
<< layout.y0() << ","
<< layout.dx() << ","
<< layout.dy()
<< " }";
return dbg;
}