aboutsummaryrefslogtreecommitdiff
path: root/settingsdialog.h
blob: 95d43b30039cc0a5cb79e7798941cbd72300bcd7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
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