QElectroTech  0.8-dev
Public Member Functions | Public Attributes | Protected Member Functions | Private Member Functions | List of all members
PasteTemplateCellsCommand Class Reference

#include <templatecommands.h>

Inheritance diagram for PasteTemplateCellsCommand:
Inheritance graph
Collaboration diagram for PasteTemplateCellsCommand:
Collaboration graph

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
 
TitleBlockTemplatetitleBlockTemplate () const
 
void setTitleBlockTemplate (TitleBlockTemplate *)
 
TitleBlockTemplateViewview () const
 
void setView (TitleBlockTemplateView *)
 
void refreshView ()
 
void refreshLayout ()
 

Public Attributes

QHash< TitleBlockCell *, QPair< int, int > > spans_before_
 Spans before operation. More...
 
QHash< TitleBlockCell *, TitleBlockCellpasted_cells_
 Pasted cells. More...
 
QHash< TitleBlockCell *, TitleBlockCellerased_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
TitleBlockTemplatetbtemplate_
 Modified TitleBlock Template. More...
 
TitleBlockTemplateViewview_
 This class may trigger a view update. More...
 

Detailed Description

This class represents the action of pasting a cells set.

Constructor & Destructor Documentation

◆ PasteTemplateCellsCommand() [1/2]

PasteTemplateCellsCommand::PasteTemplateCellsCommand ( TitleBlockTemplate tb_template,
QUndoCommand *  parent = nullptr 
)

Constructor

Parameters
tb_templateChanged title block template
parentParent command

◆ ~PasteTemplateCellsCommand()

PasteTemplateCellsCommand::~PasteTemplateCellsCommand ( )
override

Destructor

◆ PasteTemplateCellsCommand() [2/2]

PasteTemplateCellsCommand::PasteTemplateCellsCommand ( const PasteTemplateCellsCommand )
private

Member Function Documentation

◆ addCell()

void PasteTemplateCellsCommand::addCell ( TitleBlockCell cell,
const TitleBlockCell before,
const TitleBlockCell after 
)
virtual

This is a convenience function equivalent to: addErasedCell(cell, before) addPastedCell(cell, after)

Here is the call graph for this function:

◆ addErasedCell()

void PasteTemplateCellsCommand::addErasedCell ( TitleBlockCell cell,
const TitleBlockCell former_cell_content 
)
virtual
Parameters
cellPointer to the cell impacted by te paste operation
former_cell_contentContent of the cell before the paste operation
Here is the call graph for this function:
Here is the caller graph for this function:

◆ addPastedCell()

void PasteTemplateCellsCommand::addPastedCell ( TitleBlockCell cell,
const TitleBlockCell new_cell_content 
)
virtual
Parameters
cellPointer to the cell impacted by te paste operation
new_cell_contentContent pasted to the cell
Here is the caller graph for this function:

◆ redo()

void PasteTemplateCellsCommand::redo ( )
override

Redo a paste action.

Here is the call graph for this function:

◆ undo()

void PasteTemplateCellsCommand::undo ( )
override

Undo a paste action.

Here is the call graph for this function:

◆ updateText()

void PasteTemplateCellsCommand::updateText ( )
protectedvirtual

Update the label describing this command

Here is the caller graph for this function:

Member Data Documentation

◆ erased_cells_

QHash<TitleBlockCell *, TitleBlockCell> PasteTemplateCellsCommand::erased_cells_

Existing cells impacted by the paste operation.

◆ pasted_cells_

QHash<TitleBlockCell *, TitleBlockCell> PasteTemplateCellsCommand::pasted_cells_

Pasted cells.

◆ spans_before_

QHash<TitleBlockCell *, QPair<int, int> > PasteTemplateCellsCommand::spans_before_

Spans before operation.


The documentation for this class was generated from the following files: