qpagesize.sip 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216
  1. // qpagesize.sip generated by MetaSIP
  2. //
  3. // This file is part of the QtGui Python extension module.
  4. //
  5. // Copyright (c) 2026 Riverbank Computing Limited <info@riverbankcomputing.com>
  6. //
  7. // This file is part of PyQt6.
  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. class QPageSize
  22. {
  23. %TypeHeaderCode
  24. #include <qpagesize.h>
  25. %End
  26. public:
  27. enum PageSizeId
  28. {
  29. A4,
  30. B5,
  31. Letter,
  32. Legal,
  33. Executive,
  34. A0,
  35. A1,
  36. A2,
  37. A3,
  38. A5,
  39. A6,
  40. A7,
  41. A8,
  42. A9,
  43. B0,
  44. B1,
  45. B10,
  46. B2,
  47. B3,
  48. B4,
  49. B6,
  50. B7,
  51. B8,
  52. B9,
  53. C5E,
  54. Comm10E,
  55. DLE,
  56. Folio,
  57. Ledger,
  58. Tabloid,
  59. Custom,
  60. A10,
  61. A3Extra,
  62. A4Extra,
  63. A4Plus,
  64. A4Small,
  65. A5Extra,
  66. B5Extra,
  67. JisB0,
  68. JisB1,
  69. JisB2,
  70. JisB3,
  71. JisB4,
  72. JisB5,
  73. JisB6,
  74. JisB7,
  75. JisB8,
  76. JisB9,
  77. JisB10,
  78. AnsiC,
  79. AnsiD,
  80. AnsiE,
  81. LegalExtra,
  82. LetterExtra,
  83. LetterPlus,
  84. LetterSmall,
  85. TabloidExtra,
  86. ArchA,
  87. ArchB,
  88. ArchC,
  89. ArchD,
  90. ArchE,
  91. Imperial7x9,
  92. Imperial8x10,
  93. Imperial9x11,
  94. Imperial9x12,
  95. Imperial10x11,
  96. Imperial10x13,
  97. Imperial10x14,
  98. Imperial12x11,
  99. Imperial15x11,
  100. ExecutiveStandard,
  101. Note,
  102. Quarto,
  103. Statement,
  104. SuperA,
  105. SuperB,
  106. Postcard,
  107. DoublePostcard,
  108. Prc16K,
  109. Prc32K,
  110. Prc32KBig,
  111. FanFoldUS,
  112. FanFoldGerman,
  113. FanFoldGermanLegal,
  114. EnvelopeB4,
  115. EnvelopeB5,
  116. EnvelopeB6,
  117. EnvelopeC0,
  118. EnvelopeC1,
  119. EnvelopeC2,
  120. EnvelopeC3,
  121. EnvelopeC4,
  122. EnvelopeC6,
  123. EnvelopeC65,
  124. EnvelopeC7,
  125. Envelope9,
  126. Envelope11,
  127. Envelope12,
  128. Envelope14,
  129. EnvelopeMonarch,
  130. EnvelopePersonal,
  131. EnvelopeChou3,
  132. EnvelopeChou4,
  133. EnvelopeInvite,
  134. EnvelopeItalian,
  135. EnvelopeKaku2,
  136. EnvelopeKaku3,
  137. EnvelopePrc1,
  138. EnvelopePrc2,
  139. EnvelopePrc3,
  140. EnvelopePrc4,
  141. EnvelopePrc5,
  142. EnvelopePrc6,
  143. EnvelopePrc7,
  144. EnvelopePrc8,
  145. EnvelopePrc9,
  146. EnvelopePrc10,
  147. EnvelopeYou4,
  148. AnsiA,
  149. AnsiB,
  150. EnvelopeC5,
  151. EnvelopeDL,
  152. Envelope10,
  153. LastPageSize,
  154. };
  155. enum Unit
  156. {
  157. Millimeter,
  158. Point,
  159. Inch,
  160. Pica,
  161. Didot,
  162. Cicero,
  163. };
  164. enum SizeMatchPolicy
  165. {
  166. FuzzyMatch,
  167. FuzzyOrientationMatch,
  168. ExactMatch,
  169. };
  170. QPageSize();
  171. %If (Qt_6_2_0 -)
  172. QPageSize(QPageSize::PageSizeId pageSizeId);
  173. %End
  174. %If (- Qt_6_2_0)
  175. explicit QPageSize(QPageSize::PageSizeId pageSizeId);
  176. %End
  177. QPageSize(const QSize &pointSize, const QString &name = QString(), QPageSize::SizeMatchPolicy matchPolicy = QPageSize::FuzzyMatch);
  178. QPageSize(const QSizeF &size, QPageSize::Unit units, const QString &name = QString(), QPageSize::SizeMatchPolicy matchPolicy = QPageSize::FuzzyMatch);
  179. QPageSize(const QPageSize &other);
  180. ~QPageSize();
  181. void swap(QPageSize &other /Constrained/);
  182. bool isEquivalentTo(const QPageSize &other) const;
  183. bool isValid() const;
  184. QString key() const;
  185. QString name() const;
  186. QPageSize::PageSizeId id() const;
  187. int windowsId() const;
  188. QSizeF definitionSize() const;
  189. QPageSize::Unit definitionUnits() const;
  190. QSizeF size(QPageSize::Unit units) const;
  191. QSize sizePoints() const;
  192. QSize sizePixels(int resolution) const;
  193. QRectF rect(QPageSize::Unit units) const;
  194. QRect rectPoints() const;
  195. QRect rectPixels(int resolution) const;
  196. static QString key(QPageSize::PageSizeId pageSizeId);
  197. static QString name(QPageSize::PageSizeId pageSizeId);
  198. static QPageSize::PageSizeId id(const QSize &pointSize, QPageSize::SizeMatchPolicy matchPolicy = QPageSize::FuzzyMatch);
  199. static QPageSize::PageSizeId id(const QSizeF &size, QPageSize::Unit units, QPageSize::SizeMatchPolicy matchPolicy = QPageSize::FuzzyMatch);
  200. static QPageSize::PageSizeId id(int windowsId);
  201. static int windowsId(QPageSize::PageSizeId pageSizeId);
  202. static QSizeF definitionSize(QPageSize::PageSizeId pageSizeId);
  203. static QPageSize::Unit definitionUnits(QPageSize::PageSizeId pageSizeId);
  204. static QSizeF size(QPageSize::PageSizeId pageSizeId, QPageSize::Unit units);
  205. static QSize sizePoints(QPageSize::PageSizeId pageSizeId);
  206. static QSize sizePixels(QPageSize::PageSizeId pageSizeId, int resolution);
  207. };
  208. bool operator==(const QPageSize &lhs, const QPageSize &rhs);
  209. bool operator!=(const QPageSize &lhs, const QPageSize &rhs);