QElectroTech
0.70
|
#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
Definition at line 211 of file templatecommands.h.
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. |
Definition at line 744 of file templatecommands.cpp.
References applied_col_span_before_, applied_row_span_before_, canSplit(), col_span_before_, row_span_before_, span_state_before_, spanned_cells_, spanning_cell_, TitleBlockTemplateCommand::tbtemplate_, and QET::Icons::tr.
|
override |
Destructor
Definition at line 774 of file templatecommands.cpp.
|
static |
splitted_cells | Cell to be splitted. |
tbtemplate | Modified title block template. |
Definition at line 782 of file templatecommands.cpp.
Referenced by TitleBlockTemplateView::analyzeSelectedCells(), and SplitCellsCommand().
bool SplitCellsCommand::isValid | ( | ) | const |
Definition at line 801 of file templatecommands.cpp.
References spanned_cells_, and spanning_cell_.
|
override |
Apply the split operation
Definition at line 830 of file templatecommands.cpp.
References isValid(), spanned_cells_, spanning_cell_, TitleBlockTemplateCommand::tbtemplate_, and TitleBlockTemplateCommand::view_.
|
override |
Undo the split operation
Definition at line 809 of file templatecommands.cpp.
References applied_col_span_before_, applied_row_span_before_, col_span_before_, isValid(), row_span_before_, span_state_before_, spanned_cells_, spanning_cell_, and TitleBlockTemplateCommand::view_.
|
private |
the applied_col_span attribute of the spanning cell before splitting
Definition at line 231 of file templatecommands.h.
Referenced by SplitCellsCommand(), and undo().
|
private |
the applied_row_span attribute of the spanning cell before splitting
Definition at line 230 of file templatecommands.h.
Referenced by SplitCellsCommand(), and undo().
|
private |
the col_span attribute of the spanning cell before splitting
Definition at line 229 of file templatecommands.h.
Referenced by SplitCellsCommand(), and undo().
|
private |
the row_span attribute of the spanning cell before splitting
Definition at line 228 of file templatecommands.h.
Referenced by SplitCellsCommand(), and undo().
|
private |
the span_state attribute of the spanning cell before splitting
Definition at line 232 of file templatecommands.h.
Referenced by SplitCellsCommand(), and undo().
|
private |
the spanned cells
Definition at line 227 of file templatecommands.h.
Referenced by isValid(), redo(), SplitCellsCommand(), and undo().
|
private |
the cell spanning over the other ones
Definition at line 226 of file templatecommands.h.
Referenced by isValid(), redo(), SplitCellsCommand(), and undo().