ukui-search/libsearch/global-settings-private.h

33 lines
675 B
C++

#ifndef GLOBALSETTINGSPRIVATE_H
#define GLOBALSETTINGSPRIVATE_H
#include "global-settings.h"
#include <QMutex>
#include <QGSettings>
#include <QMap>
namespace UkuiSearch {
class GlobalSettingsPrivate : public QObject
{
Q_OBJECT
public:
explicit GlobalSettingsPrivate(QObject *parent = nullptr);
QVariant getValue(const QString&);
Q_SIGNALS:
void valueChanged(const QString& key, QVariant value);
private:
void setValue(const QString& key, const QVariant& value);
QMutex m_mutex;
QGSettings *m_transGsettings = nullptr;
QGSettings *m_themeGsettings = nullptr;
QMap<QString, QVariant> m_cache;
};
}
#endif // GLOBALSETTINGSPRIVATE_H