QElectroTech  0.70
eseventinterface.h
Go to the documentation of this file.
1 /*
2  Copyright 2006-2019 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
ElementScene * m_scene
QETElementEditor * m_editor
virtual ~ESEventInterface()
ESEventInterface::~ESEventInterface Destructor.
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)