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
12class Settings : public QObject
13{
15
16 Q_PROPERTY( QString organizationName READ organizationName WRITE setOrganizationName )
17 Q_PROPERTY( QString applicationName READ applicationName WRITE setApplicationName )
18 Q_PROPERTY( bool debugOutputEnabled READ debugOutputEnabled WRITE setDebugOutputEnabled NOTIFY debugOutputEnabledChanged)
19
20public:
21 Settings();
22
23 QString organizationName() const;
24
25 void setOrganizationName( const QString &organization );
26
27 QString applicationName() const;
28
29 void setApplicationName( const QString &application );
30
31 bool debugOutputEnabled() const;
32
33public Q_SLOTS:
34 QVariant value( const QString &group, const QString &key, const QVariant &value = QVariant() ) const;
35
36 void setValue( const QString &group, const QString &key, const QVariant &value );
37
38 void remove(const QString &group, const QString &value);
39
40 void setDebugOutputEnabled(bool debugOutputEnabled);
41
43 void debugOutputEnabledChanged(bool debugOutputEnabled);
44
45private:
46 QString m_organizationName;
47 QString m_applicationName;
48};
49
50#endif // MARBLE_DECLARATIVE_SETTINGS_H
Q_OBJECTQ_OBJECT
Q_PROPERTY(...)
Q_SIGNALSQ_SIGNALS
Q_SLOTSQ_SLOTS
T qobject_cast(QObject *object)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:18:17 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.