KurusView  1.0
settingsdialog.h
1 #ifndef SETTINGSDIALOG_H
2 #define SETTINGSDIALOG_H
3 
4 #include <QDialog>
5 #include <QSettings>
6 
7 // wrap the class in Ui::
8 namespace Ui {
9  class settingsDialog;
10 }
11 
15 class settingsDialog : public QDialog {
16 Q_OBJECT
17 
18 public:
23  explicit settingsDialog(QWidget *parent = nullptr);
24 
28  ~settingsDialog();
29 
34  static QString getDefault_saveLocation();
35 
40  static unsigned short int getDefault_maxModelsPerWindow();
41 
46  static int getDefault_displayRecents();
47 
52  static bool getDefault_alwaysOpenModelToNewWindow();
53 
58  static QColor getDefault_modelColour();
59 
64  static QColor getDefault_modelBackFaceColour();
65 
70  static QColor getDefault_backgroundColour();
71 
72 
73 private:
75  Ui::settingsDialog *ui;
76 
78  QString defaultSaveLocation;
79  unsigned short int maxModelsPerWindow;
80  unsigned int displayRecents;
81  bool alwaysOpenModelToNewWindow;
82  QColor defaultModelColour, defaultBackFaceColour, defaultBackgroundColour;
83 
84 private slots:
85 
89  void acceptDialog();
90 
94  void rejectDialog();
95 
99  void handleBrowseButton();
100 
105  void handleModelsPerWindowSpin(int i);
106 
110  void handleAlwaysOpenCheck();
111 
116  void handleDisplayRecentsSpin(int i);
117 
121  void handleModelColour();
122 
126  void handleModelBackfaceColour();
127 
131  void handModelBackgroundColour();
132 
133 };
134 
135 #endif // SETTINGSDIALOG_H
Definition: dialog.h:7
Settings menu class. UI and logic.
Definition: settingsdialog.h:15