forked from aizenbit/Scribbler
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpreferencesdialog.h
54 lines (43 loc) · 1.23 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
/*!
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 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();
void changeSheetOrientation();
};
#endif // PREFERENCESDIALOG_H