Add generic templates (#307)

- Add generic full-page templates.  (This feature from 3.4 was missing)
- Also add generic half-page, quarter-page, and envelope templates.
- Add several more common envelope sizes to page-sizes.xml
- Qt print backend does not need pwg_size.
    - Replace with pwg_class, to distinguish between ISO and NA sizes
This commit is contained in:
Jaye Evins
2026-02-11 11:27:41 -05:00
committed by GitHub
parent 993e1e460d
commit e6673a0a24
15 changed files with 369 additions and 67 deletions
+14 -6
View File
@@ -29,12 +29,14 @@ namespace glabels::model
const QString& name,
Distance width,
Distance height,
const QString& pwgSize )
const QString& pwgClass,
Type type )
: mId(id),
mName(name),
mWidth(width),
mHeight(height),
mPwgSize(pwgSize)
mPwgClass(pwgClass),
mType(type)
{
// empty
}
@@ -64,21 +66,27 @@ namespace glabels::model
}
QString Paper::pwgSize() const
QString Paper::pwgClass() const
{
return mPwgSize;
return mPwgClass;
}
Paper::Type Paper::type() const
{
return mType;
}
bool Paper::isSizeIso() const
{
return mPwgSize.startsWith( "iso_" );
return mPwgClass == "iso";
}
bool Paper::isSizeUs() const
{
return mPwgSize.startsWith( "na_" );
return mPwgClass == "na";
}
}