]> Shamusworld >> Repos - architektonas/blobdiff - src/drawingview.h
Fix for Print Preview for centering of drawing on page.
[architektonas] / src / drawingview.h
index d252ffcf3515e5273c74c48e6cdb33554daf2a26..704b79d357f60b1b610a0afbf4d802ea8f271fd1 100644 (file)
@@ -18,8 +18,7 @@ class DrawingView: public QWidget
                DrawingView(QWidget * parent = NULL);
 
        public:
-               void SetGridSize(uint32_t);
-               void UpdateGridBackground(void);
+               void DrawBackground(Painter *);
                Point SnapPointToGrid(Point);
                Point SnapPointToAngle(Point);
                void RenderObjects(Painter *, VPVector &, int, bool ignoreLayer = false);
@@ -49,17 +48,21 @@ class DrawingView: public QWidget
                void DeleteCurrentLayer(int);
                void HandleLayerToggle(void);
                void HandleLayerSwap(int, int);
+               void HandleLayerSwap(int, int, VPVector &);
                void HandlePenWidth(float);
                void HandlePenStyle(int);
                void HandlePenColor(uint32_t);
-               void HandlePenStamp(void);
+               void HandlePenStamp(QAction *);
+               void HandlePenDropper(QAction *);
 
        signals:
                void ObjectHovered(Object *);
                void ObjectSelected(Object *);
+               void NeedZoomUpdate(void);
 
        protected:
                void focusOutEvent(QFocusEvent * event);
+               void focusInEvent(QFocusEvent * event);
                void paintEvent(QPaintEvent * event);
                void resizeEvent(QResizeEvent * event);
                void mousePressEvent(QMouseEvent * event);
@@ -70,6 +73,7 @@ class DrawingView: public QWidget
                void keyReleaseEvent(QKeyEvent * event);
 
        private:
+               void DrawSubGrid(Painter *, uint32_t, double, Vector, Vector);
                QPoint GetAdjustedMousePosition(QMouseEvent * event);
                QPoint GetAdjustedClientPosition(int x, int y);
 
@@ -84,10 +88,15 @@ 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
-       private:
+               double gridPixelsF;                                             // Grid size in pixels (float)
+//     private:
+       public:
                bool collided;
                bool scrollDrag;
                Vector oldPoint;