File indexing completed on 2024-05-05 03:49:20
0001 // SPDX-License-Identifier: LGPL-2.1-or-later 0002 // 0003 // SPDX-FileCopyrightText: 2011 Dennis Nienhüser <nienhueser@kde.org> 0004 // 0005 0006 #ifndef MARBLE_DECLARATIVE_SETTINGS_H 0007 #define MARBLE_DECLARATIVE_SETTINGS_H 0008 0009 #include <QObject> 0010 #include <QVariant> 0011 0012 class Settings : public QObject 0013 { 0014 Q_OBJECT 0015 0016 Q_PROPERTY( QString organizationName READ organizationName WRITE setOrganizationName ) 0017 Q_PROPERTY( QString applicationName READ applicationName WRITE setApplicationName ) 0018 Q_PROPERTY( bool debugOutputEnabled READ debugOutputEnabled WRITE setDebugOutputEnabled NOTIFY debugOutputEnabledChanged) 0019 0020 public: 0021 Settings(); 0022 0023 QString organizationName() const; 0024 0025 void setOrganizationName( const QString &organization ); 0026 0027 QString applicationName() const; 0028 0029 void setApplicationName( const QString &application ); 0030 0031 bool debugOutputEnabled() const; 0032 0033 public Q_SLOTS: 0034 QVariant value( const QString &group, const QString &key, const QVariant &value = QVariant() ) const; 0035 0036 void setValue( const QString &group, const QString &key, const QVariant &value ); 0037 0038 void remove(const QString &group, const QString &value); 0039 0040 void setDebugOutputEnabled(bool debugOutputEnabled); 0041 0042 Q_SIGNALS: 0043 void debugOutputEnabledChanged(bool debugOutputEnabled); 0044 0045 private: 0046 QString m_organizationName; 0047 QString m_applicationName; 0048 }; 0049 0050 #endif // MARBLE_DECLARATIVE_SETTINGS_H