21 #include <QGraphicsSceneMouseEvent> 25 m_editor (scene->editor()),
26 m_help_horiz (nullptr),
27 m_help_verti (nullptr),
89 if (event->key() == Qt::Key_Escape) {
115 pen.setCosmetic(
true);
116 pen.setColor(Qt::darkGray);
118 m_help_horiz =
new QGraphicsLineItem(-10000, 0, 10000, 0);
123 m_help_verti =
new QGraphicsLineItem(0, -10000, 0, 10000);
130 QPointF point =
m_scene -> snapToGrid(p);
void slot_setNoDragToView()
void slot_setRubberBandToView()
QETElementEditor * m_editor
virtual ~ESEventInterface()
ESEventInterface::~ESEventInterface Destructor.
void setBehavior(ElementScene::Behavior)
ElementScene::setBehavior Modifie the current behavior of this scene.
virtual bool wheelEvent(QGraphicsSceneWheelEvent *event)
void init()
ESEventInterface::init Init this event interface.
QGraphicsLineItem * m_help_horiz
virtual bool mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
void updateHelpCross(const QPointF &p)
virtual bool KeyReleaseEvent(QKeyEvent *event)
virtual bool mousePressEvent(QGraphicsSceneMouseEvent *event)
QGraphicsLineItem * m_help_verti
virtual bool keyPressEvent(QKeyEvent *event)
ESEventInterface::keyPressEvent By default, press escape key abort the curent action.
ESEventInterface(ElementScene *scene)
virtual bool isFinish() const
virtual bool isRunning() const
virtual bool mouseMoveEvent(QGraphicsSceneMouseEvent *event)
virtual bool mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event)