]> Shamusworld >> Repos - architektonas/blobdiff - src/drawingview.h
Changes to make containers behave like a first-class object.
[architektonas] / src / drawingview.h
index 92ac72a692abc14945124569c45d8d6a699f66c4..768c5c029b26a518b2f7959eaa8d2987f9aa53b9 100644 (file)
@@ -25,7 +25,8 @@ class DrawingView: public QWidget
                void RenderObjects(Painter *, std::vector<void *> &, int, bool ignoreLayer = false);
                void AddHoveredToSelection(void);
                void GetSelection(std::vector<void *> &);
-               void GetHovered(std::vector<void *> &);
+//             void GetHovered(std::vector<void *> &);
+               std::vector<void *> GetHovered(void);
                void ToolHandler(int, Point);
                void ToolDraw(Painter *);
                void LineHandler(int, Point);
@@ -33,22 +34,32 @@ class DrawingView: public QWidget
                void ArcHandler(int, Point);
                void RotateHandler(int, Point);
                void MirrorHandler(int, Point);
+               void DimensionHandler(int, Point);
+               void TriangulateHandler(int, Point);
+               void TrimHandler(int, Point);
+               void ParallelHandler(int, Point);
                Rect GetObjectExtents(Object *);
                void CheckObjectBounds(void);
                bool HitTestObjects(Point);
                bool HitTest(Object *, Point);
                bool HandleObjectClicked(void);
                void HandleObjectMovement(Point);
+               void AddDimensionTo(void * obj);
 
        public slots:
                void DeleteCurrentLayer(int);
                void HandleLayerToggle(void);
                void HandleLayerSwap(int, int);
+               void HandlePenWidth(float);
+               void HandlePenStyle(int);
+               void HandlePenColor(uint32_t);
 
        signals:
                void ObjectHovered(Object *);
+               void ObjectSelected(Object *);
 
        protected:
+               void focusOutEvent(QFocusEvent * event);
                void paintEvent(QPaintEvent * event);
                void resizeEvent(QResizeEvent * event);
                void mousePressEvent(QMouseEvent * event);
@@ -64,10 +75,10 @@ class DrawingView: public QWidget
 
        public:
                bool useAntialiasing;
-//             uint32_t numSelected;
                uint32_t numHovered;
                bool shiftDown;
                bool ctrlDown;
+               bool altDown;
 
        private:
                QPixmap gridBackground;
@@ -80,14 +91,17 @@ class DrawingView: public QWidget
                bool collided;
                bool scrollDrag;
                Vector oldPoint;
+               Vector oldScrollPoint;
                QString informativeText;
 
        public:
                std::vector<void *> select;
-               std::vector<void *> hover;
+//             std::vector<void *> hover;
                std::vector<void *> toolObjects;
                std::vector<Object> toolScratch;
+               std::vector<void *> toolScratch2;
                Point toolPoint[32];
+               Object * toolObj[32];
                Point intersectionPoint;
                Point hoverPoint;
                bool hoverPointValid;
@@ -95,6 +109,7 @@ class DrawingView: public QWidget
                Object * dragged;
                bool draggingObject;
                bool angleSnap;
+               bool dirty;
 };
 
 #endif // __DRAWINGVIEW_H__