-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathUiVariables.h
76 lines (62 loc) · 1.83 KB
/
UiVariables.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#ifndef JUI_VARS
#define JUI_VARS
#include <string>
#include <QWidget>
#include <map>
class QTextEdit;
class QSpinBox;
class GLWidget;
using namespace std;
class UiVariables : public QObject
{
Q_OBJECT
public:
QTextEdit* textArea;
int colorSetting;
enum colorPalletes { CLASSIC, COLORBLINDSAFE, BETTERCBSAFE, DARK, DRUMS, BLUES, REDS };
static UiVariables* Instance();
void newOffsetDial(GLWidget* gl);
void print(const char*);
void print(std::string s);
void printHtml(std::string);
void print(const char* s, int num);
void printNum(int num);
bool valueIsGoingToChange(QSpinBox* dial, int val);
int getColorSetting();
vector<QSpinBox *> getDialPointers();
public slots:
void setAllVariables(int width, int scale, int zoom, int start, int size);
int getWidth();
void setWidth(int newWidth);
int getScale();
void setScale(int newScale);
int getStart(GLWidget* gl);
void setStart(GLWidget *saysWho, int start);
int getZoom();
void setZoom(int zoom);
int getSize();
void setSize(int size);
QSpinBox* getOffsetDial(GLWidget* gl);
void setOffsetDelta(GLWidget *gl, int deltaO);
void changeColorSetting(int set);
signals:
void internalsUpdated();
void colorsChanged(int);
private:
// UiVariables();
UiVariables(QTextEdit* text = NULL);
UiVariables(UiVariables const&){} // copy constructor is private
UiVariables& operator = (UiVariables const&){return *Instance();} // assignment operator is private
~UiVariables();
static UiVariables* pointerInstance;
map<GLWidget*, QSpinBox*> offsets;
int oldScale;
int oldWidth;
static int const maxSaneWidth = 4000;
QSpinBox* widthDial;
QSpinBox* scaleDial;
QSpinBox* zoomDial;
QSpinBox* startDial;
QSpinBox* sizeDial;
};
#endif