![]() |
QElectroTech 0.100.0-dev
|
#include <templatecommands.h>


Public Member Functions | |
| ModifyTemplateDimension (TitleBlockTemplate *=nullptr, QUndoCommand *=nullptr) | |
| ~ModifyTemplateDimension () override | |
| int | index () const |
| void | setIndex (int) |
| int | type () const |
| void | setType (bool) |
| TitleBlockDimension | dimensionBefore () const |
| void | setDimensionBefore (const TitleBlockDimension &) |
| TitleBlockDimension | dimensionAfter () const |
| void | setDimensionAfter (const TitleBlockDimension &) |
| void | undo () override |
| void | redo () override |
Public Member Functions inherited from TitleBlockTemplateCommand | |
| TitleBlockTemplateCommand (TitleBlockTemplate *=nullptr, QUndoCommand *=nullptr) | |
| ~TitleBlockTemplateCommand () override | |
| TitleBlockTemplate * | titleBlockTemplate () const |
| void | setTitleBlockTemplate (TitleBlockTemplate *) |
| TitleBlockTemplateView * | view () const |
| void | setView (TitleBlockTemplateView *) |
| void | refreshView () |
| void | refreshLayout () |
Private Member Functions | |
| ModifyTemplateDimension (const ModifyTemplateDimension &) | |
| void | updateText () |
| void | apply (const TitleBlockDimension &) |
Private Attributes | |
| int | index_ |
| Index of the resized row/column. | |
| bool | type_ |
| true for a row, false for a column | |
| TitleBlockDimension | before_ |
| Size of the row/column before it is changed. | |
| TitleBlockDimension | after_ |
| Size of the row/column after it is changed. | |
Additional Inherited Members | |
Protected Attributes inherited from TitleBlockTemplateCommand | |
| TitleBlockTemplate * | tbtemplate_ |
| Modified TitleBlock Template. | |
| TitleBlockTemplateView * | view_ |
| This class may trigger a view update. | |
This class represents the action of changing the width/height of a specific row/column within a title block template.
| ModifyTemplateDimension::ModifyTemplateDimension | ( | TitleBlockTemplate * | tbtemplate = nullptr, |
| QUndoCommand * | parent = nullptr |
||
| ) |
Construct a default ModifyTemplateDimension.
| tbtemplate | Modified title block template |
| parent | Parent QUndoCommand |
|
override |
Destructor
|
private |
|
private |
Applies a given size to the row/column
| dimension | Size to apply |

| TitleBlockDimension ModifyTemplateDimension::dimensionAfter | ( | ) | const |
| TitleBlockDimension ModifyTemplateDimension::dimensionBefore | ( | ) | const |
| int ModifyTemplateDimension::index | ( | ) | const |

|
override |
Resize the row/column.

| void ModifyTemplateDimension::setDimensionAfter | ( | const TitleBlockDimension & | dimension | ) |
| dimension | the dimension of the row/column after it is resized |
| void ModifyTemplateDimension::setDimensionBefore | ( | const TitleBlockDimension & | dimension | ) |
| dimension | the dimension of the row/column before it is resized |
| void ModifyTemplateDimension::setIndex | ( | int | index | ) |
Set the index of the resized row/column.
| index | Index of the resized row/column. |

| void ModifyTemplateDimension::setType | ( | bool | type | ) |
Indicates whether this object resizes a row or a column.
| type | true if this object is about resizing a row, false for a column. |

| int ModifyTemplateDimension::type | ( | ) | const |

|
override |
Restore the previous size of the row/column.

|
private |
Update the text describing what the command does.

|
private |
Size of the row/column after it is changed.
|
private |
Size of the row/column before it is changed.
|
private |
Index of the resized row/column.
|
private |
true for a row, false for a column