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
+19 -4
View File
@@ -32,13 +32,23 @@ namespace glabels::model
class Paper
{
public:
enum Type
{
SHEET,
ENVELOPE,
ROLL
};
public:
Paper() = default;
Paper( const QString& id,
const QString& name,
Distance width,
Distance height,
const QString& pwgSize );
const QString& pwgClass,
Type type = SHEET );
~Paper() = default;
QString id() const;
@@ -50,18 +60,23 @@ namespace glabels::model
/* Height */
Distance height() const;
/* PWG 5101.1-2002 size name */
QString pwgSize() const;
/* PWG 5101.1-2023 class */
QString pwgClass() const;
Type type() const;
bool isSizeIso() const;
bool isSizeUs() const;
private:
QString mId;
QString mName;
Distance mWidth;
Distance mHeight;
QString mPwgSize;
QString mPwgClass;
Type mType;
};
}