QtBase  v6.3.1
qmargins.h
Go to the documentation of this file.
1 /****************************************************************************
2 **
3 ** Copyright (C) 2016 The Qt Company Ltd.
4 ** Contact: https://www.qt.io/licensing/
5 **
6 ** This file is part of the QtCore module of the Qt Toolkit.
7 **
8 ** $QT_BEGIN_LICENSE:LGPL$
9 ** Commercial License Usage
10 ** Licensees holding valid commercial Qt licenses may use this file in
11 ** accordance with the commercial license agreement provided with the
12 ** Software or, alternatively, in accordance with the terms contained in
13 ** a written agreement between you and The Qt Company. For licensing terms
14 ** and conditions see https://www.qt.io/terms-conditions. For further
15 ** information use the contact form at https://www.qt.io/contact-us.
16 **
17 ** GNU Lesser General Public License Usage
18 ** Alternatively, this file may be used under the terms of the GNU Lesser
19 ** General Public License version 3 as published by the Free Software
20 ** Foundation and appearing in the file LICENSE.LGPL3 included in the
21 ** packaging of this file. Please review the following information to
22 ** ensure the GNU Lesser General Public License version 3 requirements
23 ** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
24 **
25 ** GNU General Public License Usage
26 ** Alternatively, this file may be used under the terms of the GNU
27 ** General Public License version 2.0 or (at your option) the GNU General
28 ** Public license version 3 or any later version approved by the KDE Free
29 ** Qt Foundation. The licenses are as published by the Free Software
30 ** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
31 ** included in the packaging of this file. Please review the following
32 ** information to ensure the GNU General Public License requirements will
33 ** be met: https://www.gnu.org/licenses/gpl-2.0.html and
34 ** https://www.gnu.org/licenses/gpl-3.0.html.
35 **
36 ** $QT_END_LICENSE$
37 **
38 ****************************************************************************/
39 
40 #ifndef QMARGINS_H
41 #define QMARGINS_H
42 
43 #include <QtCore/qnamespace.h>
44 
46 
47 /*****************************************************************************
48  QMargins class
49  *****************************************************************************/
50 
51 class QMargins
52 {
53 public:
54  constexpr QMargins() noexcept;
55  constexpr QMargins(int left, int top, int right, int bottom) noexcept;
56 
57  constexpr bool isNull() const noexcept;
58 
59  constexpr int left() const noexcept;
60  constexpr int top() const noexcept;
61  constexpr int right() const noexcept;
62  constexpr int bottom() const noexcept;
63 
64  constexpr void setLeft(int left) noexcept;
65  constexpr void setTop(int top) noexcept;
66  constexpr void setRight(int right) noexcept;
67  constexpr void setBottom(int bottom) noexcept;
68 
69  constexpr QMargins &operator+=(const QMargins &margins) noexcept;
70  constexpr QMargins &operator-=(const QMargins &margins) noexcept;
71  constexpr QMargins &operator+=(int) noexcept;
72  constexpr QMargins &operator-=(int) noexcept;
73  constexpr QMargins &operator*=(int) noexcept;
74  constexpr QMargins &operator/=(int);
75  constexpr QMargins &operator*=(qreal) noexcept;
76  constexpr QMargins &operator/=(qreal);
77 
78 private:
79  int m_left;
80  int m_top;
81  int m_right;
82  int m_bottom;
83 
84  friend constexpr inline bool operator==(const QMargins &m1, const QMargins &m2) noexcept
85  {
86  return
87  m1.m_left == m2.m_left &&
88  m1.m_top == m2.m_top &&
89  m1.m_right == m2.m_right &&
90  m1.m_bottom == m2.m_bottom;
91  }
92 
93  friend constexpr inline bool operator!=(const QMargins &m1, const QMargins &m2) noexcept
94  {
95  return !(m1 == m2);
96  }
97 
98  template <std::size_t I,
99  typename M,
100  std::enable_if_t<(I < 4), bool> = true,
101  std::enable_if_t<std::is_same_v<std::decay_t<M>, QMargins>, bool> = true>
102  friend constexpr decltype(auto) get(M &&m) noexcept
103  {
104  if constexpr (I == 0)
105  return (std::forward<M>(m).m_left);
106  else if constexpr (I == 1)
107  return (std::forward<M>(m).m_top);
108  else if constexpr (I == 2)
109  return (std::forward<M>(m).m_right);
110  else if constexpr (I == 3)
111  return (std::forward<M>(m).m_bottom);
112  }
113 };
114 
116 
117 /*****************************************************************************
118  QMargins stream functions
119  *****************************************************************************/
120 #ifndef QT_NO_DATASTREAM
121 Q_CORE_EXPORT QDataStream &operator<<(QDataStream &, const QMargins &);
122 Q_CORE_EXPORT QDataStream &operator>>(QDataStream &, QMargins &);
123 #endif
124 
125 /*****************************************************************************
126  QMargins inline functions
127  *****************************************************************************/
128 
129 constexpr inline QMargins::QMargins() noexcept : m_left(0), m_top(0), m_right(0), m_bottom(0) {}
130 
131 constexpr inline QMargins::QMargins(int aleft, int atop, int aright, int abottom) noexcept
132  : m_left(aleft), m_top(atop), m_right(aright), m_bottom(abottom) {}
133 
134 constexpr inline bool QMargins::isNull() const noexcept
135 { return m_left==0 && m_top==0 && m_right==0 && m_bottom==0; }
136 
137 constexpr inline int QMargins::left() const noexcept
138 { return m_left; }
139 
140 constexpr inline int QMargins::top() const noexcept
141 { return m_top; }
142 
143 constexpr inline int QMargins::right() const noexcept
144 { return m_right; }
145 
146 constexpr inline int QMargins::bottom() const noexcept
147 { return m_bottom; }
148 
149 
150 constexpr inline void QMargins::setLeft(int aleft) noexcept
151 { m_left = aleft; }
152 
153 constexpr inline void QMargins::setTop(int atop) noexcept
154 { m_top = atop; }
155 
156 constexpr inline void QMargins::setRight(int aright) noexcept
157 { m_right = aright; }
158 
159 constexpr inline void QMargins::setBottom(int abottom) noexcept
160 { m_bottom = abottom; }
161 
162 constexpr inline QMargins operator+(const QMargins &m1, const QMargins &m2) noexcept
163 {
164  return QMargins(m1.left() + m2.left(), m1.top() + m2.top(),
165  m1.right() + m2.right(), m1.bottom() + m2.bottom());
166 }
167 
168 constexpr inline QMargins operator-(const QMargins &m1, const QMargins &m2) noexcept
169 {
170  return QMargins(m1.left() - m2.left(), m1.top() - m2.top(),
171  m1.right() - m2.right(), m1.bottom() - m2.bottom());
172 }
173 
174 constexpr inline QMargins operator+(const QMargins &lhs, int rhs) noexcept
175 {
176  return QMargins(lhs.left() + rhs, lhs.top() + rhs,
177  lhs.right() + rhs, lhs.bottom() + rhs);
178 }
179 
180 constexpr inline QMargins operator+(int lhs, const QMargins &rhs) noexcept
181 {
182  return QMargins(rhs.left() + lhs, rhs.top() + lhs,
183  rhs.right() + lhs, rhs.bottom() + lhs);
184 }
185 
186 constexpr inline QMargins operator-(const QMargins &lhs, int rhs) noexcept
187 {
188  return QMargins(lhs.left() - rhs, lhs.top() - rhs,
189  lhs.right() - rhs, lhs.bottom() - rhs);
190 }
191 
192 constexpr inline QMargins operator*(const QMargins &margins, int factor) noexcept
193 {
194  return QMargins(margins.left() * factor, margins.top() * factor,
195  margins.right() * factor, margins.bottom() * factor);
196 }
197 
198 constexpr inline QMargins operator*(int factor, const QMargins &margins) noexcept
199 {
200  return QMargins(margins.left() * factor, margins.top() * factor,
201  margins.right() * factor, margins.bottom() * factor);
202 }
203 
204 constexpr inline QMargins operator*(const QMargins &margins, qreal factor) noexcept
205 {
206  return QMargins(qRound(margins.left() * factor), qRound(margins.top() * factor),
207  qRound(margins.right() * factor), qRound(margins.bottom() * factor));
208 }
209 
210 constexpr inline QMargins operator*(qreal factor, const QMargins &margins) noexcept
211 {
212  return QMargins(qRound(margins.left() * factor), qRound(margins.top() * factor),
213  qRound(margins.right() * factor), qRound(margins.bottom() * factor));
214 }
215 
216 constexpr inline QMargins operator/(const QMargins &margins, int divisor)
217 {
218  return QMargins(margins.left() / divisor, margins.top() / divisor,
219  margins.right() / divisor, margins.bottom() / divisor);
220 }
221 
222 constexpr inline QMargins operator/(const QMargins &margins, qreal divisor)
223 {
224  return QMargins(qRound(margins.left() / divisor), qRound(margins.top() / divisor),
225  qRound(margins.right() / divisor), qRound(margins.bottom() / divisor));
226 }
227 
228 constexpr inline QMargins operator|(const QMargins &m1, const QMargins &m2) noexcept
229 {
230  return QMargins(qMax(m1.left(), m2.left()), qMax(m1.top(), m2.top()),
231  qMax(m1.right(), m2.right()), qMax(m1.bottom(), m2.bottom()));
232 }
233 
234 constexpr inline QMargins &QMargins::operator+=(const QMargins &margins) noexcept
235 {
236  return *this = *this + margins;
237 }
238 
239 constexpr inline QMargins &QMargins::operator-=(const QMargins &margins) noexcept
240 {
241  return *this = *this - margins;
242 }
243 
244 constexpr inline QMargins &QMargins::operator+=(int margin) noexcept
245 {
246  m_left += margin;
247  m_top += margin;
248  m_right += margin;
249  m_bottom += margin;
250  return *this;
251 }
252 
253 constexpr inline QMargins &QMargins::operator-=(int margin) noexcept
254 {
255  m_left -= margin;
256  m_top -= margin;
257  m_right -= margin;
258  m_bottom -= margin;
259  return *this;
260 }
261 
262 constexpr inline QMargins &QMargins::operator*=(int factor) noexcept
263 {
264  return *this = *this * factor;
265 }
266 
267 constexpr inline QMargins &QMargins::operator/=(int divisor)
268 {
269  return *this = *this / divisor;
270 }
271 
272 constexpr inline QMargins &QMargins::operator*=(qreal factor) noexcept
273 {
274  return *this = *this * factor;
275 }
276 
278 {
279  return *this = *this / divisor;
280 }
281 
282 constexpr inline QMargins operator+(const QMargins &margins) noexcept
283 {
284  return margins;
285 }
286 
287 constexpr inline QMargins operator-(const QMargins &margins) noexcept
288 {
289  return QMargins(-margins.left(), -margins.top(), -margins.right(), -margins.bottom());
290 }
291 
292 #ifndef QT_NO_DEBUG_STREAM
293 Q_CORE_EXPORT QDebug operator<<(QDebug, const QMargins &);
294 #endif
295 
296 /*****************************************************************************
297  QMarginsF class
298  *****************************************************************************/
299 
301 {
302 public:
303  constexpr QMarginsF() noexcept;
304  constexpr QMarginsF(qreal left, qreal top, qreal right, qreal bottom) noexcept;
305  constexpr QMarginsF(const QMargins &margins) noexcept;
306 
307  constexpr bool isNull() const noexcept;
308 
309  constexpr qreal left() const noexcept;
310  constexpr qreal top() const noexcept;
311  constexpr qreal right() const noexcept;
312  constexpr qreal bottom() const noexcept;
313 
314  constexpr void setLeft(qreal aleft) noexcept;
315  constexpr void setTop(qreal atop) noexcept;
316  constexpr void setRight(qreal aright) noexcept;
317  constexpr void setBottom(qreal abottom) noexcept;
318 
319  constexpr QMarginsF &operator+=(const QMarginsF &margins) noexcept;
320  constexpr QMarginsF &operator-=(const QMarginsF &margins) noexcept;
321  constexpr QMarginsF &operator+=(qreal addend) noexcept;
322  constexpr QMarginsF &operator-=(qreal subtrahend) noexcept;
323  constexpr QMarginsF &operator*=(qreal factor) noexcept;
324  constexpr QMarginsF &operator/=(qreal divisor);
325 
326  constexpr inline QMargins toMargins() const noexcept;
327 
328 private:
329  qreal m_left;
330  qreal m_top;
331  qreal m_right;
332  qreal m_bottom;
333 
334  friend constexpr inline bool operator==(const QMarginsF &lhs, const QMarginsF &rhs) noexcept
335  {
336  return qFuzzyCompare(lhs.left(), rhs.left())
337  && qFuzzyCompare(lhs.top(), rhs.top())
338  && qFuzzyCompare(lhs.right(), rhs.right())
339  && qFuzzyCompare(lhs.bottom(), rhs.bottom());
340  }
341 
342  friend constexpr inline bool operator!=(const QMarginsF &lhs, const QMarginsF &rhs) noexcept
343  {
344  return !(lhs == rhs);
345  }
346 
347  template <std::size_t I,
348  typename M,
349  std::enable_if_t<(I < 4), bool> = true,
350  std::enable_if_t<std::is_same_v<std::decay_t<M>, QMarginsF>, bool> = true>
351  friend constexpr decltype(auto) get(M &&m) noexcept
352  {
353  if constexpr (I == 0)
354  return (std::forward<M>(m).m_left);
355  else if constexpr (I == 1)
356  return (std::forward<M>(m).m_top);
357  else if constexpr (I == 2)
358  return (std::forward<M>(m).m_right);
359  else if constexpr (I == 3)
360  return (std::forward<M>(m).m_bottom);
361  }
362 };
363 
365 
366 /*****************************************************************************
367  QMarginsF stream functions
368  *****************************************************************************/
369 
370 #ifndef QT_NO_DATASTREAM
371 Q_CORE_EXPORT QDataStream &operator<<(QDataStream &, const QMarginsF &);
372 Q_CORE_EXPORT QDataStream &operator>>(QDataStream &, QMarginsF &);
373 #endif
374 
375 /*****************************************************************************
376  QMarginsF inline functions
377  *****************************************************************************/
378 
379 constexpr inline QMarginsF::QMarginsF() noexcept
380  : m_left(0), m_top(0), m_right(0), m_bottom(0) {}
381 
382 constexpr inline QMarginsF::QMarginsF(qreal aleft, qreal atop, qreal aright, qreal abottom) noexcept
383  : m_left(aleft), m_top(atop), m_right(aright), m_bottom(abottom) {}
384 
385 constexpr inline QMarginsF::QMarginsF(const QMargins &margins) noexcept
386  : m_left(margins.left()), m_top(margins.top()), m_right(margins.right()), m_bottom(margins.bottom()) {}
387 
388 constexpr inline bool QMarginsF::isNull() const noexcept
389 { return qFuzzyIsNull(m_left) && qFuzzyIsNull(m_top) && qFuzzyIsNull(m_right) && qFuzzyIsNull(m_bottom); }
390 
391 constexpr inline qreal QMarginsF::left() const noexcept
392 { return m_left; }
393 
394 constexpr inline qreal QMarginsF::top() const noexcept
395 { return m_top; }
396 
397 constexpr inline qreal QMarginsF::right() const noexcept
398 { return m_right; }
399 
400 constexpr inline qreal QMarginsF::bottom() const noexcept
401 { return m_bottom; }
402 
403 
404 constexpr inline void QMarginsF::setLeft(qreal aleft) noexcept
405 { m_left = aleft; }
406 
407 constexpr inline void QMarginsF::setTop(qreal atop) noexcept
408 { m_top = atop; }
409 
410 constexpr inline void QMarginsF::setRight(qreal aright) noexcept
411 { m_right = aright; }
412 
413 constexpr inline void QMarginsF::setBottom(qreal abottom) noexcept
414 { m_bottom = abottom; }
415 
416 constexpr inline QMarginsF operator+(const QMarginsF &lhs, const QMarginsF &rhs) noexcept
417 {
418  return QMarginsF(lhs.left() + rhs.left(), lhs.top() + rhs.top(),
419  lhs.right() + rhs.right(), lhs.bottom() + rhs.bottom());
420 }
421 
422 constexpr inline QMarginsF operator-(const QMarginsF &lhs, const QMarginsF &rhs) noexcept
423 {
424  return QMarginsF(lhs.left() - rhs.left(), lhs.top() - rhs.top(),
425  lhs.right() - rhs.right(), lhs.bottom() - rhs.bottom());
426 }
427 
428 constexpr inline QMarginsF operator+(const QMarginsF &lhs, qreal rhs) noexcept
429 {
430  return QMarginsF(lhs.left() + rhs, lhs.top() + rhs,
431  lhs.right() + rhs, lhs.bottom() + rhs);
432 }
433 
434 constexpr inline QMarginsF operator+(qreal lhs, const QMarginsF &rhs) noexcept
435 {
436  return QMarginsF(rhs.left() + lhs, rhs.top() + lhs,
437  rhs.right() + lhs, rhs.bottom() + lhs);
438 }
439 
440 constexpr inline QMarginsF operator-(const QMarginsF &lhs, qreal rhs) noexcept
441 {
442  return QMarginsF(lhs.left() - rhs, lhs.top() - rhs,
443  lhs.right() - rhs, lhs.bottom() - rhs);
444 }
445 
446 constexpr inline QMarginsF operator*(const QMarginsF &lhs, qreal rhs) noexcept
447 {
448  return QMarginsF(lhs.left() * rhs, lhs.top() * rhs,
449  lhs.right() * rhs, lhs.bottom() * rhs);
450 }
451 
452 constexpr inline QMarginsF operator*(qreal lhs, const QMarginsF &rhs) noexcept
453 {
454  return QMarginsF(rhs.left() * lhs, rhs.top() * lhs,
455  rhs.right() * lhs, rhs.bottom() * lhs);
456 }
457 
458 constexpr inline QMarginsF operator/(const QMarginsF &lhs, qreal divisor)
459 {
461  return QMarginsF(lhs.left() / divisor, lhs.top() / divisor,
462  lhs.right() / divisor, lhs.bottom() / divisor);
463 }
464 
465 constexpr inline QMarginsF operator|(const QMarginsF &m1, const QMarginsF &m2) noexcept
466 {
467  return QMarginsF(qMax(m1.left(), m2.left()), qMax(m1.top(), m2.top()),
468  qMax(m1.right(), m2.right()), qMax(m1.bottom(), m2.bottom()));
469 }
470 
471 constexpr inline QMarginsF &QMarginsF::operator+=(const QMarginsF &margins) noexcept
472 {
473  return *this = *this + margins;
474 }
475 
476 constexpr inline QMarginsF &QMarginsF::operator-=(const QMarginsF &margins) noexcept
477 {
478  return *this = *this - margins;
479 }
480 
481 constexpr inline QMarginsF &QMarginsF::operator+=(qreal addend) noexcept
482 {
483  m_left += addend;
484  m_top += addend;
485  m_right += addend;
486  m_bottom += addend;
487  return *this;
488 }
489 
490 constexpr inline QMarginsF &QMarginsF::operator-=(qreal subtrahend) noexcept
491 {
492  m_left -= subtrahend;
493  m_top -= subtrahend;
494  m_right -= subtrahend;
495  m_bottom -= subtrahend;
496  return *this;
497 }
498 
499 constexpr inline QMarginsF &QMarginsF::operator*=(qreal factor) noexcept
500 {
501  return *this = *this * factor;
502 }
503 
505 {
506  return *this = *this / divisor;
507 }
508 
509 constexpr inline QMarginsF operator+(const QMarginsF &margins) noexcept
510 {
511  return margins;
512 }
513 
514 constexpr inline QMarginsF operator-(const QMarginsF &margins) noexcept
515 {
516  return QMarginsF(-margins.left(), -margins.top(), -margins.right(), -margins.bottom());
517 }
518 
519 constexpr inline QMargins QMarginsF::toMargins() const noexcept
520 {
521  return QMargins(qRound(m_left), qRound(m_top), qRound(m_right), qRound(m_bottom));
522 }
523 
524 #ifndef QT_NO_DEBUG_STREAM
525 Q_CORE_EXPORT QDebug operator<<(QDebug, const QMarginsF &);
526 #endif
527 
529 
530 /*****************************************************************************
531  QMargins/QMarginsF tuple protocol
532  *****************************************************************************/
533 
534 namespace std {
535  template <>
536  class tuple_size<QT_PREPEND_NAMESPACE(QMargins)> : public integral_constant<size_t, 4> {};
537  template <>
538  class tuple_element<0, QT_PREPEND_NAMESPACE(QMargins)> { public: using type = int; };
539  template <>
540  class tuple_element<1, QT_PREPEND_NAMESPACE(QMargins)> { public: using type = int; };
541  template <>
542  class tuple_element<2, QT_PREPEND_NAMESPACE(QMargins)> { public: using type = int; };
543  template <>
544  class tuple_element<3, QT_PREPEND_NAMESPACE(QMargins)> { public: using type = int; };
545 
546  template <>
547  class tuple_size<QT_PREPEND_NAMESPACE(QMarginsF)> : public integral_constant<size_t, 4> {};
548  template <>
549  class tuple_element<0, QT_PREPEND_NAMESPACE(QMarginsF)> { public: using type = QT_PREPEND_NAMESPACE(qreal); };
550  template <>
551  class tuple_element<1, QT_PREPEND_NAMESPACE(QMarginsF)> { public: using type = QT_PREPEND_NAMESPACE(qreal); };
552  template <>
553  class tuple_element<2, QT_PREPEND_NAMESPACE(QMarginsF)> { public: using type = QT_PREPEND_NAMESPACE(qreal); };
554  template <>
555  class tuple_element<3, QT_PREPEND_NAMESPACE(QMarginsF)> { public: using type = QT_PREPEND_NAMESPACE(qreal); };
556 }
557 
558 #endif // QMARGINS_H
The QDataStream class provides serialization of binary data to a QIODevice.
Definition: qdatastream.h:66
The QDebug class provides an output stream for debugging information.
Definition: qdebug.h:65
The QMarginsF class defines the four margins of a rectangle.
Definition: qmargins.h:301
constexpr QMarginsF & operator-=(const QMarginsF &margins) noexcept
Definition: qmargins.h:476
constexpr qreal right() const noexcept
Definition: qmargins.h:397
constexpr qreal left() const noexcept
Definition: qmargins.h:391
constexpr QMarginsF() noexcept
Definition: qmargins.h:379
constexpr qreal top() const noexcept
Definition: qmargins.h:394
constexpr void setLeft(qreal aleft) noexcept
Definition: qmargins.h:404
constexpr QMarginsF & operator+=(const QMarginsF &margins) noexcept
Definition: qmargins.h:471
constexpr QMarginsF & operator/=(qreal divisor)
Definition: qmargins.h:504
constexpr friend bool operator!=(const QMarginsF &lhs, const QMarginsF &rhs) noexcept
Definition: qmargins.h:342
constexpr bool isNull() const noexcept
Definition: qmargins.h:388
constexpr QMargins toMargins() const noexcept
Definition: qmargins.h:519
constexpr QMarginsF & operator*=(qreal factor) noexcept
Definition: qmargins.h:499
constexpr void setRight(qreal aright) noexcept
Definition: qmargins.h:410
constexpr void setBottom(qreal abottom) noexcept
Definition: qmargins.h:413
constexpr void setTop(qreal atop) noexcept
Definition: qmargins.h:407
constexpr qreal bottom() const noexcept
Definition: qmargins.h:400
constexpr friend bool operator==(const QMarginsF &lhs, const QMarginsF &rhs) noexcept
Definition: qmargins.h:334
The QMargins class defines the four margins of a rectangle.
Definition: qmargins.h:52
constexpr void setTop(int top) noexcept
Definition: qmargins.h:153
QDataStream & operator>>(QDataStream &stream, QMargins &m)
Definition: qmargins.cpp:439
constexpr int bottom() const noexcept
Definition: qmargins.h:146
QDataStream & operator<<(QDataStream &stream, const QMargins &m)
Definition: qmargins.cpp:423
constexpr bool isNull() const noexcept
Definition: qmargins.h:134
constexpr void setBottom(int bottom) noexcept
Definition: qmargins.h:159
QMargins operator*(const QMargins &margins, int factor)
Definition: qmargins.h:192
constexpr friend bool operator==(const QMargins &m1, const QMargins &m2) noexcept
Definition: qmargins.h:84
constexpr void setLeft(int left) noexcept
Definition: qmargins.h:150
constexpr QMargins & operator-=(const QMargins &margins) noexcept
Definition: qmargins.h:239
constexpr int left() const noexcept
Definition: qmargins.h:137
QMargins operator|(const QMargins &m1, const QMargins &m2)
Definition: qmargins.h:228
constexpr QMargins & operator*=(int) noexcept
Definition: qmargins.h:262
constexpr QMargins & operator/=(int)
Definition: qmargins.h:267
constexpr QMargins & operator+=(const QMargins &margins) noexcept
Definition: qmargins.h:234
QMargins operator/(const QMargins &margins, int divisor)
Definition: qmargins.h:216
constexpr QMargins() noexcept
Definition: qmargins.h:129
constexpr friend bool operator!=(const QMargins &m1, const QMargins &m2) noexcept
Definition: qmargins.h:93
constexpr int right() const noexcept
Definition: qmargins.h:143
constexpr int top() const noexcept
Definition: qmargins.h:140
QMargins operator-(const QMargins &m1, const QMargins &m2)
Definition: qmargins.h:168
QMargins operator+(const QMargins &m1, const QMargins &m2)
Definition: qmargins.h:162
constexpr void setRight(int right) noexcept
Definition: qmargins.h:156
float factor
else
Definition: ftgrays.c:1658
auto it unsigned count const
Definition: hb-iter.hh:848
#define I(x, y, z)
Definition: md5.c:55
Definition: qfloat16.h:381
set set set set set set set macro pixldst1 abits if abits op else op endif endm macro pixldst2 abits if abits op else op endif endm macro pixldst4 abits if abits op else op endif endm macro pixldst0 abits op endm macro pixldst3 mem_operand op endm macro pixldst30 mem_operand op endm macro pixldst abits if abits elseif abits elseif abits elseif abits elseif abits pixldst0 abits else pixldst0 abits pixldst0 abits pixldst0 abits pixldst0 abits endif elseif abits else pixldst0 abits pixldst0 abits endif elseif abits else error unsupported bpp *numpix else pixst endif endm macro vuzp8 reg2 vuzp d d &reg2 endm macro vzip8 reg2 vzip d d &reg2 endm macro pixdeinterleave basereg basereg basereg basereg basereg endif endm macro pixinterleave basereg basereg basereg basereg basereg endif endm macro PF boost_increment endif if endif PF tst PF addne PF subne PF cmp ORIG_W if endif if endif if endif PF subge ORIG_W PF subges if endif if endif if endif endif endm macro cache_preload_simple endif if dst_r_bpp pld[DST_R, #(PREFETCH_DISTANCE_SIMPLE *dst_r_bpp/8)] endif if mask_bpp pld if[MASK, #(PREFETCH_DISTANCE_SIMPLE *mask_bpp/8)] endif endif endm macro ensure_destination_ptr_alignment process_pixblock_tail_head if beq irp skip1(dst_w_bpp<=(lowbit *8)) &&((lowbit *8)<(pixblock_size *dst_w_bpp)) .if lowbit< 16 tst DST_R
[3]
bool qFuzzyCompare(qfloat16 p1, qfloat16 p2) noexcept
Definition: qfloat16.h:233
bool qFuzzyIsNull(qfloat16 f) noexcept
Definition: qfloat16.h:249
int qRound(qfloat16 d) noexcept
Definition: qfloat16.h:227
QT_END_INCLUDE_NAMESPACE typedef double qreal
Definition: qglobal.h:341
Q_DECLARE_TYPEINFO(QMargins, Q_RELOCATABLE_TYPE)
const GLfloat * m
GLuint divisor
GLdouble GLdouble GLdouble GLdouble top
GLdouble GLdouble right
GLint left
GLint GLint bottom
#define Q_ASSERT(cond)
Definition: qrandom.cpp:84
int QT_PREPEND_NAMESPACE(QSharedMemoryPrivate)
@ Q_RELOCATABLE_TYPE
Definition: qtypeinfo.h:156
#define rhs