7#include <QtCore/qcompare.h>
8#include <QtCore/qnamespace.h>
9#include <QtCore/qnumeric.h>
11#include <QtCore/q20type_traits.h>
12#include <QtCore/q23utility.h>
14#if defined(Q_OS_DARWIN) || defined(Q_QDOC)
20QT_ENABLE_P0846_SEMANTICS_FOR(get)
27 constexpr QPoint()
noexcept;
28 constexpr QPoint(
int xpos,
int ypos)
noexcept;
30 constexpr inline bool isNull()
const noexcept;
32 constexpr inline int x()
const noexcept;
33 constexpr inline int y()
const noexcept;
34 constexpr inline void setX(
int x)
noexcept;
35 constexpr inline void setY(
int y)
noexcept;
41 constexpr inline int &
rx()
noexcept;
42 constexpr inline int &
ry()
noexcept;
54 {
return p1.xp * p2.xp + p1.yp * p2.yp; }
58 {
return p1.xp == p2.xp && p1.yp == p2.yp; }
84#if defined(Q_OS_DARWIN) || defined(Q_QDOC)
90 friend class QTransform;
98 friend constexpr decltype(
auto)
get(
P &&
p)
noexcept
100 if constexpr (
I == 0)
102 else if constexpr (
I == 1)
110
111
112#ifndef QT_NO_DATASTREAM
113Q_CORE_EXPORT
QDataStream &operator<<(QDataStream &,
const QPoint &);
118
119
123constexpr inline QPoint::
QPoint(
int xpos,
int ypos)
noexcept : xp(xpos), yp(ypos) {}
127 return xp == 0 && yp == 0;
130constexpr inline int QPoint::
x()
const noexcept
135constexpr inline int QPoint::
y()
const noexcept
152 return qAbs(
x()) + qAbs(
y());
181 xp = qRound(xp * factor);
182 yp = qRound(yp * factor);
188 xp = qRound(xp * factor);
189 yp = qRound(yp * factor);
207#ifndef QT_NO_DEBUG_STREAM
208Q_CORE_EXPORT
QDebug operator<<(QDebug,
const QPoint &);
211Q_CORE_EXPORT size_t qHash(QPoint key, size_t seed = 0)
noexcept;
221 constexpr QPointF(qreal xpos, qreal ypos)
noexcept;
225 inline bool isNull()
const noexcept;
227 constexpr inline qreal x()
const noexcept;
228 constexpr inline qreal y()
const noexcept;
229 constexpr inline void setX(qreal x)
noexcept;
230 constexpr inline void setY(qreal y)
noexcept;
234 constexpr inline qreal &
rx()
noexcept;
235 constexpr inline qreal &
ry()
noexcept;
244 return p1.xp * p2.xp + p1.yp * p2.yp;
249 QT_WARNING_DISABLE_FLOAT_COMPARE
287#if defined(Q_OS_DARWIN) || defined(Q_QDOC)
293 friend class QTransform;
302 friend constexpr decltype(
auto)
get(
P &&
p)
noexcept
304 if constexpr (
I == 0)
306 else if constexpr (
I == 1)
316
317
318#ifndef QT_NO_DATASTREAM
319Q_CORE_EXPORT
QDataStream &operator<<(QDataStream &,
const QPointF &);
324
325
335 return qAbs(x()) + qAbs(y());
340 return qIsNull(xp) && qIsNull(yp);
396 Q_ASSERT(divisor > 0 || divisor < 0);
406 return QPoint(qRound(xp), qRound(yp));
409#ifndef QT_NO_DEBUG_STREAM
410Q_CORE_EXPORT
QDebug operator<<(QDebug d,
const QPointF &p);
416
417
static bool readIniSection(const QSettingsKey §ion, QByteArrayView data, ParsedSettingsMap *settingsMap)
void set(const QString &key, const QVariant &value) override
QStringList children(const QString &prefix, ChildSpec spec) const override
~QConfFileSettingsPrivate()
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
UnparsedSettingsMap unparsedIniSections
ParsedSettingsMap originalKeys
static Q_AUTOTEST_EXPORT void clearCache()
ParsedSettingsMap removedKeys
ParsedSettingsMap mergedKeyMap() const
static QConfFile * fromName(const QString &name, bool _userPerms)
ParsedSettingsMap addedKeys
\inmodule QtCore\reentrant
\inmodule QtCore\reentrant
constexpr qreal & ry() noexcept
Returns a reference to the y coordinate of this point.
constexpr qreal x() const noexcept
Returns the x coordinate of this point.
constexpr qreal manhattanLength() const
constexpr qreal y() const noexcept
Returns the y coordinate of this point.
constexpr QPointF & operator+=(const QPointF &p)
Adds the given point to this point and returns a reference to this point.
constexpr qreal & rx() noexcept
Returns a reference to the x coordinate of this point.
constexpr QPointF & operator*=(qreal c)
Multiplies this point's coordinates by the given finite factor, and returns a reference to this point...
constexpr QPointF transposed() const noexcept
constexpr void setY(qreal y) noexcept
Sets the y coordinate of this point to the given finite y coordinate.
constexpr QPointF & operator-=(const QPointF &p)
Subtracts the given point from this point and returns a reference to this point.
constexpr QPointF() noexcept
Constructs a null point, i.e.
constexpr QPointF(qreal xpos, qreal ypos) noexcept
Constructs a point with the given coordinates (xpos, ypos).
constexpr void setX(qreal x) noexcept
Sets the x coordinate of this point to the given finite x coordinate.
constexpr QPointF & operator/=(qreal c)
Divides both x and y by the given divisor, and returns a reference to this point.
constexpr QPointF(const QPoint &p) noexcept
Constructs a copy of the given point.
bool isNull() const noexcept
Returns true if both the x and y coordinates are set to 0.0 (ignoring the sign); otherwise returns fa...
static constexpr qreal dotProduct(const QPointF &p1, const QPointF &p2)
\inmodule QtCore\reentrant
constexpr bool isNull() const noexcept
Returns true if both the x and y coordinates are set to 0, otherwise returns false.
constexpr QPoint & operator*=(double factor)
Multiplies this point's coordinates by the given factor, and returns a reference to this point.
constexpr int & ry() noexcept
Returns a reference to the y coordinate of this point.
constexpr int & rx() noexcept
Returns a reference to the x coordinate of this point.
constexpr QPoint transposed() const noexcept
constexpr int x() const noexcept
Returns the x coordinate of this point.
constexpr void setY(int y) noexcept
Sets the y coordinate of this point to the given y coordinate.
constexpr QPoint & operator*=(int factor)
Multiplies this point's coordinates by the given factor, and returns a reference to this point.
constexpr QPoint & operator+=(const QPoint &p)
Adds the given point to this point and returns a reference to this point.
constexpr int manhattanLength() const
Returns the sum of the absolute values of x() and y(), traditionally known as the "Manhattan length" ...
constexpr QPoint(int xpos, int ypos) noexcept
Constructs a point with the given coordinates (xpos, ypos).
constexpr int y() const noexcept
Returns the y coordinate of this point.
static constexpr int dotProduct(const QPoint &p1, const QPoint &p2)
constexpr void setX(int x) noexcept
Sets the x coordinate of this point to the given x coordinate.
constexpr QPoint & operator*=(float factor)
Multiplies this point's coordinates by the given factor, and returns a reference to this point.
constexpr QPoint & operator-=(const QPoint &p)
Subtracts the given point from this point and returns a reference to this point.
constexpr QPoint & operator/=(qreal divisor)
This is an overloaded member function, provided for convenience. It differs from the above function o...
constexpr QPoint() noexcept
Constructs a null point, i.e.
friend constexpr bool comparesEqual(const QPoint &p1, const QPoint &p2) noexcept
QSettingsGroup(const QString &s, bool guessArraySize)
qsizetype arraySizeGuess() const
QSettingsGroup(const QString &s)
void setArrayIndex(qsizetype i)
QSettingsIniKey(const QString &str, qsizetype pos=-1)
QSettingsKey(const QString &key, Qt::CaseSensitivity cs, qsizetype=-1)
QString originalCaseKey() const
qsizetype originalKeyPosition() const
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)
QT_REQUIRE_CONFIG(itemmodel)
size_t qHash(QPointF, size_t seed=0)=delete
Q_DECLARE_TYPEINFO(QPointF, Q_PRIMITIVE_TYPE)
Q_DECLARE_TYPEINFO(QPoint, Q_PRIMITIVE_TYPE)
QMap< QString, QSettingsIniSection > IniMap
QList< QConfFileCustomFormat > CustomFormatVector
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
QHash< int, Path > PathHash
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
#define FLUSH_CURRENT_SECTION()
static void iniChopTrailingSpaces(QString &str, qsizetype limit)
Q_DECLARE_TYPEINFO(QSettingsGroup, Q_RELOCATABLE_TYPE)
static const Qt::CaseSensitivity IniCaseSensitivity
Q_DECLARE_TYPEINFO(QSettingsKey, Q_RELOCATABLE_TYPE)
QMap< QSettingsKey, QByteArray > UnparsedSettingsMap
QMap< QSettingsKey, QVariant > ParsedSettingsMap
#define QT_QSETTINGS_ALWAYS_CASE_SENSITIVE_AND_FORGET_ORIGINAL_KEY_ORDER
Q_DECLARE_TYPEINFO(QSizeF, Q_RELOCATABLE_TYPE)
constexpr size_t qHash(const QSize &s, size_t seed=0) noexcept