]> Shamusworld >> Repos - architektonas/blobdiff - src/drawingview.h
Converted codebase from Qt4 to Qt5.
[architektonas] / src / drawingview.h
index 888737eb82286b38d3b2fbfe75151828da08e1d3..af0fa9265afdade5a85430e35b5a6905aad0dd64 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef __DRAWINGVIEW_H__
 #define __DRAWINGVIEW_H__
 
-#include <QtGui>
+#include <QtWidgets>
 #include <stdint.h>
 #include "action.h"
 #include "container.h"
@@ -14,15 +14,15 @@ class DrawingView: public QWidget
                DrawingView(QWidget * parent = NULL);
 
        public:
-               void SetRotateToolActive(bool state = true);
-               void SetAddLineToolActive(bool state = true);
-               void SetAddCircleToolActive(bool state = true);
-               void SetAddDimensionToolActive(bool state = true);
+//             void SetRotateToolActive(bool state = true);
+               void SetToolActive(Action * action);
                void SetGridSize(uint32_t);
                void UpdateGridBackground(void);
 
        public slots:
                void AddNewObjectToDocument(Object *);
+               void HandleActionUpdate(void);
+               void SetCurrentLayer(int);
 
        protected:
                void paintEvent(QPaintEvent * event);
@@ -30,6 +30,9 @@ class DrawingView: public QWidget
                void mousePressEvent(QMouseEvent * event);
                void mouseMoveEvent(QMouseEvent * event);
                void mouseReleaseEvent(QMouseEvent * event);
+               void wheelEvent(QWheelEvent * event);
+               void keyPressEvent(QKeyEvent * event);
+               void keyReleaseEvent(QKeyEvent * event);
 
        private:
                QPoint GetAdjustedMousePosition(QMouseEvent * event);
@@ -39,30 +42,30 @@ 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;                                             // Grid spacing in base units
                uint32_t gridPixels;                                    // Grid size in pixels
-//             double gridBaseUnits;                                   // Grid size in base units
        private:
                bool collided;
 //Should this go into Object's class variables???
-               bool rotateTool;
-               double rx, ry;
+//maybe, maybe not... :-P
+//             bool rotateTool;
+//             double rx, ry;
                bool scrollDrag;
                Vector oldPoint;
-               bool addLineTool;
-               bool addCircleTool;
-               bool addDimensionTool;
-//             bool selectionInProgress;
-//             QRectF selection;
+//             bool addLineTool;
+//             bool addCircleTool;
+//             bool addDimensionTool;
 
        public:
                Action * toolAction;
+
+//     public:
+//             static Container document;
 };
 
 #endif // __DRAWINGVIEW_H__
+