12#include <QElapsedTimer>
13#include <QGraphicsRectItem>
19class QGraphicsSceneMouseEvent;
47 bool mousePress(QGraphicsSceneMouseEvent *event);
49 bool mouseMove(QGraphicsSceneMouseEvent *event);
66 void startSelectionRect();
70 QGraphicsRectItem m_selectionRect;
71 QElapsedTimer m_timer;
73 QPointF m_selectionStartPoint;
77 QList<std::pair<QPointer<GraphicElement>, QPointF>> m_dragSnapshot;
78 bool m_draggingElement =
false;
79 bool m_markingSelectionBox =
false;
Abstract base class for all graphical circuit elements in wiRedPanda.
bool mouseMove(QGraphicsSceneMouseEvent *event)
bool mousePress(QGraphicsSceneMouseEvent *event)
SceneInteraction(Scene *scene)
void applyTheme(const ThemeAttributes &theme)
Applies the theme's selection-rectangle brush and pen.
bool mouseRelease(QGraphicsSceneMouseEvent *event)
bool isDraggingElement() const
true while an element drag is in progress (drives Scene::resizeScene's expand-only mode).
QPointF lastMousePos() const
Last known cursor position in scene coordinates.
bool mouseDoubleClick(QGraphicsSceneMouseEvent *event)
Main circuit editing scene.
Contains all color attributes for a theme.