]> Shamusworld >> Repos - architektonas/blobdiff - src/drawingview.h
Tool for adding Lines works now.
[architektonas] / src / drawingview.h
index 2cc4bcdac8676e0118e2214eff3f5c4ddfbb9e5b..3d22b44e83e97224b9e1c38eee3201d56972d2b0 100644 (file)
@@ -1,10 +1,11 @@
 #ifndef __DRAWINGVIEW_H__
 #define __DRAWINGVIEW_H__
 
-#include <QtGui>
+#include <QtWidgets>
 #include <stdint.h>
-#include "action.h"
-#include "container.h"
+#include "structs.h"
+
+class Painter;
 
 class DrawingView: public QWidget
 {
@@ -14,10 +15,19 @@ class DrawingView: public QWidget
                DrawingView(QWidget * parent = NULL);
 
        public:
-//             void SetRotateToolActive(bool state = true);
-               void SetToolActive(Action * action);
                void SetGridSize(uint32_t);
                void UpdateGridBackground(void);
+               Point SnapPointToGrid(Point);
+               void RenderObjects(Painter *, Container *);
+               void DeleteSelectedItems(void);
+               void ClearSelection(void);
+               void AddHoveredToSelection(void);
+               void GetSelection(std::vector<void *> &);
+               void GetHovered(std::vector<void *> &);
+               void ToolMouseDown(Point);
+               void ToolMouseMove(Point);
+               void ToolMouseUp(Point);
+               void ToolDraw(Painter *);
 
        public slots:
                void AddNewObjectToDocument(Object *);
@@ -40,6 +50,10 @@ class DrawingView: public QWidget
 
        public:
                bool useAntialiasing;
+               uint32_t numSelected;
+               uint32_t numHovered;
+               bool shiftDown;
+               bool ctrlDown;
 
        private:
                QPixmap gridBackground;
@@ -50,19 +64,19 @@ class DrawingView: public QWidget
                uint32_t gridPixels;                                    // Grid size in pixels
        private:
                bool collided;
-//Should this go into Object's class variables???
-//maybe, maybe not... :-P
-//             bool rotateTool;
-//             double rx, ry;
                bool scrollDrag;
                Vector oldPoint;
-//             bool addLineTool;
-//             bool addCircleTool;
-//             bool addDimensionTool;
 
        public:
-               Action * toolAction;
+               std::vector<void *> select;
+               std::vector<void *> hover;
+//             int toolState;
+               Point toolPoint[32];
+//             Object * toolObject;
 
+       // Tool methods (static)
+       public:
+//             static void foo();
 //     public:
 //             static Container document;
 };