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:
+15
-11
@@ -67,13 +67,10 @@ namespace glabels
|
||||
QList<Vendor*> Db::mVendors;
|
||||
QStringList Db::mVendorNames;
|
||||
QList<Template*> Db::mTemplates;
|
||||
QString Db::mPaperNameOther;
|
||||
|
||||
|
||||
Db::Db()
|
||||
{
|
||||
mPaperNameOther = tr("Other");
|
||||
|
||||
readPapers();
|
||||
readCategories();
|
||||
readVendors();
|
||||
@@ -209,6 +206,15 @@ namespace glabels
|
||||
{
|
||||
if ( !name.isNull() && !name.isEmpty() )
|
||||
{
|
||||
if ( name == tr("Other") )
|
||||
{
|
||||
return "other";
|
||||
}
|
||||
else if ( name == tr("Roll") )
|
||||
{
|
||||
return "roll";
|
||||
}
|
||||
|
||||
const Paper *paper = lookupPaperFromName( name );
|
||||
if ( paper != nullptr )
|
||||
{
|
||||
@@ -225,9 +231,13 @@ namespace glabels
|
||||
{
|
||||
if ( !id.isNull() && !id.isEmpty() )
|
||||
{
|
||||
if ( isPaperIdOther( id ) )
|
||||
if ( id == "roll" )
|
||||
{
|
||||
return mPaperNameOther;
|
||||
return tr("Roll");
|
||||
}
|
||||
else
|
||||
{
|
||||
return tr("Other");
|
||||
}
|
||||
|
||||
const Paper *paper = lookupPaperFromId( id );
|
||||
@@ -256,12 +266,6 @@ namespace glabels
|
||||
}
|
||||
|
||||
|
||||
bool Db::isPaperIdOther( const QString& id )
|
||||
{
|
||||
return ( id == "Other" );
|
||||
}
|
||||
|
||||
|
||||
void Db::registerCategory( Category *category )
|
||||
{
|
||||
if ( !isCategoryIdKnown( category->id() ) )
|
||||
|
||||
Reference in New Issue
Block a user