QElectroTech
0.8-dev
|
The DiagramEventAddShape class This event manage the creation of a shape. More...
#include <diagrameventaddshape.h>
Public Member Functions | |
DiagramEventAddShape (Diagram *diagram, QetShapeItem::ShapeType shape_type) | |
DiagramEventAddShape::DiagramEventAddShape Default constructor. More... | |
~DiagramEventAddShape () override | |
DiagramEventAddShape::~DiagramEventAddShape. More... | |
void | mousePressEvent (QGraphicsSceneMouseEvent *event) override |
DiagramEventAddShape::mousePressEvent Action when mouse is pressed. More... | |
void | mouseMoveEvent (QGraphicsSceneMouseEvent *event) override |
DiagramEventAddShape::mouseMoveEvent Action when mouse move. More... | |
void | mouseReleaseEvent (QGraphicsSceneMouseEvent *event) override |
DiagramEventAddShape::mouseReleaseEvent Action when mouse button is released. More... | |
void | mouseDoubleClickEvent (QGraphicsSceneMouseEvent *event) override |
DiagramEventAddShape::mouseDoubleClickEvent Action when mouse button is double clicked. More... | |
void | init () override |
Public Member Functions inherited from DiagramEventInterface | |
DiagramEventInterface (Diagram *diagram) | |
~DiagramEventInterface () override=0 | |
virtual void | wheelEvent (QGraphicsSceneWheelEvent *event) |
virtual void | keyPressEvent (QKeyEvent *event) |
DiagramEventInterface::keyPressEvent By default, press escape key abort the curent action. More... | |
virtual void | keyReleaseEvent (QKeyEvent *event) |
virtual bool | isRunning () const |
Protected Attributes | |
QetShapeItem::ShapeType | m_shape_type |
QetShapeItem * | m_shape_item |
QGraphicsLineItem * | m_help_horiz |
QGraphicsLineItem * | m_help_verti |
Protected Attributes inherited from DiagramEventInterface | |
Diagram * | m_diagram |
bool | m_running |
bool | m_abort |
Private Member Functions | |
void | updateHelpCross (const QPointF &p) |
DiagramEventAddShape::updateHelpCross Create and update the position of the cross to help user for draw new shape. More... | |
Additional Inherited Members | |
Signals inherited from DiagramEventInterface | |
void | finish () |
The DiagramEventAddShape class This event manage the creation of a shape.
DiagramEventAddShape::DiagramEventAddShape | ( | Diagram * | diagram, |
QetShapeItem::ShapeType | shape_type | ||
) |
DiagramEventAddShape::DiagramEventAddShape Default constructor.
diagram | : the diagram where this event must operate |
shape_type | : the type of shape to draw |
|
override |
|
overridevirtual |
|
overridevirtual |
DiagramEventAddShape::mouseDoubleClickEvent Action when mouse button is double clicked.
event | : event of mouse double click |
Reimplemented from DiagramEventInterface.
|
overridevirtual |
DiagramEventAddShape::mouseMoveEvent Action when mouse move.
event | : event of mouse move |
Reimplemented from DiagramEventInterface.
|
overridevirtual |
DiagramEventAddShape::mousePressEvent Action when mouse is pressed.
event | : event of mouse press |
Reimplemented from DiagramEventInterface.
|
overridevirtual |
DiagramEventAddShape::mouseReleaseEvent Action when mouse button is released.
event | : event of mouse release |
Reimplemented from DiagramEventInterface.
|
private |
DiagramEventAddShape::updateHelpCross Create and update the position of the cross to help user for draw new shape.
p | : the center of the cross |
|
protected |
|
protected |
|
protected |
|
protected |