18#ifndef DIAGRAMEVENTADDSHAPE_H
19#define DIAGRAMEVENTADDSHAPE_H
24class QGraphicsEllipseItem;
48 void applyPosition (
const QPointF &pos, Qt::KeyboardModifiers mods);
void mousePressEvent(QGraphicsSceneMouseEvent *event) override
DiagramEventAddShape::mousePressEvent Action when mouse is pressed.
Definition diagrameventaddshape.cpp:195
QetShapeItem::ShapeType m_shape_type
Definition diagrameventaddshape.h:57
QString beforeClickHint() const
Definition diagrameventaddshape.cpp:446
void reapplyLastPosition(QKeyEvent *event)
Definition diagrameventaddshape.cpp:331
~DiagramEventAddShape() override
DiagramEventAddShape::~DiagramEventAddShape.
Definition diagrameventaddshape.cpp:64
QetShapeItem * m_shape_item
Definition diagrameventaddshape.h:58
void init() override
Definition diagrameventaddshape.cpp:423
void mouseReleaseEvent(QGraphicsSceneMouseEvent *event) override
DiagramEventAddShape::mouseReleaseEvent Action when mouse button is released.
Definition diagrameventaddshape.cpp:354
void showCenterMarker(const QPointF &scenePos)
DiagramEventAddShape::showCenterMarker Small, filled marker at the anchor point, shown only while Ctr...
Definition diagrameventaddshape.cpp:170
void updateHelpCross(const QPointF &p)
DiagramEventAddShape::updateHelpCross Create and update the position of the cross to help user for dr...
Definition diagrameventaddshape.cpp:487
void mouseMoveEvent(QGraphicsSceneMouseEvent *event) override
DiagramEventAddShape::mouseMoveEvent Action when mouse move.
Definition diagrameventaddshape.cpp:275
QGraphicsEllipseItem * m_center_marker
Definition diagrameventaddshape.h:61
QGraphicsLineItem * m_help_horiz
Definition diagrameventaddshape.h:59
void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event) override
DiagramEventAddShape::mouseDoubleClickEvent Action when mouse button is double clicked.
Definition diagrameventaddshape.cpp:398
void updateCreationHint() const
DiagramEventAddShape::updateCreationHint Shows whichever of beforeClickHint()/afterClickHint() matche...
Definition diagrameventaddshape.cpp:438
bool m_center_anchored
Definition diagrameventaddshape.h:62
QPointF m_last_mouse_scene_pos
Definition diagrameventaddshape.h:63
QPointF m_anchor_point
Definition diagrameventaddshape.h:60
DiagramEventAddShape(Diagram *diagram, QetShapeItem::ShapeType shape_type)
DiagramEventAddShape::DiagramEventAddShape Default constructor.
Definition diagrameventaddshape.cpp:38
QString afterClickHint() const
Definition diagrameventaddshape.cpp:462
void hideCenterMarker()
Definition diagrameventaddshape.cpp:184
QGraphicsLineItem * m_help_verti
Definition diagrameventaddshape.h:59
void keyReleaseEvent(QKeyEvent *event) override
Definition diagrameventaddshape.cpp:326
void keyPressEvent(QKeyEvent *event) override
DiagramEventAddShape::keyPressEvent / keyReleaseEvent Pressing or releasing Shift (the square/circle ...
Definition diagrameventaddshape.cpp:321
void applyPosition(const QPointF &pos, Qt::KeyboardModifiers mods)
DiagramEventAddShape::applyPosition Applies a drag/click position to the in-progress shape,...
Definition diagrameventaddshape.cpp:110
DiagramEventInterface(Diagram *diagram)
Definition diagrameventinterface.cpp:25
The Diagram class This class represents an electric diagram. It manages its various child elements,...
Definition diagram.h:54
The QetShapeItem class this class is used to draw a basic shape (line, rectangle, ellipse,...
Definition qetshapeitem.h:42
ShapeType
Definition qetshapeitem.h:79