QElectroTech 0.100.0-dev
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | Private Attributes | List of all members
ElementTextsMover Class Reference

#include <elementtextsmover.h>

Collaboration diagram for ElementTextsMover:
Collaboration graph

Public Member Functions

 ElementTextsMover ()
 ElementTextsMover::ElementTextsMover.
 
bool isReady () const
 ElementTextsMover::isReady.
 
int beginMovement (Diagram *diagram, QGraphicsItem *driver_item=nullptr)
 ElementTextsMover::beginMovement Begin a movement.
 
void continueMovement (QGraphicsSceneMouseEvent *event)
 
void endMovement ()
 ElementTextsMover::endMovement Finish the movement by pushing an undo command to the parent diagram of text item.
 

Private Member Functions

 ElementTextsMover (const ElementTextsMover &)
 
QString undoText () const
 

Private Attributes

bool m_movement_running = false
 
Diagramm_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
 

Detailed Description

This class manages the interactive movement of element text items on a particular diagram.

Constructor & Destructor Documentation

◆ ElementTextsMover() [1/2]

ElementTextsMover::ElementTextsMover ( )

◆ ElementTextsMover() [2/2]

ElementTextsMover::ElementTextsMover ( const ElementTextsMover )
private

Member Function Documentation

◆ beginMovement()

int ElementTextsMover::beginMovement ( Diagram diagram,
QGraphicsItem *  driver_item = nullptr 
)

ElementTextsMover::beginMovement Begin a movement.

Parameters
diagram: diagram where the movement is apply
driver_item: item moved by the mouse
Returns
: the number of moved text (driver_item include), or -1 if this ElementTextsMover can't begin a movement
Here is the caller graph for this function:

◆ continueMovement()

void ElementTextsMover::continueMovement ( QGraphicsSceneMouseEvent *  event)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ endMovement()

void ElementTextsMover::endMovement ( )

ElementTextsMover::endMovement Finish the movement by pushing an undo command to the parent diagram of text item.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ isReady()

bool ElementTextsMover::isReady ( ) const

ElementTextsMover::isReady.

Returns
true if this ElementTextsMover is ready to process a new movement. False if this ElementTextsMover is actually process a movement

◆ undoText()

QString ElementTextsMover::undoText ( ) const
private
Here is the caller graph for this function:

Member Data Documentation

◆ m_diagram

Diagram* ElementTextsMover::m_diagram = nullptr
private

◆ m_group_count

int ElementTextsMover::m_group_count = 0
private

◆ m_grps_hash

QHash<QGraphicsItemGroup *, QPointF> ElementTextsMover::m_grps_hash
private

◆ m_items_hash

QHash<QGraphicsItem *, QPointF> ElementTextsMover::m_items_hash
private

◆ m_movement_driver

QGraphicsItem* ElementTextsMover::m_movement_driver = nullptr
private

◆ m_movement_running

bool ElementTextsMover::m_movement_running = false
private

◆ m_text_count

int ElementTextsMover::m_text_count = 0
private

◆ m_texts_hash

QHash<DiagramTextItem *, QPointF> ElementTextsMover::m_texts_hash
private

The documentation for this class was generated from the following files: