QElectroTech 0.200.1-dev
Loading...
Searching...
No Matches
MirrorElementsCommand Class Reference

The MirrorElementsCommand class Mirror the selected parts horizontally (left <-> right) across the vertical line through the center of the selection, so the selection keeps its place in the scene. More...

#include <editorcommands.h>

Inheritance diagram for MirrorElementsCommand:
Inheritance graph
Collaboration diagram for MirrorElementsCommand:
Collaboration graph

Public Member Functions

 MirrorElementsCommand (ElementScene *scene, QUndoCommand *parent=nullptr)
void undo () override
 MirrorElementsCommand::undo.
void redo () override
 MirrorElementsCommand::redo.
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.
 ElementEditionCommand (const QString &, ElementScene *=nullptr, ElementView *=nullptr, QUndoCommand *=nullptr)
 ElementEditionCommand::ElementEditionCommand Constructs an ElementEditionCommand, thus embedding the provided scene and view.
 ~ElementEditionCommand () override
ElementSceneelementScene () const
void setElementScene (ElementScene *)
ElementViewelementView () const
void setElementView (ElementView *)

Private Attributes

ElementScenem_scene =nullptr
QList< QGraphicsItem * > m_items
qreal m_axis_x = 0

Additional Inherited Members

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

Detailed Description

The MirrorElementsCommand class Mirror the selected parts horizontally (left <-> right) across the vertical line through the center of the selection, so the selection keeps its place in the scene.

Constructor & Destructor Documentation

◆ MirrorElementsCommand()

MirrorElementsCommand::MirrorElementsCommand ( ElementScene * scene,
QUndoCommand * parent = nullptr )
Here is the call graph for this function:

Member Function Documentation

◆ redo()

void MirrorElementsCommand::redo ( )
override

MirrorElementsCommand::redo.

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

◆ undo()

void MirrorElementsCommand::undo ( )
override

MirrorElementsCommand::undo.

Here is the call graph for this function:

Member Data Documentation

◆ m_axis_x

qreal MirrorElementsCommand::m_axis_x = 0
private

◆ m_items

QList<QGraphicsItem*> MirrorElementsCommand::m_items
private

◆ m_scene

ElementScene* MirrorElementsCommand::m_scene =nullptr
private

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