18#ifndef DIAGRAMEVENTADDPATH_H
19#define DIAGRAMEVENTADDPATH_H
24class QGraphicsLineItem;
68 QPointF
snapped (
const QPointF &scenePos, Qt::KeyboardModifiers mods)
const;
void showHint() const
DiagramEventAddPath::showHint Re-asserted on every move within the canvas (see mouseMoveEvent),...
Definition diagrameventaddpath.cpp:87
int m_dragging_node
Definition diagrameventaddpath.h:72
QGraphicsLineItem * m_help_horiz
Definition diagrameventaddpath.h:73
QGraphicsLineItem * m_help_verti
Definition diagrameventaddpath.h:73
void keyPressEvent(QKeyEvent *event) override
DiagramEventAddPath::keyPressEvent Escape or Enter finish the path open once at least two real points...
Definition diagrameventaddpath.cpp:305
QPointF snapped(const QPointF &scenePos, Qt::KeyboardModifiers mods) const
Definition diagrameventaddpath.cpp:103
QVector< QetShapeItem::PathNode > m_nodes
Definition diagrameventaddpath.h:71
~DiagramEventAddPath() override
Definition diagrameventaddpath.cpp:53
DiagramEventAddPath(Diagram *diagram)
DiagramEventAddPath::DiagramEventAddPath.
Definition diagrameventaddpath.cpp:37
QetShapeItem * m_shape_item
Definition diagrameventaddpath.h:70
void mouseMoveEvent(QGraphicsSceneMouseEvent *event) override
DiagramEventAddPath::mouseMoveEvent Two mutually exclusive behaviours, matching whether a button is h...
Definition diagrameventaddpath.cpp:198
int confirmedNodeCount() const
Definition diagrameventaddpath.cpp:108
static constexpr qreal CLOSE_THRESHOLD
Definition diagrameventaddpath.h:78
void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event) override
DiagramEventAddPath::mouseDoubleClickEvent A double-click is a press, release, press,...
Definition diagrameventaddpath.cpp:289
bool nearFirstNode(const QPointF &scenePos) const
DiagramEventAddPath::nearFirstNode m_shape_item's pos()/transform() stay at their identity defaults f...
Definition diagrameventaddpath.cpp:383
void mouseReleaseEvent(QGraphicsSceneMouseEvent *event) override
DiagramEventAddPath::mouseReleaseEvent Left release just ends the current node's drag phase (the trai...
Definition diagrameventaddpath.cpp:250
void finishPath(bool closed)
DiagramEventAddPath::finishPath Strips the trailing live-preview node, commits the in-progress path o...
Definition diagrameventaddpath.cpp:335
void mousePressEvent(QGraphicsSceneMouseEvent *event) override
DiagramEventAddPath::mousePressEvent Left click: on the very first click, creates the shape with a re...
Definition diagrameventaddpath.cpp:125
void updateHelpCross(const QPointF &p)
DiagramEventAddPath::updateHelpCross Same crosshair guide as every other shape tool (see DiagramEvent...
Definition diagrameventaddpath.cpp:397
void init() override
Definition diagrameventaddpath.cpp:97
void cancelPath()
DiagramEventAddPath::cancelPath Discards the in-progress path entirely – nothing worth keeping (an em...
Definition diagrameventaddpath.cpp:364
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