QElectroTech
0.70
|
#include <templatecommands.h>
Public Member Functions | |
PasteTemplateCellsCommand (TitleBlockTemplate *, QUndoCommand *=nullptr) | |
~PasteTemplateCellsCommand () override | |
void | undo () override |
void | redo () override |
virtual void | addPastedCell (TitleBlockCell *, const TitleBlockCell &) |
virtual void | addErasedCell (TitleBlockCell *, const TitleBlockCell &) |
virtual void | addCell (TitleBlockCell *, const TitleBlockCell &, const TitleBlockCell &) |
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 () |
Public Attributes | |
QHash< TitleBlockCell *, QPair< int, int > > | spans_before_ |
Spans before operation. More... | |
QHash< TitleBlockCell *, TitleBlockCell > | pasted_cells_ |
Pasted cells. More... | |
QHash< TitleBlockCell *, TitleBlockCell > | erased_cells_ |
Existing cells impacted by the paste operation. More... | |
Protected Member Functions | |
virtual void | updateText () |
Private Member Functions | |
PasteTemplateCellsCommand (const PasteTemplateCellsCommand &) | |
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 pasting a cells set.
Definition at line 290 of file templatecommands.h.
PasteTemplateCellsCommand::PasteTemplateCellsCommand | ( | TitleBlockTemplate * | tb_template, |
QUndoCommand * | parent = nullptr |
||
) |
Constructor
tb_template | Changed title block template |
parent | Parent command |
Definition at line 937 of file templatecommands.cpp.
|
override |
Destructor
Definition at line 945 of file templatecommands.cpp.
|
private |
|
virtual |
This is a convenience function equivalent to: addErasedCell(cell, before) addPastedCell(cell, after)
Definition at line 1058 of file templatecommands.cpp.
References addErasedCell(), and addPastedCell().
|
virtual |
cell | Pointer to the cell impacted by te paste operation |
former_cell_content | Content of the cell before the paste operation |
Definition at line 1048 of file templatecommands.cpp.
References erased_cells_, and updateText().
Referenced by addCell().
|
virtual |
cell | Pointer to the cell impacted by te paste operation |
new_cell_content | Content pasted to the cell |
Definition at line 1040 of file templatecommands.cpp.
References pasted_cells_.
Referenced by addCell().
|
override |
Redo a paste action.
Definition at line 976 of file templatecommands.cpp.
References TitleBlockCell::col_span, erased_cells_, pasted_cells_, TitleBlockTemplateCommand::refreshLayout(), TitleBlockTemplateCommand::refreshView(), TitleBlockCell::row_span, spans_before_, and TitleBlockTemplateCommand::tbtemplate_.
|
override |
Undo a paste action.
Definition at line 958 of file templatecommands.cpp.
References erased_cells_, TitleBlockTemplateCommand::refreshLayout(), TitleBlockTemplateCommand::refreshView(), spans_before_, and TitleBlockTemplateCommand::tbtemplate_.
|
protectedvirtual |
Update the label describing this command
Definition at line 951 of file templatecommands.cpp.
References erased_cells_, and QET::Icons::tr.
Referenced by addErasedCell().
QHash<TitleBlockCell *, TitleBlockCell> PasteTemplateCellsCommand::erased_cells_ |
Existing cells impacted by the paste operation.
Definition at line 315 of file templatecommands.h.
Referenced by addErasedCell(), redo(), undo(), and updateText().
QHash<TitleBlockCell *, TitleBlockCell> PasteTemplateCellsCommand::pasted_cells_ |
Pasted cells.
Definition at line 313 of file templatecommands.h.
Referenced by addPastedCell(), and redo().
QHash<TitleBlockCell *, QPair<int, int> > PasteTemplateCellsCommand::spans_before_ |
Spans before operation.
Definition at line 311 of file templatecommands.h.