QElectroTech 0.100.0-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. | |
~DiagramEventAddShape () override | |
DiagramEventAddShape::~DiagramEventAddShape. | |
void | mousePressEvent (QGraphicsSceneMouseEvent *event) override |
DiagramEventAddShape::mousePressEvent Action when mouse is pressed. | |
void | mouseMoveEvent (QGraphicsSceneMouseEvent *event) override |
DiagramEventAddShape::mouseMoveEvent Action when mouse move. | |
void | mouseReleaseEvent (QGraphicsSceneMouseEvent *event) override |
DiagramEventAddShape::mouseReleaseEvent Action when mouse button is released. | |
void | mouseDoubleClickEvent (QGraphicsSceneMouseEvent *event) override |
DiagramEventAddShape::mouseDoubleClickEvent Action when mouse button is double clicked. | |
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 current action. | |
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 | |
QPointer< Diagram > | m_diagram |
bool | m_running {false} |
bool | m_abort {false} |
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. | |
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 |