diff options
author | kintel <kintel@b57f626f-c46c-0410-a088-ec61d464b74c> | 2010-01-25 20:52:43 (GMT) |
---|---|---|
committer | kintel <kintel@b57f626f-c46c-0410-a088-ec61d464b74c> | 2010-01-25 20:52:43 (GMT) |
commit | b629bd329247aa47b99afa6c6f9a2a28803af09b (patch) | |
tree | 066cc0443b13e5b82154acd1f81e4ade90100c78 /Preferences.h | |
parent | b0b3d030c0ee7177b8777ff681626be5b0e861d2 (diff) |
Save preferences to disk
git-svn-id: http://svn.clifford.at/openscad/trunk@352 b57f626f-c46c-0410-a088-ec61d464b74c
Diffstat (limited to 'Preferences.h')
-rw-r--r-- | Preferences.h | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/Preferences.h b/Preferences.h index 24b734e..39599fd 100644 --- a/Preferences.h +++ b/Preferences.h @@ -2,6 +2,7 @@ #define PREFERENCES_H_ #include <QMainWindow> +#include <QSettings> #include "ui_Preferences.h" class Preferences : public QMainWindow, public Ui::Preferences @@ -25,6 +26,8 @@ public: CROSSHAIR_COLOR }; const QColor &color(RenderColor idx); + QVariant getValue(const QString &key) const; + void apply() const; public slots: void actionTriggered(class QAction *); @@ -33,17 +36,17 @@ public slots: void fontSizeChanged(const QString &); signals: - void requestRedraw(); - void fontChanged(const QString &family, uint size); + void requestRedraw() const; + void fontChanged(const QString &family, uint size) const; private: Preferences(QWidget *parent = NULL); void keyPressEvent(QKeyEvent *e); + void updateGUI(); + void removeDefaultSettings(); + QSettings::SettingsMap defaultmap; QHash<QString, QMap<RenderColor, QColor> > colorschemes; - QString colorscheme; - QString fontfamily; - uint fontsize; static Preferences *instance; }; |