Changeset View
Changeset View
Standalone View
Standalone View
src/common/KReportPageSize.cpp
Show All 22 Lines | |||||
23 | 23 | | |||
24 | struct KReportPageSizeInfo { | 24 | struct KReportPageSizeInfo { | ||
25 | const char *name; | 25 | const char *name; | ||
26 | struct { const char *source; const char *comment; } description; | 26 | struct { const char *source; const char *comment; } description; | ||
27 | QPageSize::PageSizeId pageSize; | 27 | QPageSize::PageSizeId pageSize; | ||
28 | }; | 28 | }; | ||
29 | 29 | | |||
30 | static const KReportPageSizeInfo pageSizeInfo[] = { | 30 | static const KReportPageSizeInfo pageSizeInfo[] = { | ||
31 | { "A3", QT_TRANSLATE_NOOP3("KReportPageFormat", "A3", ""), QPageSize::A3}, | 31 | { "A3", QT_TRANSLATE_NOOP3("KReportPageFormat", "A3", ""), QPageSize::A3}, | ||
32 | { "A4", QT_TRANSLATE_NOOP3("KReportPageFormat", "A4", ""), QPageSize::A4}, | 32 | { "A4", QT_TRANSLATE_NOOP3("KReportPageFormat", "A4", ""), QPageSize::A4}, | ||
33 | { "A5", QT_TRANSLATE_NOOP3("KReportPageFormat", "A5", ""), QPageSize::A5}, | 33 | { "A5", QT_TRANSLATE_NOOP3("KReportPageFormat", "A5", ""), QPageSize::A5}, | ||
34 | { "Letter", QT_TRANSLATE_NOOP3("KReportPageFormat", "US Letter", | 34 | { "Letter", QT_TRANSLATE_NOOP3("KReportPageFormat", "US Letter", | ||
35 | "Usually don't translate literally, use \"US Letter\""), | 35 | "Usually don't translate literally, use \"US Letter\""), | ||
36 | QPageSize::Letter}, | 36 | QPageSize::Letter}, | ||
37 | { "Legal", QT_TRANSLATE_NOOP3("KReportPageFormat", "US Legal", | 37 | { "Legal", QT_TRANSLATE_NOOP3("KReportPageFormat", "US Legal", | ||
38 | "Usually don't translate literally, use \"US Legal\""), | 38 | "Usually don't translate literally, use \"US Legal\""), | ||
39 | QPageSize::Legal}, | 39 | QPageSize::Legal}, | ||
40 | { "Screen", QT_TRANSLATE_NOOP3("KReportPageFormat", "Screen", ""), QPageSize::A4}, | | |||
41 | { "Custom", QT_TRANSLATE_NOOP3("KReportPageFormat", "Custom", ""), QPageSize::Custom}, | 40 | { "Custom", QT_TRANSLATE_NOOP3("KReportPageFormat", "Custom", ""), QPageSize::Custom}, | ||
staniek: Planned to mention this before: screen is not something intuitive, how about removing it? | |||||
41 | { "B6", QT_TRANSLATE_NOOP3("KReportPageFormat", "B6", ""), QPageSize::B6}, | ||||
staniek: B6
B5
B4
(proposal) | |||||
42 | { "B5", QT_TRANSLATE_NOOP3("KReportPageFormat", "B5", ""), QPageSize::B5}, | ||||
43 | { "B4", QT_TRANSLATE_NOOP3("KReportPageFormat", "B4", ""), QPageSize::B4}, | ||||
44 | { "Executive", QT_TRANSLATE_NOOP3("KReportPageFormat", "Executive", ""), QPageSize::Executive}, | ||||
45 | { "A0", QT_TRANSLATE_NOOP3("KReportPageFormat", "A0", ""), QPageSize::A0}, | ||||
46 | { "A1", QT_TRANSLATE_NOOP3("KReportPageFormat", "A1", ""), QPageSize::A1}, | ||||
47 | { "A2", QT_TRANSLATE_NOOP3("KReportPageFormat", "A2", ""), QPageSize::A2}, | ||||
48 | { "A6", QT_TRANSLATE_NOOP3("KReportPageFormat", "A6", ""), QPageSize::A6}, | ||||
49 | { "A7", QT_TRANSLATE_NOOP3("KReportPageFormat", "A7", ""), QPageSize::A7}, | ||||
50 | { "A8", QT_TRANSLATE_NOOP3("KReportPageFormat", "A8", ""), QPageSize::A8}, | ||||
51 | { "A9", QT_TRANSLATE_NOOP3("KReportPageFormat", "A9", ""), QPageSize::A9}, | ||||
52 | { "B0", QT_TRANSLATE_NOOP3("KReportPageFormat", "B0", ""), QPageSize::B0}, | ||||
53 | { "B1", QT_TRANSLATE_NOOP3("KReportPageFormat", "B1", ""), QPageSize::B1}, | ||||
54 | { "B10", QT_TRANSLATE_NOOP3("KReportPageFormat", "B10", ""), QPageSize::B10}, | ||||
55 | { "B2", QT_TRANSLATE_NOOP3("KReportPageFormat", "B2", ""), QPageSize::B2}, | ||||
56 | { "B3", QT_TRANSLATE_NOOP3("KReportPageFormat", "B3", ""), QPageSize::B3}, | ||||
57 | { "C5E", QT_TRANSLATE_NOOP3("KReportPageFormat", "C5E", ""), QPageSize::C5E}, | ||||
58 | { "Comm10", QT_TRANSLATE_NOOP3("KReportPageFormat", "Comm10", ""), QPageSize::Comm10E}, | ||||
59 | { "DL", QT_TRANSLATE_NOOP3("KReportPageFormat", "ISO DL", ""), QPageSize::DLE}, | ||||
60 | { "Folio", QT_TRANSLATE_NOOP3("KReportPageFormat", "US Folio", ""), QPageSize::Folio}, | ||||
61 | { "Ledger", QT_TRANSLATE_NOOP3("KReportPageFormat", "US Ledger", ""), QPageSize::Ledger}, | ||||
62 | { "Tabloid", QT_TRANSLATE_NOOP3("KReportPageFormat", "US Tabloid", ""), QPageSize::Tabloid}, | ||||
63 | { "EnvelopeDL", QT_TRANSLATE_NOOP3("KReportPageFormat", "DL Envelope", ""), QPageSize::EnvelopeDL}, | ||||
64 | { "EnvelopeC6", QT_TRANSLATE_NOOP3("KReportPageFormat", "C6 Envelope", ""), QPageSize::EnvelopeC6}, | ||||
65 | { "EnvelopeC65", QT_TRANSLATE_NOOP3("KReportPageFormat", "C6/5 Envolope", ""), QPageSize::EnvelopeC65}, | ||||
66 | { "EnvelopeC5", QT_TRANSLATE_NOOP3("KReportPageFormat", "C5 Envelope", ""), QPageSize::EnvelopeC5}, | ||||
67 | { "EnvelopeC4", QT_TRANSLATE_NOOP3("KReportPageFormat", "C4 Envelope", ""), QPageSize::EnvelopeC4}, | ||||
68 | { "EnvelopeMonarch", QT_TRANSLATE_NOOP3("KReportPageFormat", "Monarch Envelope", ""), QPageSize::EnvelopeMonarch}, | ||||
69 | { "EnvelopePersonal", QT_TRANSLATE_NOOP3("KReportPageFormat", "Personal Envelope", ""), QPageSize::EnvelopePersonal}, | ||||
70 | { "Envelope9", QT_TRANSLATE_NOOP3("KReportPageFormat", "9 Envelope", ""), QPageSize::Envelope9}, | ||||
71 | { "Envelope10", QT_TRANSLATE_NOOP3("KReportPageFormat", "10 Envelope", ""), QPageSize::Envelope10}, | ||||
72 | { "Envelope11", QT_TRANSLATE_NOOP3("KReportPageFormat", "11 Envelope", ""), QPageSize::Envelope11}, | ||||
73 | { "Envelope12", QT_TRANSLATE_NOOP3("KReportPageFormat", "12 Envelope", ""), QPageSize::Envelope12}, | ||||
74 | { "Postcard", QT_TRANSLATE_NOOP3("KReportPageFormat", "Postcard", ""), QPageSize::Postcard}, | ||||
75 | { "DoublePostcard", QT_TRANSLATE_NOOP3("KReportPageFormat", "Double Postcard", ""), QPageSize::DoublePostcard}, | ||||
76 | | ||||
42 | { "", {"", ""}, QPageSize::LastPageSize} | 77 | { "", {"", ""}, QPageSize::LastPageSize} | ||
staniek: Calligra has no envelope types, Qt has, and our users may need it. How about appending… | |||||
43 | 78 | | |||
44 | }; | 79 | }; | ||
45 | 80 | | |||
46 | QStringList KReportPageSize::pageFormatNames() | 81 | QStringList KReportPageSize::pageFormatNames() | ||
47 | { | 82 | { | ||
48 | QStringList lst; | 83 | QStringList lst; | ||
49 | for (int i = 0; pageSizeInfo[i].pageSize != QPageSize::LastPageSize ;i++) { | 84 | for (int i = 0; pageSizeInfo[i].pageSize != QPageSize::LastPageSize ;i++) { | ||
50 | lst << QCoreApplication::translate("KReportPageFormat", | 85 | lst << QCoreApplication::translate("KReportPageFormat", | ||
▲ Show 20 Lines • Show All 44 Lines • Show Last 20 Lines |
Planned to mention this before: screen is not something intuitive, how about removing it?
That's true, unlike LO Writer, LO Impress has Screen 4:3 and other sizes because Screen is the target medium for presentations.
For us it can be too but it's not clear what orientation and what screen do we mean. Power users have custom size to easily apply screen geometry if really needed.