aboutsummaryrefslogtreecommitdiff
path: root/settingsdialog.h
diff options
context:
space:
mode:
Diffstat (limited to 'settingsdialog.h')
-rw-r--r--settingsdialog.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/settingsdialog.h b/settingsdialog.h
new file mode 100644
index 0000000..95d43b3
--- /dev/null
+++ b/settingsdialog.h
@@ -0,0 +1,36 @@
+#ifndef SETTINGSDIALOG_H
+#define SETTINGSDIALOG_H
+
+#include <QDialog>
+#include <QFont>
+#include "database.h"
+
+QT_BEGIN_NAMESPACE
+namespace Ui { class SettingsDialog; }
+QT_END_NAMESPACE
+
+class SettingsDialog : public QDialog
+{
+ Q_OBJECT
+
+public:
+ explicit SettingsDialog(Database *db, QWidget *parent = nullptr);
+ ~SettingsDialog();
+
+ QFont getCurrentAmountFont() const { return currentAmountFont; }
+ int getWeekStartDay() const { return weekStartDay; }
+
+private slots:
+ void onChooseAmountFont();
+
+private:
+ Ui::SettingsDialog *ui;
+ Database *database;
+ QFont currentAmountFont;
+ int weekStartDay;
+
+ void loadSettings();
+ void saveSettings();
+};
+
+#endif // SETTINGSDIALOG_H