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

#include <templatecommands.h>

Inheritance diagram for SplitCellsCommand:
Inheritance graph
Collaboration diagram for SplitCellsCommand:
Collaboration graph

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

Static Public Member Functions

static bool canSplit (const TitleBlockTemplateCellsSet &splitted_cells, TitleBlockTemplate *tbtemplate)
 

Private Attributes

TitleBlockCellspanning_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
TitleBlockTemplatetbtemplate_
 Modified TitleBlock Template. More...
 
TitleBlockTemplateViewview_
 This class may trigger a view update. More...
 

Detailed Description

This class represents the action of splitting a visual cell into at least two logical cells

Constructor & Destructor Documentation

◆ SplitCellsCommand()

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().

Parameters
splitted_cellsCell to be splitted.
tbtemplateModified title block template.
parentParent QUndoCommand.
Here is the call graph for this function:

◆ ~SplitCellsCommand()

SplitCellsCommand::~SplitCellsCommand ( )
override

Destructor

Member Function Documentation

◆ canSplit()

bool SplitCellsCommand::canSplit ( const TitleBlockTemplateCellsSet splitted_cells,
TitleBlockTemplate tbtemplate 
)
static
Parameters
splitted_cellsCell to be splitted.
tbtemplateModified title block template.
Returns
true if the split is feasible, false otherwise
Here is the caller graph for this function:

◆ isValid()

bool SplitCellsCommand::isValid ( ) const
Returns
true if this command object is valid and usable, false otherwise.
Here is the caller graph for this function:

◆ redo()

void SplitCellsCommand::redo ( )
override

Apply the split operation

Here is the call graph for this function:

◆ undo()

void SplitCellsCommand::undo ( )
override

Undo the split operation

Here is the call graph for this function:

Member Data Documentation

◆ applied_col_span_before_

int SplitCellsCommand::applied_col_span_before_
private

the applied_col_span attribute of the spanning cell before splitting

◆ applied_row_span_before_

int SplitCellsCommand::applied_row_span_before_
private

the applied_row_span attribute of the spanning cell before splitting

◆ col_span_before_

int SplitCellsCommand::col_span_before_
private

the col_span attribute of the spanning cell before splitting

◆ row_span_before_

int SplitCellsCommand::row_span_before_
private

the row_span attribute of the spanning cell before splitting

◆ span_state_before_

int SplitCellsCommand::span_state_before_
private

the span_state attribute of the spanning cell before splitting

◆ spanned_cells_

QSet<TitleBlockCell *> SplitCellsCommand::spanned_cells_
private

the spanned cells

◆ spanning_cell_

TitleBlockCell* SplitCellsCommand::spanning_cell_
private

the cell spanning over the other ones


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