qpagelayout.sip 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. // qpagelayout.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 QPageLayout
  22. {
  23. %TypeHeaderCode
  24. #include <qpagelayout.h>
  25. %End
  26. public:
  27. enum Unit
  28. {
  29. Millimeter,
  30. Point,
  31. Inch,
  32. Pica,
  33. Didot,
  34. Cicero,
  35. };
  36. enum Orientation
  37. {
  38. Portrait,
  39. Landscape,
  40. };
  41. enum Mode
  42. {
  43. StandardMode,
  44. FullPageMode,
  45. };
  46. %If (Qt_6_8_0 -)
  47. enum class OutOfBoundsPolicy
  48. {
  49. Reject,
  50. Clamp,
  51. };
  52. %End
  53. QPageLayout();
  54. QPageLayout(const QPageSize &pageSize, QPageLayout::Orientation orientation, const QMarginsF &margins, QPageLayout::Unit units = QPageLayout::Point, const QMarginsF &minMargins = QMarginsF(0, 0, 0, 0));
  55. QPageLayout(const QPageLayout &other);
  56. ~QPageLayout();
  57. void swap(QPageLayout &other /Constrained/);
  58. bool isEquivalentTo(const QPageLayout &other) const;
  59. bool isValid() const;
  60. void setMode(QPageLayout::Mode mode);
  61. QPageLayout::Mode mode() const;
  62. void setPageSize(const QPageSize &pageSize, const QMarginsF &minMargins = QMarginsF(0, 0, 0, 0));
  63. QPageSize pageSize() const;
  64. void setOrientation(QPageLayout::Orientation orientation);
  65. QPageLayout::Orientation orientation() const;
  66. void setUnits(QPageLayout::Unit units);
  67. QPageLayout::Unit units() const;
  68. %If (Qt_6_8_0 -)
  69. bool setMargins(const QMarginsF &margins, QPageLayout::OutOfBoundsPolicy outOfBoundsPolicy = QPageLayout::OutOfBoundsPolicy::Reject);
  70. %End
  71. %If (- Qt_6_8_0)
  72. bool setMargins(const QMarginsF &margins);
  73. %End
  74. %If (Qt_6_8_0 -)
  75. bool setLeftMargin(qreal leftMargin, QPageLayout::OutOfBoundsPolicy outOfBoundsPolicy = QPageLayout::OutOfBoundsPolicy::Reject);
  76. %End
  77. %If (- Qt_6_8_0)
  78. bool setLeftMargin(qreal leftMargin);
  79. %End
  80. %If (Qt_6_8_0 -)
  81. bool setRightMargin(qreal rightMargin, QPageLayout::OutOfBoundsPolicy outOfBoundsPolicy = QPageLayout::OutOfBoundsPolicy::Reject);
  82. %End
  83. %If (- Qt_6_8_0)
  84. bool setRightMargin(qreal rightMargin);
  85. %End
  86. %If (Qt_6_8_0 -)
  87. bool setTopMargin(qreal topMargin, QPageLayout::OutOfBoundsPolicy outOfBoundsPolicy = QPageLayout::OutOfBoundsPolicy::Reject);
  88. %End
  89. %If (- Qt_6_8_0)
  90. bool setTopMargin(qreal topMargin);
  91. %End
  92. %If (Qt_6_8_0 -)
  93. bool setBottomMargin(qreal bottomMargin, QPageLayout::OutOfBoundsPolicy outOfBoundsPolicy = QPageLayout::OutOfBoundsPolicy::Reject);
  94. %End
  95. %If (- Qt_6_8_0)
  96. bool setBottomMargin(qreal bottomMargin);
  97. %End
  98. QMarginsF margins() const;
  99. QMarginsF margins(QPageLayout::Unit units) const;
  100. QMargins marginsPoints() const;
  101. QMargins marginsPixels(int resolution) const;
  102. void setMinimumMargins(const QMarginsF &minMargins);
  103. QMarginsF minimumMargins() const;
  104. QMarginsF maximumMargins() const;
  105. QRectF fullRect() const;
  106. QRectF fullRect(QPageLayout::Unit units) const;
  107. QRect fullRectPoints() const;
  108. QRect fullRectPixels(int resolution) const;
  109. QRectF paintRect() const;
  110. QRectF paintRect(QPageLayout::Unit units) const;
  111. QRect paintRectPoints() const;
  112. QRect paintRectPixels(int resolution) const;
  113. };
  114. bool operator==(const QPageLayout &lhs, const QPageLayout &rhs);
  115. bool operator!=(const QPageLayout &lhs, const QPageLayout &rhs);