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
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/qcheckedint_impl.h>
8#include <QtCore/qnamespace.h>
9#include <QtCore/qhashfunctions.h>
10#include <QtCore/qmargins.h>
11
12#include <QtCore/q20type_traits.h>
13#include <QtCore/q23utility.h>
14
15#if defined(Q_OS_DARWIN) || defined(Q_QDOC)
16struct CGSize;
17#endif
18
20
21// QT_ENABLE_P0846_SEMANTICS_FOR(get) // from qmargins.h
22
23class QSizeF;
24
25class Q_CORE_EXPORT QSize
26{
27public:
28 constexpr QSize() noexcept;
29 constexpr QSize(int w, int h) noexcept;
30
31 constexpr inline bool isNull() const noexcept;
32 constexpr inline bool isEmpty() const noexcept;
33 constexpr inline bool isValid() const noexcept;
34
35 constexpr inline int width() const noexcept;
36 constexpr inline int height() const noexcept;
37 constexpr inline void setWidth(int w) noexcept;
38 constexpr inline void setHeight(int h) noexcept;
39 void transpose() noexcept;
40 [[nodiscard]] constexpr inline QSize transposed() const noexcept;
41
42 inline void scale(int w, int h, Qt::AspectRatioMode mode) noexcept;
43 inline void scale(const QSize &s, Qt::AspectRatioMode mode) noexcept;
44 [[nodiscard]] QSize scaled(int w, int h, Qt::AspectRatioMode mode) const noexcept;
45 [[nodiscard]] QSize scaled(const QSize &s, Qt::AspectRatioMode mode) const noexcept;
46
47 [[nodiscard]] constexpr inline QSize expandedTo(const QSize &) const noexcept;
48 [[nodiscard]] constexpr inline QSize boundedTo(const QSize &) const noexcept;
49
50 [[nodiscard]] constexpr QSize grownBy(QMargins m) const noexcept
51 { return {wd + m.left() + m.right(), ht + m.top() + m.bottom()}; }
52 [[nodiscard]] constexpr QSize shrunkBy(QMargins m) const noexcept
53 { return {wd - m.left() - m.right(), ht - m.top() - m.bottom()}; }
54
55 constexpr inline int &rwidth() noexcept;
56 constexpr inline int &rheight() noexcept;
57
58 constexpr inline QSize &operator+=(const QSize &) noexcept;
59 constexpr inline QSize &operator-=(const QSize &) noexcept;
60 constexpr inline QSize &operator*=(qreal c) noexcept;
61 inline QSize &operator/=(qreal c);
62
63private:
64 friend constexpr bool comparesEqual(const QSize &s1, const QSize &s2) noexcept
65 { return s1.wd == s2.wd && s1.ht == s2.ht; }
66 Q_DECLARE_EQUALITY_COMPARABLE_LITERAL_TYPE(QSize)
67 friend inline constexpr QSize operator+(const QSize &s1, const QSize &s2) noexcept
68 { return QSize(s1.wd + s2.wd, s1.ht + s2.ht); }
69 friend inline constexpr QSize operator-(const QSize &s1, const QSize &s2) noexcept
70 { return QSize(s1.wd - s2.wd, s1.ht - s2.ht); }
71 friend inline constexpr QSize operator*(const QSize &s, qreal c) noexcept
72 { return QSize(QtPrivate::qSaturateRound(s.width() * c), QtPrivate::qSaturateRound(s.height() * c)); }
73 friend inline constexpr QSize operator*(qreal c, const QSize &s) noexcept
74 { return s * c; }
75 friend inline QSize operator/(const QSize &s, qreal c)
76 {
77 Q_ASSERT(!qFuzzyIsNull(c));
78 return QSize(QtPrivate::qSaturateRound(s.width() / c), QtPrivate::qSaturateRound(s.height() / c));
79 }
80 friend inline constexpr size_t qHash(const QSize &, size_t) noexcept;
81
82public:
83#if defined(Q_OS_DARWIN) || defined(Q_QDOC)
84 [[nodiscard]] CGSize toCGSize() const noexcept;
85#endif
86
87 [[nodiscard]] inline constexpr QSizeF toSizeF() const noexcept;
88
89private:
90 using Representation = QtPrivate::QCheckedIntegers::QCheckedInt<int>;
91
92 constexpr QSize(Representation w, Representation h) noexcept
93 : wd(w), ht(h)
94 {}
95
96 Representation wd;
97 Representation ht;
98
99 template <std::size_t I,
100 typename S,
101 std::enable_if_t<(I < 2), bool> = true,
102 std::enable_if_t<std::is_same_v<q20::remove_cvref_t<S>, QSize>, bool> = true>
103 friend constexpr decltype(auto) get(S &&s) noexcept
104 {
105 if constexpr (I == 0)
106 return q23::forward_like<S>(s.wd).as_underlying();
107 else if constexpr (I == 1)
108 return q23::forward_like<S>(s.ht).as_underlying();
109 }
110};
111Q_DECLARE_TYPEINFO(QSize, Q_RELOCATABLE_TYPE);
112
113/*****************************************************************************
114 QSize stream functions
115 *****************************************************************************/
116
117#ifndef QT_NO_DATASTREAM
118Q_CORE_EXPORT QDataStream &operator<<(QDataStream &, const QSize &);
119Q_CORE_EXPORT QDataStream &operator>>(QDataStream &, QSize &);
120#endif
121
122
123/*****************************************************************************
124 QSize inline functions
125 *****************************************************************************/
126
127constexpr inline QSize::QSize() noexcept : wd(-1), ht(-1) {}
128
129constexpr inline QSize::QSize(int w, int h) noexcept : wd(w), ht(h) {}
130
131constexpr inline bool QSize::isNull() const noexcept
132{ return wd == 0 && ht == 0; }
133
134constexpr inline bool QSize::isEmpty() const noexcept
135{ return wd < 1 || ht < 1; }
136
137constexpr inline bool QSize::isValid() const noexcept
138{ return wd >= 0 && ht >= 0; }
139
140constexpr inline int QSize::width() const noexcept
141{ return wd.value(); }
142
143constexpr inline int QSize::height() const noexcept
144{ return ht.value(); }
145
146constexpr inline void QSize::setWidth(int w) noexcept
147{ wd.setValue(w); }
148
149constexpr inline void QSize::setHeight(int h) noexcept
150{ ht.setValue(h); }
151
152constexpr inline QSize QSize::transposed() const noexcept
153{ return QSize(ht, wd); }
154
155inline void QSize::scale(int w, int h, Qt::AspectRatioMode mode) noexcept
156{ scale(QSize(w, h), mode); }
157
158inline void QSize::scale(const QSize &s, Qt::AspectRatioMode mode) noexcept
159{ *this = scaled(s, mode); }
160
161inline QSize QSize::scaled(int w, int h, Qt::AspectRatioMode mode) const noexcept
162{ return scaled(QSize(w, h), mode); }
163
164constexpr inline int &QSize::rwidth() noexcept
165{ return wd.as_underlying(); }
166
167constexpr inline int &QSize::rheight() noexcept
168{ return ht.as_underlying(); }
169
170constexpr inline QSize &QSize::operator+=(const QSize &s) noexcept
171{
172 wd += s.wd;
173 ht += s.ht;
174 return *this;
175}
176
177constexpr inline QSize &QSize::operator-=(const QSize &s) noexcept
178{
179 wd -= s.wd;
180 ht -= s.ht;
181 return *this;
182}
183
184constexpr inline QSize &QSize::operator*=(qreal c) noexcept
185{
186 wd.setValue(QtPrivate::qSaturateRound(width() * c));
187 ht.setValue(QtPrivate::qSaturateRound(height() * c));
188 return *this;
189}
190
191constexpr inline size_t qHash(const QSize &s, size_t seed = 0) noexcept
192{ return qHashMulti(seed, s.width(), s.height()); }
193
194inline QSize &QSize::operator/=(qreal c)
195{
196 Q_ASSERT(!qFuzzyIsNull(c));
197 wd.setValue(QtPrivate::qSaturateRound(width() / c));
198 ht.setValue(QtPrivate::qSaturateRound(height() / c));
199 return *this;
200}
201
202constexpr inline QSize QSize::expandedTo(const QSize & otherSize) const noexcept
203{
204 return QSize(qMax(wd,otherSize.wd), qMax(ht,otherSize.ht));
205}
206
207constexpr inline QSize QSize::boundedTo(const QSize & otherSize) const noexcept
208{
209 return QSize(qMin(wd,otherSize.wd), qMin(ht,otherSize.ht));
210}
211
212#ifndef QT_NO_DEBUG_STREAM
213Q_CORE_EXPORT QDebug operator<<(QDebug, const QSize &);
214#endif
215
216
217class Q_CORE_EXPORT QSizeF
218{
219public:
220 constexpr QSizeF() noexcept;
221 constexpr QSizeF(const QSize &sz) noexcept;
222 constexpr QSizeF(qreal w, qreal h) noexcept;
223
224 inline bool isNull() const noexcept;
225 constexpr inline bool isEmpty() const noexcept;
226 constexpr inline bool isValid() const noexcept;
227
228 constexpr inline qreal width() const noexcept;
229 constexpr inline qreal height() const noexcept;
230 constexpr inline void setWidth(qreal w) noexcept;
231 constexpr inline void setHeight(qreal h) noexcept;
232 void transpose() noexcept;
233 [[nodiscard]] constexpr inline QSizeF transposed() const noexcept;
234
235 inline void scale(qreal w, qreal h, Qt::AspectRatioMode mode) noexcept;
236 inline void scale(const QSizeF &s, Qt::AspectRatioMode mode) noexcept;
237 [[nodiscard]] QSizeF scaled(qreal w, qreal h, Qt::AspectRatioMode mode) const noexcept;
238 [[nodiscard]] QSizeF scaled(const QSizeF &s, Qt::AspectRatioMode mode) const noexcept;
239
240 [[nodiscard]] constexpr inline QSizeF expandedTo(const QSizeF &) const noexcept;
241 [[nodiscard]] constexpr inline QSizeF boundedTo(const QSizeF &) const noexcept;
242
243 [[nodiscard]] constexpr QSizeF grownBy(QMarginsF m) const noexcept
244 { return {width() + m.left() + m.right(), height() + m.top() + m.bottom()}; }
245 [[nodiscard]] constexpr QSizeF shrunkBy(QMarginsF m) const noexcept
246 { return {width() - m.left() - m.right(), height() - m.top() - m.bottom()}; }
247
248 constexpr inline qreal &rwidth() noexcept;
249 constexpr inline qreal &rheight() noexcept;
250
251 constexpr inline QSizeF &operator+=(const QSizeF &) noexcept;
252 constexpr inline QSizeF &operator-=(const QSizeF &) noexcept;
253 constexpr inline QSizeF &operator*=(qreal c) noexcept;
254 inline QSizeF &operator/=(qreal c);
255
256private:
257 QT_WARNING_PUSH
258 QT_WARNING_DISABLE_FLOAT_COMPARE
259 friend constexpr bool qFuzzyCompare(const QSizeF &s1, const QSizeF &s2) noexcept
260 {
261 // Cannot use qFuzzyCompare(), because it will give incorrect results
262 // if one of the arguments is 0.0.
263 return ((!s1.wd || !s2.wd) ? qFuzzyIsNull(s1.wd - s2.wd) : qFuzzyCompare(s1.wd, s2.wd))
264 && ((!s1.ht || !s2.ht) ? qFuzzyIsNull(s1.ht - s2.ht) : qFuzzyCompare(s1.ht, s2.ht));
265 }
266 QT_WARNING_POP
267 friend constexpr bool qFuzzyIsNull(const QSizeF &size) noexcept
268 { return qFuzzyIsNull(size.wd) && qFuzzyIsNull(size.ht); }
269 friend constexpr bool comparesEqual(const QSizeF &lhs, const QSizeF &rhs) noexcept
270 { return qFuzzyCompare(lhs, rhs); }
271 Q_DECLARE_EQUALITY_COMPARABLE_LITERAL_TYPE(QSizeF)
272 friend constexpr bool comparesEqual(const QSizeF &lhs, const QSize &rhs) noexcept
273 { return comparesEqual(lhs, rhs.toSizeF()); }
274 Q_DECLARE_EQUALITY_COMPARABLE_LITERAL_TYPE(QSizeF, QSize)
275 friend constexpr inline QSizeF operator+(const QSizeF &s1, const QSizeF &s2) noexcept
276 { return QSizeF(s1.wd + s2.wd, s1.ht + s2.ht); }
277 friend constexpr inline QSizeF operator-(const QSizeF &s1, const QSizeF &s2) noexcept
278 { return QSizeF(s1.wd - s2.wd, s1.ht - s2.ht); }
279 friend constexpr inline QSizeF operator*(const QSizeF &s, qreal c) noexcept
280 { return QSizeF(s.wd * c, s.ht * c); }
281 friend constexpr inline QSizeF operator*(qreal c, const QSizeF &s) noexcept
282 { return s * c; }
283 friend inline QSizeF operator/(const QSizeF &s, qreal c)
284 { Q_ASSERT(!qFuzzyIsNull(c)); return QSizeF(s.wd / c, s.ht / c); }
285
286public:
287 constexpr inline QSize toSize() const noexcept;
288
289#if defined(Q_OS_DARWIN) || defined(Q_QDOC)
290 [[nodiscard]] static QSizeF fromCGSize(CGSize size) noexcept;
291 [[nodiscard]] CGSize toCGSize() const noexcept;
292#endif
293
294private:
295 qreal wd;
296 qreal ht;
297
298 template <std::size_t I,
299 typename S,
300 std::enable_if_t<(I < 2), bool> = true,
301 std::enable_if_t<std::is_same_v<q20::remove_cvref_t<S>, QSizeF>, bool> = true>
302 friend constexpr decltype(auto) get(S &&s) noexcept
303 {
304 if constexpr (I == 0)
305 return q23::forward_like<S>(s.wd);
306 else if constexpr (I == 1)
307 return q23::forward_like<S>(s.ht);
308 }
309};
311
312
313/*****************************************************************************
314 QSizeF stream functions
315 *****************************************************************************/
316
317#ifndef QT_NO_DATASTREAM
318Q_CORE_EXPORT QDataStream &operator<<(QDataStream &, const QSizeF &);
319Q_CORE_EXPORT QDataStream &operator>>(QDataStream &, QSizeF &);
320#endif
321
322
323/*****************************************************************************
324 QSizeF inline functions
325 *****************************************************************************/
326
327constexpr inline QSizeF::QSizeF() noexcept : wd(-1.), ht(-1.) {}
328
329constexpr inline QSizeF::QSizeF(const QSize &sz) noexcept : wd(sz.width()), ht(sz.height()) {}
330
331constexpr inline QSizeF::QSizeF(qreal w, qreal h) noexcept : wd(w), ht(h) {}
332
333inline bool QSizeF::isNull() const noexcept
334{ return qIsNull(wd) && qIsNull(ht); }
335
336constexpr inline bool QSizeF::isEmpty() const noexcept
337{ return wd <= 0. || ht <= 0.; }
338
339constexpr inline bool QSizeF::isValid() const noexcept
340{ return wd >= 0. && ht >= 0.; }
341
342constexpr inline qreal QSizeF::width() const noexcept
343{ return wd; }
344
345constexpr inline qreal QSizeF::height() const noexcept
346{ return ht; }
347
348constexpr inline void QSizeF::setWidth(qreal w) noexcept
349{ wd = w; }
350
351constexpr inline void QSizeF::setHeight(qreal h) noexcept
352{ ht = h; }
353
354constexpr inline QSizeF QSizeF::transposed() const noexcept
355{ return QSizeF(ht, wd); }
356
357inline void QSizeF::scale(qreal w, qreal h, Qt::AspectRatioMode mode) noexcept
358{ scale(QSizeF(w, h), mode); }
359
360inline void QSizeF::scale(const QSizeF &s, Qt::AspectRatioMode mode) noexcept
361{ *this = scaled(s, mode); }
362
363inline QSizeF QSizeF::scaled(qreal w, qreal h, Qt::AspectRatioMode mode) const noexcept
364{ return scaled(QSizeF(w, h), mode); }
365
366constexpr inline qreal &QSizeF::rwidth() noexcept
367{ return wd; }
368
369constexpr inline qreal &QSizeF::rheight() noexcept
370{ return ht; }
371
372constexpr inline QSizeF &QSizeF::operator+=(const QSizeF &s) noexcept
373{
374 wd += s.wd;
375 ht += s.ht;
376 return *this;
377}
378
379constexpr inline QSizeF &QSizeF::operator-=(const QSizeF &s) noexcept
380{
381 wd -= s.wd;
382 ht -= s.ht;
383 return *this;
384}
385
386constexpr inline QSizeF &QSizeF::operator*=(qreal c) noexcept
387{
388 wd *= c;
389 ht *= c;
390 return *this;
391}
392
393inline QSizeF &QSizeF::operator/=(qreal c)
394{
395 Q_ASSERT(!qFuzzyIsNull(c) && qIsFinite(c));
396 wd = wd / c;
397 ht = ht / c;
398 return *this;
399}
400
401constexpr inline QSizeF QSizeF::expandedTo(const QSizeF &otherSize) const noexcept
402{
403 return QSizeF(qMax(wd, otherSize.wd), qMax(ht, otherSize.ht));
404}
405
406constexpr inline QSizeF QSizeF::boundedTo(const QSizeF &otherSize) const noexcept
407{
408 return QSizeF(qMin(wd, otherSize.wd), qMin(ht, otherSize.ht));
409}
410
411constexpr inline QSize QSizeF::toSize() const noexcept
412{
413 return QSize(QtPrivate::qSaturateRound(wd), QtPrivate::qSaturateRound(ht));
414}
415
416constexpr QSizeF QSize::toSizeF() const noexcept { return *this; }
417
418#ifndef QT_NO_DEBUG_STREAM
419Q_CORE_EXPORT QDebug operator<<(QDebug, const QSizeF &);
420#endif
421
422QT_END_NAMESPACE
423
424/*****************************************************************************
425 QSize/QSizeF tuple protocol
426 *****************************************************************************/
427
428namespace std {
429 template <>
431 template <>
432 class tuple_element<0, QT_PREPEND_NAMESPACE(QSize)> { public: using type = int; };
433 template <>
434 class tuple_element<1, QT_PREPEND_NAMESPACE(QSize)> { public: using type = int; };
435
436 template <>
438 template <>
440 template <>
442}
443
444#endif // QSIZE_H
static bool readIniSection(const QSettingsKey &section, QByteArrayView data, ParsedSettingsMap *settingsMap)
void set(const QString &key, const QVariant &value) override
QStringList children(const QString &prefix, ChildSpec spec) const override
virtual void initAccess()
bool readIniFile(QByteArrayView data, UnparsedSettingsMap *unparsedIniSections)
bool isWritable() const override
QString fileName() const override
QConfFileSettingsPrivate(QSettings::Format format, QSettings::Scope scope, const QString &organization, const QString &application)
void remove(const QString &key) override
QConfFileSettingsPrivate(const QString &fileName, QSettings::Format format)
const QList< QConfFile * > & getConfFiles() const
static bool readIniLine(QByteArrayView data, qsizetype &dataPos, qsizetype &lineStart, qsizetype &lineLen, qsizetype &equalsPos)
std::optional< QVariant > get(const QString &key) const override
QString name
QAtomicInt ref
UnparsedSettingsMap unparsedIniSections
ParsedSettingsMap originalKeys
qint64 size
bool userPerms
static Q_AUTOTEST_EXPORT void clearCache()
QDateTime timeStamp
QMutex mutex
ParsedSettingsMap removedKeys
ParsedSettingsMap mergedKeyMap() const
static QConfFile * fromName(const QString &name, bool _userPerms)
bool isWritable() const
ParsedSettingsMap addedKeys
\inmodule QtCore\reentrant
Definition qdatastream.h:49
\inmodule QtCore
Definition qfile.h:95
\inmodule QtCore
Definition qlockfile.h:17
\inmodule QtCore\reentrant
Definition qpoint.h:229
constexpr qreal & ry() noexcept
Returns a reference to the y coordinate of this point.
Definition qpoint.h:380
constexpr qreal x() const noexcept
Returns the x coordinate of this point.
Definition qpoint.h:355
constexpr qreal manhattanLength() const
Definition qpoint.h:345
constexpr qreal y() const noexcept
Returns the y coordinate of this point.
Definition qpoint.h:360
constexpr QPointF & operator+=(const QPointF &p)
Adds the given point to this point and returns a reference to this point.
Definition qpoint.h:385
constexpr qreal & rx() noexcept
Returns a reference to the x coordinate of this point.
Definition qpoint.h:375
constexpr QPointF & operator*=(qreal c)
Multiplies this point's coordinates by the given finite factor, and returns a reference to this point...
Definition qpoint.h:399
constexpr QPointF transposed() const noexcept
Definition qpoint.h:244
constexpr void setY(qreal y) noexcept
Sets the y coordinate of this point to the given finite y coordinate.
Definition qpoint.h:370
constexpr QPointF & operator-=(const QPointF &p)
Subtracts the given point from this point and returns a reference to this point.
Definition qpoint.h:392
constexpr QPointF() noexcept
Constructs a null point, i.e.
Definition qpoint.h:339
constexpr QPointF(qreal xpos, qreal ypos) noexcept
Constructs a point with the given coordinates (xpos, ypos).
Definition qpoint.h:341
constexpr void setX(qreal x) noexcept
Sets the x coordinate of this point to the given finite x coordinate.
Definition qpoint.h:365
constexpr QPointF & operator/=(qreal c)
Divides both x and y by the given divisor, and returns a reference to this point.
Definition qpoint.h:406
constexpr QPointF(const QPoint &p) noexcept
Constructs a copy of the given point.
Definition qpoint.h:343
bool isNull() const noexcept
Returns true if both the x and y coordinates are set to 0.0 (ignoring the sign); otherwise returns fa...
Definition qpoint.h:350
static constexpr qreal dotProduct(const QPointF &p1, const QPointF &p2)
Definition qpoint.h:254
\inmodule QtCore\reentrant
Definition qpoint.h:28
constexpr bool isNull() const noexcept
Returns true if both the x and y coordinates are set to 0, otherwise returns false.
Definition qpoint.h:136
constexpr QPoint & operator*=(double factor)
Multiplies this point's coordinates by the given factor, and returns a reference to this point.
Definition qpoint.h:197
constexpr int & ry() noexcept
Returns a reference to the y coordinate of this point.
Definition qpoint.h:171
constexpr int & rx() noexcept
Returns a reference to the x coordinate of this point.
Definition qpoint.h:166
constexpr QPoint transposed() const noexcept
Definition qpoint.h:42
constexpr int x() const noexcept
Returns the x coordinate of this point.
Definition qpoint.h:141
constexpr void setY(int y) noexcept
Sets the y coordinate of this point to the given y coordinate.
Definition qpoint.h:156
constexpr QPoint & operator*=(int factor)
Multiplies this point's coordinates by the given factor, and returns a reference to this point.
Definition qpoint.h:204
constexpr QPoint & operator+=(const QPoint &p)
Adds the given point to this point and returns a reference to this point.
Definition qpoint.h:176
constexpr int manhattanLength() const
Returns the sum of the absolute values of x() and y(), traditionally known as the "Manhattan length" ...
Definition qpoint.h:161
constexpr QPoint(int xpos, int ypos) noexcept
Constructs a point with the given coordinates (xpos, ypos).
Definition qpoint.h:134
constexpr int y() const noexcept
Returns the y coordinate of this point.
Definition qpoint.h:146
static constexpr int dotProduct(const QPoint &p1, const QPoint &p2)
Definition qpoint.h:56
constexpr void setX(int x) noexcept
Sets the x coordinate of this point to the given x coordinate.
Definition qpoint.h:151
constexpr QPoint & operator*=(float factor)
Multiplies this point's coordinates by the given factor, and returns a reference to this point.
Definition qpoint.h:190
constexpr QPoint & operator-=(const QPoint &p)
Subtracts the given point from this point and returns a reference to this point.
Definition qpoint.h:183
constexpr QPoint & operator/=(qreal divisor)
This is an overloaded member function, provided for convenience. It differs from the above function o...
Definition qpoint.h:211
constexpr QPoint() noexcept
Constructs a null point, i.e.
Definition qpoint.h:132
friend constexpr bool comparesEqual(const QPoint &p1, const QPoint &p2) noexcept
Definition qpoint.h:60
\inmodule QtCore\reentrant
Definition qrect.h:509
\inmodule QtCore\reentrant
Definition qrect.h:31
QSettingsGroup(const QString &s, bool guessArraySize)
Definition qsettings_p.h:87
qsizetype num
Definition qsettings_p.h:98
QString toString() const
QString name() const
Definition qsettings_p.h:90
bool isArray() const
Definition qsettings_p.h:92
qsizetype arraySizeGuess() const
Definition qsettings_p.h:93
qsizetype maxNum
Definition qsettings_p.h:99
QSettingsGroup(const QString &s)
Definition qsettings_p.h:85
void setArrayIndex(qsizetype i)
Definition qsettings_p.h:94
qsizetype position
QSettingsIniKey(const QString &str, qsizetype pos=-1)
QSettingsKey(const QString &key, Qt::CaseSensitivity cs, qsizetype=-1)
Definition qsettings_p.h:47
QString originalCaseKey() const
Definition qsettings_p.h:50
qsizetype originalKeyPosition() const
Definition qsettings_p.h:51
\inmodule QtCore
Definition qsettings.h:30
\inmodule QtCore
Definition qsize.h:218
\inmodule QtCore
Definition qsize.h:26
Combined button and popup list for selecting options.
QDataStream & readListBasedContainer(QDataStream &s, Container &c)
QDataStream & readAssociativeContainer(QDataStream &s, Container &c)
QDataStream & writeAssociativeContainer(QDataStream &s, const Container &c)
QDataStream & writeAssociativeMultiContainer(QDataStream &s, const Container &c)
QDataStream & writeSequentialContainer(QDataStream &s, const Container &c)
QDataStream & readArrayBasedContainer(QDataStream &s, Container &c)
static const char charTraits[256]
Q_DECLARE_TYPEINFO(QByteArrayView, Q_PRIMITIVE_TYPE)
std::enable_if_t< std::is_enum< T >::value, QDataStream & > operator>>(QDataStream &s, T &t)
QDataStream & operator>>(QDataStream &s, QFlags< Enum > &e)
QDataStreamIfHasIStreamOperators< T1, T2 > operator>>(QDataStream &s, std::pair< T1, T2 > &p)
QDataStream & operator>>(QDataStream &s, QKeyCombination &combination)
QDataStreamIfHasIStreamOperatorsContainer< QHash< Key, T >, Key, T > operator>>(QDataStream &s, QHash< Key, T > &hash)
QDataStreamIfHasIStreamOperatorsContainer< QList< T >, T > operator>>(QDataStream &s, QList< T > &v)
Q_CORE_EXPORT QDebug operator<<(QDebug debug, QDir::Filters filters)
Definition qdir.cpp:2462
size_t qHash(QPointF, size_t seed=0)=delete
Q_DECLARE_TYPEINFO(QPointF, Q_PRIMITIVE_TYPE)
Q_DECLARE_TYPEINFO(QPoint, Q_PRIMITIVE_TYPE)
constexpr QRectF operator+(const QRectF &lhs, const QMarginsF &rhs) noexcept
Definition qrect.h:899
constexpr QRect operator+(const QMargins &margins, const QRect &rectangle) noexcept
Definition qrect.h:461
Q_DECLARE_TYPEINFO(QRect, Q_RELOCATABLE_TYPE)
constexpr QRectF operator+(const QMarginsF &lhs, const QRectF &rhs) noexcept
Definition qrect.h:905
Q_DECLARE_TYPEINFO(QRectF, Q_RELOCATABLE_TYPE)
constexpr QRectF operator-(const QRectF &lhs, const QMarginsF &rhs) noexcept
Definition qrect.h:911
constexpr QRect operator+(const QRect &rectangle, const QMargins &margins) noexcept
Definition qrect.h:455
constexpr size_t qHash(const QRect &r, size_t seed=0) noexcept
Definition qrect.h:450
constexpr QRect operator-(const QRect &lhs, const QMargins &rhs) noexcept
Definition qrect.h:467
QMap< QString, QSettingsIniSection > IniMap
QList< QConfFileCustomFormat > CustomFormatVector
Definition qsettings.cpp:88
static bool operator<(const QSettingsIniKey &k1, const QSettingsIniKey &k2)
static constexpr QChar sep
static Path getPath(QSettings::Format format, QSettings::Scope scope)
QMap< QSettingsIniKey, QVariant > IniKeyMap
static int pathHashKey(QSettings::Format format, QSettings::Scope scope)
static QString make_user_path()
static std::unique_lock< QBasicMutex > initDefaultPaths(std::unique_lock< QBasicMutex > locker)
static QString make_user_path_without_qstandard_paths()
QHash< QString, QConfFile * > ConfFileHash
Definition qsettings.cpp:74
QHash< int, Path > PathHash
Definition qsettings.cpp:87
Q_DECLARE_TYPEINFO(QSettingsIniSection, Q_RELOCATABLE_TYPE)
Q_DECLARE_TYPEINFO(QConfFileCustomFormat, Q_RELOCATABLE_TYPE)
Q_DECLARE_TYPEINFO(QSettingsIniKey, Q_RELOCATABLE_TYPE)
QCache< QString, QConfFile > ConfFileCache
Definition qsettings.cpp:75
#define FLUSH_CURRENT_SECTION()
static void iniChopTrailingSpaces(QString &str, qsizetype limit)
Q_DECLARE_TYPEINFO(QSettingsGroup, Q_RELOCATABLE_TYPE)
static const Qt::CaseSensitivity IniCaseSensitivity
Definition qsettings_p.h:42
Q_DECLARE_TYPEINFO(QSettingsKey, Q_RELOCATABLE_TYPE)
QMap< QSettingsKey, QByteArray > UnparsedSettingsMap
Definition qsettings_p.h:77
QMap< QSettingsKey, QVariant > ParsedSettingsMap
Definition qsettings_p.h:78
#define QT_QSETTINGS_ALWAYS_CASE_SENSITIVE_AND_FORGET_ORIGINAL_KEY_ORDER
Definition qsettings_p.h:35
Q_DECLARE_TYPEINFO(QSizeF, Q_RELOCATABLE_TYPE)
constexpr size_t qHash(const QSize &s, size_t seed=0) noexcept
Definition qsize.h:191
QSettings settings("MySoft", "Star Runner")
[0]
Qt::CaseSensitivity caseSensitivity
Definition qsettings.cpp:70