QElectroTech  0.8-dev
eseventinterface.h
Go to the documentation of this file.
1 /*
2  Copyright 2006-2020 The QElectroTech Team
3  This file is part of QElectroTech.
4 
5  QElectroTech is free software: you can redistribute it and/or modify
6  it under the terms of the GNU General Public License as published by
7  the Free Software Foundation, either version 2 of the License, or
8  (at your option) any later version.
9 
10  QElectroTech is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU General Public License for more details.
14 
15  You should have received a copy of the GNU General Public License
16  along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
17 */
18 #ifndef ESEVENTINTERFACE_H
19 #define ESEVENTINTERFACE_H
20 
21 class QGraphicsSceneMouseEvent;
22 class QGraphicsSceneWheelEvent;
23 class QKeyEvent;
24 class ElementScene;
25 class QETElementEditor;
26 class QGraphicsLineItem;
27 class QPointF;
28 
30 {
31  public:
33  virtual ~ESEventInterface();
34 
35  void init();
36 
37  virtual bool mouseDoubleClickEvent (QGraphicsSceneMouseEvent *event);
38  virtual bool mousePressEvent (QGraphicsSceneMouseEvent *event);
39  virtual bool mouseMoveEvent (QGraphicsSceneMouseEvent *event);
40  virtual bool mouseReleaseEvent (QGraphicsSceneMouseEvent *event);
41  virtual bool wheelEvent (QGraphicsSceneWheelEvent *event);
42  virtual bool keyPressEvent (QKeyEvent *event);
43  virtual bool KeyReleaseEvent (QKeyEvent *event);
44  virtual bool isRunning () const;
45  virtual bool isFinish () const;
46 
47  protected:
48  void updateHelpCross (const QPointF &p);
49 
50  protected:
53  QGraphicsLineItem *m_help_horiz, *m_help_verti;
55 };
56 
57 #endif // ESEVENTINTERFACE_H
ESEventInterface::m_abort
bool m_abort
Definition: eseventinterface.h:54
ESEventInterface::init
void init()
ESEventInterface::init Init this event interface.
Definition: eseventinterface.cpp:38
QETElementEditor::slot_setNoDragToView
void slot_setNoDragToView()
Definition: qetelementeditor.cpp:602
ESEventInterface::~ESEventInterface
virtual ~ESEventInterface()
ESEventInterface::~ESEventInterface Destructor.
Definition: eseventinterface.cpp:48
ESEventInterface::m_editor
QETElementEditor * m_editor
Definition: eseventinterface.h:52
ESEventInterface::isFinish
virtual bool isFinish() const
Definition: eseventinterface.cpp:106
ESEventInterface::KeyReleaseEvent
virtual bool KeyReleaseEvent(QKeyEvent *event)
Definition: eseventinterface.cpp:97
QETElementEditor::slot_setRubberBandToView
void slot_setRubberBandToView()
Definition: qetelementeditor.cpp:595
ESEventInterface::wheelEvent
virtual bool wheelEvent(QGraphicsSceneWheelEvent *event)
Definition: eseventinterface.cpp:77
qetelementeditor.h
elementscene.h
eseventinterface.h
ESEventInterface::updateHelpCross
void updateHelpCross(const QPointF &p)
Definition: eseventinterface.cpp:110
ESEventInterface::m_help_horiz
QGraphicsLineItem * m_help_horiz
Definition: eseventinterface.h:53
ESEventInterface::ESEventInterface
ESEventInterface(ElementScene *scene)
Definition: eseventinterface.cpp:23
ESEventInterface::m_running
bool m_running
Definition: eseventinterface.h:54
ESEventInterface::m_scene
ElementScene * m_scene
Definition: eseventinterface.h:51
ESEventInterface::isRunning
virtual bool isRunning() const
Definition: eseventinterface.cpp:102
ElementScene::setBehavior
void setBehavior(ElementScene::Behavior)
ElementScene::setBehavior Modify the current behavior of this scene.
Definition: elementscene.cpp:348
ESEventInterface::mouseReleaseEvent
virtual bool mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
Definition: eseventinterface.cpp:72
ESEventInterface::mousePressEvent
virtual bool mousePressEvent(QGraphicsSceneMouseEvent *event)
Definition: eseventinterface.cpp:62
ESEventInterface::mouseDoubleClickEvent
virtual bool mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event)
Definition: eseventinterface.cpp:57
ElementScene
The ElementScene class This class is the canvas allowing the visual edition of an electrial element....
Definition: elementscene.h:40
ESEventInterface::mouseMoveEvent
virtual bool mouseMoveEvent(QGraphicsSceneMouseEvent *event)
Definition: eseventinterface.cpp:67
ESEventInterface::keyPressEvent
virtual bool keyPressEvent(QKeyEvent *event)
ESEventInterface::keyPressEvent By default, press escape key abort the curent action.
Definition: eseventinterface.cpp:88
ESEventInterface::m_help_verti
QGraphicsLineItem * m_help_verti
Definition: eseventinterface.h:53
QETElementEditor
Definition: qetelementeditor.h:33
ESEventInterface
Definition: eseventinterface.h:30