QElectroTech  0.8-dev
eseventaddarc.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 ESEVENTADDARC_H
19 #define ESEVENTADDARC_H
20 
21 #include "eseventinterface.h"
22 
23 class ElementScene;
24 class PartArc;
25 class QGraphicsSceneMouseEvent;
26 
32 {
33  public:
35  ~ESEventAddArc() override;
36 
37  bool mousePressEvent (QGraphicsSceneMouseEvent *event) override;
38  bool mouseMoveEvent (QGraphicsSceneMouseEvent *event) override;
39  bool mouseReleaseEvent (QGraphicsSceneMouseEvent *event) override;
40  bool keyPressEvent (QKeyEvent *event) override;
41 
42  private:
43  void updateArc ();
44 
45  private:
48  bool m_inverted;
49 };
50 
51 #endif // ESEVENTADDARC_H
ESEventInterface::m_abort
bool m_abort
Definition: eseventinterface.h:54
ElementScene::snapToGrid
QPointF snapToGrid(QPointF point)
ElementScene::snapToGrid Rounds the coordinates of the point passed as a parameter so that this point...
Definition: elementscene.cpp:1270
ESEventAddArc::mouseMoveEvent
bool mouseMoveEvent(QGraphicsSceneMouseEvent *event) override
ESEventAddArc::mouseMoveEvent.
Definition: eseventaddarc.cpp:86
ESEventAddArc::~ESEventAddArc
~ESEventAddArc() override
ESEventAddArc::~ESEventAddArc.
Definition: eseventaddarc.cpp:38
PartArc::setStartAngle
void setStartAngle(const int &start_angle) override
AbstractPartEllipse::setStartAngle Sets the start angle for an ellipse segment to angle,...
Definition: partarc.h:60
ESEventAddArc::m_arc
PartArc * m_arc
Definition: eseventaddarc.h:46
QET::Icons::PartArc
QIcon PartArc
Definition: qeticons.cpp:127
ESEventAddArc
The ESEventAddArc class This ESEvent manage creation of arc in an ElementScene.
Definition: eseventaddarc.h:32
ESEventInterface::m_editor
QETElementEditor * m_editor
Definition: eseventinterface.h:52
ESEventAddArc::mouseReleaseEvent
bool mouseReleaseEvent(QGraphicsSceneMouseEvent *event) override
ESEventAddArc::mouseReleaseEvent.
Definition: eseventaddarc.cpp:101
PartArc
The PartArc class This class represents an elliptical arc primitive which may be used to compose the ...
Definition: partarc.h:32
ESEventAddArc::ESEventAddArc
ESEventAddArc(ElementScene *scene)
ESEventAddArc::ESEventAddArc.
Definition: eseventaddarc.cpp:29
partarc.h
ESEventAddArc::m_mouse_pos
QPointF m_mouse_pos
Definition: eseventaddarc.h:47
elementscene.h
eseventinterface.h
ESEventInterface::updateHelpCross
void updateHelpCross(const QPointF &p)
Definition: eseventinterface.cpp:110
ESEventAddArc::m_inverted
bool m_inverted
Definition: eseventaddarc.h:48
editorcommands.h
eseventaddarc.h
AbstractPartEllipse::rect
QRectF rect
Definition: abstractpartellipse.h:44
ESEventInterface::m_running
bool m_running
Definition: eseventinterface.h:54
ESEventInterface::m_scene
ElementScene * m_scene
Definition: eseventinterface.h:51
ESEventAddArc::updateArc
void updateArc()
ESEventAddArc::updateArc Redraw the arc with curent value.
Definition: eseventaddarc.cpp:129
ESEventAddArc::mousePressEvent
bool mousePressEvent(QGraphicsSceneMouseEvent *event) override
ESEventAddPolygon::mousePressEvent.
Definition: eseventaddarc.cpp:48
ElementScene
The ElementScene class This class is the canvas allowing the visual edition of an electrial element....
Definition: elementscene.h:40
ESEventAddArc::m_origin
QPointF m_origin
Definition: eseventaddarc.h:47
ESEventInterface::keyPressEvent
virtual bool keyPressEvent(QKeyEvent *event)
ESEventInterface::keyPressEvent By default, press escape key abort the curent action.
Definition: eseventinterface.cpp:88
QET::Icons::tr
QIcon tr
Definition: qeticons.cpp:206
ESEventAddArc::keyPressEvent
bool keyPressEvent(QKeyEvent *event) override
ESEventAddArc::keyPressEvent.
Definition: eseventaddarc.cpp:115
ESEventInterface
Definition: eseventinterface.h:30
AddPartCommand
Definition: editorcommands.h:125