-
Notifications
You must be signed in to change notification settings - Fork 1
/
settingsdialog.h
54 lines (38 loc) · 997 Bytes
/
settingsdialog.h
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#ifndef SETTINGSDIALOG_H
#define SETTINGSDIALOG_H
#include <QWidget>
#include <QKeyEvent>
#include <QColor>
#include <QSettings>
namespace Ui {
class SettingsDialog;
}
class options;
class SettingsDialog : public QWidget
{
Q_OBJECT
public:
explicit SettingsDialog(options *opt, QWidget *parent = nullptr);
~SettingsDialog();
void keyPressEvent(QKeyEvent *e) {
if(e->key() == Qt::Key_Escape)
this->on_button_cancel_clicked();
else if (e->key() == Qt::Key_Return || e->key() == Qt::Key_Enter)
this->on_button_ok_clicked();
}
private slots:
void on_button_cancel_clicked();
void on_button_ok_clicked();
void on_button_spacing_color_clicked();
void on_button_selection_color_clicked();
void on_button_defaults_clicked();
signals:
void finished();
private:
Ui::SettingsDialog *ui;
options *opt;
QColor bgcolor;
QColor select_color;
QSettings settings;
};
#endif // SETTINGSDIALOG_H