QElectroTech 0.100.0-dev
Loading...
Searching...
No Matches
eseventinterface.h
Go to the documentation of this file.
1/*
2 Copyright 2006-2024 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
21class QGraphicsSceneMouseEvent;
22class QGraphicsSceneWheelEvent;
23class QKeyEvent;
24class ElementScene;
26class QGraphicsLineItem;
27class 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
Definition eseventinterface.h:30
virtual bool mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event)
Definition eseventinterface.cpp:60
virtual bool mouseMoveEvent(QGraphicsSceneMouseEvent *event)
Definition eseventinterface.cpp:70
void updateHelpCross(const QPointF &p)
Definition eseventinterface.cpp:115
virtual bool wheelEvent(QGraphicsSceneWheelEvent *event)
Definition eseventinterface.cpp:80
virtual bool isFinish() const
Definition eseventinterface.cpp:110
bool m_running
Definition eseventinterface.h:54
QGraphicsLineItem * m_help_verti
Definition eseventinterface.h:53
virtual bool keyPressEvent(QKeyEvent *event)
ESEventInterface::keyPressEvent By default, press escape key abort the current action.
Definition eseventinterface.cpp:91
void init()
ESEventInterface::init Init this event interface.
Definition eseventinterface.cpp:41
virtual bool isRunning() const
Definition eseventinterface.cpp:105
virtual bool mousePressEvent(QGraphicsSceneMouseEvent *event)
Definition eseventinterface.cpp:65
ElementScene * m_scene
Definition eseventinterface.h:51
QETElementEditor * m_editor
Definition eseventinterface.h:52
virtual ~ESEventInterface()
ESEventInterface::~ESEventInterface Destructor.
Definition eseventinterface.cpp:51
virtual bool mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
Definition eseventinterface.cpp:75
bool m_abort
Definition eseventinterface.h:54
virtual bool KeyReleaseEvent(QKeyEvent *event)
Definition eseventinterface.cpp:100
QGraphicsLineItem * m_help_horiz
Definition eseventinterface.h:53
The ElementScene class This class is the canvas allowing the visual edition of an electrical element....
Definition elementscene.h:46
Definition qetelementeditor.h:39