]> Shamusworld >> Repos - architektonas/blobdiff - src/mainapp/graphicview.h
Removed Snapper class; still refactoring Snapper/Preview...
[architektonas] / src / mainapp / graphicview.h
index 863b7d6311a5f7d08eace23ad616c411051414ab..cb684c060aef93b3f75ed173c92a1f2134c1dff6 100644 (file)
@@ -207,18 +207,27 @@ 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);
+               Entity * GetSnapperEntity(void);
+               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 +240,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;
@@ -265,7 +280,8 @@ Having this class derive from that one *might* make sense... *Maybe*. Not sure.
        public://for now
                // We use this here instead of deriving ActionInterface from it because
                // this makes more sense.
-               Snapper snapper;
+//             Snapper snapper;
+//yer next
                Preview preview;
 
 //QG