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
+15 -11
View File
@@ -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() ) )