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


Public Member Functions | |
| MergeCellsCommand (const TitleBlockTemplateCellsSet &, TitleBlockTemplate *=nullptr, QUndoCommand *=nullptr) | |
| ~MergeCellsCommand () 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 | canMerge (const TitleBlockTemplateCellsSet &, TitleBlockTemplate *) |
Static Private Member Functions | |
| static TitleBlockCell * | getBottomRightCell (const TitleBlockTemplateCellsSet &) |
Private Attributes | |
| TitleBlockCell * | spanning_cell_ |
| the cell spanning over the other ones More... | |
| QHash< TitleBlockCell *, TitleBlockCell * > | spanner_cells_before_merge_ |
| int | row_span_before_ |
| the row_span attribute of the spanning cell before the merge More... | |
| int | col_span_before_ |
| the col_span attribute of the spanning cell before the merge More... | |
| int | applied_row_span_before_ |
| the applied_row_span attribute of the spanning cell before the merge More... | |
| int | applied_col_span_before_ |
| the applied_col_span attribute of the spanning cell before the merge More... | |
| int | span_state_before_ |
| the span_state attribute of the spanning cell before the merge More... | |
| int | row_span_after_ |
| the row_span attribute of the spanning cell after the merge More... | |
| int | col_span_after_ |
| the col_span attribute of the spanning cell after the merge 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 merging 2 to n cells into a single one.
| MergeCellsCommand::MergeCellsCommand | ( | const TitleBlockTemplateCellsSet & | merged_cells, |
| TitleBlockTemplate * | tbtemplate = nullptr, |
||
| QUndoCommand * | parent = nullptr |
||
| ) |
Construct a command object that acts on tbtemplate in order to merge merged_cells. Note: you should check the resulting object is valid using isValid().
| merged_cells | Cells to be merged together into a single one. |
| tbtemplate | Modified title block template. |
| parent | Parent QUndoCommand. |

|
override |
Destructor
|
static |
| merged_cells | Cell sto be merged. |
| tbtemplate | Modified title block template. |


|
staticprivate |
| cells_set | Set of title block template visual cells. |


| bool MergeCellsCommand::isValid | ( | ) | const |

|
override |
Apply the merge operation

|
override |
Undo the merge operation.

|
private |
the applied_col_span attribute of the spanning cell before the merge
|
private |
the applied_row_span attribute of the spanning cell before the merge
|
private |
the col_span attribute of the spanning cell after the merge
|
private |
the col_span attribute of the spanning cell before the merge
|
private |
the row_span attribute of the spanning cell after the merge
|
private |
the row_span attribute of the spanning cell before the merge
|
private |
the span_state attribute of the spanning cell before the merge
|
private |
hash associating spanned cells with their spanner_cell attribute before the merge operation
|
private |
the cell spanning over the other ones
1.8.18