QElectroTech  0.8-dev
Public Member Functions | Private Member Functions | Private Attributes | List of all members
ChangeZValueCommand Class Reference

#include <editorcommands.h>

Inheritance diagram for ChangeZValueCommand:
Inheritance graph
Collaboration diagram for ChangeZValueCommand:
Collaboration graph

Public Member Functions

 ChangeZValueCommand (ElementScene *, QET::DepthOption, QUndoCommand *=nullptr)
 
 ~ChangeZValueCommand () override
 Destructeur. More...
 
void undo () override
 Annule les changements de zValue. More...
 
void redo () override
 Refait les changements de zValue. More...
 
- Public Member Functions inherited from ElementEditionCommand
 ElementEditionCommand (ElementScene *=nullptr, ElementView *=nullptr, QUndoCommand *=nullptr)
 ElementEditionCommand::ElementEditionCommand Constructs an ElementEditionCommand, thus embedding the provided scene and view. More...
 
 ElementEditionCommand (const QString &, ElementScene *=nullptr, ElementView *=nullptr, QUndoCommand *=nullptr)
 ElementEditionCommand::ElementEditionCommand Constructs an ElementEditionCommand, thus embedding the provided scene and view. More...
 
 ~ElementEditionCommand () override
 
ElementSceneelementScene () const
 
void setElementScene (ElementScene *)
 
ElementViewelementView () const
 
void setElementView (ElementView *)
 

Private Member Functions

 ChangeZValueCommand (const ChangeZValueCommand &)
 
void applyBringForward (const QList< QGraphicsItem * > &)
 
void applyRaise (const QList< QGraphicsItem * > &)
 
void applyLower (const QList< QGraphicsItem * > &)
 
void applySendBackward (const QList< QGraphicsItem * > &)
 

Private Attributes

QHash< QGraphicsItem *, qreal > undo_hash
 associates impacted primitives with their former zValues More...
 
QHash< QGraphicsItem *, qreal > redo_hash
 associates impacted primitives with their new zValues More...
 
QET::DepthOption m_option
 kind of treatment to apply More...
 

Additional Inherited Members

- Protected Attributes inherited from ElementEditionCommand
ElementScenem_scene
 Element editor/view/scene the command should take place on. More...
 
ElementViewm_view
 

Detailed Description

This command changes the zValue of a set of primitives when editing an electrical element.

Constructor & Destructor Documentation

◆ ChangeZValueCommand() [1/2]

ChangeZValueCommand::ChangeZValueCommand ( ElementScene elmt,
QET::DepthOption  o,
QUndoCommand *  parent = nullptr 
)

Constructeur

Parameters
elmtElementScene concernee
oOption decrivant le type de traitement applique aux zValues des parties de l'element
parentQUndoCommand parent
Here is the call graph for this function:

◆ ~ChangeZValueCommand()

ChangeZValueCommand::~ChangeZValueCommand ( )
override

Destructeur.

◆ ChangeZValueCommand() [2/2]

ChangeZValueCommand::ChangeZValueCommand ( const ChangeZValueCommand )
private

Member Function Documentation

◆ applyBringForward()

void ChangeZValueCommand::applyBringForward ( const QList< QGraphicsItem * > &  items_list)
private

Amene les elements selectionnes au premier plan

Parameters
items_listListe des elements (selectionnes et non selectionnes)
Here is the caller graph for this function:

◆ applyLower()

void ChangeZValueCommand::applyLower ( const QList< QGraphicsItem * > &  items_list)
private

Descend les elements selectionnes d'un plan

Parameters
items_listListe des elements (selectionnes et non selectionnes)
Here is the caller graph for this function:

◆ applyRaise()

void ChangeZValueCommand::applyRaise ( const QList< QGraphicsItem * > &  items_list)
private

Remonte les elements selectionnes d'un plan

Parameters
items_listListe des elements (selectionnes et non selectionnes)
Here is the caller graph for this function:

◆ applySendBackward()

void ChangeZValueCommand::applySendBackward ( const QList< QGraphicsItem * > &  items_list)
private

Envoie les elements selectionnes au fond

Parameters
items_listListe des elements (selectionnes et non selectionnes)
Here is the caller graph for this function:

◆ redo()

void ChangeZValueCommand::redo ( )
override

Refait les changements de zValue.

◆ undo()

void ChangeZValueCommand::undo ( )
override

Annule les changements de zValue.

Member Data Documentation

◆ m_option

QET::DepthOption ChangeZValueCommand::m_option
private

kind of treatment to apply

◆ redo_hash

QHash<QGraphicsItem *, qreal> ChangeZValueCommand::redo_hash
private

associates impacted primitives with their new zValues

◆ undo_hash

QHash<QGraphicsItem *, qreal> ChangeZValueCommand::undo_hash
private

associates impacted primitives with their former zValues


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