-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmainwindow.h
50 lines (41 loc) · 1.44 KB
/
mainwindow.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
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include <QSlider>
#include <QSpinBox>
#include <QRadioButton>
#include <QCheckBox>
#include <QDoubleSpinBox>
#include <QLabel>
#include <QPushButton>
#include <QBoxLayout>
#include "canvas2d.h"
class MainWindow : public QWidget
{
Q_OBJECT
public:
MainWindow();
private:
void setupCanvas2D();
Canvas2D *m_canvas;
void addHeading(QBoxLayout *layout, QString text);
void addLabel(QBoxLayout *layout, QString text);
void addRadioButton(QBoxLayout *layout, QString text, bool value, auto function);
void addSpinBox(QBoxLayout *layout, QString text, int min, int max, int step, int val, auto function);
void addDoubleSpinBox(QBoxLayout *layout, QString text, double min, double max, double step, double val, int decimal, auto function);
void addPushButton(QBoxLayout *layout, QString text, auto function);
void addCheckBox(QBoxLayout *layout, QString text, bool value, auto function);
private slots:
void setBrushType(int type);
void setFilterType(int type);
void setUIntVal(std::uint8_t &setValue, int newValue);
void setIntVal(int &setValue, int newValue);
void setFloatVal(float &setValue, float newValue);
void setBoolVal(bool &setValue, bool newValue);
void onClearButtonClick();
void onFilterButtonClick();
void onRevertButtonClick();
void onUploadButtonClick();
void onSaveButtonClick();
};
#endif // MAINWINDOW_H