]> Shamusworld >> Repos - architektonas/blob - src/global.h
93ad6f7f9484a23ecdba2b373f60413b587cb37f
[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 typedef std::vector<void *> VPVector;
18 typedef std::vector<void *>::iterator VPVectorIter;
19 typedef std::vector<bool> BVector;
20 typedef std::vector<std::string> SVector;
21
22 class Global
23 {
24         public:
25                 static double gridSpacing;
26                 static bool selectionInProgress;
27                 static QRectF selection;
28                 static QFont * font;
29                 static Point snapPoint;
30                 static bool snapPointIsValid;
31
32                 static bool fixedAngle;
33                 static bool fixedLength;
34                 static int viewportHeight;
35                 static bool deleteActive;
36                 static bool dimensionActive;
37
38                 static bool snapToGrid;
39                 static bool ignoreClicks;
40                 static bool dontMove;
41                 static uint32_t objectID;
42                 static int tool;
43                 static int toolState;
44
45                 static Point origin;
46                 static double zoom;
47                 static Vector screenSize;
48
49                 static float scale;
50
51                 static float penWidth;
52                 static int penStyle;
53                 static uint32_t penColor;
54                 static bool penStamp;
55
56                 static Point intersectPoint[16]; // Overkill, yes
57                 static double intersectParam[16]; // Ditto
58                 static int numIntersectPoints;
59                 static int numIntersectParams;
60
61                 static int activeLayer;
62                 static int numLayers;
63                 static BVector layerHidden;
64                 static BVector layerLocked;
65                 static SVector layerName;
66 };
67
68 #endif  // __GLOBALS_H__
69