1// qpagesize.sip generated by MetaSIP 2// 3// This file is part of the QtGui Python extension module. 4// 5// Copyright (c) 2021 Riverbank Computing Limited <info@riverbankcomputing.com> 6// 7// This file is part of PyQt5. 8// 9// This file may be used under the terms of the GNU General Public License 10// version 3.0 as published by the Free Software Foundation and appearing in 11// the file LICENSE included in the packaging of this file. Please review the 12// following information to ensure the GNU General Public License version 3.0 13// requirements will be met: http://www.gnu.org/copyleft/gpl.html. 14// 15// If you do not wish to use this file under the terms of the GPL version 3.0 16// then you may purchase a commercial license. For more information contact 17// info@riverbankcomputing.com. 18// 19// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 20// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 21 22 23%If (Qt_5_3_0 -) 24 25class QPageSize 26{ 27%TypeHeaderCode 28#include <qpagesize.h> 29%End 30 31public: 32 enum PageSizeId 33 { 34 A4, 35 B5, 36 Letter, 37 Legal, 38 Executive, 39 A0, 40 A1, 41 A2, 42 A3, 43 A5, 44 A6, 45 A7, 46 A8, 47 A9, 48 B0, 49 B1, 50 B10, 51 B2, 52 B3, 53 B4, 54 B6, 55 B7, 56 B8, 57 B9, 58 C5E, 59 Comm10E, 60 DLE, 61 Folio, 62 Ledger, 63 Tabloid, 64 Custom, 65 A10, 66 A3Extra, 67 A4Extra, 68 A4Plus, 69 A4Small, 70 A5Extra, 71 B5Extra, 72 JisB0, 73 JisB1, 74 JisB2, 75 JisB3, 76 JisB4, 77 JisB5, 78 JisB6, 79 JisB7, 80 JisB8, 81 JisB9, 82 JisB10, 83 AnsiC, 84 AnsiD, 85 AnsiE, 86 LegalExtra, 87 LetterExtra, 88 LetterPlus, 89 LetterSmall, 90 TabloidExtra, 91 ArchA, 92 ArchB, 93 ArchC, 94 ArchD, 95 ArchE, 96 Imperial7x9, 97 Imperial8x10, 98 Imperial9x11, 99 Imperial9x12, 100 Imperial10x11, 101 Imperial10x13, 102 Imperial10x14, 103 Imperial12x11, 104 Imperial15x11, 105 ExecutiveStandard, 106 Note, 107 Quarto, 108 Statement, 109 SuperA, 110 SuperB, 111 Postcard, 112 DoublePostcard, 113 Prc16K, 114 Prc32K, 115 Prc32KBig, 116 FanFoldUS, 117 FanFoldGerman, 118 FanFoldGermanLegal, 119 EnvelopeB4, 120 EnvelopeB5, 121 EnvelopeB6, 122 EnvelopeC0, 123 EnvelopeC1, 124 EnvelopeC2, 125 EnvelopeC3, 126 EnvelopeC4, 127 EnvelopeC6, 128 EnvelopeC65, 129 EnvelopeC7, 130 Envelope9, 131 Envelope11, 132 Envelope12, 133 Envelope14, 134 EnvelopeMonarch, 135 EnvelopePersonal, 136 EnvelopeChou3, 137 EnvelopeChou4, 138 EnvelopeInvite, 139 EnvelopeItalian, 140 EnvelopeKaku2, 141 EnvelopeKaku3, 142 EnvelopePrc1, 143 EnvelopePrc2, 144 EnvelopePrc3, 145 EnvelopePrc4, 146 EnvelopePrc5, 147 EnvelopePrc6, 148 EnvelopePrc7, 149 EnvelopePrc8, 150 EnvelopePrc9, 151 EnvelopePrc10, 152 EnvelopeYou4, 153 NPageSize, 154 NPaperSize, 155 AnsiA, 156 AnsiB, 157 EnvelopeC5, 158 EnvelopeDL, 159 Envelope10, 160 LastPageSize, 161 }; 162 163 enum Unit 164 { 165 Millimeter, 166 Point, 167 Inch, 168 Pica, 169 Didot, 170 Cicero, 171 }; 172 173 enum SizeMatchPolicy 174 { 175 FuzzyMatch, 176 FuzzyOrientationMatch, 177 ExactMatch, 178 }; 179 180 QPageSize(); 181 explicit QPageSize(QPageSize::PageSizeId pageSizeId); 182 QPageSize(const QSize &pointSize, const QString &name = QString(), QPageSize::SizeMatchPolicy matchPolicy = QPageSize::FuzzyMatch); 183 QPageSize(const QSizeF &size, QPageSize::Unit units, const QString &name = QString(), QPageSize::SizeMatchPolicy matchPolicy = QPageSize::FuzzyMatch); 184 QPageSize(const QPageSize &other); 185 ~QPageSize(); 186 void swap(QPageSize &other /Constrained/); 187 bool isEquivalentTo(const QPageSize &other) const; 188 bool isValid() const; 189 QString key() const; 190 QString name() const; 191 QPageSize::PageSizeId id() const; 192 int windowsId() const; 193 QSizeF definitionSize() const; 194 QPageSize::Unit definitionUnits() const; 195 QSizeF size(QPageSize::Unit units) const; 196 QSize sizePoints() const; 197 QSize sizePixels(int resolution) const; 198 QRectF rect(QPageSize::Unit units) const; 199 QRect rectPoints() const; 200 QRect rectPixels(int resolution) const; 201 static QString key(QPageSize::PageSizeId pageSizeId); 202 static QString name(QPageSize::PageSizeId pageSizeId); 203 static QPageSize::PageSizeId id(const QSize &pointSize, QPageSize::SizeMatchPolicy matchPolicy = QPageSize::FuzzyMatch); 204 static QPageSize::PageSizeId id(const QSizeF &size, QPageSize::Unit units, QPageSize::SizeMatchPolicy matchPolicy = QPageSize::FuzzyMatch); 205 static QPageSize::PageSizeId id(int windowsId); 206 static int windowsId(QPageSize::PageSizeId pageSizeId); 207 static QSizeF definitionSize(QPageSize::PageSizeId pageSizeId); 208 static QPageSize::Unit definitionUnits(QPageSize::PageSizeId pageSizeId); 209 static QSizeF size(QPageSize::PageSizeId pageSizeId, QPageSize::Unit units); 210 static QSize sizePoints(QPageSize::PageSizeId pageSizeId); 211 static QSize sizePixels(QPageSize::PageSizeId pageSizeId, int resolution); 212}; 213 214%End 215%If (Qt_5_3_0 -) 216bool operator==(const QPageSize &lhs, const QPageSize &rhs); 217%End 218%If (Qt_5_3_0 -) 219bool operator!=(const QPageSize &lhs, const QPageSize &rhs); 220%End 221