qmargins.sip 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. // qmargins.sip generated by MetaSIP
  2. //
  3. // This file is part of the QtCore 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. %ModuleCode
  22. #include <qmargins.h>
  23. %End
  24. class QMargins
  25. {
  26. %TypeHeaderCode
  27. #include <qmargins.h>
  28. %End
  29. public:
  30. QMargins();
  31. QMargins(int aleft, int atop, int aright, int abottom);
  32. bool isNull() const;
  33. int left() const;
  34. int top() const;
  35. int right() const;
  36. int bottom() const;
  37. void setLeft(int aleft);
  38. void setTop(int atop);
  39. void setRight(int aright);
  40. void setBottom(int abottom);
  41. QMargins &operator+=(const QMargins &margins);
  42. QMargins &operator-=(const QMargins &margins);
  43. QMargins &operator*=(int factor /Constrained/);
  44. QMargins &operator/=(int divisor /Constrained/);
  45. QMargins &operator*=(qreal factor);
  46. QMargins &operator/=(qreal divisor);
  47. QMargins &operator+=(int margin);
  48. QMargins &operator-=(int margin);
  49. %If (Qt_6_4_0 -)
  50. QMarginsF toMarginsF() const;
  51. %End
  52. };
  53. %If (Qt_6_8_0 -)
  54. bool operator==(const QMarginsF &lhs, const QMargins &rhs);
  55. %End
  56. %If (Qt_6_8_0 -)
  57. bool operator==(const QMargins &lhs, const QMarginsF &rhs);
  58. %End
  59. bool operator==(const QMargins &m1, const QMargins &m2);
  60. %If (Qt_6_8_0 -)
  61. bool operator!=(const QMarginsF &lhs, const QMargins &rhs);
  62. %End
  63. %If (Qt_6_8_0 -)
  64. bool operator!=(const QMargins &lhs, const QMarginsF &rhs);
  65. %End
  66. bool operator!=(const QMargins &m1, const QMargins &m2);
  67. QDataStream &operator<<(QDataStream &, const QMargins & /Constrained/) /ReleaseGIL/;
  68. QDataStream &operator>>(QDataStream &, QMargins & /Constrained/) /ReleaseGIL/;
  69. QMargins operator+(const QMargins &m1, const QMargins &m2);
  70. QMargins operator-(const QMargins &m1, const QMargins &m2);
  71. QMargins operator*(const QMargins &margins, int factor /Constrained/);
  72. QMargins operator*(const QMargins &margins, qreal factor);
  73. QMargins operator/(const QMargins &margins, int divisor /Constrained/);
  74. QMargins operator/(const QMargins &margins, qreal divisor);
  75. QMargins operator+(const QMargins &lhs, int rhs);
  76. QMargins operator+(int lhs, const QMargins &rhs);
  77. QMargins operator-(const QMargins &lhs, int rhs);
  78. QMargins operator+(const QMargins &margins);
  79. QMargins operator-(const QMargins &margins);
  80. QMargins operator|(const QMargins &m1, const QMargins &m2);
  81. class QMarginsF
  82. {
  83. %TypeHeaderCode
  84. #include <qmargins.h>
  85. %End
  86. public:
  87. QMarginsF();
  88. QMarginsF(qreal aleft, qreal atop, qreal aright, qreal abottom);
  89. QMarginsF(const QMargins &margins);
  90. bool isNull() const;
  91. qreal left() const;
  92. qreal top() const;
  93. qreal right() const;
  94. qreal bottom() const;
  95. void setLeft(qreal aleft);
  96. void setTop(qreal atop);
  97. void setRight(qreal aright);
  98. void setBottom(qreal abottom);
  99. QMarginsF &operator+=(const QMarginsF &margins);
  100. QMarginsF &operator-=(const QMarginsF &margins);
  101. QMarginsF &operator+=(qreal addend);
  102. QMarginsF &operator-=(qreal subtrahend);
  103. QMarginsF &operator*=(qreal factor);
  104. QMarginsF &operator/=(qreal divisor);
  105. QMargins toMargins() const;
  106. };
  107. QDataStream &operator<<(QDataStream &, const QMarginsF & /Constrained/);
  108. QDataStream &operator>>(QDataStream &, QMarginsF & /Constrained/);
  109. bool operator==(const QMarginsF &lhs, const QMarginsF &rhs);
  110. bool operator!=(const QMarginsF &lhs, const QMarginsF &rhs);
  111. QMarginsF operator+(const QMarginsF &lhs, const QMarginsF &rhs);
  112. QMarginsF operator-(const QMarginsF &lhs, const QMarginsF &rhs);
  113. QMarginsF operator+(const QMarginsF &lhs, qreal rhs);
  114. QMarginsF operator+(qreal lhs, const QMarginsF &rhs);
  115. QMarginsF operator-(const QMarginsF &lhs, qreal rhs);
  116. QMarginsF operator*(const QMarginsF &lhs, qreal rhs);
  117. QMarginsF operator*(qreal lhs, const QMarginsF &rhs);
  118. QMarginsF operator/(const QMarginsF &lhs, qreal divisor);
  119. QMarginsF operator+(const QMarginsF &margins);
  120. QMarginsF operator-(const QMarginsF &margins);
  121. QMarginsF operator|(const QMarginsF &m1, const QMarginsF &m2);
  122. %If (Qt_6_8_0 -)
  123. bool qFuzzyCompare(const QMarginsF &lhs, const QMarginsF &rhs);
  124. %End
  125. %If (Qt_6_8_0 -)
  126. bool qFuzzyIsNull(const QMarginsF &m);
  127. %End