#define __SNAPPER_H__
#include <QtCore>
-#include "rs.h"
+#include "enums.h"
#include "vector.h"
-class RS_Entity;
-class RS_EntityContainer;
+class Entity;
+class EntityContainer;
class GraphicView;
class PaintInterface;
*
* @author Andrew Mustun
*/
-class RS_Snapper
+class Snapper
{
public:
- RS_Snapper(RS_EntityContainer & container, GraphicView & graphicView);
- RS_Snapper();
- virtual ~RS_Snapper();
+ Snapper(EntityContainer & container, GraphicView & graphicView);
+ Snapper();
+ virtual ~Snapper();
void init();
void finish();
- void SetContainer(RS_EntityContainer *);
+ void SetContainer(EntityContainer *);
void SetGraphicView(GraphicView *);
- RS_Entity * getKeyEntity();
+ Entity * getKeyEntity();
void setSnapMode(RS2::SnapMode snapMode);
void setSnapRestriction(RS2::SnapRestriction snapRes);
RS2::SnapMode getSnapMode(void);
Vector restrictHorizontal(Vector coord);
Vector restrictVertical(Vector coord);
- RS_Entity * catchEntity(const Vector & pos, RS2::ResolveLevel level = RS2::ResolveNone);
- RS_Entity * catchEntity(QMouseEvent * e, RS2::ResolveLevel level = RS2::ResolveNone);
+ Entity * catchEntity(const Vector & pos, RS2::ResolveLevel level = RS2::ResolveNone);
+ Entity * catchEntity(QMouseEvent * e, RS2::ResolveLevel level = RS2::ResolveNone);
virtual void suspend();
virtual void resume();
// void xorSnapper();
protected:
- RS_EntityContainer * container;
+ EntityContainer * container;
GraphicView * graphicView;
- RS_Entity * keyEntity;
+ Entity * keyEntity;
Vector snapCoord;
Vector snapSpot;
RS2::SnapMode snapMode;