2021-04-08 10:29:21 +08:00
|
|
|
#ifndef SETTINGS_H
|
|
|
|
#define SETTINGS_H
|
|
|
|
|
|
|
|
#include <QSettings>
|
|
|
|
|
|
|
|
#define EDITOR_DEFAULT_ENCODING "editor/default_encoding"
|
2021-04-09 17:48:25 +08:00
|
|
|
#define EDITOR_AUTO_INDENT "editor/default_auto_indent"
|
|
|
|
|
2021-04-08 10:29:21 +08:00
|
|
|
|
|
|
|
class Settings
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
Settings();
|
|
|
|
|
|
|
|
void setDefault(const QString &key, const QVariant &value);
|
|
|
|
void setValue(const QString &key, const QVariant &value);
|
|
|
|
QVariant value(const QString &key) const;
|
|
|
|
private:
|
|
|
|
QSettings mSettings;
|
|
|
|
};
|
|
|
|
|
|
|
|
extern Settings* pSettings;
|
|
|
|
|
|
|
|
#endif // SETTINGS_H
|