QElectroTech
0.70
|
#include <editorcommands.h>
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 (const QString &, ElementScene *=nullptr, ElementView *=nullptr, QUndoCommand *=nullptr) | |
~ElementEditionCommand () override | |
ElementScene * | elementScene () const |
void | setElementScene (ElementScene *) |
ElementView * | elementView () 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 | |
ElementScene * | m_scene |
Element editor/view/scene the command should take place on. More... | |
ElementView * | m_view |
This command changes the zValue of a set of primitives when editing an electrical element.
Definition at line 200 of file editorcommands.h.
ChangeZValueCommand::ChangeZValueCommand | ( | ElementScene * | elmt, |
QET::DepthOption | o, | ||
QUndoCommand * | parent = nullptr |
||
) |
Constructeur
elmt | ElementScene concernee |
o | Option decrivant le type de traitement applique aux zValues des parties de l'element |
parent | QUndoCommand parent |
Definition at line 344 of file editorcommands.cpp.
References applyBringForward(), applyLower(), applyRaise(), applySendBackward(), QET::BringForward, QET::Lower, m_option, ElementEditionCommand::m_scene, QET::Raise, ElementScene::SelectedOrNot, QET::SendBackward, ElementScene::SortByZValue, QET::Icons::tr, and undo_hash.
|
override |
Destructeur.
Definition at line 375 of file editorcommands.cpp.
|
private |
|
private |
Amene les elements selectionnes au premier plan
items_list | Liste des elements (selectionnes et non selectionnes) |
Definition at line 392 of file editorcommands.cpp.
References redo_hash.
Referenced by ChangeZValueCommand().
|
private |
Descend les elements selectionnes d'un plan
items_list | Liste des elements (selectionnes et non selectionnes) |
Definition at line 428 of file editorcommands.cpp.
References redo_hash.
Referenced by ChangeZValueCommand().
|
private |
Remonte les elements selectionnes d'un plan
items_list | Liste des elements (selectionnes et non selectionnes) |
Definition at line 410 of file editorcommands.cpp.
References redo_hash.
Referenced by ChangeZValueCommand().
|
private |
Envoie les elements selectionnes au fond
items_list | Liste des elements (selectionnes et non selectionnes) |
Definition at line 447 of file editorcommands.cpp.
References redo_hash.
Referenced by ChangeZValueCommand().
|
override |
Refait les changements de zValue.
Definition at line 384 of file editorcommands.cpp.
References redo_hash.
|
override |
Annule les changements de zValue.
Definition at line 379 of file editorcommands.cpp.
References undo_hash.
|
private |
kind of treatment to apply
Definition at line 227 of file editorcommands.h.
Referenced by ChangeZValueCommand().
|
private |
associates impacted primitives with their new zValues
Definition at line 225 of file editorcommands.h.
Referenced by applyBringForward(), applyLower(), applyRaise(), applySendBackward(), and redo().
|
private |
associates impacted primitives with their former zValues
Definition at line 223 of file editorcommands.h.
Referenced by ChangeZValueCommand(), and undo().