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


Public Member Functions | |
| ModifyTemplateGridCommand (TitleBlockTemplate *=nullptr, QUndoCommand *=nullptr) | |
| ~ModifyTemplateGridCommand () override | |
| int | index () const |
| void | setIndex (int) |
| QList< TitleBlockCell * > | cells () const |
| void | setCells (const QList< TitleBlockCell * > &) |
| TitleBlockDimension | dimension () const |
| void | setDimension (const TitleBlockDimension &) |
| int | type () const |
| void | setType (bool) |
| bool | isInsertion () const |
| void | setInsertion (bool) |
| 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 () |
Static Public Member Functions | |
| static ModifyTemplateGridCommand * | addRow (TitleBlockTemplate *, int=-1) |
| static ModifyTemplateGridCommand * | addColumn (TitleBlockTemplate *, int=-1) |
| static ModifyTemplateGridCommand * | deleteRow (TitleBlockTemplate *, int=-1) |
| static ModifyTemplateGridCommand * | deleteColumn (TitleBlockTemplate *, int=-1) |
Private Member Functions | |
| ModifyTemplateGridCommand (const ModifyTemplateGridCommand &) | |
| void | updateText () |
| void | apply (bool=false) |
Private Attributes | |
| int | index_ |
| Index of the inserted/deleted row/column. More... | |
| QList< TitleBlockCell * > | cells_ |
| Cells composing the inserted/deleted row/column. More... | |
| bool | type_ |
| true for a row, false for a column More... | |
| TitleBlockDimension | dimension_ |
| width/height of the column/row, which interpretation depends on type_ More... | |
| bool | insertion_ |
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 adding or deleting a row or column within a title block template.
| ModifyTemplateGridCommand::ModifyTemplateGridCommand | ( | TitleBlockTemplate * | tbtemplate = nullptr, |
| QUndoCommand * | parent = nullptr |
||
| ) |
Construct a default ModifyTemplateGridCommand, i.e. a command adding a 25px row at the bottom of the template.
| tbtemplate | Modified title block template |
| parent | Parent QUndoCommand |


|
override |
Destructor
|
private |
|
static |
This static method is a convenience to create a ModifyTemplateGridCommand that adds a column to tbtemplate at index.
| tbtemplate | Modified title block template. |
| index | Index where the column should be inserted. |


|
static |
This static method is a convenience to create a ModifyTemplateGridCommand that adds a row to tbtemplate at index.
| tbtemplate | Modified title block template |
| index | Index where the row should be inserted. |


|
private |


| QList< TitleBlockCell * > ModifyTemplateGridCommand::cells | ( | ) | const |

|
static |
This static method is a convenience to create a ModifyTemplateGridCommand that removes the column at index from tbtemplate.
| tbtemplate | Modified title block template. |
| index | Index of the removed column. |


|
static |
This static method is a convenience to create a ModifyTemplateGridCommand that removes the row at index from tbtemplate.
| tbtemplate | Modified title block template. |
| index | Index of the removed row. |


| TitleBlockDimension ModifyTemplateGridCommand::dimension | ( | ) | const |

| int ModifyTemplateGridCommand::index | ( | ) | const |

| bool ModifyTemplateGridCommand::isInsertion | ( | ) | const |
|
override |
Redo the change.

| void ModifyTemplateGridCommand::setCells | ( | const QList< TitleBlockCell * > & | cells | ) |
Set the cells composing the inserted/deleted row/column.
| cells | List of pointers to cells composing the inserted/deleted row/column. |


| void ModifyTemplateGridCommand::setDimension | ( | const TitleBlockDimension & | dimension | ) |
Set the dimension of the inserted/deleted row/column
| dimension | Dimension of the inserted/deleted row/column |


| void ModifyTemplateGridCommand::setIndex | ( | int | index | ) |
Set the index of the inserted/deleted row/column.
| index | Index of the inserted/deleted row/column. |


| void ModifyTemplateGridCommand::setInsertion | ( | bool | insertion | ) |
| insertion | true if the row/column is inserted, false if it is deleted |


| void ModifyTemplateGridCommand::setType | ( | bool | type | ) |
Indicates whether this object inserts/deletes a row or a column.
| type | true if this object is about inserting/deleting a row, false for a column. |


| int ModifyTemplateGridCommand::type | ( | ) | const |

|
override |
Undo the change.


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

|
private |
Cells composing the inserted/deleted row/column.
|
private |
width/height of the column/row, which interpretation depends on type_
|
private |
Index of the inserted/deleted row/column.
|
private |
|
private |
true for a row, false for a column
1.8.18