QElectroTech
0.70
|
#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. More... | |
bool | type_ |
true for a row, false for a column More... | |
TitleBlockDimension | before_ |
Size of the row/column before it is changed. More... | |
TitleBlockDimension | after_ |
Size of the row/column after it is changed. More... | |
Additional Inherited Members | |
Protected Attributes inherited from TitleBlockTemplateCommand | |
TitleBlockTemplate * | tbtemplate_ |
Modified TitleBlock Template. More... | |
TitleBlockTemplateView * | view_ |
This class may trigger a view update. More... | |
This class represents the action of changing the width/height of a specific row/column within a title block template.
Definition at line 140 of file templatecommands.h.
ModifyTemplateDimension::ModifyTemplateDimension | ( | TitleBlockTemplate * | tbtemplate = nullptr , |
QUndoCommand * | parent = nullptr |
||
) |
Construct a default ModifyTemplateDimension.
tbtemplate | Modified title block template |
parent | Parent QUndoCommand |
Definition at line 463 of file templatecommands.cpp.
|
override |
Destructor
Definition at line 475 of file templatecommands.cpp.
|
private |
|
private |
Applies a given size to the row/column
dimension | Size to apply |
Definition at line 566 of file templatecommands.cpp.
References index_, TitleBlockTemplateCommand::tbtemplate_, type_, and TitleBlockTemplateCommand::view_.
TitleBlockDimension ModifyTemplateDimension::dimensionAfter | ( | ) | const |
Definition at line 526 of file templatecommands.cpp.
References after_.
TitleBlockDimension ModifyTemplateDimension::dimensionBefore | ( | ) | const |
Definition at line 512 of file templatecommands.cpp.
References before_.
int ModifyTemplateDimension::index | ( | ) | const |
Definition at line 481 of file templatecommands.cpp.
References index_.
Referenced by setIndex().
|
override |
Resize the row/column.
Definition at line 547 of file templatecommands.cpp.
void ModifyTemplateDimension::setDimensionAfter | ( | const TitleBlockDimension & | dimension | ) |
dimension | the dimension of the row/column after it is resized |
Definition at line 533 of file templatecommands.cpp.
References after_.
void ModifyTemplateDimension::setDimensionBefore | ( | const TitleBlockDimension & | dimension | ) |
dimension | the dimension of the row/column before it is resized |
Definition at line 519 of file templatecommands.cpp.
References before_.
void ModifyTemplateDimension::setIndex | ( | int | index | ) |
Set the index of the resized row/column.
index | Index of the resized row/column. |
Definition at line 489 of file templatecommands.cpp.
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. |
Definition at line 504 of file templatecommands.cpp.
References type(), type_, and updateText().
int ModifyTemplateDimension::type | ( | ) | const |
Definition at line 496 of file templatecommands.cpp.
References type_.
Referenced by setType().
|
override |
Restore the previous size of the row/column.
Definition at line 540 of file templatecommands.cpp.
|
private |
Update the text describing what the command does.
Definition at line 554 of file templatecommands.cpp.
References QET::Icons::tr, and type_.
Referenced by setType().
|
private |
Size of the row/column after it is changed.
Definition at line 170 of file templatecommands.h.
Referenced by dimensionAfter(), redo(), and setDimensionAfter().
|
private |
Size of the row/column before it is changed.
Definition at line 169 of file templatecommands.h.
Referenced by dimensionBefore(), setDimensionBefore(), and undo().
|
private |
Index of the resized row/column.
Definition at line 167 of file templatecommands.h.
Referenced by apply(), index(), and setIndex().
|
private |
true for a row, false for a column
Definition at line 168 of file templatecommands.h.
Referenced by apply(), setType(), type(), and updateText().