]> Shamusworld >> Repos - architektonas/blob - src/global.h
Changes to make containers behave like a first-class object.
[architektonas] / src / global.h
1 #ifndef __GLOBALS_H__
2 #define __GLOBALS_H__
3
4 // Global variable class. Note that all vars are class vars, so we don't have
5 // to do any instantiation shite.
6
7 #include <stdint.h>
8 #include <string>
9 #include <vector>
10 #include <QRectF>
11 #include "vector.h"
12
13 class QFont;
14
15 enum LineStyle { LSNone, LSSolid, LSDash, LSDot, LSDashDot, LSDashDotDot };
16
17
18 class Global
19 {
20         public:
21                 static double gridSpacing;
22                 static bool selectionInProgress;
23                 static QRectF selection;
24                 static int currentLayer;
25                 static QFont * font;
26                 static Point snapPoint;
27                 static bool snapPointIsValid;
28
29                 static bool fixedAngle;
30                 static bool fixedLength;
31                 static int viewportHeight;
32                 static bool deleteActive;
33                 static bool dimensionActive;
34
35                 static bool snapToGrid;
36                 static bool ignoreClicks;
37                 static bool dontMove;
38                 static uint32_t objectID;
39                 static int tool;
40                 static int toolState;
41
42                 static Point origin;
43                 static double zoom;
44                 static Vector screenSize;
45
46                 static float scale;
47
48                 static float penWidth;
49                 static int penStyle;
50                 static uint32_t penColor;
51                 static bool penStamp;
52
53                 static Point intersectPoint[16]; // Overkill, yes
54                 static double intersectParam[16]; // Ditto
55                 static int numIntersectPoints;
56                 static int numIntersectParams;
57
58                 static int activeLayer;
59                 static int numLayers;
60                 static std::vector<bool> layerHidden;
61                 static std::vector<bool> layerLocked;
62                 static std::vector<std::string> layerName;
63 };
64
65 #endif  // __GLOBALS_H__
66