![]() |
QElectroTech
0.8-dev
|
#include <editorcommands.h>


Public Member Functions | |
| ScalePartsCommand (ElementScene *=nullptr, QUndoCommand *=nullptr) | |
| ~ScalePartsCommand () override | |
| void | undo () override |
| void | redo () override |
| ElementScene * | elementScene () const |
| void | setScaledPrimitives (const QList< CustomElementPart * > &) |
| QList< CustomElementPart * > | scaledPrimitives () const |
| void | setTransformation (const QRectF &, const QRectF &) |
| ScalePartsCommand::setTransformation Define the transformation applied by this command. More... | |
| QPair< QRectF, QRectF > | transformation () |
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 | |
| ElementScene * | elementScene () const |
| void | setElementScene (ElementScene *) |
| ElementView * | elementView () const |
| void | setElementView (ElementView *) |
Protected Member Functions | |
| void | scale (const QRectF &before, const QRectF &after) |
| void | adjustText () |
Private Member Functions | |
| ScalePartsCommand (const ScalePartsCommand &) | |
Private Attributes | |
| QList< CustomElementPart * > | scaled_primitives_ |
| List of moved primitives. More... | |
| QRectF | original_rect_ |
| original rect items fit in More... | |
| QRectF | new_rect_ |
| new rect items should fit in More... | |
| bool | first_redo |
| Prevent the first call to redo() 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 scales primitives when editing an electrical element.
| ScalePartsCommand::ScalePartsCommand | ( | ElementScene * | scene = nullptr, |
| QUndoCommand * | parent = nullptr |
||
| ) |
Constructor
| scene | Modified ElementScene |
| parent | Parent QUndoCommand |
|
override |
Destructor
|
private |
|
protected |
Generate the text describing what this command does exactly.

| ElementScene * ScalePartsCommand::elementScene | ( | ) | const |
|
override |
Redo the scaling operation

|
protected |
Apply the scaling operation from before to after.

| QList< CustomElementPart * > ScalePartsCommand::scaledPrimitives | ( | ) | const |
| void ScalePartsCommand::setScaledPrimitives | ( | const QList< CustomElementPart * > & | primitives | ) |
Set primitives as the list of primitives to be scaled by this command

| void ScalePartsCommand::setTransformation | ( | const QRectF & | original_rect, |
| const QRectF & | new_rect | ||
| ) |
ScalePartsCommand::setTransformation Define the transformation applied by this command.
| original_rect | : Bounding rectangle for all scaled primitives before the operation |
| new_rect | : Bounding rectangle for all scaled primitives after the operation |
| QPair< QRectF, QRectF > ScalePartsCommand::transformation | ( | ) |
|
override |
Undo the scaling operation

|
private |
Prevent the first call to redo()
|
private |
new rect items should fit in
|
private |
original rect items fit in
|
private |
List of moved primitives.
1.8.18