Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qmargins.h
Go to the documentation of this file.
1// Copyright (C) 2022 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QMARGINS_H
5#define QMARGINS_H
6
7#include <QtCore/qcompare.h>
8#include <QtCore/qnamespace.h>
9
10#include <QtCore/q20type_traits.h>
11#include <QtCore/q23utility.h>
12
13QT_BEGIN_NAMESPACE
14
15QT_ENABLE_P0846_SEMANTICS_FOR(get)
16
17class QMarginsF;
18
19/*****************************************************************************
20 QMargins class
21 *****************************************************************************/
22
24{
25public:
26 constexpr QMargins() noexcept;
27 constexpr QMargins(int left, int top, int right, int bottom) noexcept;
28
29 constexpr bool isNull() const noexcept;
30
31 constexpr int left() const noexcept;
32 constexpr int top() const noexcept;
33 constexpr int right() const noexcept;
34 constexpr int bottom() const noexcept;
35
36 constexpr void setLeft(int left) noexcept;
37 constexpr void setTop(int top) noexcept;
38 constexpr void setRight(int right) noexcept;
39 constexpr void setBottom(int bottom) noexcept;
40
41 constexpr QMargins &operator+=(const QMargins &margins) noexcept;
42 constexpr QMargins &operator-=(const QMargins &margins) noexcept;
43 constexpr QMargins &operator+=(int) noexcept;
44 constexpr QMargins &operator-=(int) noexcept;
45 constexpr QMargins &operator*=(int) noexcept;
46 constexpr QMargins &operator/=(int);
47 constexpr QMargins &operator*=(qreal) noexcept;
48 constexpr QMargins &operator/=(qreal);
49
50 [[nodiscard]] constexpr inline QMarginsF toMarginsF() const noexcept;
51
52private:
53 int m_left;
54 int m_top;
55 int m_right;
56 int m_bottom;
57
58 friend constexpr bool comparesEqual(const QMargins &lhs, const QMargins &rhs) noexcept
59 {
60 return lhs.m_left == rhs.m_left
61 && lhs.m_top == rhs.m_top
62 && lhs.m_right == rhs.m_right
63 && lhs.m_bottom == rhs.m_bottom;
64 }
66
67 template <std::size_t I,
68 typename M,
69 std::enable_if_t<(I < 4), bool> = true,
71 friend constexpr decltype(auto) get(M &&m) noexcept
72 {
73 if constexpr (I == 0)
74 return q23::forward_like<M>(m.m_left);
75 else if constexpr (I == 1)
76 return q23::forward_like<M>(m.m_top);
77 else if constexpr (I == 2)
78 return q23::forward_like<M>(m.m_right);
79 else if constexpr (I == 3)
80 return q23::forward_like<M>(m.m_bottom);
81 }
82};
83
85
86/*****************************************************************************
87 QMargins stream functions
88 *****************************************************************************/
89#ifndef QT_NO_DATASTREAM
90Q_CORE_EXPORT QDataStream &operator<<(QDataStream &, const QMargins &);
91Q_CORE_EXPORT QDataStream &operator>>(QDataStream &, QMargins &);
92#endif
93
94/*****************************************************************************
95 QMargins inline functions
96 *****************************************************************************/
97
98constexpr inline QMargins::QMargins() noexcept : m_left(0), m_top(0), m_right(0), m_bottom(0) {}
99
100constexpr inline QMargins::QMargins(int aleft, int atop, int aright, int abottom) noexcept
101 : m_left(aleft), m_top(atop), m_right(aright), m_bottom(abottom) {}
102
103constexpr inline bool QMargins::isNull() const noexcept
104{ return m_left==0 && m_top==0 && m_right==0 && m_bottom==0; }
105
106constexpr inline int QMargins::left() const noexcept
107{ return m_left; }
108
109constexpr inline int QMargins::top() const noexcept
110{ return m_top; }
111
112constexpr inline int QMargins::right() const noexcept
113{ return m_right; }
114
115constexpr inline int QMargins::bottom() const noexcept
116{ return m_bottom; }
117
118
119constexpr inline void QMargins::setLeft(int aleft) noexcept
120{ m_left = aleft; }
121
122constexpr inline void QMargins::setTop(int atop) noexcept
123{ m_top = atop; }
124
125constexpr inline void QMargins::setRight(int aright) noexcept
126{ m_right = aright; }
127
128constexpr inline void QMargins::setBottom(int abottom) noexcept
129{ m_bottom = abottom; }
130
131constexpr inline QMargins operator+(const QMargins &m1, const QMargins &m2) noexcept
132{
133 return QMargins(m1.left() + m2.left(), m1.top() + m2.top(),
135}
136
137constexpr inline QMargins operator-(const QMargins &m1, const QMargins &m2) noexcept
138{
139 return QMargins(m1.left() - m2.left(), m1.top() - m2.top(),
141}
142
143constexpr inline QMargins operator+(const QMargins &lhs, int rhs) noexcept
144{
145 return QMargins(lhs.left() + rhs, lhs.top() + rhs,
146 lhs.right() + rhs, lhs.bottom() + rhs);
147}
148
149constexpr inline QMargins operator+(int lhs, const QMargins &rhs) noexcept
150{
151 return QMargins(rhs.left() + lhs, rhs.top() + lhs,
152 rhs.right() + lhs, rhs.bottom() + lhs);
153}
154
155constexpr inline QMargins operator-(const QMargins &lhs, int rhs) noexcept
156{
157 return QMargins(lhs.left() - rhs, lhs.top() - rhs,
158 lhs.right() - rhs, lhs.bottom() - rhs);
159}
160
161constexpr inline QMargins operator*(const QMargins &margins, int factor) noexcept
162{
163 return QMargins(margins.left() * factor, margins.top() * factor,
164 margins.right() * factor, margins.bottom() * factor);
165}
166
167constexpr inline QMargins operator*(int factor, const QMargins &margins) noexcept
168{
169 return QMargins(margins.left() * factor, margins.top() * factor,
170 margins.right() * factor, margins.bottom() * factor);
171}
172
173constexpr inline QMargins operator*(const QMargins &margins, qreal factor) noexcept
174{
175 return QMargins(qRound(margins.left() * factor), qRound(margins.top() * factor),
176 qRound(margins.right() * factor), qRound(margins.bottom() * factor));
177}
178
179constexpr inline QMargins operator*(qreal factor, const QMargins &margins) noexcept
180{
181 return QMargins(qRound(margins.left() * factor), qRound(margins.top() * factor),
182 qRound(margins.right() * factor), qRound(margins.bottom() * factor));
183}
184
185constexpr inline QMargins operator/(const QMargins &margins, int divisor)
186{
187 return QMargins(margins.left() / divisor, margins.top() / divisor,
188 margins.right() / divisor, margins.bottom() / divisor);
189}
190
191constexpr inline QMargins operator/(const QMargins &margins, qreal divisor)
192{
193 return QMargins(qRound(margins.left() / divisor), qRound(margins.top() / divisor),
194 qRound(margins.right() / divisor), qRound(margins.bottom() / divisor));
195}
196
197constexpr inline QMargins operator|(const QMargins &m1, const QMargins &m2) noexcept
198{
199 return QMargins(qMax(m1.left(), m2.left()), qMax(m1.top(), m2.top()),
200 qMax(m1.right(), m2.right()), qMax(m1.bottom(), m2.bottom()));
201}
202
203constexpr inline QMargins &QMargins::operator+=(const QMargins &margins) noexcept
204{
205 return *this = *this + margins;
206}
207
208constexpr inline QMargins &QMargins::operator-=(const QMargins &margins) noexcept
209{
210 return *this = *this - margins;
211}
212
213constexpr inline QMargins &QMargins::operator+=(int margin) noexcept
214{
215 m_left += margin;
216 m_top += margin;
217 m_right += margin;
218 m_bottom += margin;
219 return *this;
220}
221
222constexpr inline QMargins &QMargins::operator-=(int margin) noexcept
223{
224 m_left -= margin;
225 m_top -= margin;
226 m_right -= margin;
227 m_bottom -= margin;
228 return *this;
229}
230
231constexpr inline QMargins &QMargins::operator*=(int factor) noexcept
232{
233 return *this = *this * factor;
234}
235
236constexpr inline QMargins &QMargins::operator/=(int divisor)
237{
238 return *this = *this / divisor;
239}
240
241constexpr inline QMargins &QMargins::operator*=(qreal factor) noexcept
242{
243 return *this = *this * factor;
244}
245
246constexpr inline QMargins &QMargins::operator/=(qreal divisor)
247{
248 return *this = *this / divisor;
249}
250
251constexpr inline QMargins operator+(const QMargins &margins) noexcept
252{
253 return margins;
254}
255
256constexpr inline QMargins operator-(const QMargins &margins) noexcept
257{
258 return QMargins(-margins.left(), -margins.top(), -margins.right(), -margins.bottom());
259}
260
261#ifndef QT_NO_DEBUG_STREAM
262Q_CORE_EXPORT QDebug operator<<(QDebug, const QMargins &);
263#endif
264
265/*****************************************************************************
266 QMarginsF class
267 *****************************************************************************/
268
270{
271public:
272 constexpr QMarginsF() noexcept;
273 constexpr QMarginsF(qreal left, qreal top, qreal right, qreal bottom) noexcept;
274 constexpr QMarginsF(const QMargins &margins) noexcept;
275
276 constexpr bool isNull() const noexcept;
277
278 constexpr qreal left() const noexcept;
279 constexpr qreal top() const noexcept;
280 constexpr qreal right() const noexcept;
281 constexpr qreal bottom() const noexcept;
282
283 constexpr void setLeft(qreal aleft) noexcept;
284 constexpr void setTop(qreal atop) noexcept;
285 constexpr void setRight(qreal aright) noexcept;
286 constexpr void setBottom(qreal abottom) noexcept;
287
288 constexpr QMarginsF &operator+=(const QMarginsF &margins) noexcept;
289 constexpr QMarginsF &operator-=(const QMarginsF &margins) noexcept;
290 constexpr QMarginsF &operator+=(qreal addend) noexcept;
291 constexpr QMarginsF &operator-=(qreal subtrahend) noexcept;
292 constexpr QMarginsF &operator*=(qreal factor) noexcept;
293 constexpr QMarginsF &operator/=(qreal divisor);
294
295 constexpr inline QMargins toMargins() const noexcept;
296
297private:
298 qreal m_left;
299 qreal m_top;
300 qreal m_right;
301 qreal m_bottom;
302
303 QT_WARNING_PUSH
304 QT_WARNING_DISABLE_FLOAT_COMPARE
317 friend constexpr bool qFuzzyIsNull(const QMarginsF &m) noexcept
318 {
321 }
322
323 friend constexpr bool comparesEqual(const QMarginsF &lhs, const QMarginsF &rhs) noexcept
324 {
325 return qFuzzyCompare(lhs, rhs);
326 }
328
329 friend constexpr bool comparesEqual(const QMarginsF &lhs, const QMargins &rhs) noexcept
330 { return comparesEqual(lhs, rhs.toMarginsF()); }
332
333 template <std::size_t I,
334 typename M,
335 std::enable_if_t<(I < 4), bool> = true,
337 friend constexpr decltype(auto) get(M &&m) noexcept
338 {
339 if constexpr (I == 0)
340 return q23::forward_like<M>(m.m_left);
341 else if constexpr (I == 1)
342 return q23::forward_like<M>(m.m_top);
343 else if constexpr (I == 2)
344 return q23::forward_like<M>(m.m_right);
345 else if constexpr (I == 3)
346 return q23::forward_like<M>(m.m_bottom);
347 }
348};
349
351
352/*****************************************************************************
353 QMarginsF stream functions
354 *****************************************************************************/
355
356#ifndef QT_NO_DATASTREAM
357Q_CORE_EXPORT QDataStream &operator<<(QDataStream &, const QMarginsF &);
358Q_CORE_EXPORT QDataStream &operator>>(QDataStream &, QMarginsF &);
359#endif
360
361/*****************************************************************************
362 QMarginsF inline functions
363 *****************************************************************************/
364
365constexpr inline QMarginsF::QMarginsF() noexcept
366 : m_left(0), m_top(0), m_right(0), m_bottom(0) {}
367
368constexpr inline QMarginsF::QMarginsF(qreal aleft, qreal atop, qreal aright, qreal abottom) noexcept
370
371constexpr inline QMarginsF::QMarginsF(const QMargins &margins) noexcept
373
374constexpr inline bool QMarginsF::isNull() const noexcept
375{ return qFuzzyIsNull(m_left) && qFuzzyIsNull(m_top) && qFuzzyIsNull(m_right) && qFuzzyIsNull(m_bottom); }
376
377constexpr inline qreal QMarginsF::left() const noexcept
378{ return m_left; }
379
380constexpr inline qreal QMarginsF::top() const noexcept
381{ return m_top; }
382
383constexpr inline qreal QMarginsF::right() const noexcept
384{ return m_right; }
385
386constexpr inline qreal QMarginsF::bottom() const noexcept
387{ return m_bottom; }
388
389
390constexpr inline void QMarginsF::setLeft(qreal aleft) noexcept
391{ m_left = aleft; }
392
393constexpr inline void QMarginsF::setTop(qreal atop) noexcept
394{ m_top = atop; }
395
396constexpr inline void QMarginsF::setRight(qreal aright) noexcept
397{ m_right = aright; }
398
399constexpr inline void QMarginsF::setBottom(qreal abottom) noexcept
400{ m_bottom = abottom; }
401
402constexpr inline QMarginsF operator+(const QMarginsF &lhs, const QMarginsF &rhs) noexcept
403{
404 return QMarginsF(lhs.left() + rhs.left(), lhs.top() + rhs.top(),
405 lhs.right() + rhs.right(), lhs.bottom() + rhs.bottom());
406}
407
408constexpr inline QMarginsF operator-(const QMarginsF &lhs, const QMarginsF &rhs) noexcept
409{
410 return QMarginsF(lhs.left() - rhs.left(), lhs.top() - rhs.top(),
411 lhs.right() - rhs.right(), lhs.bottom() - rhs.bottom());
412}
413
414constexpr inline QMarginsF operator+(const QMarginsF &lhs, qreal rhs) noexcept
415{
416 return QMarginsF(lhs.left() + rhs, lhs.top() + rhs,
417 lhs.right() + rhs, lhs.bottom() + rhs);
418}
419
420constexpr inline QMarginsF operator+(qreal lhs, const QMarginsF &rhs) noexcept
421{
422 return QMarginsF(rhs.left() + lhs, rhs.top() + lhs,
423 rhs.right() + lhs, rhs.bottom() + lhs);
424}
425
426constexpr inline QMarginsF operator-(const QMarginsF &lhs, qreal rhs) noexcept
427{
428 return QMarginsF(lhs.left() - rhs, lhs.top() - rhs,
429 lhs.right() - rhs, lhs.bottom() - rhs);
430}
431
432constexpr inline QMarginsF operator*(const QMarginsF &lhs, qreal rhs) noexcept
433{
434 return QMarginsF(lhs.left() * rhs, lhs.top() * rhs,
435 lhs.right() * rhs, lhs.bottom() * rhs);
436}
437
438constexpr inline QMarginsF operator*(qreal lhs, const QMarginsF &rhs) noexcept
439{
440 return QMarginsF(rhs.left() * lhs, rhs.top() * lhs,
441 rhs.right() * lhs, rhs.bottom() * lhs);
442}
443
444constexpr inline QMarginsF operator/(const QMarginsF &lhs, qreal divisor)
445{
446 Q_ASSERT(divisor < 0 || divisor > 0);
447 return QMarginsF(lhs.left() / divisor, lhs.top() / divisor,
448 lhs.right() / divisor, lhs.bottom() / divisor);
449}
450
451constexpr inline QMarginsF operator|(const QMarginsF &m1, const QMarginsF &m2) noexcept
452{
453 return QMarginsF(qMax(m1.left(), m2.left()), qMax(m1.top(), m2.top()),
454 qMax(m1.right(), m2.right()), qMax(m1.bottom(), m2.bottom()));
455}
456
457constexpr inline QMarginsF &QMarginsF::operator+=(const QMarginsF &margins) noexcept
458{
459 return *this = *this + margins;
460}
461
462constexpr inline QMarginsF &QMarginsF::operator-=(const QMarginsF &margins) noexcept
463{
464 return *this = *this - margins;
465}
466
467constexpr inline QMarginsF &QMarginsF::operator+=(qreal addend) noexcept
468{
469 m_left += addend;
470 m_top += addend;
471 m_right += addend;
472 m_bottom += addend;
473 return *this;
474}
475
476constexpr inline QMarginsF &QMarginsF::operator-=(qreal subtrahend) noexcept
477{
478 m_left -= subtrahend;
479 m_top -= subtrahend;
480 m_right -= subtrahend;
481 m_bottom -= subtrahend;
482 return *this;
483}
484
485constexpr inline QMarginsF &QMarginsF::operator*=(qreal factor) noexcept
486{
487 return *this = *this * factor;
488}
489
490constexpr inline QMarginsF &QMarginsF::operator/=(qreal divisor)
491{
492 return *this = *this / divisor;
493}
494
495constexpr inline QMarginsF operator+(const QMarginsF &margins) noexcept
496{
497 return margins;
498}
499
500constexpr inline QMarginsF operator-(const QMarginsF &margins) noexcept
501{
502 return QMarginsF(-margins.left(), -margins.top(), -margins.right(), -margins.bottom());
503}
504
505constexpr QMarginsF QMargins::toMarginsF() const noexcept { return *this; }
506
507constexpr inline QMargins QMarginsF::toMargins() const noexcept
508{
509 return QMargins(qRound(m_left), qRound(m_top), qRound(m_right), qRound(m_bottom));
510}
511
512#ifndef QT_NO_DEBUG_STREAM
513Q_CORE_EXPORT QDebug operator<<(QDebug, const QMarginsF &);
514#endif
515
516QT_END_NAMESPACE
517
518/*****************************************************************************
519 QMargins/QMarginsF tuple protocol
520 *****************************************************************************/
521
522namespace std {
523 template <>
524 class tuple_size<QT_PREPEND_NAMESPACE(QMargins)> : public integral_constant<size_t, 4> {};
525 template <>
526 class tuple_element<0, QT_PREPEND_NAMESPACE(QMargins)> { public: using type = int; };
527 template <>
528 class tuple_element<1, QT_PREPEND_NAMESPACE(QMargins)> { public: using type = int; };
529 template <>
530 class tuple_element<2, QT_PREPEND_NAMESPACE(QMargins)> { public: using type = int; };
531 template <>
532 class tuple_element<3, QT_PREPEND_NAMESPACE(QMargins)> { public: using type = int; };
533
534 template <>
535 class tuple_size<QT_PREPEND_NAMESPACE(QMarginsF)> : public integral_constant<size_t, 4> {};
536 template <>
537 class tuple_element<0, QT_PREPEND_NAMESPACE(QMarginsF)> { public: using type = QT_PREPEND_NAMESPACE(qreal); };
538 template <>
539 class tuple_element<1, QT_PREPEND_NAMESPACE(QMarginsF)> { public: using type = QT_PREPEND_NAMESPACE(qreal); };
540 template <>
541 class tuple_element<2, QT_PREPEND_NAMESPACE(QMarginsF)> { public: using type = QT_PREPEND_NAMESPACE(qreal); };
542 template <>
543 class tuple_element<3, QT_PREPEND_NAMESPACE(QMarginsF)> { public: using type = QT_PREPEND_NAMESPACE(qreal); };
544}
545
546#endif // QMARGINS_H
\inmodule QtCore\reentrant
Definition qdatastream.h:47
\inmodule QtCore
Definition qmargins.h:270
constexpr QMarginsF & operator-=(const QMarginsF &margins) noexcept
Subtract each component of margins from the respective component of this object and returns a referen...
Definition qmargins.h:462
constexpr qreal right() const noexcept
Returns the right margin.
Definition qmargins.h:383
constexpr qreal left() const noexcept
Returns the left margin.
Definition qmargins.h:377
constexpr QMarginsF() noexcept
Constructs a margins object with all margins set to 0.
Definition qmargins.h:365
constexpr qreal top() const noexcept
Returns the top margin.
Definition qmargins.h:380
constexpr void setLeft(qreal aleft) noexcept
Sets the left margin to aleft (which must be finite).
Definition qmargins.h:390
constexpr QMarginsF & operator+=(const QMarginsF &margins) noexcept
Add each component of margins to the respective component of this object and returns a reference to i...
Definition qmargins.h:457
constexpr QMarginsF & operator-=(qreal subtrahend) noexcept
This is an overloaded member function, provided for convenience. It differs from the above function o...
Definition qmargins.h:476
constexpr QMarginsF & operator/=(qreal divisor)
Divides each component of this object by divisor and returns a reference to this object.
Definition qmargins.h:490
constexpr bool isNull() const noexcept
Returns true if all margins are very close to 0; otherwise returns false.
Definition qmargins.h:374
constexpr QMarginsF(const QMargins &margins) noexcept
Constructs margins copied from the given margins.
Definition qmargins.h:371
constexpr QMargins toMargins() const noexcept
Returns an integer-based copy of this margins object.
Definition qmargins.h:507
constexpr QMarginsF & operator*=(qreal factor) noexcept
Multiplies each component of this object by the given finite factor and returns a reference to this o...
Definition qmargins.h:485
constexpr void setRight(qreal aright) noexcept
Sets the right margin to aright (which must be finite).
Definition qmargins.h:396
constexpr QMarginsF(qreal left, qreal top, qreal right, qreal bottom) noexcept
Constructs margins with the given left, top, right, and bottom.
Definition qmargins.h:368
constexpr void setBottom(qreal abottom) noexcept
Sets the bottom margin to abottom (which must be finite).
Definition qmargins.h:399
constexpr void setTop(qreal atop) noexcept
Sets the top margin to atop (which must be finite).
Definition qmargins.h:393
constexpr QMarginsF & operator+=(qreal addend) noexcept
This is an overloaded member function, provided for convenience. It differs from the above function o...
Definition qmargins.h:467
constexpr qreal bottom() const noexcept
Returns the bottom margin.
Definition qmargins.h:386
\inmodule QtCore
Definition qmargins.h:24
constexpr void setTop(int top) noexcept
Sets the Top margin to Top.
Definition qmargins.h:122
constexpr int bottom() const noexcept
Returns the bottom margin.
Definition qmargins.h:115
constexpr QMarginsF toMarginsF() const noexcept
Definition qmargins.h:505
constexpr QMargins & operator-=(int) noexcept
This is an overloaded member function, provided for convenience. It differs from the above function o...
Definition qmargins.h:222
constexpr bool isNull() const noexcept
Returns true if all margins are is 0; otherwise returns false.
Definition qmargins.h:103
constexpr void setBottom(int bottom) noexcept
Sets the bottom margin to bottom.
Definition qmargins.h:128
constexpr void setLeft(int left) noexcept
Sets the left margin to left.
Definition qmargins.h:119
constexpr QMargins & operator-=(const QMargins &margins) noexcept
Subtract each component of margins from the respective component of this object and returns a referen...
Definition qmargins.h:208
constexpr int left() const noexcept
Returns the left margin.
Definition qmargins.h:106
constexpr QMargins & operator*=(int) noexcept
Multiplies each component of this object by factor and returns a reference to it.
Definition qmargins.h:231
friend constexpr bool comparesEqual(const QMargins &lhs, const QMargins &rhs) noexcept
Definition qmargins.h:58
constexpr QMargins & operator+=(int) noexcept
This is an overloaded member function, provided for convenience. It differs from the above function o...
Definition qmargins.h:213
constexpr QMargins & operator/=(int)
Divides each component of this object by divisor and returns a reference to it.
Definition qmargins.h:236
constexpr QMargins & operator+=(const QMargins &margins) noexcept
Add each component of margins to the respective component of this object and returns a reference to i...
Definition qmargins.h:203
constexpr QMargins() noexcept
Constructs a margins object with all margins set to 0.
Definition qmargins.h:98
constexpr QMargins(int left, int top, int right, int bottom) noexcept
Constructs margins with the given left, top, right, and bottom.
Definition qmargins.h:100
constexpr int right() const noexcept
Returns the right margin.
Definition qmargins.h:112
constexpr int top() const noexcept
Returns the top margin.
Definition qmargins.h:109
constexpr void setRight(int right) noexcept
Sets the right margin to right.
Definition qmargins.h:125
Combined button and popup list for selecting options.
Q_CORE_EXPORT QDebug operator<<(QDebug debug, QDir::Filters filters)
Definition qdir.cpp:2439
QDebug operator<<(QDebug dbg, const QMargins &m)
Definition qmargins.cpp:428
QDebug operator<<(QDebug dbg, const QMarginsF &m)
Definition qmargins.cpp:816
QDataStream & operator>>(QDataStream &s, QMargins &m)
Definition qmargins.cpp:416
QDataStream & operator>>(QDataStream &s, QMarginsF &m)
Definition qmargins.cpp:803
constexpr QMarginsF operator*(qreal lhs, const QMarginsF &rhs) noexcept
Definition qmargins.h:438
constexpr QMarginsF operator+(const QMarginsF &lhs, const QMarginsF &rhs) noexcept
Definition qmargins.h:402
constexpr QMarginsF operator|(const QMarginsF &m1, const QMarginsF &m2) noexcept
Definition qmargins.h:451
constexpr QMargins operator+(int lhs, const QMargins &rhs) noexcept
Definition qmargins.h:149
constexpr QMargins operator|(const QMargins &m1, const QMargins &m2) noexcept
Definition qmargins.h:197
constexpr QMarginsF operator/(const QMarginsF &lhs, qreal divisor)
Definition qmargins.h:444
constexpr QMargins operator+(const QMargins &lhs, int rhs) noexcept
Definition qmargins.h:143
constexpr QMargins operator-(const QMargins &lhs, int rhs) noexcept
Definition qmargins.h:155
constexpr QMargins operator+(const QMargins &margins) noexcept
Definition qmargins.h:251
constexpr QMargins operator/(const QMargins &margins, int divisor)
Definition qmargins.h:185
constexpr QMargins operator*(const QMargins &margins, int factor) noexcept
Definition qmargins.h:161
constexpr QMarginsF operator*(const QMarginsF &lhs, qreal rhs) noexcept
Definition qmargins.h:432
Q_DECLARE_TYPEINFO(QMarginsF, Q_RELOCATABLE_TYPE)
constexpr QMargins operator-(const QMargins &m1, const QMargins &m2) noexcept
Definition qmargins.h:137
constexpr QMargins operator*(int factor, const QMargins &margins) noexcept
Definition qmargins.h:167
constexpr QMargins operator+(const QMargins &m1, const QMargins &m2) noexcept
Definition qmargins.h:131
constexpr QMarginsF operator+(qreal lhs, const QMarginsF &rhs) noexcept
Definition qmargins.h:420
constexpr QMarginsF operator+(const QMarginsF &margins) noexcept
Definition qmargins.h:495
Q_DECLARE_TYPEINFO(QMargins, Q_RELOCATABLE_TYPE)
constexpr QMarginsF operator+(const QMarginsF &lhs, qreal rhs) noexcept
Definition qmargins.h:414
constexpr QMarginsF operator-(const QMarginsF &lhs, qreal rhs) noexcept
Definition qmargins.h:426
constexpr QMarginsF operator-(const QMarginsF &lhs, const QMarginsF &rhs) noexcept
Definition qmargins.h:408
constexpr QMargins operator-(const QMargins &margins) noexcept
Definition qmargins.h:256
constexpr QMarginsF operator-(const QMarginsF &margins) noexcept
Definition qmargins.h:500