Qt 6.x
The Qt SDK
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
62 friend inline constexpr bool operator==(const QSize &s1, const QSize &s2) noexcept
63 { return s1.wd == s2.wd && s1.ht == s2.ht; }
64 friend inline constexpr bool operator!=(const QSize &s1, const QSize &s2) noexcept
65 { 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
78#if defined(Q_OS_DARWIN) || defined(Q_QDOC)
79 [[nodiscard]] CGSize toCGSize() const noexcept;
80#endif
81
82 [[nodiscard]] inline constexpr QSizeF toSizeF() const noexcept;
83
85 int wd;
86 int ht;
87
88 template <std::size_t I,
89 typename S,
90 std::enable_if_t<(I < 2), bool> = true,
91 std::enable_if_t<std::is_same_v<q20::remove_cvref_t<S>, QSize>, bool> = true>
92 friend constexpr decltype(auto) get(S &&s) noexcept
93 {
94 if constexpr (I == 0)
95 return q23::forward_like<S>(s.wd);
96 else if constexpr (I == 1)
97 return q23::forward_like<S>(s.ht);
98 }
99};
101
102/*****************************************************************************
103 QSize stream functions
104 *****************************************************************************/
105
106#ifndef QT_NO_DATASTREAM
107Q_CORE_EXPORT QDataStream &operator<<(QDataStream &, const QSize &);
108Q_CORE_EXPORT QDataStream &operator>>(QDataStream &, QSize &);
109#endif
110
111
112/*****************************************************************************
113 QSize inline functions
114 *****************************************************************************/
115
116constexpr inline QSize::QSize() noexcept : wd(-1), ht(-1) {}
117
118constexpr inline QSize::QSize(int w, int h) noexcept : wd(w), ht(h) {}
119
120constexpr inline bool QSize::isNull() const noexcept
121{ return wd == 0 && ht == 0; }
122
123constexpr inline bool QSize::isEmpty() const noexcept
124{ return wd < 1 || ht < 1; }
125
126constexpr inline bool QSize::isValid() const noexcept
127{ return wd >= 0 && ht >= 0; }
128
129constexpr inline int QSize::width() const noexcept
130{ return wd; }
131
132constexpr inline int QSize::height() const noexcept
133{ return ht; }
134
135constexpr inline void QSize::setWidth(int w) noexcept
136{ wd = w; }
137
138constexpr inline void QSize::setHeight(int h) noexcept
139{ ht = h; }
140
141constexpr inline QSize QSize::transposed() const noexcept
142{ return QSize(ht, wd); }
143
144inline void QSize::scale(int w, int h, Qt::AspectRatioMode mode) noexcept
145{ scale(QSize(w, h), mode); }
146
147inline void QSize::scale(const QSize &s, Qt::AspectRatioMode mode) noexcept
148{ *this = scaled(s, mode); }
149
150inline QSize QSize::scaled(int w, int h, Qt::AspectRatioMode mode) const noexcept
151{ return scaled(QSize(w, h), mode); }
152
153constexpr inline int &QSize::rwidth() noexcept
154{ return wd; }
155
156constexpr inline int &QSize::rheight() noexcept
157{ return ht; }
158
159constexpr inline QSize &QSize::operator+=(const QSize &s) noexcept
160{
161 wd += s.wd;
162 ht += s.ht;
163 return *this;
164}
165
166constexpr inline QSize &QSize::operator-=(const QSize &s) noexcept
167{
168 wd -= s.wd;
169 ht -= s.ht;
170 return *this;
171}
172
173constexpr inline QSize &QSize::operator*=(qreal c) noexcept
174{
175 wd = qRound(wd * c);
176 ht = qRound(ht * c);
177 return *this;
178}
179
180constexpr inline size_t qHash(const QSize &s, size_t seed = 0) noexcept
181{ return qHashMulti(seed, s.wd, s.ht); }
182
184{
186 wd = qRound(wd / c);
187 ht = qRound(ht / c);
188 return *this;
189}
190
191constexpr inline QSize QSize::expandedTo(const QSize & otherSize) const noexcept
192{
193 return QSize(qMax(wd,otherSize.wd), qMax(ht,otherSize.ht));
194}
195
196constexpr inline QSize QSize::boundedTo(const QSize & otherSize) const noexcept
197{
198 return QSize(qMin(wd,otherSize.wd), qMin(ht,otherSize.ht));
199}
200
201#ifndef QT_NO_DEBUG_STREAM
202Q_CORE_EXPORT QDebug operator<<(QDebug, const QSize &);
203#endif
204
205
206class Q_CORE_EXPORT QSizeF
207{
208public:
209 constexpr QSizeF() noexcept;
210 constexpr QSizeF(const QSize &sz) noexcept;
211 constexpr QSizeF(qreal w, qreal h) noexcept;
212
213 inline bool isNull() const noexcept;
214 constexpr inline bool isEmpty() const noexcept;
215 constexpr inline bool isValid() const noexcept;
216
217 constexpr inline qreal width() const noexcept;
218 constexpr inline qreal height() const noexcept;
219 constexpr inline void setWidth(qreal w) noexcept;
220 constexpr inline void setHeight(qreal h) noexcept;
221 void transpose() noexcept;
222 [[nodiscard]] constexpr inline QSizeF transposed() const noexcept;
223
224 inline void scale(qreal w, qreal h, Qt::AspectRatioMode mode) noexcept;
225 inline void scale(const QSizeF &s, Qt::AspectRatioMode mode) noexcept;
226 [[nodiscard]] QSizeF scaled(qreal w, qreal h, Qt::AspectRatioMode mode) const noexcept;
227 [[nodiscard]] QSizeF scaled(const QSizeF &s, Qt::AspectRatioMode mode) const noexcept;
228
229 [[nodiscard]] constexpr inline QSizeF expandedTo(const QSizeF &) const noexcept;
230 [[nodiscard]] constexpr inline QSizeF boundedTo(const QSizeF &) const noexcept;
231
232 [[nodiscard]] constexpr QSizeF grownBy(QMarginsF m) const noexcept
233 { return {width() + m.left() + m.right(), height() + m.top() + m.bottom()}; }
234 [[nodiscard]] constexpr QSizeF shrunkBy(QMarginsF m) const noexcept
235 { return {width() - m.left() - m.right(), height() - m.top() - m.bottom()}; }
236
237 constexpr inline qreal &rwidth() noexcept;
238 constexpr inline qreal &rheight() noexcept;
239
240 constexpr inline QSizeF &operator+=(const QSizeF &) noexcept;
241 constexpr inline QSizeF &operator-=(const QSizeF &) noexcept;
242 constexpr inline QSizeF &operator*=(qreal c) noexcept;
243 inline QSizeF &operator/=(qreal c);
244
247 friend constexpr inline bool operator==(const QSizeF &s1, const QSizeF &s2)
248 {
249 return ((!s1.wd || !s2.wd) ? qFuzzyIsNull(s1.wd - s2.wd) : qFuzzyCompare(s1.wd, s2.wd))
250 && ((!s1.ht || !s2.ht) ? qFuzzyIsNull(s1.ht - s2.ht) : qFuzzyCompare(s1.ht, s2.ht));
251 }
253 friend constexpr inline bool operator!=(const QSizeF &s1, const QSizeF &s2)
254 { return !(s1 == s2); }
255 friend constexpr inline QSizeF operator+(const QSizeF &s1, const QSizeF &s2) noexcept
256 { return QSizeF(s1.wd + s2.wd, s1.ht + s2.ht); }
257 friend constexpr inline QSizeF operator-(const QSizeF &s1, const QSizeF &s2) noexcept
258 { return QSizeF(s1.wd - s2.wd, s1.ht - s2.ht); }
259 friend constexpr inline QSizeF operator*(const QSizeF &s, qreal c) noexcept
260 { return QSizeF(s.wd * c, s.ht * c); }
261 friend constexpr inline QSizeF operator*(qreal c, const QSizeF &s) noexcept
262 { return s * c; }
263 friend inline QSizeF operator/(const QSizeF &s, qreal c)
264 { Q_ASSERT(!qFuzzyIsNull(c)); return QSizeF(s.wd / c, s.ht / c); }
265
266 constexpr inline QSize toSize() const noexcept;
267
268#if defined(Q_OS_DARWIN) || defined(Q_QDOC)
269 [[nodiscard]] static QSizeF fromCGSize(CGSize size) noexcept;
270 [[nodiscard]] CGSize toCGSize() const noexcept;
271#endif
272
273private:
274 qreal wd;
275 qreal ht;
276
277 template <std::size_t I,
278 typename S,
279 std::enable_if_t<(I < 2), bool> = true,
280 std::enable_if_t<std::is_same_v<q20::remove_cvref_t<S>, QSizeF>, bool> = true>
281 friend constexpr decltype(auto) get(S &&s) noexcept
282 {
283 if constexpr (I == 0)
284 return q23::forward_like<S>(s.wd);
285 else if constexpr (I == 1)
286 return q23::forward_like<S>(s.ht);
287 }
288};
290
291
292/*****************************************************************************
293 QSizeF stream functions
294 *****************************************************************************/
295
296#ifndef QT_NO_DATASTREAM
297Q_CORE_EXPORT QDataStream &operator<<(QDataStream &, const QSizeF &);
298Q_CORE_EXPORT QDataStream &operator>>(QDataStream &, QSizeF &);
299#endif
300
301
302/*****************************************************************************
303 QSizeF inline functions
304 *****************************************************************************/
305
306constexpr inline QSizeF::QSizeF() noexcept : wd(-1.), ht(-1.) {}
307
308constexpr inline QSizeF::QSizeF(const QSize &sz) noexcept : wd(sz.width()), ht(sz.height()) {}
309
310constexpr inline QSizeF::QSizeF(qreal w, qreal h) noexcept : wd(w), ht(h) {}
311
312inline bool QSizeF::isNull() const noexcept
313{ return qIsNull(wd) && qIsNull(ht); }
314
315constexpr inline bool QSizeF::isEmpty() const noexcept
316{ return wd <= 0. || ht <= 0.; }
317
318constexpr inline bool QSizeF::isValid() const noexcept
319{ return wd >= 0. && ht >= 0.; }
320
321constexpr inline qreal QSizeF::width() const noexcept
322{ return wd; }
323
324constexpr inline qreal QSizeF::height() const noexcept
325{ return ht; }
326
327constexpr inline void QSizeF::setWidth(qreal w) noexcept
328{ wd = w; }
329
330constexpr inline void QSizeF::setHeight(qreal h) noexcept
331{ ht = h; }
332
333constexpr inline QSizeF QSizeF::transposed() const noexcept
334{ return QSizeF(ht, wd); }
335
337{ scale(QSizeF(w, h), mode); }
338
339inline void QSizeF::scale(const QSizeF &s, Qt::AspectRatioMode mode) noexcept
340{ *this = scaled(s, mode); }
341
343{ return scaled(QSizeF(w, h), mode); }
344
345constexpr inline qreal &QSizeF::rwidth() noexcept
346{ return wd; }
347
348constexpr inline qreal &QSizeF::rheight() noexcept
349{ return ht; }
350
351constexpr inline QSizeF &QSizeF::operator+=(const QSizeF &s) noexcept
352{
353 wd += s.wd;
354 ht += s.ht;
355 return *this;
356}
357
358constexpr inline QSizeF &QSizeF::operator-=(const QSizeF &s) noexcept
359{
360 wd -= s.wd;
361 ht -= s.ht;
362 return *this;
363}
364
365constexpr inline QSizeF &QSizeF::operator*=(qreal c) noexcept
366{
367 wd *= c;
368 ht *= c;
369 return *this;
370}
371
373{
375 wd = wd / c;
376 ht = ht / c;
377 return *this;
378}
379
380constexpr inline QSizeF QSizeF::expandedTo(const QSizeF &otherSize) const noexcept
381{
382 return QSizeF(qMax(wd, otherSize.wd), qMax(ht, otherSize.ht));
383}
384
385constexpr inline QSizeF QSizeF::boundedTo(const QSizeF &otherSize) const noexcept
386{
387 return QSizeF(qMin(wd, otherSize.wd), qMin(ht, otherSize.ht));
388}
389
390constexpr inline QSize QSizeF::toSize() const noexcept
391{
392 return QSize(qRound(wd), qRound(ht));
393}
394
395constexpr QSizeF QSize::toSizeF() const noexcept { return *this; }
396
397#ifndef QT_NO_DEBUG_STREAM
398Q_CORE_EXPORT QDebug operator<<(QDebug, const QSizeF &);
399#endif
400
402
403/*****************************************************************************
404 QSize/QSizeF tuple protocol
405 *****************************************************************************/
406
407namespace std {
408 template <>
409 class tuple_size<QT_PREPEND_NAMESPACE(QSize)> : public integral_constant<size_t, 2> {};
410 template <>
411 class tuple_element<0, QT_PREPEND_NAMESPACE(QSize)> { public: using type = int; };
412 template <>
413 class tuple_element<1, QT_PREPEND_NAMESPACE(QSize)> { public: using type = int; };
414
415 template <>
416 class tuple_size<QT_PREPEND_NAMESPACE(QSizeF)> : public integral_constant<size_t, 2> {};
417 template <>
418 class tuple_element<0, QT_PREPEND_NAMESPACE(QSizeF)> { public: using type = QT_PREPEND_NAMESPACE(qreal); };
419 template <>
420 class tuple_element<1, QT_PREPEND_NAMESPACE(QSizeF)> { public: using type = QT_PREPEND_NAMESPACE(qreal); };
421}
422
423#endif // QSIZE_H
\inmodule QtCore\reentrant
Definition qdatastream.h:30
\inmodule QtCore
\inmodule QtCore
Definition qmargins.h:274
\inmodule QtCore
Definition qmargins.h:23
\inmodule QtCore
Definition qsize.h:207
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:365
constexpr QSizeF() noexcept
Constructs an invalid size.
Definition qsize.h:306
QT_WARNING_POP friend constexpr bool operator!=(const QSizeF &s1, const QSizeF &s2)
Returns true if s1 and s2 are sufficiently different; otherwise returns false.
Definition qsize.h:253
constexpr qreal & rwidth() noexcept
Returns a reference to the width.
Definition qsize.h:345
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:259
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:261
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:336
constexpr QSizeF shrunkBy(QMarginsF m) const noexcept
Definition qsize.h:234
constexpr QSizeF grownBy(QMarginsF m) const noexcept
Definition qsize.h:232
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:318
friend constexpr QSizeF operator-(const QSizeF &s1, const QSizeF &s2) noexcept
Returns s2 subtracted from s1; each component is subtracted separately.
Definition qsize.h:257
bool isNull() const noexcept
Returns true if both the width and height are 0.0 (ignoring the sign); otherwise returns false.
Definition qsize.h:312
constexpr void setHeight(qreal h) noexcept
Sets the height to the given finite height.
Definition qsize.h:330
QSizeF & operator/=(qreal c)
This is an overloaded member function, provided for convenience. It differs from the above function o...
Definition qsize.h:372
constexpr QSize toSize() const noexcept
Returns an integer based copy of this size.
Definition qsize.h:390
constexpr qreal & rheight() noexcept
Returns a reference to the height.
Definition qsize.h:348
constexpr void setWidth(qreal w) noexcept
Sets the width to the given finite width.
Definition qsize.h:327
constexpr qreal width() const noexcept
Returns the width.
Definition qsize.h:321
friend constexpr decltype(auto) get(S &&s) noexcept
Definition qsize.h:281
friend constexpr QSizeF operator+(const QSizeF &s1, const QSizeF &s2) noexcept
Returns the sum of s1 and s2; each component is added separately.
Definition qsize.h:255
constexpr QSizeF & operator-=(const QSizeF &) noexcept
Subtracts the given size from this size and returns a reference to this size.
Definition qsize.h:358
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:315
QSizeF scaled(qreal w, qreal h, Qt::AspectRatioMode mode) const noexcept
Definition qsize.h:342
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:263
constexpr QSizeF & operator+=(const QSizeF &) noexcept
Adds the given size to this size and returns a reference to this size.
Definition qsize.h:351
constexpr QSizeF transposed() const noexcept
Definition qsize.h:333
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:380
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:385
constexpr qreal height() const noexcept
Returns the height.
Definition qsize.h:324
\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:196
constexpr int height() const noexcept
Returns the height.
Definition qsize.h:132
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:129
constexpr int & rheight() noexcept
Returns a reference to the height.
Definition qsize.h:156
constexpr QSize & operator-=(const QSize &) noexcept
Subtracts the given size from this size, and returns a reference to this size.
Definition qsize.h:166
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:191
friend constexpr bool operator!=(const QSize &s1, const QSize &s2) noexcept
Returns true if s1 and s2 are different; otherwise returns false.
Definition qsize.h:64
constexpr QSize & operator+=(const QSize &) noexcept
Adds the given size to this size, and returns a reference to this size.
Definition qsize.h:159
constexpr void setWidth(int w) noexcept
Sets the width to the given width.
Definition qsize.h:135
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:173
QSize scaled(int w, int h, Qt::AspectRatioMode mode) const noexcept
Definition qsize.h:150
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:144
constexpr QSize transposed() const noexcept
Definition qsize.h:141
constexpr int & rwidth() noexcept
Returns a reference to the width.
Definition qsize.h:153
constexpr bool isNull() const noexcept
Returns true if both the width and height is 0; otherwise returns false.
Definition qsize.h:120
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:123
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:116
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:138
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:126
friend constexpr QSize operator+(const QSize &s1, const QSize &s2) noexcept
Returns the sum of s1 and s2; each component is added separately.
Definition qsize.h:66
constexpr QSizeF toSizeF() const noexcept
Definition qsize.h:395
QSize & operator/=(qreal c)
This is an overloaded member function, provided for convenience. It differs from the above function o...
Definition qsize.h:183
Combined button and popup list for selecting options.
AspectRatioMode
#define QT_WARNING_POP
#define QT_WARNING_DISABLE_FLOAT_COMPARE
#define QT_WARNING_PUSH
static QDBusError::ErrorType get(const char *name)
size_t qHash(const QFileSystemWatcherPathKey &key, size_t seed=0)
bool qIsFinite(qfloat16 f) noexcept
Definition qfloat16.h:239
bool qFuzzyCompare(qfloat16 p1, qfloat16 p2) noexcept
Definition qfloat16.h:287
bool qFuzzyIsNull(qfloat16 f) noexcept
Definition qfloat16.h:303
bool qIsNull(qfloat16 f) noexcept
Definition qfloat16.h:308
int qRound(qfloat16 d) noexcept
Definition qfloat16.h:281
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
const GLubyte * c
GLdouble s
[6]
Definition qopenglext.h:235
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:180
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:145
#define Q_DECLARE_TYPEINFO(TYPE, FLAGS)
Definition qtypeinfo.h:163
double qreal
Definition qtypes.h:92
QT_END_NAMESPACE typedef QT_PREPEND_NAMESPACE(quintptr) WId
QImage scaled(const QImage &image)
[0]
size rheight()+
size rwidth()+