X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fglobal.h;fp=src%2Fglobal.h;h=64422da263b4509896a74cf6f2dcae3827e2a3b5;hb=7fde5a077bc9bbce28662fa2e5aa5043f3b4747f;hp=0000000000000000000000000000000000000000;hpb=0c01fa32c7e0629ae61992e0419f03724fc18487;p=ttedit diff --git a/src/global.h b/src/global.h new file mode 100644 index 0000000..64422da --- /dev/null +++ b/src/global.h @@ -0,0 +1,59 @@ +#ifndef __GLOBALS_H__ +#define __GLOBALS_H__ + +// Global variable class. Note that all vars are class vars, so we don't have +// to do any instantiation shite--it's treated as a namespace. + +#include +#include +#include +#include "vector.h" + +class QFont; + +enum LineStyle { LSNone, LSSolid, LSDash, LSDot, LSDashDot, LSDashDotDot }; + + +class Global +{ + public: + static double gridSpacing; + static bool selectionInProgress; + static QRectF selection; + static int currentLayer; + static QFont * font; + static Point snapPoint; + static bool snapPointIsValid; + + static bool fixedAngle; + static bool fixedLength; + static int viewportHeight; + static bool deleteActive; + static bool dimensionActive; + + static bool snapToGrid; + static bool ignoreClicks; + static bool dontMove; + static uint32_t objectID; + static int tool; + static int toolState; + + static Point origin; + static double zoom; + static Vector screenSize; + + static float scale; + + static Point intersectPoint[16]; // Overkill, yes + static double intersectParam[16]; // Ditto + static int numIntersectPoints; + static int numIntersectParams; + + static int activeLayer; + static int numLayers; + static std::vector layerHidden; + static std::vector layerLocked; +}; + +#endif // __GLOBALS_H__ +