18 #ifndef DIAGRAMEVENTADDELEMENT_H 19 #define DIAGRAMEVENTADDELEMENT_H 56 #endif // DIAGRAMEVENTADDELEMENT_H
DiagramEventAddElement(ElementsLocation &location, Diagram *diagram, QPointF pos=QPointF(0, 0))
DiagramEventAddElement::DiagramEventAddElement Defaut constructor.
bool buildElement()
DiagramEventAddElement::buildElement Build the element, if the element is build successfully, we return true, otherwise false.
void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event) override
DiagramEventAddElement::mouseDoubleClickEvent If mouse left double clic, finish this event (isRunning...
ElementsLocation m_location
void mouseReleaseEvent(QGraphicsSceneMouseEvent *event) override
DiagramEventAddElement::mouseReleaseEvent Right button finish this event (isRunning = false) and emit...
void keyPressEvent(QKeyEvent *event) override
DiagramEventAddElement::keyPressEvent Press space key rotate the element to 90° (return true) else ca...
void mouseMoveEvent(QGraphicsSceneMouseEvent *event) override
DiagramEventAddElement::mouseMoveEvent Move the element to new pos of mouse the event is always accep...
~DiagramEventAddElement() override
DiagramEventAddElement::~DiagramEventAddElement Destructor Enable context menu for each view of diagr...
void init() override
DiagramEventAddElement::init Init this event.
The DiagramEventAddElement class This diagram event add a new element, for each left click button at ...
The DiagramEventInterface class isRunning() return true if action is running (do something). By default return false.
void mousePressEvent(QGraphicsSceneMouseEvent *event) override
DiagramEventAddElement::mousePressEvent Do nothing, but return true for not transit the event to othe...
void addElement()
DiagramEventAddElement::addElement Add an element at the current pos en current rotation, if project autoconductor option is enable, and the element can be wired, we do it.