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