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
+27 -8
View File
@@ -26,29 +26,48 @@ namespace glabels
namespace model
{
const QPainterPath& Markup::path() const
QPainterPath Markup::path( const Frame* frame ) const
{
// Use cached path -- default does not depend on frame size
return mPath;
}
MarkupMargin::MarkupMargin( const Frame* frame,
const Distance& size )
: mFrame(frame), mSize(size)
MarkupMargin::MarkupMargin( const Distance& size )
: mXSize(size), mYSize(size)
{
mPath = frame->marginPath( size );
}
MarkupMargin::MarkupMargin( const Distance& xSize,
const Distance& ySize )
: mXSize(xSize), mYSize(ySize)
{
}
QPainterPath MarkupMargin::path( const Frame* frame ) const
{
// Re-calculate path -- frame size may have changed
return frame->marginPath( mXSize, mYSize );
}
Markup* MarkupMargin::dup() const
{
return new MarkupMargin( mFrame, mSize );
return new MarkupMargin( mXSize, mYSize );
}
Distance MarkupMargin::size() const
Distance MarkupMargin::xSize() const
{
return mSize;
return mXSize;
}
Distance MarkupMargin::ySize() const
{
return mYSize;
}