]> Shamusworld >> Repos - architektonas/blobdiff - src/drawingview.h
Added pen and dropper tools, and printing support.
[architektonas] / src / drawingview.h
index 441b7a8eb61cecfd2b080bc636b11b00000faee8..0c6cc46cf76d18390d908dd8447e7b4661355ac9 100644 (file)
@@ -19,10 +19,10 @@ class DrawingView: public QWidget
 
        public:
                void DrawBackground(Painter *);
-               void SetGridSize(uint32_t);
-               void SetGridSize(double);
-               void UpdateGridBackground(void);
-               void UpdateGridBackgroundF(void);
+//             void SetGridSize(uint32_t);
+//             void SetGridSize(double);
+//             void UpdateGridBackground(void);
+//             void UpdateGridBackgroundF(void);
                Point SnapPointToGrid(Point);
                Point SnapPointToAngle(Point);
                void RenderObjects(Painter *, VPVector &, int, bool ignoreLayer = false);
@@ -55,7 +55,8 @@ class DrawingView: public QWidget
                void HandlePenWidth(float);
                void HandlePenStyle(int);
                void HandlePenColor(uint32_t);
-               void HandlePenStamp(void);
+               void HandlePenStamp(QAction *);
+               void HandlePenDropper(QAction *);
 
        signals:
                void ObjectHovered(Object *);
@@ -64,6 +65,7 @@ class DrawingView: public QWidget
 
        protected:
                void focusOutEvent(QFocusEvent * event);
+               void focusInEvent(QFocusEvent * event);
                void paintEvent(QPaintEvent * event);
                void resizeEvent(QResizeEvent * event);
                void mousePressEvent(QMouseEvent * event);
@@ -74,6 +76,7 @@ class DrawingView: public QWidget
                void keyReleaseEvent(QKeyEvent * event);
 
        private:
+               void HandleLayerSwap(int, int, VPVector &);
                void DrawSubGrid(Painter *, uint32_t, double, Vector, Vector);
                QPoint GetAdjustedMousePosition(QMouseEvent * event);
                QPoint GetAdjustedClientPosition(int x, int y);
@@ -89,6 +92,9 @@ class DrawingView: public QWidget
                QPixmap gridBackground;
                double scale;                                                   // Window scaling factor
                int32_t offsetX, offsetY;                               // Window offsets
+               bool supressSelected;
+               QCursor curMarker;
+               QCursor curDropper;
        public:
                Container document;
                uint32_t gridPixels;                                    // Grid size in pixels