Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qsize.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 QSIZE_H
5#define QSIZE_H
6
7#include <QtCore/qnamespace.h>
8#include <QtCore/qhashfunctions.h>
9#include <QtCore/qmargins.h>
10
11#include <QtCore/q20type_traits.h>
12#include <QtCore/q23utility.h>
13
14#if defined(Q_OS_DARWIN) || defined(Q_QDOC)
15struct CGSize;
16#endif
17
19
20// QT_ENABLE_P0846_SEMANTICS_FOR(get) // from qmargins.h
21
22class QSizeF;
23
24class Q_CORE_EXPORT QSize
25{
26public:
27 constexpr QSize() noexcept;
28 constexpr QSize(int w, int h) noexcept;
29
30 constexpr inline bool isNull() const noexcept;
31 constexpr inline bool isEmpty() const noexcept;
32 constexpr inline bool isValid() const noexcept;
33
34 constexpr inline int width() const noexcept;
35 constexpr inline int height() const noexcept;
36 constexpr inline void setWidth(int w) noexcept;
37 constexpr inline void setHeight(int h) noexcept;
38 void transpose() noexcept;
39 [[nodiscard]] constexpr inline QSize transposed() const noexcept;
40
41 inline void scale(int w, int h, Qt::AspectRatioMode mode) noexcept;
42 inline void scale(const QSize &s, Qt::AspectRatioMode mode) noexcept;
43 [[nodiscard]] QSize scaled(int w, int h, Qt::AspectRatioMode mode) const noexcept;
44 [[nodiscard]] QSize scaled(const QSize &s, Qt::AspectRatioMode mode) const noexcept;
45
46 [[nodiscard]] constexpr inline QSize expandedTo(const QSize &) const noexcept;
47 [[nodiscard]] constexpr inline QSize boundedTo(const QSize &) const noexcept;
48
49 [[nodiscard]] constexpr QSize grownBy(QMargins m) const noexcept
50 { return {width() + m.left() + m.right(), height() + m.top() + m.bottom()}; }
51 [[nodiscard]] constexpr QSize shrunkBy(QMargins m) const noexcept
52 { return {width() - m.left() - m.right(), height() - m.top() - m.bottom()}; }
53
54 constexpr inline int &rwidth() noexcept;
55 constexpr inline int &rheight() noexcept;
56
57 constexpr inline QSize &operator+=(const QSize &) noexcept;
58 constexpr inline QSize &operator-=(const QSize &) noexcept;
59 constexpr inline QSize &operator*=(qreal c) noexcept;
60 inline QSize &operator/=(qreal c);
61
63 friend constexpr bool comparesEqual(const QSize &s1, const QSize &s2) noexcept
64 { return s1.wd == s2.wd && s1.ht == s2.ht; }
66 friend inline constexpr QSize operator+(const QSize &s1, const QSize &s2) noexcept
67 { return QSize(s1.wd + s2.wd, s1.ht + s2.ht); }
68 friend inline constexpr QSize operator-(const QSize &s1, const QSize &s2) noexcept
69 { return QSize(s1.wd - s2.wd, s1.ht - s2.ht); }
70 friend inline constexpr QSize operator*(const QSize &s, qreal c) noexcept
71 { return QSize(qRound(s.wd * c), qRound(s.ht * c)); }
72 friend inline constexpr QSize operator*(qreal c, const QSize &s) noexcept
73 { return s * c; }
74 friend inline QSize operator/(const QSize &s, qreal c)
75 { Q_ASSERT(!qFuzzyIsNull(c)); return QSize(qRound(s.wd / c), qRound(s.ht / c)); }
76 friend inline constexpr size_t qHash(const QSize &, size_t) noexcept;
77
78public:
79#if defined(Q_OS_DARWIN) || defined(Q_QDOC)
80 [[nodiscard]] CGSize toCGSize() const noexcept;
81#endif
82
83 [[nodiscard]] inline constexpr QSizeF toSizeF() const noexcept;
84
86 int wd;
87 int ht;
88
89 template <std::size_t I,
90 typename S,
91 std::enable_if_t<(I < 2), bool> = true,
92 std::enable_if_t<std::is_same_v<q20::remove_cvref_t<S>, QSize>, bool> = true>
93 friend constexpr decltype(auto) get(S &&s) noexcept
94 {
95 if constexpr (I == 0)
96 return q23::forward_like<S>(s.wd);
97 else if constexpr (I == 1)
98 return q23::forward_like<S>(s.ht);
99 }
100};
102
103/*****************************************************************************
104 QSize stream functions
105 *****************************************************************************/
106
107#ifndef QT_NO_DATASTREAM
108Q_CORE_EXPORT QDataStream &operator<<(QDataStream &, const QSize &);
109Q_CORE_EXPORT QDataStream &operator>>(QDataStream &, QSize &);
110#endif
111
112
113/*****************************************************************************
114 QSize inline functions
115 *****************************************************************************/
116
117constexpr inline QSize::QSize() noexcept : wd(-1), ht(-1) {}
118
119constexpr inline QSize::QSize(int w, int h) noexcept : wd(w), ht(h) {}
120
121constexpr inline bool QSize::isNull() const noexcept
122{ return wd == 0 && ht == 0; }
123
124constexpr inline bool QSize::isEmpty() const noexcept
125{ return wd < 1 || ht < 1; }
126
127constexpr inline bool QSize::isValid() const noexcept
128{ return wd >= 0 && ht >= 0; }
129
130constexpr inline int QSize::width() const noexcept
131{ return wd; }
132
133constexpr inline int QSize::height() const noexcept
134{ return ht; }
135
136constexpr inline void QSize::setWidth(int w) noexcept
137{ wd = w; }
138
139constexpr inline void QSize::setHeight(int h) noexcept
140{ ht = h; }
141
142constexpr inline QSize QSize::transposed() const noexcept
143{ return QSize(ht, wd); }
144
145inline void QSize::scale(int w, int h, Qt::AspectRatioMode mode) noexcept
146{ scale(QSize(w, h), mode); }
147
148inline void QSize::scale(const QSize &s, Qt::AspectRatioMode mode) noexcept
149{ *this = scaled(s, mode); }
150
151inline QSize QSize::scaled(int w, int h, Qt::AspectRatioMode mode) const noexcept
152{ return scaled(QSize(w, h), mode); }
153
154constexpr inline int &QSize::rwidth() noexcept
155{ return wd; }
156
157constexpr inline int &QSize::rheight() noexcept
158{ return ht; }
159
160constexpr inline QSize &QSize::operator+=(const QSize &s) noexcept
161{
162 wd += s.wd;
163 ht += s.ht;
164 return *this;
165}
166
167constexpr inline QSize &QSize::operator-=(const QSize &s) noexcept
168{
169 wd -= s.wd;
170 ht -= s.ht;
171 return *this;
172}
173
174constexpr inline QSize &QSize::operator*=(qreal c) noexcept
175{
176 wd = qRound(wd * c);
177 ht = qRound(ht * c);
178 return *this;
179}
180
181constexpr inline size_t qHash(const QSize &s, size_t seed = 0) noexcept
182{ return qHashMulti(seed, s.wd, s.ht); }
183
185{
187 wd = qRound(wd / c);
188 ht = qRound(ht / c);
189 return *this;
190}
191
192constexpr inline QSize QSize::expandedTo(const QSize & otherSize) const noexcept
193{
194 return QSize(qMax(wd,otherSize.wd), qMax(ht,otherSize.ht));
195}
196
197constexpr inline QSize QSize::boundedTo(const QSize & otherSize) const noexcept
198{
199 return QSize(qMin(wd,otherSize.wd), qMin(ht,otherSize.ht));
200}
201
202#ifndef QT_NO_DEBUG_STREAM
203Q_CORE_EXPORT QDebug operator<<(QDebug, const QSize &);
204#endif
205
206
207class Q_CORE_EXPORT QSizeF
208{
209public:
210 constexpr QSizeF() noexcept;
211 constexpr QSizeF(const QSize &sz) noexcept;
212 constexpr QSizeF(qreal w, qreal h) noexcept;
213
214 inline bool isNull() const noexcept;
215 constexpr inline bool isEmpty() const noexcept;
216 constexpr inline bool isValid() const noexcept;
217
218 constexpr inline qreal width() const noexcept;
219 constexpr inline qreal height() const noexcept;
220 constexpr inline void setWidth(qreal w) noexcept;
221 constexpr inline void setHeight(qreal h) noexcept;
222 void transpose() noexcept;
223 [[nodiscard]] constexpr inline QSizeF transposed() const noexcept;
224
225 inline void scale(qreal w, qreal h, Qt::AspectRatioMode mode) noexcept;
226 inline void scale(const QSizeF &s, Qt::AspectRatioMode mode) noexcept;
227 [[nodiscard]] QSizeF scaled(qreal w, qreal h, Qt::AspectRatioMode mode) const noexcept;
228 [[nodiscard]] QSizeF scaled(const QSizeF &s, Qt::AspectRatioMode mode) const noexcept;
229
230 [[nodiscard]] constexpr inline QSizeF expandedTo(const QSizeF &) const noexcept;
231 [[nodiscard]] constexpr inline QSizeF boundedTo(const QSizeF &) const noexcept;
232
233 [[nodiscard]] constexpr QSizeF grownBy(QMarginsF m) const noexcept
234 { return {width() + m.left() + m.right(), height() + m.top() + m.bottom()}; }
235 [[nodiscard]] constexpr QSizeF shrunkBy(QMarginsF m) const noexcept
236 { return {width() - m.left() - m.right(), height() - m.top() - m.bottom()}; }
237
238 constexpr inline qreal &rwidth() noexcept;
239 constexpr inline qreal &rheight() noexcept;
240
241 constexpr inline QSizeF &operator+=(const QSizeF &) noexcept;
242 constexpr inline QSizeF &operator-=(const QSizeF &) noexcept;
243 constexpr inline QSizeF &operator*=(qreal c) noexcept;
244 inline QSizeF &operator/=(qreal c);
245
246private:
249 friend constexpr bool qFuzzyCompare(const QSizeF &s1, const QSizeF &s2) noexcept
250 {
251 // Cannot use qFuzzyCompare(), because it will give incorrect results
252 // if one of the arguments is 0.0.
253 return ((!s1.wd || !s2.wd) ? qFuzzyIsNull(s1.wd - s2.wd) : qFuzzyCompare(s1.wd, s2.wd))
254 && ((!s1.ht || !s2.ht) ? qFuzzyIsNull(s1.ht - s2.ht) : qFuzzyCompare(s1.ht, s2.ht));
255 }
257 friend constexpr bool qFuzzyIsNull(const QSizeF &size) noexcept
258 { return qFuzzyIsNull(size.wd) && qFuzzyIsNull(size.ht); }
259 friend constexpr bool comparesEqual(const QSizeF &lhs, const QSizeF &rhs) noexcept
260 { return qFuzzyCompare(lhs, rhs); }
262 friend constexpr bool comparesEqual(const QSizeF &lhs, const QSize &rhs) noexcept
263 { return comparesEqual(lhs, rhs.toSizeF()); }
265 friend constexpr inline QSizeF operator+(const QSizeF &s1, const QSizeF &s2) noexcept
266 { return QSizeF(s1.wd + s2.wd, s1.ht + s2.ht); }
267 friend constexpr inline QSizeF operator-(const QSizeF &s1, const QSizeF &s2) noexcept
268 { return QSizeF(s1.wd - s2.wd, s1.ht - s2.ht); }
269 friend constexpr inline QSizeF operator*(const QSizeF &s, qreal c) noexcept
270 { return QSizeF(s.wd * c, s.ht * c); }
271 friend constexpr inline QSizeF operator*(qreal c, const QSizeF &s) noexcept
272 { return s * c; }
273 friend inline QSizeF operator/(const QSizeF &s, qreal c)
274 { Q_ASSERT(!qFuzzyIsNull(c)); return QSizeF(s.wd / c, s.ht / c); }
275
276public:
277 constexpr inline QSize toSize() const noexcept;
278
279#if defined(Q_OS_DARWIN) || defined(Q_QDOC)
280 [[nodiscard]] static QSizeF fromCGSize(CGSize size) noexcept;
281 [[nodiscard]] CGSize toCGSize() const noexcept;
282#endif
283
284private:
285 qreal wd;
286 qreal ht;
287
288 template <std::size_t I,
289 typename S,
290 std::enable_if_t<(I < 2), bool> = true,
291 std::enable_if_t<std::is_same_v<q20::remove_cvref_t<S>, QSizeF>, bool> = true>
292 friend constexpr decltype(auto) get(S &&s) noexcept
293 {
294 if constexpr (I == 0)
295 return q23::forward_like<S>(s.wd);
296 else if constexpr (I == 1)
297 return q23::forward_like<S>(s.ht);
298 }
299};
301
302
303/*****************************************************************************
304 QSizeF stream functions
305 *****************************************************************************/
306
307#ifndef QT_NO_DATASTREAM
308Q_CORE_EXPORT QDataStream &operator<<(QDataStream &, const QSizeF &);
309Q_CORE_EXPORT QDataStream &operator>>(QDataStream &, QSizeF &);
310#endif
311
312
313/*****************************************************************************
314 QSizeF inline functions
315 *****************************************************************************/
316
317constexpr inline QSizeF::QSizeF() noexcept : wd(-1.), ht(-1.) {}
318
319constexpr inline QSizeF::QSizeF(const QSize &sz) noexcept : wd(sz.width()), ht(sz.height()) {}
320
321constexpr inline QSizeF::QSizeF(qreal w, qreal h) noexcept : wd(w), ht(h) {}
322
323inline bool QSizeF::isNull() const noexcept
324{ return qIsNull(wd) && qIsNull(ht); }
325
326constexpr inline bool QSizeF::isEmpty() const noexcept
327{ return wd <= 0. || ht <= 0.; }
328
329constexpr inline bool QSizeF::isValid() const noexcept
330{ return wd >= 0. && ht >= 0.; }
331
332constexpr inline qreal QSizeF::width() const noexcept
333{ return wd; }
334
335constexpr inline qreal QSizeF::height() const noexcept
336{ return ht; }
337
338constexpr inline void QSizeF::setWidth(qreal w) noexcept
339{ wd = w; }
340
341constexpr inline void QSizeF::setHeight(qreal h) noexcept
342{ ht = h; }
343
344constexpr inline QSizeF QSizeF::transposed() const noexcept
345{ return QSizeF(ht, wd); }
346
348{ scale(QSizeF(w, h), mode); }
349
350inline void QSizeF::scale(const QSizeF &s, Qt::AspectRatioMode mode) noexcept
351{ *this = scaled(s, mode); }
352
354{ return scaled(QSizeF(w, h), mode); }
355
356constexpr inline qreal &QSizeF::rwidth() noexcept
357{ return wd; }
358
359constexpr inline qreal &QSizeF::rheight() noexcept
360{ return ht; }
361
362constexpr inline QSizeF &QSizeF::operator+=(const QSizeF &s) noexcept
363{
364 wd += s.wd;
365 ht += s.ht;
366 return *this;
367}
368
369constexpr inline QSizeF &QSizeF::operator-=(const QSizeF &s) noexcept
370{
371 wd -= s.wd;
372 ht -= s.ht;
373 return *this;
374}
375
376constexpr inline QSizeF &QSizeF::operator*=(qreal c) noexcept
377{
378 wd *= c;
379 ht *= c;
380 return *this;
381}
382
384{
386 wd = wd / c;
387 ht = ht / c;
388 return *this;
389}
390
391constexpr inline QSizeF QSizeF::expandedTo(const QSizeF &otherSize) const noexcept
392{
393 return QSizeF(qMax(wd, otherSize.wd), qMax(ht, otherSize.ht));
394}
395
396constexpr inline QSizeF QSizeF::boundedTo(const QSizeF &otherSize) const noexcept
397{
398 return QSizeF(qMin(wd, otherSize.wd), qMin(ht, otherSize.ht));
399}
400
401constexpr inline QSize QSizeF::toSize() const noexcept
402{
403 return QSize(qRound(wd), qRound(ht));
404}
405
406constexpr QSizeF QSize::toSizeF() const noexcept { return *this; }
407
408#ifndef QT_NO_DEBUG_STREAM
409Q_CORE_EXPORT QDebug operator<<(QDebug, const QSizeF &);
410#endif
411
413
414/*****************************************************************************
415 QSize/QSizeF tuple protocol
416 *****************************************************************************/
417
418namespace std {
419 template <>
420 class tuple_size<QT_PREPEND_NAMESPACE(QSize)> : public integral_constant<size_t, 2> {};
421 template <>
422 class tuple_element<0, QT_PREPEND_NAMESPACE(QSize)> { public: using type = int; };
423 template <>
424 class tuple_element<1, QT_PREPEND_NAMESPACE(QSize)> { public: using type = int; };
425
426 template <>
427 class tuple_size<QT_PREPEND_NAMESPACE(QSizeF)> : public integral_constant<size_t, 2> {};
428 template <>
429 class tuple_element<0, QT_PREPEND_NAMESPACE(QSizeF)> { public: using type = QT_PREPEND_NAMESPACE(qreal); };
430 template <>
431 class tuple_element<1, QT_PREPEND_NAMESPACE(QSizeF)> { public: using type = QT_PREPEND_NAMESPACE(qreal); };
432}
433
434#endif // QSIZE_H
\inmodule QtCore\reentrant
Definition qdatastream.h:46
\inmodule QtCore
\inmodule QtCore
Definition qmargins.h:270
\inmodule QtCore
Definition qmargins.h:24
\inmodule QtCore
Definition qsize.h:208
constexpr QSizeF & operator*=(qreal c) noexcept
This is an overloaded member function, provided for convenience. It differs from the above function o...
Definition qsize.h:376
constexpr QSizeF() noexcept
Constructs an invalid size.
Definition qsize.h:317
constexpr qreal & rwidth() noexcept
Returns a reference to the width.
Definition qsize.h:356
friend constexpr QSizeF operator*(const QSizeF &s, qreal c) noexcept
This is an overloaded member function, provided for convenience. It differs from the above function o...
Definition qsize.h:269
friend constexpr QSizeF operator*(qreal c, const QSizeF &s) noexcept
This is an overloaded member function, provided for convenience. It differs from the above function o...
Definition qsize.h:271
void scale(qreal w, qreal h, Qt::AspectRatioMode mode) noexcept
Scales the size to a rectangle with the given width and height, according to the specified mode.
Definition qsize.h:347
constexpr QSizeF shrunkBy(QMarginsF m) const noexcept
Definition qsize.h:235
constexpr QSizeF grownBy(QMarginsF m) const noexcept
Definition qsize.h:233
constexpr bool isValid() const noexcept
Returns true if both the width and height are equal to or greater than 0; otherwise returns false.
Definition qsize.h:329
friend constexpr QSizeF operator-(const QSizeF &s1, const QSizeF &s2) noexcept
Returns s2 subtracted from s1; each component is subtracted separately.
Definition qsize.h:267
friend constexpr bool comparesEqual(const QSizeF &lhs, const QSizeF &rhs) noexcept
Definition qsize.h:259
bool isNull() const noexcept
Returns true if both the width and height are 0.0 (ignoring the sign); otherwise returns false.
Definition qsize.h:323
constexpr void setHeight(qreal h) noexcept
Sets the height to the given finite height.
Definition qsize.h:341
QSizeF & operator/=(qreal c)
This is an overloaded member function, provided for convenience. It differs from the above function o...
Definition qsize.h:383
constexpr QSize toSize() const noexcept
Returns an integer based copy of this size.
Definition qsize.h:401
constexpr qreal & rheight() noexcept
Returns a reference to the height.
Definition qsize.h:359
constexpr void setWidth(qreal w) noexcept
Sets the width to the given finite width.
Definition qsize.h:338
constexpr qreal width() const noexcept
Returns the width.
Definition qsize.h:332
friend constexpr decltype(auto) get(S &&s) noexcept
Definition qsize.h:292
QT_WARNING_POP friend constexpr bool qFuzzyIsNull(const QSizeF &size) noexcept
Definition qsize.h:257
constexpr QSizeF & operator-=(const QSizeF &) noexcept
Subtracts the given size from this size and returns a reference to this size.
Definition qsize.h:369
constexpr bool isEmpty() const noexcept
Returns true if either of the width and height is less than or equal to 0; otherwise returns false.
Definition qsize.h:326
QSizeF scaled(qreal w, qreal h, Qt::AspectRatioMode mode) const noexcept
Definition qsize.h:353
friend QSizeF operator/(const QSizeF &s, qreal c)
This is an overloaded member function, provided for convenience. It differs from the above function o...
Definition qsize.h:273
constexpr QSizeF & operator+=(const QSizeF &) noexcept
Adds the given size to this size and returns a reference to this size.
Definition qsize.h:362
constexpr QSizeF transposed() const noexcept
Definition qsize.h:344
constexpr QSizeF expandedTo(const QSizeF &) const noexcept
Returns a size holding the maximum width and height of this size and the given otherSize.
Definition qsize.h:391
constexpr QSizeF boundedTo(const QSizeF &) const noexcept
Returns a size holding the minimum width and height of this size and the given otherSize.
Definition qsize.h:396
constexpr qreal height() const noexcept
Returns the height.
Definition qsize.h:335
\inmodule QtCore
Definition qsize.h:25
constexpr QSize boundedTo(const QSize &) const noexcept
Returns a size holding the minimum width and height of this size and the given otherSize.
Definition qsize.h:197
constexpr int height() const noexcept
Returns the height.
Definition qsize.h:133
constexpr QSize grownBy(QMargins m) const noexcept
Definition qsize.h:49
constexpr QSize shrunkBy(QMargins m) const noexcept
Definition qsize.h:51
constexpr int width() const noexcept
Returns the width.
Definition qsize.h:130
constexpr int & rheight() noexcept
Returns a reference to the height.
Definition qsize.h:157
constexpr QSize & operator-=(const QSize &) noexcept
Subtracts the given size from this size, and returns a reference to this size.
Definition qsize.h:167
friend constexpr QSize operator-(const QSize &s1, const QSize &s2) noexcept
Returns s2 subtracted from s1; each component is subtracted separately.
Definition qsize.h:68
constexpr QSize expandedTo(const QSize &) const noexcept
Returns a size holding the maximum width and height of this size and the given otherSize.
Definition qsize.h:192
constexpr QSize & operator+=(const QSize &) noexcept
Adds the given size to this size, and returns a reference to this size.
Definition qsize.h:160
constexpr void setWidth(int w) noexcept
Sets the width to the given width.
Definition qsize.h:136
friend constexpr QSize operator*(const QSize &s, qreal c) noexcept
Multiplies the given size by the given factor, and returns the result rounded to the nearest integer.
Definition qsize.h:70
constexpr QSize & operator*=(qreal c) noexcept
This is an overloaded member function, provided for convenience. It differs from the above function o...
Definition qsize.h:174
QSize scaled(int w, int h, Qt::AspectRatioMode mode) const noexcept
Definition qsize.h:151
void scale(int w, int h, Qt::AspectRatioMode mode) noexcept
Scales the size to a rectangle with the given width and height, according to the specified mode:
Definition qsize.h:145
constexpr QSize transposed() const noexcept
Definition qsize.h:142
constexpr int & rwidth() noexcept
Returns a reference to the width.
Definition qsize.h:154
constexpr bool isNull() const noexcept
Returns true if both the width and height is 0; otherwise returns false.
Definition qsize.h:121
constexpr bool isEmpty() const noexcept
Returns true if either of the width and height is less than or equal to 0; otherwise returns false.
Definition qsize.h:124
friend constexpr QSize operator*(qreal c, const QSize &s) noexcept
This is an overloaded member function, provided for convenience. It differs from the above function o...
Definition qsize.h:72
constexpr QSize() noexcept
Constructs a size with an invalid width and height (i.e., isValid() returns false).
Definition qsize.h:117
friend QSize operator/(const QSize &s, qreal c)
This is an overloaded member function, provided for convenience. It differs from the above function o...
Definition qsize.h:74
constexpr void setHeight(int h) noexcept
Sets the height to the given height.
Definition qsize.h:139
constexpr bool isValid() const noexcept
Returns true if both the width and height is equal to or greater than 0; otherwise returns false.
Definition qsize.h:127
constexpr QSizeF toSizeF() const noexcept
Definition qsize.h:406
QSize & operator/=(qreal c)
This is an overloaded member function, provided for convenience. It differs from the above function o...
Definition qsize.h:184
Combined button and popup list for selecting options.
AspectRatioMode
#define Q_DECLARE_EQUALITY_COMPARABLE_LITERAL_TYPE(...)
#define QT_WARNING_POP
#define QT_WARNING_DISABLE_FLOAT_COMPARE
#define QT_WARNING_PUSH
static QDBusError::ErrorType get(const char *name)
bool comparesEqual(const QDir &lhs, const QDir &rhs)
Definition qdir.cpp:1819
size_t qHash(const QFileSystemWatcherPathKey &key, size_t seed=0)
bool qIsFinite(qfloat16 f) noexcept
Definition qfloat16.h:285
bool qFuzzyCompare(qfloat16 p1, qfloat16 p2) noexcept
Definition qfloat16.h:333
bool qFuzzyIsNull(qfloat16 f) noexcept
Definition qfloat16.h:349
bool qIsNull(qfloat16 f) noexcept
Definition qfloat16.h:354
int qRound(qfloat16 d) noexcept
Definition qfloat16.h:327
constexpr QtPrivate::QHashMultiReturnType< T... > qHashMulti(size_t seed, const T &... args) noexcept(std::conjunction_v< QtPrivate::QNothrowHashable< T >... >)
constexpr const T & qMin(const T &a, const T &b)
Definition qminmax.h:40
constexpr const T & qMax(const T &a, const T &b)
Definition qminmax.h:42
GLenum mode
const GLfloat * m
GLfloat GLfloat GLfloat w
[0]
GLint GLsizei GLsizei height
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLuint GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat s1
GLint GLsizei width
GLint GLsizei GLboolean transpose
GLfloat GLfloat GLfloat GLfloat h
GLdouble s
[6]
Definition qopenglext.h:235
const GLubyte * c
GLenum GLenum GLenum GLenum GLenum scale
static Q_CONSTINIT QBasicAtomicInteger< unsigned > seed
Definition qrandom.cpp:196
#define Q_ASSERT(cond)
Definition qrandom.cpp:47
constexpr size_t qHash(const QSize &s, size_t seed=0) noexcept
Definition qsize.h:181
Q_CORE_EXPORT QDataStream & operator>>(QDataStream &, QSize &)
Definition qsize.cpp:412
Q_CORE_EXPORT QDataStream & operator<<(QDataStream &, const QSize &)
Definition qsize.cpp:393
#define s2
@ Q_RELOCATABLE_TYPE
Definition qtypeinfo.h:158
#define Q_DECLARE_TYPEINFO(TYPE, FLAGS)
Definition qtypeinfo.h:180
double qreal
Definition qtypes.h:187
QImage scaled(const QImage &image)
[0]
size rheight()+
size rwidth()+