|
QElectroTech
0.8-dev
|
Go to the documentation of this file.
18 #ifndef QETGRAPHICSITEM_H
19 #define QETGRAPHICSITEM_H
21 #include <QGraphicsObject>
37 virtual void setPos (
const QPointF &p);
38 virtual void setPos (qreal x, qreal y);
44 virtual QString
name ()
const {
return QString(
"");}
64 #endif // QETGRAPHICSITEM_H
int beginMovement(Diagram *, QGraphicsItem *=nullptr)
ElementsMover::beginMovement Start a new movement.
Definition: elementsmover.cpp:65
Definition: qetgraphicsitem.h:27
void mouseReleaseEvent(QGraphicsSceneMouseEvent *event) override
QetGraphicsItem::mouseReleaseEvent handle mouse release click.
Definition: qetgraphicsitem.cpp:149
Diagram * diagram() const
Definition: qetgraphicsitem.cpp:40
GraphicsItemState
Definition: qet.h:38
virtual void setMovable(bool movable)
Definition: qetgraphicsitem.h:41
virtual QString name() const
Definition: qetgraphicsitem.h:44
void endMovement()
ElementsMover::endMovement Ended the current movement by creating an undo added to the undostack of t...
Definition: elementsmover.cpp:150
~QetGraphicsItem() override=0
Definition: qetgraphicsitem.cpp:33
void continueMovement(const QPointF &)
ElementsMover::continueMovement Add a move to the current movement.
Definition: elementsmover.cpp:112
The Diagram class This class represents an electric diagram. It manages its various child elements,...
Definition: diagram.h:56
@ GIOK
General state.
Definition: qet.h:39
bool is_movable_
Definition: qetgraphicsitem.h:56
QetGraphicsItem(QGraphicsItem *parent=nullptr)
QetGraphicsItem::QetGraphicsItem Default constructor.
Definition: qetgraphicsitem.cpp:26
QET::GraphicsItemState m_state
Definition: qetgraphicsitem.h:60
void mousePressEvent(QGraphicsSceneMouseEvent *event) override
Definition: qetgraphicsitem.cpp:79
virtual void editProperty()
Definition: qetgraphicsitem.h:43
bool m_first_move
Definition: qetgraphicsitem.h:57
void mouseMoveEvent(QGraphicsSceneMouseEvent *event) override
Definition: qetgraphicsitem.cpp:108
ElementsMover & elementsMover()
Diagram::elementsMover.
Definition: diagram.cpp:2057
static QPointF snapToGrid(const QPointF &p)
Diagram::snapToGrid Return a nearest snap point of p.
Definition: diagram.cpp:2240
QPointF m_mouse_to_origin_movement
Definition: qetgraphicsitem.h:59
virtual void setPos(const QPointF &p)
Definition: qetgraphicsitem.cpp:49
bool snap_to_grid_
Definition: qetgraphicsitem.h:58
void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event) override
Definition: qetgraphicsitem.cpp:97
virtual bool isMovable() const
Definition: qetgraphicsitem.h:40
QET::GraphicsItemState state() const
QetGraphicsItem::state.
Definition: qetgraphicsitem.cpp:70