]> Shamusworld >> Repos - architektonas/blobdiff - src/drawingview.h
Fix for Print Preview for centering of drawing on page.
[architektonas] / src / drawingview.h
index 7e5a9d1db52b212509ef5041ba283e7a4c8f9ded..704b79d357f60b1b610a0afbf4d802ea8f271fd1 100644 (file)
@@ -18,13 +18,11 @@ 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);
                void AddHoveredToSelection(void);
-               void GetSelection(VPVector &);
                VPVector GetSelection(void);
                VPVector GetHovered(void);
                void ToolHandler(int, Point);
@@ -50,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);
@@ -71,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);
 
@@ -85,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;
@@ -110,6 +118,7 @@ class DrawingView: public QWidget
                bool draggingObject;
                bool angleSnap;
                bool dirty;
+               bool scrollWheelSeen;
 };
 
 #endif // __DRAWINGVIEW_H__