1// qmargins.sip generated by MetaSIP
2//
3// This file is part of the QtCore Python extension module.
4//
5// Copyright (c) 2021 Riverbank Computing Limited <info@riverbankcomputing.com>
6//
7// This file is part of PyQt5.
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
22
23class QMargins
24{
25%TypeHeaderCode
26#include <qmargins.h>
27%End
28
29public:
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%If (Qt_5_1_0 -)
42    QMargins &operator+=(const QMargins &margins);
43%End
44%If (Qt_5_1_0 -)
45    QMargins &operator-=(const QMargins &margins);
46%End
47%If (Qt_5_1_0 -)
48    QMargins &operator*=(int factor /Constrained/);
49%End
50%If (Qt_5_1_0 -)
51    QMargins &operator/=(int divisor /Constrained/);
52%End
53%If (Qt_5_1_0 -)
54    QMargins &operator*=(qreal factor);
55%End
56%If (Qt_5_1_0 -)
57    QMargins &operator/=(qreal divisor);
58%End
59%If (Qt_5_2_0 -)
60    QMargins &operator+=(int margin);
61%End
62%If (Qt_5_2_0 -)
63    QMargins &operator-=(int margin);
64%End
65};
66
67bool operator==(const QMargins &m1, const QMargins &m2);
68bool operator!=(const QMargins &m1, const QMargins &m2);
69QDataStream &operator<<(QDataStream &, const QMargins & /Constrained/) /ReleaseGIL/;
70QDataStream &operator>>(QDataStream &, QMargins & /Constrained/) /ReleaseGIL/;
71%If (Qt_5_1_0 - Qt_5_3_0)
72QRect operator+(const QRect &rectangle, const QMargins &margins);
73%End
74%If (Qt_5_1_0 - Qt_5_3_0)
75QRect operator+(const QMargins &margins, const QRect &rectangle);
76%End
77%If (Qt_5_1_0 -)
78QMargins operator+(const QMargins &m1, const QMargins &m2);
79%End
80%If (Qt_5_1_0 -)
81QMargins operator-(const QMargins &m1, const QMargins &m2);
82%End
83%If (Qt_5_1_0 -)
84QMargins operator*(const QMargins &margins, int factor /Constrained/);
85%End
86%If (Qt_5_1_0 -)
87QMargins operator*(const QMargins &margins, qreal factor);
88%End
89%If (Qt_5_1_0 -)
90QMargins operator/(const QMargins &margins, int divisor /Constrained/);
91%End
92%If (Qt_5_1_0 -)
93QMargins operator/(const QMargins &margins, qreal divisor);
94%End
95%If (Qt_5_1_0 -)
96QMargins operator-(const QMargins &margins);
97%End
98%If (Qt_5_3_0 -)
99QMargins operator+(const QMargins &lhs, int rhs);
100%End
101%If (Qt_5_3_0 -)
102QMargins operator+(int lhs, const QMargins &rhs);
103%End
104%If (Qt_5_3_0 -)
105QMargins operator-(const QMargins &lhs, int rhs);
106%End
107%If (Qt_5_3_0 -)
108QMargins operator+(const QMargins &margins);
109%End
110%If (Qt_5_3_0 -)
111
112class QMarginsF
113{
114%TypeHeaderCode
115#include <qmargins.h>
116%End
117
118public:
119    QMarginsF();
120    QMarginsF(qreal aleft, qreal atop, qreal aright, qreal abottom);
121    QMarginsF(const QMargins &margins);
122    bool isNull() const;
123    qreal left() const;
124    qreal top() const;
125    qreal right() const;
126    qreal bottom() const;
127    void setLeft(qreal aleft);
128    void setTop(qreal atop);
129    void setRight(qreal aright);
130    void setBottom(qreal abottom);
131    QMarginsF &operator+=(const QMarginsF &margins);
132    QMarginsF &operator-=(const QMarginsF &margins);
133    QMarginsF &operator+=(qreal addend);
134    QMarginsF &operator-=(qreal subtrahend);
135    QMarginsF &operator*=(qreal factor);
136    QMarginsF &operator/=(qreal divisor);
137    QMargins toMargins() const;
138};
139
140%End
141%If (Qt_5_3_0 -)
142QDataStream &operator<<(QDataStream &, const QMarginsF & /Constrained/);
143%End
144%If (Qt_5_3_0 -)
145QDataStream &operator>>(QDataStream &, QMarginsF & /Constrained/);
146%End
147%If (Qt_5_3_0 -)
148bool operator==(const QMarginsF &lhs, const QMarginsF &rhs);
149%End
150%If (Qt_5_3_0 -)
151bool operator!=(const QMarginsF &lhs, const QMarginsF &rhs);
152%End
153%If (Qt_5_3_0 -)
154QMarginsF operator+(const QMarginsF &lhs, const QMarginsF &rhs);
155%End
156%If (Qt_5_3_0 -)
157QMarginsF operator-(const QMarginsF &lhs, const QMarginsF &rhs);
158%End
159%If (Qt_5_3_0 -)
160QMarginsF operator+(const QMarginsF &lhs, qreal rhs);
161%End
162%If (Qt_5_3_0 -)
163QMarginsF operator+(qreal lhs, const QMarginsF &rhs);
164%End
165%If (Qt_5_3_0 -)
166QMarginsF operator-(const QMarginsF &lhs, qreal rhs);
167%End
168%If (Qt_5_3_0 -)
169QMarginsF operator*(const QMarginsF &lhs, qreal rhs);
170%End
171%If (Qt_5_3_0 -)
172QMarginsF operator*(qreal lhs, const QMarginsF &rhs);
173%End
174%If (Qt_5_3_0 -)
175QMarginsF operator/(const QMarginsF &lhs, qreal divisor);
176%End
177%If (Qt_5_3_0 -)
178QMarginsF operator+(const QMarginsF &margins);
179%End
180%If (Qt_5_3_0 -)
181QMarginsF operator-(const QMarginsF &margins);
182%End
183