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