ukui-notification/libukui-notification/notification-settings/settings-manager.h

61 lines
1.3 KiB
C
Raw Normal View History

//
//
#ifndef SETTINGS_MANAGER_H
#define SETTINGS_MANAGER_H
#include <QObject>
#include "settings-properties.h"
namespace UkuiNotification {
class SettingsManagerPrivate;
class SettingsManager : public QObject
{
Q_OBJECT
public:
static SettingsManager *self();
~SettingsManager() = default;
/**
*
*/
QJsonObject getGlobalSettings();
/**
* @brief getAllAppSettings
*
*/
QJsonObject getAllAppSettings();
/**
* @brief getAppSettings
*
* @param appDesktopName "default"
*/
QJsonObject getAppSettings(const QString &appDesktopName);
/**
*
* @return
*/
QJsonObject getAppDefaultSettings();
bool setGlobalSettings(SettingsProperty::Property key, const QVariant &value);
bool setAppSettings(const QString &appDesktopName, SettingsProperty::Property key, const QVariant &value);
Q_SIGNALS:
void settingsDataChanged();
void newAppInstalled(const QString &desktopEntry);
void appUninstalled(const QString &desktopEntry);
private:
SettingsManager(QObject *parent = nullptr);
SettingsManagerPrivate * d = nullptr;
};
}
#endif