6#include <QtCore/qcoreapplication.h>
7#include <QtCore/qdebug.h>
8#include <QtCore/qpoint.h>
9#include <QtCore/qrect.h>
10#include <QtCore/qsize.h>
11#include <QtCore/qstring.h>
216 {
QPageSize::Letter ,
DMPAPER_LETTER ,
QPageSize::Inch , 612, 792, 215.9, 279.4, 8.5 , 11 ,
"Letter"},
217 {
QPageSize::Legal ,
DMPAPER_LEGAL ,
QPageSize::Inch , 612, 1008, 215.9, 355.6, 8.5 , 14 ,
"Legal"},
218 {
QPageSize::Executive ,
DMPAPER_NONE ,
QPageSize::Inch , 540, 720, 190.5, 254 , 7.5 , 10 ,
"Executive.7.5x10in"},
219 {
QPageSize::A0 ,
DMPAPER_NONE ,
QPageSize::Millimeter, 2384, 3370, 841 , 1189 , 33.11, 46.81,
"A0"},
220 {
QPageSize::A1 ,
DMPAPER_NONE ,
QPageSize::Millimeter, 1684, 2384, 594 , 841 , 23.39, 33.11,
"A1"},
221 {
QPageSize::A2 ,
DMPAPER_A2 ,
QPageSize::Millimeter, 1191, 1684, 420 , 594 , 16.54, 23.39,
"A2"},
222 {
QPageSize::A3 ,
DMPAPER_A3 ,
QPageSize::Millimeter, 842, 1191, 297 , 420 , 11.69, 16.54,
"A3"},
223 {
QPageSize::A4 ,
DMPAPER_A4 ,
QPageSize::Millimeter, 595, 842, 210 , 297 , 8.27, 11.69,
"A4"},
224 {
QPageSize::A5 ,
DMPAPER_A5 ,
QPageSize::Millimeter, 420, 595, 148 , 210 , 5.83, 8.27,
"A5"},
225 {
QPageSize::A6 ,
DMPAPER_A6 ,
QPageSize::Millimeter, 297, 420, 105 , 148 , 4.13, 5.83,
"A6"},
226 {
QPageSize::A7 ,
DMPAPER_NONE ,
QPageSize::Millimeter, 210, 297, 74 , 105 , 2.91, 4.13,
"A7"},
227 {
QPageSize::A8 ,
DMPAPER_NONE ,
QPageSize::Millimeter, 148, 210, 52 , 74 , 2.05, 2.91,
"A8"},
228 {
QPageSize::A9 ,
DMPAPER_NONE ,
QPageSize::Millimeter, 105, 148, 37 , 52 , 1.46, 2.05,
"A9"},
229 {
QPageSize::A10 ,
DMPAPER_NONE ,
QPageSize::Millimeter, 73, 105, 26 , 37 , 1.02, 1.46,
"A10"},
230 {
QPageSize::B0 ,
DMPAPER_NONE ,
QPageSize::Millimeter, 2835, 4008, 1000 , 1414 , 39.37, 55.67,
"ISOB0"},
231 {
QPageSize::B1 ,
DMPAPER_NONE ,
QPageSize::Millimeter, 2004, 2835, 707 , 1000 , 27.83, 39.37,
"ISOB1"},
232 {
QPageSize::B2 ,
DMPAPER_NONE ,
QPageSize::Millimeter, 1417, 2004, 500 , 707 , 19.68, 27.83,
"ISOB2"},
233 {
QPageSize::B3 ,
DMPAPER_NONE ,
QPageSize::Millimeter, 1001, 1417, 353 , 500 , 13.9 , 19.68,
"ISOB3"},
234 {
QPageSize::B4 ,
DMPAPER_ISO_B4 ,
QPageSize::Millimeter, 709, 1001, 250 , 353 , 9.84, 13.9 ,
"ISOB4"},
235 {
QPageSize::B5 ,
DMPAPER_NONE ,
QPageSize::Millimeter, 499, 709, 176 , 250 , 6.9 , 9.8 ,
"ISOB5"},
236 {
QPageSize::B6 ,
DMPAPER_NONE ,
QPageSize::Millimeter, 354, 499, 125 , 176 , 4.92, 6.93,
"ISOB6"},
237 {
QPageSize::B7 ,
DMPAPER_NONE ,
QPageSize::Millimeter, 249, 354, 88 , 125 , 3.46, 4.92,
"ISOB7"},
238 {
QPageSize::B8 ,
DMPAPER_NONE ,
QPageSize::Millimeter, 176, 249, 62 , 88 , 2.44, 3.46,
"ISOB8"},
239 {
QPageSize::B9 ,
DMPAPER_NONE ,
QPageSize::Millimeter, 125, 176, 44 , 62 , 1.73, 2.44,
"ISOB9"},
240 {
QPageSize::B10 ,
DMPAPER_NONE ,
QPageSize::Millimeter, 88, 125, 31 , 44 , 1.22, 1.73,
"ISOB10"},
241 {
QPageSize::C5E ,
DMPAPER_ENV_C5 ,
QPageSize::Millimeter, 459, 649, 162 , 229 , 6.38, 9.02,
"EnvC5"},
242 {
QPageSize::Comm10E ,
DMPAPER_ENV_10 ,
QPageSize::Inch , 297, 684, 104.8, 241.3, 4.12, 9.5 ,
"Env10"},
243 {
QPageSize::DLE ,
DMPAPER_ENV_DL ,
QPageSize::Millimeter, 312, 624, 110 , 220 , 4.33, 8.66,
"EnvDL"},
244 {
QPageSize::Folio ,
DMPAPER_NONE ,
QPageSize::Millimeter, 595, 935, 210 , 330 , 8.27, 13 ,
"Folio"},
245 {
QPageSize::Ledger ,
DMPAPER_LEDGER ,
QPageSize::Inch , 1224, 792, 431.8, 279.4, 17 , 11 ,
"Ledger"},
246 {
QPageSize::Tabloid ,
DMPAPER_TABLOID ,
QPageSize::Inch , 792, 1224, 279.4, 431.8, 11 , 17 ,
"Tabloid"},
247 {
QPageSize::Custom ,
DMPAPER_USER ,
QPageSize::Millimeter, -1, -1, -1. , -1 , -1 , -1 ,
"Custom"},
250 {
QPageSize::A3Extra ,
DMPAPER_A3_EXTRA ,
QPageSize::Millimeter, 913, 1262, 322 , 445 , 12.67, 17.52,
"A3Extra"},
251 {
QPageSize::A4Extra ,
DMPAPER_A4_EXTRA ,
QPageSize::Millimeter, 667, 914, 235.5, 322.3, 9.27, 12.69,
"A4Extra"},
252 {
QPageSize::A4Plus ,
DMPAPER_A4_PLUS ,
QPageSize::Millimeter, 595, 936, 210 , 330 , 8.27, 13 ,
"A4Plus"},
253 {
QPageSize::A4Small ,
DMPAPER_A4SMALL ,
QPageSize::Millimeter, 595, 842, 210 , 297 , 8.27, 11.69,
"A4Small"},
254 {
QPageSize::A5Extra ,
DMPAPER_A5_EXTRA ,
QPageSize::Millimeter, 492, 668, 174 , 235 , 6.85, 9.25,
"A5Extra"},
255 {
QPageSize::B5Extra ,
DMPAPER_B5_EXTRA ,
QPageSize::Millimeter, 570, 782, 201 , 276 , 7.9 , 10.8 ,
"ISOB5Extra"},
258 {
QPageSize::JisB0 ,
DMPAPER_NONE ,
QPageSize::Millimeter, 2920, 4127, 1030 , 1456 , 40.55, 57.32,
"B0"},
259 {
QPageSize::JisB1 ,
DMPAPER_NONE ,
QPageSize::Millimeter, 2064, 2920, 728 , 1030 , 28.66, 40.55,
"B1"},
260 {
QPageSize::JisB2 ,
DMPAPER_NONE ,
QPageSize::Millimeter, 1460, 2064, 515 , 728 , 20.28, 28.66,
"B2"},
261 {
QPageSize::JisB3 ,
DMPAPER_NONE ,
QPageSize::Millimeter, 1032, 1460, 364 , 515 , 14.33, 20.28,
"B3"},
262 {
QPageSize::JisB4 ,
DMPAPER_B4 ,
QPageSize::Millimeter, 729, 1032, 257 , 364 , 10.12, 14.33,
"B4"},
263 {
QPageSize::JisB5 ,
DMPAPER_B5 ,
QPageSize::Millimeter, 516, 729, 182 , 257 , 7.17, 10.12,
"B5"},
264 {
QPageSize::JisB6 ,
DMPAPER_B6_JIS ,
QPageSize::Millimeter, 363, 516, 128 , 182 , 5.04, 7.17,
"B6"},
265 {
QPageSize::JisB7 ,
DMPAPER_NONE ,
QPageSize::Millimeter, 258, 363, 91 , 128 , 3.58, 5.04,
"B7"},
266 {
QPageSize::JisB8 ,
DMPAPER_NONE ,
QPageSize::Millimeter, 181, 258, 64 , 91 , 2.52, 3.58,
"B8"},
267 {
QPageSize::JisB9 ,
DMPAPER_NONE ,
QPageSize::Millimeter, 127, 181, 45 , 64 , 1.77, 2.52,
"B9"},
268 {
QPageSize::JisB10 ,
DMPAPER_NONE ,
QPageSize::Millimeter, 91, 127, 32 , 45 , 1.26, 1.77,
"B10"},
271 {
QPageSize::AnsiC ,
DMPAPER_NONE ,
QPageSize::Inch , 1224, 1584, 431.8, 558.8, 17 , 22 ,
"AnsiC"},
272 {
QPageSize::AnsiD ,
DMPAPER_NONE ,
QPageSize::Inch , 1584, 2448, 558.8, 863.6, 22 , 34 ,
"AnsiD"},
273 {
QPageSize::AnsiE ,
DMPAPER_NONE ,
QPageSize::Inch , 2448, 3168, 863.6, 1118 , 34 , 44 ,
"AnsiE"},
274 {
QPageSize::LegalExtra ,
DMPAPER_LEGAL_EXTRA ,
QPageSize::Inch , 684, 1080, 241.3, 381 , 9.5 , 15 ,
"LegalExtra"},
275 {
QPageSize::LetterExtra ,
DMPAPER_LETTER_EXTRA ,
QPageSize::Inch , 684, 864, 241.3, 304.8, 9.5 , 12 ,
"LetterExtra"},
276 {
QPageSize::LetterPlus ,
DMPAPER_LETTER_PLUS ,
QPageSize::Inch , 612, 914, 215.9, 322.3, 8.5 , 12.69,
"LetterPlus"},
277 {
QPageSize::LetterSmall ,
DMPAPER_LETTERSMALL ,
QPageSize::Inch , 612, 792, 215.9, 279.4, 8.5 , 11 ,
"LetterSmall"},
278 {
QPageSize::TabloidExtra ,
DMPAPER_TABLOID_EXTRA ,
QPageSize::Inch , 864, 1296, 304.8, 457.2, 12 , 18 ,
"TabloidExtra"},
281 {
QPageSize::ArchA ,
DMPAPER_NONE ,
QPageSize::Inch , 648, 864, 228.6, 304.8, 9 , 12 ,
"ARCHA"},
282 {
QPageSize::ArchB ,
DMPAPER_NONE ,
QPageSize::Inch , 864, 1296, 304.8, 457.2, 12 , 18 ,
"ARCHB"},
283 {
QPageSize::ArchC ,
DMPAPER_CSHEET ,
QPageSize::Inch , 1296, 1728, 457.2, 609.6, 18 , 24 ,
"ARCHC"},
284 {
QPageSize::ArchD ,
DMPAPER_DSHEET ,
QPageSize::Inch , 1728, 2592, 609.6, 914.4, 24 , 36 ,
"ARCHD"},
285 {
QPageSize::ArchE ,
DMPAPER_ESHEET ,
QPageSize::Inch , 2592, 3456, 914.4, 1219 , 36 , 48 ,
"ARCHE"},
288 {
QPageSize::Imperial7x9 ,
DMPAPER_NONE ,
QPageSize::Inch , 504, 648, 177.8, 228.6, 7 , 9 ,
"7x9"},
289 {
QPageSize::Imperial8x10 ,
DMPAPER_NONE ,
QPageSize::Inch , 576, 720, 203.2, 254 , 8 , 10 ,
"8x10"},
290 {
QPageSize::Imperial9x11 ,
DMPAPER_9X11 ,
QPageSize::Inch , 648, 792, 228.6, 279.4, 9 , 11 ,
"9x11"},
291 {
QPageSize::Imperial9x12 ,
DMPAPER_NONE ,
QPageSize::Inch , 648, 864, 228.6, 304.8, 9 , 12 ,
"9x12"},
292 {
QPageSize::Imperial10x11 ,
DMPAPER_10X11 ,
QPageSize::Inch , 720, 792, 254 , 279.4, 10 , 11 ,
"10x11"},
293 {
QPageSize::Imperial10x13 ,
DMPAPER_NONE ,
QPageSize::Inch , 720, 936, 254 , 330.2, 10 , 13 ,
"10x13"},
294 {
QPageSize::Imperial10x14 ,
DMPAPER_10X14 ,
QPageSize::Inch , 720, 1008, 254 , 355.6, 10 , 14 ,
"10x14"},
295 {
QPageSize::Imperial12x11 ,
DMPAPER_12X11 ,
QPageSize::Inch , 864, 792, 304.8, 279.4, 12 , 11 ,
"12x11"},
296 {
QPageSize::Imperial15x11 ,
DMPAPER_15X11 ,
QPageSize::Inch , 1080, 792, 381 , 279.4, 15 , 11 ,
"15x11"},
299 {
QPageSize::ExecutiveStandard ,
DMPAPER_EXECUTIVE ,
QPageSize::Inch , 522, 756, 184.2, 266.7, 7.25, 10.5 ,
"Executive"},
300 {
QPageSize::Note ,
DMPAPER_NOTE ,
QPageSize::Inch , 612, 792, 215.9, 279.4, 8.5 , 11 ,
"Note"},
301 {
QPageSize::Quarto ,
DMPAPER_QUARTO ,
QPageSize::Inch , 610, 780, 215.9, 275.1, 8.5 , 10.83,
"Quarto"},
302 {
QPageSize::Statement ,
DMPAPER_STATEMENT ,
QPageSize::Inch , 396, 612, 139.7, 215.9, 5.5 , 8.5 ,
"Statement"},
303 {
QPageSize::SuperA ,
DMPAPER_A_PLUS ,
QPageSize::Millimeter, 643, 1009, 227 , 356 , 8.94, 14 ,
"SuperA"},
304 {
QPageSize::SuperB ,
DMPAPER_B_PLUS ,
QPageSize::Millimeter, 864, 1380, 305 , 487 , 12 , 19.17,
"SuperB"},
305 {
QPageSize::Postcard ,
DMPAPER_JAPANESE_POSTCARD ,
QPageSize::Millimeter, 284, 419, 100 , 148 , 3.94, 5.83,
"Postcard"},
306 {
QPageSize::DoublePostcard ,
DMPAPER_DBL_JAPANESE_POSTCARD,
QPageSize::Millimeter, 567, 419, 200 , 148 , 7.87, 5.83,
"DoublePostcard"},
307 {
QPageSize::Prc16K ,
DMPAPER_P16K ,
QPageSize::Millimeter, 414, 610, 146 , 215 , 5.75, 8.5 ,
"PRC16K"},
308 {
QPageSize::Prc32K ,
DMPAPER_P32K ,
QPageSize::Millimeter, 275, 428, 97 , 151 , 3.82, 5.95,
"PRC32K"},
309 {
QPageSize::Prc32KBig ,
DMPAPER_P32KBIG ,
QPageSize::Millimeter, 275, 428, 97 , 151 , 3.82, 5.95,
"PRC32KBig"},
312 {
QPageSize::FanFoldUS ,
DMPAPER_FANFOLD_US ,
QPageSize::Inch , 1071, 792, 377.8, 279.4, 14.875, 11 ,
"FanFoldUS"},
313 {
QPageSize::FanFoldGerman ,
DMPAPER_FANFOLD_STD_GERMAN ,
QPageSize::Inch , 612, 864, 215.9, 304.8, 8.5 , 12 ,
"FanFoldGerman"},
314 {
QPageSize::FanFoldGermanLegal,
DMPAPER_FANFOLD_LGL_GERMAN ,
QPageSize::Inch , 612, 936, 215.9, 330 , 8.5 , 13 ,
"FanFoldGermanLegal"},
317 {
QPageSize::EnvelopeB4 ,
DMPAPER_ENV_B4 ,
QPageSize::Millimeter, 708, 1001, 250 , 353 , 9.84, 13.9 ,
"EnvISOB4"},
318 {
QPageSize::EnvelopeB5 ,
DMPAPER_ENV_B5 ,
QPageSize::Millimeter, 499, 709, 176 , 250 , 6.9 , 9.8 ,
"EnvISOB5"},
319 {
QPageSize::EnvelopeB6 ,
DMPAPER_ENV_B6 ,
QPageSize::Millimeter, 499, 354, 176 , 125 , 6.9 , 4.9 ,
"EnvISOB6"},
320 {
QPageSize::EnvelopeC0 ,
DMPAPER_NONE ,
QPageSize::Millimeter, 2599, 3676, 917 , 1297 , 36.1 , 51.06,
"EnvC0"},
321 {
QPageSize::EnvelopeC1 ,
DMPAPER_NONE ,
QPageSize::Millimeter, 1837, 2599, 648 , 917 , 25.51, 36.1 ,
"EnvC1"},
322 {
QPageSize::EnvelopeC2 ,
DMPAPER_NONE ,
QPageSize::Millimeter, 1298, 1837, 458 , 648 , 18.03, 25.51,
"EnvC2"},
323 {
QPageSize::EnvelopeC3 ,
DMPAPER_ENV_C3 ,
QPageSize::Millimeter, 918, 1296, 324 , 458 , 12.75, 18.03,
"EnvC3"},
324 {
QPageSize::EnvelopeC4 ,
DMPAPER_ENV_C4 ,
QPageSize::Millimeter, 649, 918, 229 , 324 , 9.02, 12.75,
"EnvC4"},
325 {
QPageSize::EnvelopeC6 ,
DMPAPER_ENV_C6 ,
QPageSize::Millimeter, 323, 459, 114 , 162 , 4.49, 6.38,
"EnvC6"},
326 {
QPageSize::EnvelopeC65 ,
DMPAPER_ENV_C65 ,
QPageSize::Millimeter, 324, 648, 114 , 229 , 4.5 , 9 ,
"EnvC65"},
327 {
QPageSize::EnvelopeC7 ,
DMPAPER_NONE ,
QPageSize::Millimeter, 230, 323, 81 , 114 , 3.19, 4.49,
"EnvC7"},
330 {
QPageSize::Envelope9 ,
DMPAPER_ENV_9 ,
QPageSize::Inch , 279, 639, 98.4, 225.4, 3.875, 8.875,
"Env9"},
331 {
QPageSize::Envelope11 ,
DMPAPER_ENV_11 ,
QPageSize::Inch , 324, 747, 114.3, 263.5, 4.5 , 10.375,
"Env11"},
332 {
QPageSize::Envelope12 ,
DMPAPER_ENV_12 ,
QPageSize::Inch , 342, 792, 120.7, 279.4, 4.75, 11 ,
"Env12"},
333 {
QPageSize::Envelope14 ,
DMPAPER_ENV_14 ,
QPageSize::Inch , 360, 828, 127 , 292.1, 5 , 11.5 ,
"Env14"},
334 {
QPageSize::EnvelopeMonarch ,
DMPAPER_ENV_MONARCH ,
QPageSize::Inch , 279, 540, 98.43, 190.5, 3.875, 7.5 ,
"EnvMonarch"},
335 {
QPageSize::EnvelopePersonal ,
DMPAPER_ENV_PERSONAL ,
QPageSize::Inch , 261, 468, 92.08, 165.1, 3.625, 6.5 ,
"EnvPersonal"},
338 {
QPageSize::EnvelopeChou3 ,
DMPAPER_JENV_CHOU3 ,
QPageSize::Millimeter, 340, 666, 120 , 235 , 4.72, 9.25,
"EnvChou3"},
339 {
QPageSize::EnvelopeChou4 ,
DMPAPER_JENV_CHOU4 ,
QPageSize::Millimeter, 255, 581, 90 , 205 , 3.54, 8 ,
"EnvChou4"},
340 {
QPageSize::EnvelopeInvite ,
DMPAPER_ENV_INVITE ,
QPageSize::Millimeter, 624, 624, 220 , 220 , 8.66, 8.66,
"EnvInvite"},
341 {
QPageSize::EnvelopeItalian ,
DMPAPER_ENV_ITALY ,
QPageSize::Millimeter, 312, 652, 110 , 230 , 4.33, 9 ,
"EnvItalian"},
342 {
QPageSize::EnvelopeKaku2 ,
DMPAPER_JENV_KAKU2 ,
QPageSize::Millimeter, 680, 941, 240 , 332 , 9.45, 13 ,
"EnvKaku2"},
343 {
QPageSize::EnvelopeKaku3 ,
DMPAPER_JENV_KAKU3 ,
QPageSize::Millimeter, 612, 785, 216 , 277 , 8.5 , 10.9 ,
"EnvKaku3"},
344 {
QPageSize::EnvelopePrc1 ,
DMPAPER_PENV_1 ,
QPageSize::Millimeter, 289, 468, 102 , 165 , 4 , 6.5 ,
"EnvPRC1"},
345 {
QPageSize::EnvelopePrc2 ,
DMPAPER_PENV_2 ,
QPageSize::Millimeter, 289, 499, 102 , 176 , 4 , 6.9 ,
"EnvPRC2"},
346 {
QPageSize::EnvelopePrc3 ,
DMPAPER_PENV_3 ,
QPageSize::Millimeter, 354, 499, 125 , 176 , 4.9 , 6.9 ,
"EnvPRC3"},
347 {
QPageSize::EnvelopePrc4 ,
DMPAPER_PENV_4 ,
QPageSize::Millimeter, 312, 590, 110 , 208 , 4.33, 8.2 ,
"EnvPRC4"},
348 {
QPageSize::EnvelopePrc5 ,
DMPAPER_PENV_5 ,
QPageSize::Millimeter, 312, 624, 110 , 220 , 4.33, 8.66,
"EnvPRC5"},
349 {
QPageSize::EnvelopePrc6 ,
DMPAPER_PENV_6 ,
QPageSize::Millimeter, 340, 652, 120 , 230 , 4.7 , 9 ,
"EnvPRC6"},
350 {
QPageSize::EnvelopePrc7 ,
DMPAPER_PENV_7 ,
QPageSize::Millimeter, 454, 652, 160 , 230 , 6.3 , 9 ,
"EnvPRC7"},
351 {
QPageSize::EnvelopePrc8 ,
DMPAPER_PENV_8 ,
QPageSize::Millimeter, 340, 876, 120 , 309 , 4.7 , 12.2 ,
"EnvPRC8"},
352 {
QPageSize::EnvelopePrc9 ,
DMPAPER_PENV_9 ,
QPageSize::Millimeter, 649, 918, 229 , 324 , 9 , 12.75,
"EnvPRC9"},
353 {
QPageSize::EnvelopePrc10 ,
DMPAPER_PENV_10 ,
QPageSize::Millimeter, 918, 1298, 324 , 458 , 12.75, 18 ,
"EnvPRC10"},
374 if (
key.endsWith(
"Rotated"_L1))
376 else if (
key.endsWith(
".Transverse"_L1))
392 if (windowsId <= DMPAPER_NONE || windowsId >
DMPAPER_LAST)
396 if (
it[0] == windowsId) {
439 return key.arg(
size.width()).arg(
size.height()).arg(abbrev);
481 return 2.83464566929;
499 return resolution <= 0 ? 1.0 : 72.0 / resolution;
524 newSize = newSize * multiplier;
543 if (!
size.isValid() || resolution <= 0)
597 const int tolerance = 3;
598 const int minWidth =
size.width() - tolerance;
599 const int maxWidth =
size.width() + tolerance;
600 const int minHeight =
size.height() - tolerance;
601 const int maxHeight =
size.height() + tolerance;
607 if (
width >= minWidth && width <= maxWidth && height >= minHeight &&
height <= maxHeight) {
629 if (
width >= minWidth && width <= maxWidth && height >= minHeight &&
height <= maxHeight) {
755 if (
size.isValid()) {
781 if (windowsId > 0 && pointSize.
isValid()) {
787 m_windowsId = windowsId;
836 return m_size ==
other.m_size
837 && m_units ==
other.m_units
838 && m_key ==
other.m_key
839 && m_name ==
other.m_name;
844 return m_pointSize ==
other.m_pointSize;
855 if (
units == m_units)
1333 return d->m_windowsId > 0 ? d->m_windowsId :
windowsId(d->m_id);
1474 switch (pageSizeId) {
1779 if (pageSizeId ==
Custom)
1792 if (pageSizeId ==
Custom)
1803 if (pageSizeId ==
Custom)
1814 if (pageSizeId ==
Custom)
1826 if (pageSizeId ==
Custom)
1831#ifndef QT_NO_DEBUG_STREAM
1837 dbg <<
"QPageSize(";
1839 dbg <<
'"' << pageSize.
name() <<
"\", key=\"" << pageSize.
key()
1843 dbg.nospace() <<
"QPageSize()";
static QString translate(const char *context, const char *key, const char *disambiguation=nullptr, int n=-1)
\threadsafe
bool operator==(const QPageSizePrivate &other) const
QSizeF size(QPageSize::Unit units) const
bool isEquivalentTo(const QPageSizePrivate &other) const
QSize sizePixels(int resolution) const
bool isValid() const
Returns true if this page size is valid.
QString key() const
Returns the unique key of the page size.
Unit
This enum type is used to specify the measurement unit for page sizes.
QSizeF definitionSize() const
Returns the definition size of the page size.
~QPageSize()
Destroys the page.
int windowsId() const
Returns the Windows DMPAPER enum value for the page size.
QRect rectPoints() const
Returns the page rectangle in Postscript Points (1/72 of an inch).
Unit definitionUnits() const
Returns the definition units of the page size.
QSizeF size(Unit units) const
Returns the size of the page in the required units.
QRect rectPixels(int resolution) const
Returns the page rectangle in Device Pixels at the given resolution.
QString name() const
Returns a localized human-readable name for the page size.
QSize sizePoints() const
Returns the size of the page in Postscript Points (1/72 of an inch).
QSize sizePixels(int resolution) const
Returns the size of the page in Device Pixels at the given resolution.
bool isEquivalentTo(const QPageSize &other) const
Returns true if this page is equivalent to the other page, i.e.
QPageSize()
Creates a null QPageSize.
PageSizeId id() const
Returns the standard QPageSize::PageSizeId of the page, or QPageSize::Custom.
QPageSize & operator=(const QPageSize &other)
Assignment operator, assigns other to this.
SizeMatchPolicy
\value FuzzyMatch Match to a standard page size if within the margin of tolerance.
PageSizeId
This enum type lists the available page sizes as defined in the Postscript PPD standard.
QRectF rect(Unit units) const
Returns the page rectangle in the required units.
\inmodule QtCore\reentrant
\inmodule QtCore\reentrant
\inmodule QtCore\reentrant
\inmodule QtCore\reentrant
constexpr QSize toSize() const noexcept
Returns an integer based copy of this size.
constexpr qreal width() const noexcept
Returns the width.
constexpr qreal height() const noexcept
Returns the height.
constexpr int height() const noexcept
Returns the height.
constexpr int width() const noexcept
Returns the width.
constexpr bool isValid() const noexcept
Returns true if both the width and height is equal to or greater than 0; otherwise returns false.
\macro QT_RESTRICTED_CAST_FROM_ASCII
static QString fromLatin1(QByteArrayView ba)
This is an overloaded member function, provided for convenience. It differs from the above function o...
static QString fromUtf8(QByteArrayView utf8)
This is an overloaded member function, provided for convenience. It differs from the above function o...
QString arg(qlonglong a, int fieldwidth=0, int base=10, QChar fillChar=u' ') const
bool isEmpty() const
Returns true if the string has no characters; otherwise returns false.
QSet< QString >::iterator it
Combined button and popup list for selecting options.
bool qFuzzyIsNull(qfloat16 f) noexcept
int qRound(qfloat16 d) noexcept
GLint GLsizei GLsizei height
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLfixed GLfixed GLint GLint GLfixed points
static QSizeF qt_definitionSize(QPageSize::PageSizeId pageSizeId)
static QString msgImperialPageSizeInch(int width, int height)
static QString qt_keyForPageSizeId(QPageSize::PageSizeId id)
static qreal qt_pointMultiplier(QPageSize::Unit unit)
QDebug operator<<(QDebug dbg, const QPageSize &pageSize)
static QPageSize::PageSizeId qt_idForWindowsID(int windowsId, QSize *match=nullptr)
Q_GUI_EXPORT qreal qt_pixelMultiplier(int resolution)
@ DMPAPER_LETTER_TRANSVERSE
@ DMPAPER_PENV_10_ROTATED
@ DMPAPER_A3_EXTRA_TRANSVERSE
@ DMPAPER_JENV_CHOU4_ROTATED
@ DMPAPER_FANFOLD_STD_GERMAN
@ DMPAPER_FANFOLD_LGL_GERMAN
@ DMPAPER_JENV_KAKU2_ROTATED
@ DMPAPER_JENV_CHOU3_ROTATED
@ DMPAPER_DBL_JAPANESE_POSTCARD_ROTATED
@ DMPAPER_JENV_YOU4_ROTATED
@ DMPAPER_JENV_KAKU3_ROTATED
@ DMPAPER_JAPANESE_POSTCARD_ROTATED
@ DMPAPER_DBL_JAPANESE_POSTCARD
@ DMPAPER_P32KBIG_ROTATED
@ DMPAPER_JAPANESE_POSTCARD
@ DMPAPER_LETTER_EXTRA_TRANSVERSE
static QPageSize::PageSizeId qt_idForSize(const QSizeF &size, QPageSize::Unit units, QPageSize::SizeMatchPolicy matchPolicy, QSize *match)
static QSizeF qt_unitSize(QPageSize::PageSizeId pageSizeId, QPageSize::Unit units)
static QSize qt_convertUnitsToPoints(const QSizeF &size, QPageSize::Unit units)
static QSize qt_convertPointsToPixels(const QSize &size, int resolution)
static QPageSize::PageSizeId qt_idForPpdKey(const QString &ppdKey, QSize *match=nullptr)
static QString qt_nameForCustomSize(const QSizeF &size, QPageSize::Unit units)
static const StandardPageSize qt_pageSizes[]
static QString qt_keyForCustomSize(const QSizeF &size, QPageSize::Unit units)
static QSizeF qt_convertUnits(const QSizeF &size, QPageSize::Unit fromUnits, QPageSize::Unit toUnits)
static const int pageSizesCount
static QSizeF qt_convertPointsToUnits(const QSize &size, QPageSize::Unit units)
static const int qt_windowsConversion[][2]
static QPageSize::PageSizeId qt_idForPointSize(const QSize &size, QPageSize::SizeMatchPolicy matchPolicy, QSize *match)
#define QStringLiteral(str)
static bool match(const uchar *found, uint foundLen, const char *target, uint targetLen)
const char mediaOption[20]
QPageSize::Unit definitionUnits