X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fmainapp%2Fgraphicview.h;h=65e1a3d5d6c8235fc1ea4099460b90e7c2fb594b;hb=5adb444f3e523d3fd028617ced72d1ea6661db21;hp=863b7d6311a5f7d08eace23ad616c411051414ab;hpb=16354e0421b316a62c6b9f7b0b4f3b8cf6f06284;p=architektonas diff --git a/src/mainapp/graphicview.h b/src/mainapp/graphicview.h index 863b7d6..65e1a3d 100644 --- a/src/mainapp/graphicview.h +++ b/src/mainapp/graphicview.h @@ -5,7 +5,6 @@ #include "enums.h" #include "color.h" #include "preview.h" -#include "snapper.h" #include "vector.h" class ActionInterface; @@ -207,18 +206,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 +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; @@ -265,7 +279,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