Marble

Settings.h
1// SPDX-License-Identifier: LGPL-2.1-or-later
2//
3// SPDX-FileCopyrightText: 2011 Dennis Nienhüser <nienhueser@kde.org>
4//
5
6#ifndef MARBLE_DECLARATIVE_SETTINGS_H
7#define MARBLE_DECLARATIVE_SETTINGS_H
8
9#include <QObject>
10#include <QVariant>
11#include <qqmlregistration.h>
12
13class Settings : public QObject
14{
16 QML_ELEMENT
17
18 Q_PROPERTY(QString organizationName READ organizationName WRITE setOrganizationName)
19 Q_PROPERTY(QString applicationName READ applicationName WRITE setApplicationName)
20 Q_PROPERTY(bool debugOutputEnabled READ debugOutputEnabled WRITE setDebugOutputEnabled NOTIFY debugOutputEnabledChanged)
21
22public:
23 Settings();
24
25 QString organizationName() const;
26
27 void setOrganizationName(const QString &organization);
28
29 QString applicationName() const;
30
31 void setApplicationName(const QString &application);
32
33 bool debugOutputEnabled() const;
34
35 Q_INVOKABLE QVariant value(const QString &group, const QString &key, const QVariant &value = QVariant()) const;
36
37 Q_INVOKABLE void setValue(const QString &group, const QString &key, const QVariant &value);
38
39 Q_INVOKABLE void remove(const QString &group, const QString &value);
40
41 Q_INVOKABLE void setDebugOutputEnabled(bool debugOutputEnabled);
42
44 void debugOutputEnabledChanged(bool debugOutputEnabled);
45
46private:
47 QString m_organizationName;
48 QString m_applicationName;
49};
50
51#endif // MARBLE_DECLARATIVE_SETTINGS_H
Q_INVOKABLEQ_INVOKABLE
Q_OBJECTQ_OBJECT
Q_PROPERTY(...)
Q_SIGNALSQ_SIGNALS
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:37:03 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.