-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstickynotesettings.h
More file actions
49 lines (38 loc) · 1014 Bytes
/
stickynotesettings.h
File metadata and controls
49 lines (38 loc) · 1014 Bytes
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
#pragma once
#include <QGridLayout>
#include <QDialog>
#include <QSettings>
#include <QPushButton>
#include <QSpinBox>
#include <QFontComboBox>
#include <QDialogButtonBox>
class StickyNoteSettings: public QDialog
{
Q_OBJECT
public:
explicit StickyNoteSettings(QWidget *parent = nullptr);
~StickyNoteSettings();
signals:
void settingChanged(QColor color, QString fontFamily, int fontSize);
private slots:
void onPushButtonColorClicked();
void onDialogButtonBoxAccepted();
void onDialogButtonBoxRejected();
private:
void saveFontColor(QColor color);
QString loadFontColor();
void saveFontFamily(QString fontFamily);
QString loadFontFamily();
void saveFontSize(int fontSize);
int loadFontSize();
private:
void initializeButtons();
void initializeSettings();
private:
QVBoxLayout *m_mainLayout;
QFontComboBox *m_fontComboBox;
QSpinBox *m_spinBoxSize;
QPushButton *m_pushButtonColor;
QSettings m_setting;
QColor m_color;
};