X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fdrawingview.h;h=cd76d1e9aba034be6e7e93ce335280bc42e48530;hb=8ab4e08bd78cb5b07f069e3e6c5bf76944cb14fa;hp=7d4301e81ef74603fbdfd21ac0aedc1d7f90cf0c;hpb=b5981e2c452fa0ad5d922025780f9200450698dc;p=architektonas diff --git a/src/drawingview.h b/src/drawingview.h index 7d4301e..cd76d1e 100644 --- a/src/drawingview.h +++ b/src/drawingview.h @@ -3,6 +3,7 @@ #include #include +#include "action.h" #include "container.h" class DrawingView: public QWidget @@ -14,6 +15,13 @@ class DrawingView: public QWidget public: void SetRotateToolActive(bool state = true); + void SetAddLineToolActive(bool state = true); + void SetAddCircleToolActive(bool state = true); + void SetAddDimensionToolActive(bool state = true); + void UpdateGridBackground(void); + + public slots: + void AddNewObjectToDocument(Object *); protected: void paintEvent(QPaintEvent * event); @@ -29,34 +37,28 @@ class DrawingView: public QWidget bool useAntialiasing; private: +// QBrush * backgroundBrush; + QPixmap gridBackground; double scale; // Window scaling factor int32_t offsetX, offsetY; // Window offsets + public: Container document; double gridSpacing; + private: bool collided; //Should this go into Object's class variables??? bool rotateTool; double rx, ry; bool scrollDrag; Vector oldPoint; -/* QSize minimumSizeHint() const; - QSize sizeHint() const; + bool addLineTool; + bool addCircleTool; + bool addDimensionTool; +// bool selectionInProgress; +// QRectF selection; - private: - void CreateCursors(void); - QPoint GetAdjustedMousePosition(QMouseEvent * event); - QPoint GetAdjustedClientPosition(int x, int y); - - QImage image; - QPoint pt, ptOffset, ptPrevious; - ToolType tool; // Current tool - GlyphPoints pts; // Glyph point structure - int32 ptHighlight, oldPtHighlight, ptNextHighlight, oldPtNextHighlight; - bool polyFirstPoint; - - ToolWindow * toolPalette; - QCursor cur[8]; -*/ + public: + Action * toolAction; }; #endif // __DRAWINGVIEW_H__