QElectroTech
0.70
|
#include <elementtextsmover.h>
Public Member Functions | |
ElementTextsMover () | |
ElementTextsMover::ElementTextsMover. More... | |
bool | isReady () const |
ElementTextsMover::isReady. More... | |
int | beginMovement (Diagram *diagram, QGraphicsItem *driver_item=nullptr) |
ElementTextsMover::beginMovement Begin a movement. More... | |
void | continueMovement (QGraphicsSceneMouseEvent *event) |
void | endMovement () |
ElementTextsMover::endMovement Finish the movement by pushing an undo command to the parent diagram of text item. More... | |
Private Member Functions | |
ElementTextsMover (const ElementTextsMover &) | |
QString | undoText () const |
Private Attributes | |
bool | m_movement_running = false |
Diagram * | m_diagram = nullptr |
QGraphicsItem * | m_movement_driver = nullptr |
QHash< DiagramTextItem *, QPointF > | m_texts_hash |
QHash< QGraphicsItemGroup *, QPointF > | m_grps_hash |
QHash< QGraphicsItem *, QPointF > | m_items_hash |
int | m_text_count = 0 |
int | m_group_count = 0 |
This class manages the interactive movement of element text items on a particular diagram.
Definition at line 34 of file elementtextsmover.h.
ElementTextsMover::ElementTextsMover | ( | ) |
ElementTextsMover::ElementTextsMover.
Definition at line 28 of file elementtextsmover.cpp.
|
private |
int ElementTextsMover::beginMovement | ( | Diagram * | diagram, |
QGraphicsItem * | driver_item = nullptr |
||
) |
ElementTextsMover::beginMovement Begin a movement.
diagram | : diagram where the movement is apply |
driver_item | : item moved by the mouse |
Definition at line 46 of file elementtextsmover.cpp.
References m_diagram, m_group_count, m_items_hash, m_movement_driver, m_movement_running, m_text_count, and DynamicElementTextItem::Type.
Referenced by ElementTextItemGroup::mouseMoveEvent(), and DynamicElementTextItem::mouseMoveEvent().
void ElementTextsMover::continueMovement | ( | QGraphicsSceneMouseEvent * | event | ) |
Definition at line 82 of file elementtextsmover.cpp.
References m_items_hash, m_movement_driver, m_movement_running, and Diagram::snapToGrid().
Referenced by ElementTextItemGroup::mouseMoveEvent(), and DynamicElementTextItem::mouseMoveEvent().
void ElementTextsMover::endMovement | ( | ) |
ElementTextsMover::endMovement Finish the movement by pushing an undo command to the parent diagram of text item.
Definition at line 107 of file elementtextsmover.cpp.
References QPropertyUndoCommand::enableAnimation(), m_diagram, m_items_hash, m_movement_running, Diagram::undoStack(), and undoText().
Referenced by ElementTextItemGroup::mouseReleaseEvent().
bool ElementTextsMover::isReady | ( | ) | const |
Definition at line 35 of file elementtextsmover.cpp.
References m_movement_running.
|
private |
Definition at line 134 of file elementtextsmover.cpp.
References m_group_count, m_items_hash, m_text_count, and QET::Icons::tr.
Referenced by endMovement().
|
private |
Definition at line 52 of file elementtextsmover.h.
Referenced by beginMovement(), and endMovement().
|
private |
Definition at line 58 of file elementtextsmover.h.
Referenced by beginMovement(), and undoText().
|
private |
Definition at line 55 of file elementtextsmover.h.
|
private |
Definition at line 56 of file elementtextsmover.h.
Referenced by beginMovement(), continueMovement(), endMovement(), and undoText().
|
private |
Definition at line 53 of file elementtextsmover.h.
Referenced by beginMovement(), and continueMovement().
|
private |
Definition at line 51 of file elementtextsmover.h.
Referenced by beginMovement(), continueMovement(), endMovement(), and isReady().
|
private |
Definition at line 57 of file elementtextsmover.h.
Referenced by beginMovement(), and undoText().
|
private |
Definition at line 54 of file elementtextsmover.h.