QElectroTech
0.8-dev
|
#include <templatecommands.h>
Public Member Functions | |
SplitCellsCommand (const TitleBlockTemplateCellsSet &, TitleBlockTemplate *=nullptr, QUndoCommand *=nullptr) | |
~SplitCellsCommand () override | |
bool | isValid () const |
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 bool | canSplit (const TitleBlockTemplateCellsSet &splitted_cells, TitleBlockTemplate *tbtemplate) |
Private Attributes | |
TitleBlockCell * | spanning_cell_ |
the cell spanning over the other ones More... | |
QSet< TitleBlockCell * > | spanned_cells_ |
the spanned cells More... | |
int | row_span_before_ |
the row_span attribute of the spanning cell before splitting More... | |
int | col_span_before_ |
the col_span attribute of the spanning cell before splitting More... | |
int | applied_row_span_before_ |
the applied_row_span attribute of the spanning cell before splitting More... | |
int | applied_col_span_before_ |
the applied_col_span attribute of the spanning cell before splitting More... | |
int | span_state_before_ |
the span_state attribute of the spanning cell before splitting 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 splitting a visual cell into at least two logical cells
SplitCellsCommand::SplitCellsCommand | ( | const TitleBlockTemplateCellsSet & | splitted_cells, |
TitleBlockTemplate * | tbtemplate = nullptr , |
||
QUndoCommand * | parent = nullptr |
||
) |
Construct a command object that acts on tbtemplate in order to split splitted_cells. Note: you should check the resulting object is valid using isValid().
splitted_cells | Cell to be splitted. |
tbtemplate | Modified title block template. |
parent | Parent QUndoCommand. |
|
override |
Destructor
|
static |
splitted_cells | Cell to be splitted. |
tbtemplate | Modified title block template. |
bool SplitCellsCommand::isValid | ( | ) | const |
|
override |
Apply the split operation
|
override |
Undo the split operation
|
private |
the applied_col_span attribute of the spanning cell before splitting
|
private |
the applied_row_span attribute of the spanning cell before splitting
|
private |
the col_span attribute of the spanning cell before splitting
|
private |
the row_span attribute of the spanning cell before splitting
|
private |
the span_state attribute of the spanning cell before splitting
|
private |
the spanned cells
|
private |
the cell spanning over the other ones