Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
Loading...
Searching...
No Matches
qqmlsettings_p.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
// Qt-Security score:significant reason:default
4
5
#
ifndef
QQMLSETTINGS_P_H
6
#
define
QQMLSETTINGS_P_H
7
8
//
9
// W A R N I N G
10
// -------------
11
//
12
// This file is not part of the Qt API. It exists purely as an
13
// implementation detail. This header file may change from version to
14
// version without notice, or even be removed.
15
//
16
// We mean it.
17
//
18
19
#
include
<
QtCore
/
qobject
.
h
>
20
#
include
<
QtCore
/
qvariant
.
h
>
21
#
include
<
QtCore
/
qurl
.
h
>
22
#
include
<
QtQml
/
qqml
.
h
>
23
#
include
<
QtQml
/
qqmlparserstatus
.
h
>
24
#
include
<
QtQmlCore
/
private
/
qqmlcoreglobal_p
.
h
>
25
26
QT_BEGIN_NAMESPACE
27
28
class
QQmlSettingsPrivate;
29
30
class
Q_QMLCORE_EXPORT
QQmlSettings
:
public
QObject,
public
QQmlParserStatus
31
{
32
Q_OBJECT
33
Q_INTERFACES(QQmlParserStatus)
34
Q_DECLARE_PRIVATE(QQmlSettings)
35
QML_NAMED_ELEMENT(Settings)
36
QML_ADDED_IN_VERSION(6, 5)
37
38
Q_PROPERTY(QString category READ category WRITE setCategory NOTIFY categoryChanged FINAL)
39
Q_PROPERTY(QUrl location READ location WRITE setLocation NOTIFY locationChanged FINAL)
40
41
public
:
42
explicit
QQmlSettings(QObject *parent =
nullptr
);
43
~QQmlSettings() override;
44
45
QString category()
const
;
46
void
setCategory(
const
QString &category);
47
48
QUrl location()
const
;
49
void
setLocation(
const
QUrl &location);
50
51
Q_INVOKABLE QVariant value(
const
QString &key,
const
QVariant &defaultValue = {})
const
;
52
Q_INVOKABLE
void
setValue(
const
QString &key,
const
QVariant &value);
53
Q_INVOKABLE
void
sync();
54
55
Q_SIGNALS:
56
void
categoryChanged(
const
QString &arg);
57
void
locationChanged(
const
QUrl &arg);
58
59
protected
:
60
void
timerEvent(QTimerEvent *event) override;
61
62
void
classBegin() override;
63
void
componentComplete() override;
64
65
private
:
66
QScopedPointer<QQmlSettingsPrivate> d_ptr;
67
68
Q_PRIVATE_SLOT(d_func(),
void
_q_propertyChanged())
69
};
70
71
QT_END_NAMESPACE
72
73
#
endif
// QQMLSETTINGS_P_H
QQmlSettingsPrivate
Definition
qqmlsettings.cpp:213
QQmlSettingsPrivate::location
QUrl location
Definition
qqmlsettings.cpp:236
QQmlSettingsPrivate::category
QString category
Definition
qqmlsettings.cpp:235
QQmlSettingsPrivate::settings
QPointer< QSettings > settings
Definition
qqmlsettings.cpp:237
QQmlSettingsPrivate::changedProperties
QHash< const char *, QVariant > changedProperties
Definition
qqmlsettings.cpp:238
QQmlSettingsPrivate::initialized
bool initialized
Definition
qqmlsettings.cpp:234
QQmlSettingsPrivate::reset
void reset()
Definition
qqmlsettings.cpp:298
QQmlSettingsPrivate::timer
QBasicTimer timer
Definition
qqmlsettings.cpp:233
QQmlSettingsPrivate::q_ptr
QQmlSettings * q_ptr
Definition
qqmlsettings.cpp:232
QQmlSettingsPrivate::readProperty
QVariant readProperty(const QMetaProperty &property) const
Definition
qqmlsettings.cpp:366
QQmlSettingsPrivate::~QQmlSettingsPrivate
~QQmlSettingsPrivate()=default
QQmlSettingsPrivate::_q_propertyChanged
void _q_propertyChanged()
Definition
qqmlsettings.cpp:351
QQmlSettingsPrivate::load
void load()
Definition
qqmlsettings.cpp:305
QQmlSettingsPrivate::store
void store()
Definition
qqmlsettings.cpp:340
QQmlSettingsPrivate::instance
QSettings * instance() const
Definition
qqmlsettings.cpp:241
QQmlSettingsPrivate::init
void init()
Definition
qqmlsettings.cpp:289
QQmlSettings
Definition
qqmlsettings_p.h:31
settingsWriteDelay
static constexpr auto settingsWriteDelay
Definition
qqmlsettings.cpp:210
Q_STATIC_LOGGING_CATEGORY
QT_BEGIN_NAMESPACE Q_STATIC_LOGGING_CATEGORY(lcSynthesizedIterableAccess, "qt.iterable.synthesized", QtWarningMsg)
qtdeclarative
src
core
qqmlsettings_p.h
Generated on
for Qt by
1.18.0