]> Shamusworld >> Repos - architektonas/blobdiff - src/mainapp/graphicview.h
In the middle of removing Snapper class/fixing snapper rendering...
[architektonas] / src / mainapp / graphicview.h
index 863b7d6311a5f7d08eace23ad616c411051414ab..e4cd758245c8bbca312fd3583cddd651d490c1c8 100644 (file)
@@ -207,18 +207,26 @@ Having this class derive from that one *might* make sense... *Maybe*. Not sure.
                void setSimulationRapid(bool r);
                bool getSimulationRapid();
 
+               Entity * CatchEntity(const Vector &, RS2::ResolveLevel level = RS2::ResolveNone);
+               Entity * CatchEntity(QMouseEvent *, RS2::ResolveLevel level = RS2::ResolveNone);
+               Vector SnapPoint(QMouseEvent *);
+               Vector SnapGrid(Vector);
+               void DrawSnapper(PaintInterface *);
+               void SetSnapperVisible(bool visibility = true);
+               bool SnapperVisible(void);
+
        protected:
                EntityContainer * container;
                EventHandler * eventHandler;
                int mx;                                                         //!< Last known mouse cursor position
                int my;                                                         //!< Last known mouse cursor position
                PaintInterface * painter;
-               Color background;                               //! background color (any color)
-               Color foreground;                               //! foreground color (black or white)
+               Color background;                                       //! background color (any color)
+               Color foreground;                                       //! foreground color (black or white)
                Color gridColor;                                        //! grid color
                Color metaGridColor;                            //! meta grid color
                Color selectedColor;                            //! selected color
-               Color highlightedColor;                 //! highlighted color
+               Color highlightedColor;                         //! highlighted color
                Grid * grid;                                            //! Grid
                /**
                 * Current default snap mode for this graphic view. Used for new
@@ -231,13 +239,19 @@ Having this class derive from that one *might* make sense... *Maybe*. Not sure.
                 */
                RS2::SnapRestriction defaultSnapRes;
                RS2::DrawingMode drawingMode;
-
                /**
                 * Delete mode. If true, all drawing actions will delete in background color
                 * instead.
                 */
                bool deleteMode;
                bool simulationRunning;                         //! If true, the simulation is currectly running
+               double snapDistance;                            //! Manually set snap distance
+               Entity * snapEntity;                            //! Entity to snap to (if any)
+               Vector snapSpot;
+               Vector snapCoord;
+               bool snapperVisible;                            //! Snapper visibility
+               int snapRange;
+               bool showCrosshairs;                            //! Snapper crosshair visibility
 
        private:
                int updateEnabled;