2021-11-18 14:58:01 +00:00
|
|
|
#ifndef DUST3D_APPLICATION_PREFERENCES_H_
|
|
|
|
#define DUST3D_APPLICATION_PREFERENCES_H_
|
|
|
|
|
|
|
|
#include <QSettings>
|
|
|
|
#include <QSize>
|
|
|
|
#include <QStringList>
|
|
|
|
|
2022-10-18 09:35:04 +00:00
|
|
|
class Preferences : public QObject {
|
2021-11-18 14:58:01 +00:00
|
|
|
Q_OBJECT
|
|
|
|
public:
|
2022-10-18 09:35:04 +00:00
|
|
|
static Preferences& instance();
|
2021-11-18 14:58:01 +00:00
|
|
|
Preferences();
|
|
|
|
QSize documentWindowSize() const;
|
|
|
|
void setDocumentWindowSize(const QSize&);
|
|
|
|
QStringList recentFileList() const;
|
|
|
|
int maxRecentFiles() const;
|
|
|
|
public slots:
|
2022-10-18 09:35:04 +00:00
|
|
|
void setCurrentFile(const QString& fileName);
|
2021-11-18 14:58:01 +00:00
|
|
|
void reset();
|
2022-10-18 09:35:04 +00:00
|
|
|
|
2021-11-18 14:58:01 +00:00
|
|
|
private:
|
|
|
|
QSettings m_settings;
|
|
|
|
void loadDefault();
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|