forked from aizenbit/Scribbler
-
Notifications
You must be signed in to change notification settings - Fork 0
/
preferencesdialog.h
59 lines (48 loc) · 1.47 KB
/
preferencesdialog.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
55
56
57
58
59
/*!
PreferencesDialog - class representing the Settings window.
This class also record settings, extract settings from a file
and sets the default values.
*/
#ifndef PREFERENCESDIALOG_H
#define PREFERENCESDIALOG_H
#include <QtCore/QSettings>
#include <QtCore/QSignalMapper>
#include <QtWidgets/QDialog>
#include <QtWidgets/QColorDialog>
#include <QtWidgets/QMessageBox>
namespace Ui {
class PreferencesDialog;
}
class PreferencesDialog : public QDialog
{
Q_OBJECT
public:
explicit PreferencesDialog(QWidget *parent = 0);
~PreferencesDialog();
public slots:
void loadSettingsToFile();
void loadSettingsFromFile(bool loadDefault = false);
bool alternateMargins();
signals:
void settingsChanged();
private:
Ui::PreferencesDialog *ui;
QSignalMapper *sheetSizeSignalMapper; /*!< this is necessary to connect QRadioButtons
from the sheetSize group to setSheetSize() */
enum class SheetSize {
A4,
A5,
Custom
};
bool changedByProgram; //!< are spinboxes changed by program or by user; look at setSheetSize()
private slots:
void setSheetSize(int size);
void setColor(QPushButton * button);
void changeSheetOrientation();
void on_colorButton_clicked();
void on_markingColorButton_clicked();
void on_markingFitPushButton_clicked();
void on_DefaultPushButton_clicked();
void on_marginsColorButton_clicked();
};
#endif // PREFERENCESDIALOG_H