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
*/
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;