Marble

Settings.h
1 // SPDX-License-Identifier: LGPL-2.1-or-later
2 //
3 // SPDX-FileCopyrightText: 2011 Dennis Nienhüser <[email protected]>
4 //
5 
6 #ifndef MARBLE_DECLARATIVE_SETTINGS_H
7 #define MARBLE_DECLARATIVE_SETTINGS_H
8 
9 #include <QObject>
10 #include <QVariant>
11 
12 class Settings : public QObject
13 {
14  Q_OBJECT
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 
20 public:
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 
33 public 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 
42 Q_SIGNALS:
43  void debugOutputEnabledChanged(bool debugOutputEnabled);
44 
45 private:
46  QString m_organizationName;
47  QString m_applicationName;
48 };
49 
50 #endif // MARBLE_DECLARATIVE_SETTINGS_H
Q_OBJECTQ_OBJECT
Q_PROPERTY(...)
Q_SLOTSQ_SLOTS
Q_SIGNALSQ_SIGNALS
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Thu Sep 21 2023 04:12:28 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.