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