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
qqmlsettings_p.h
Go to the documentation of this file.
1// Copyright (C) 2016 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 QQMLSETTINGS_P_H
5#define QQMLSETTINGS_P_H
6
8
9//
10// W A R N I N G
11// -------------
12//
13// This file is not part of the Qt API. It exists purely as an
14// implementation detail. This header file may change from version to
15// version without notice, or even be removed.
16//
17// We mean it.
18//
19
20#include <QtQml/qqml.h>
21#include <QtCore/qobject.h>
22#include <QtCore/qscopedpointer.h>
23#include <QtQml/qqmlparserstatus.h>
24
26
28
29class Q_LABSSETTINGS_EXPORT QQmlSettings : public QObject, public QQmlParserStatus
30{
33 Q_PROPERTY(QString category READ category WRITE setCategory FINAL)
35 QML_NAMED_ELEMENT(Settings)
37
38public:
39 explicit QQmlSettings(QObject *parent = nullptr);
41
43 void setCategory(const QString &category);
44
45 QString fileName() const;
46 void setFileName(const QString &fileName);
47
48 Q_INVOKABLE QVariant value(const QString &key, const QVariant &defaultValue = QVariant()) const;
50 Q_INVOKABLE void sync();
51
52protected:
53 void timerEvent(QTimerEvent *event) override;
54
55 void classBegin() override;
56 void componentComplete() override;
57
59 Q_DISABLE_COPY(QQmlSettings)
60 Q_DECLARE_PRIVATE(QQmlSettings)
62 Q_PRIVATE_SLOT(d_func(), void _q_propertyChanged())
63};
64
66
67#endif // QQMLSETTINGS_P_H
\inmodule QtCore
Definition qobject.h:103
The QQmlParserStatus class provides updates on the QML parser state.
\inmodule QtCore
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
\inmodule QtCore
Definition qcoreevent.h:366
\inmodule QtCore
Definition qvariant.h:65
const QLoggingCategory & category()
[1]
Combined button and popup list for selecting options.
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
GLuint64 key
struct _cl_event * event
#define QML_NAMED_ELEMENT(NAME)
#define QML_ADDED_IN_VERSION(MAJOR, MINOR)
#define Q_PROPERTY(...)
#define Q_OBJECT
#define Q_INVOKABLE
#define Q_INTERFACES(x)
#define Q_PRIVATE_SLOT(d, signature)
#define explicit
file setFileName("readme.txt")
settings setValue("DataPump/bgcolor", color)