| QElectroTech
    0.70
    | 
#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.
Definition at line 177 of file templatecommands.h.
| 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. | 
Definition at line 589 of file templatecommands.cpp.
References applied_col_span_before_, applied_row_span_before_, canMerge(), TitleBlockTemplateCellsSet::cells(), col_span_after_, col_span_before_, getBottomRightCell(), row_span_after_, row_span_before_, span_state_before_, spanner_cells_before_merge_, spanning_cell_, TitleBlockTemplateCellsSet::topLeftCell(), and QET::Icons::tr.
| 
 | override | 
Destructor
Definition at line 634 of file templatecommands.cpp.
| 
 | static | 
| merged_cells | Cell sto be merged. | 
| tbtemplate | Modified title block template. | 
Definition at line 642 of file templatecommands.cpp.
References getBottomRightCell(), TitleBlockTemplateCellsSet::isRectangle(), and TitleBlockTemplateCellsSet::topLeftCell().
Referenced by TitleBlockTemplateView::analyzeSelectedCells(), and MergeCellsCommand().
| 
 | staticprivate | 
| cells_set | Set of title block template visual cells. | 
Definition at line 713 of file templatecommands.cpp.
References TitleBlockTemplateCellsSet::bottomRightCell().
Referenced by canMerge(), and MergeCellsCommand().
| bool MergeCellsCommand::isValid | ( | ) | const | 
Definition at line 661 of file templatecommands.cpp.
References col_span_after_, row_span_after_, and spanning_cell_.
| 
 | override | 
Apply the merge operation
Definition at line 690 of file templatecommands.cpp.
References col_span_after_, TitleBlockCell::Enabled, isValid(), row_span_after_, spanner_cells_before_merge_, spanning_cell_, and TitleBlockTemplateCommand::view_.
| 
 | override | 
Undo the merge operation.
Definition at line 669 of file templatecommands.cpp.
References applied_col_span_before_, applied_row_span_before_, col_span_before_, isValid(), row_span_before_, span_state_before_, spanner_cells_before_merge_, spanning_cell_, and TitleBlockTemplateCommand::view_.
| 
 | private | 
the applied_col_span attribute of the spanning cell before the merge
Definition at line 202 of file templatecommands.h.
Referenced by MergeCellsCommand(), and undo().
| 
 | private | 
the applied_row_span attribute of the spanning cell before the merge
Definition at line 201 of file templatecommands.h.
Referenced by MergeCellsCommand(), and undo().
| 
 | private | 
the col_span attribute of the spanning cell after the merge
Definition at line 205 of file templatecommands.h.
Referenced by isValid(), MergeCellsCommand(), and redo().
| 
 | private | 
the col_span attribute of the spanning cell before the merge
Definition at line 200 of file templatecommands.h.
Referenced by MergeCellsCommand(), and undo().
| 
 | private | 
the row_span attribute of the spanning cell after the merge
Definition at line 204 of file templatecommands.h.
Referenced by isValid(), MergeCellsCommand(), and redo().
| 
 | private | 
the row_span attribute of the spanning cell before the merge
Definition at line 199 of file templatecommands.h.
Referenced by MergeCellsCommand(), and undo().
| 
 | private | 
the span_state attribute of the spanning cell before the merge
Definition at line 203 of file templatecommands.h.
Referenced by MergeCellsCommand(), and undo().
| 
 | private | 
hash associating spanned cells with their spanner_cell attribute before the merge operation
Definition at line 198 of file templatecommands.h.
Referenced by MergeCellsCommand(), redo(), and undo().
| 
 | private | 
the cell spanning over the other ones
Definition at line 195 of file templatecommands.h.
Referenced by isValid(), MergeCellsCommand(), redo(), and undo().
 1.8.15
 1.8.15