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:
+24
-14
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user