QElectroTech 0.100.0-dev
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | Private Attributes | List of all members
ModifyTemplateDimension Class Reference

#include <templatecommands.h>

Inheritance diagram for ModifyTemplateDimension:
Inheritance graph
Collaboration diagram for ModifyTemplateDimension:
Collaboration graph

Public Member Functions

 ModifyTemplateDimension (TitleBlockTemplate *=nullptr, QUndoCommand *=nullptr)
 
 ~ModifyTemplateDimension () override
 
int index () const
 
void setIndex (int)
 
int type () const
 
void setType (bool)
 
TitleBlockDimension dimensionBefore () const
 
void setDimensionBefore (const TitleBlockDimension &)
 
TitleBlockDimension dimensionAfter () const
 
void setDimensionAfter (const TitleBlockDimension &)
 
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 ()
 

Private Member Functions

 ModifyTemplateDimension (const ModifyTemplateDimension &)
 
void updateText ()
 
void apply (const TitleBlockDimension &)
 

Private Attributes

int index_
 Index of the resized row/column.
 
bool type_
 true for a row, false for a column
 
TitleBlockDimension before_
 Size of the row/column before it is changed.
 
TitleBlockDimension after_
 Size of the row/column after it is changed.
 

Additional Inherited Members

- Protected Attributes inherited from TitleBlockTemplateCommand
TitleBlockTemplatetbtemplate_
 Modified TitleBlock Template.
 
TitleBlockTemplateViewview_
 This class may trigger a view update.
 

Detailed Description

This class represents the action of changing the width/height of a specific row/column within a title block template.

Constructor & Destructor Documentation

◆ ModifyTemplateDimension() [1/2]

ModifyTemplateDimension::ModifyTemplateDimension ( TitleBlockTemplate tbtemplate = nullptr,
QUndoCommand *  parent = nullptr 
)

Construct a default ModifyTemplateDimension.

Parameters
tbtemplateModified title block template
parentParent QUndoCommand

◆ ~ModifyTemplateDimension()

ModifyTemplateDimension::~ModifyTemplateDimension ( )
override

Destructor

◆ ModifyTemplateDimension() [2/2]

ModifyTemplateDimension::ModifyTemplateDimension ( const ModifyTemplateDimension )
private

Member Function Documentation

◆ apply()

void ModifyTemplateDimension::apply ( const TitleBlockDimension dimension)
private

Applies a given size to the row/column

Parameters
dimensionSize to apply
Here is the caller graph for this function:

◆ dimensionAfter()

TitleBlockDimension ModifyTemplateDimension::dimensionAfter ( ) const
Returns
the dimension of the row/column after it is resized

◆ dimensionBefore()

TitleBlockDimension ModifyTemplateDimension::dimensionBefore ( ) const
Returns
the dimension of the row/column before it is resized

◆ index()

int ModifyTemplateDimension::index ( ) const
Returns
the index of the resized row/column
Here is the caller graph for this function:

◆ redo()

void ModifyTemplateDimension::redo ( )
override

Resize the row/column.

Here is the call graph for this function:

◆ setDimensionAfter()

void ModifyTemplateDimension::setDimensionAfter ( const TitleBlockDimension dimension)
Parameters
dimensionthe dimension of the row/column after it is resized

◆ setDimensionBefore()

void ModifyTemplateDimension::setDimensionBefore ( const TitleBlockDimension dimension)
Parameters
dimensionthe dimension of the row/column before it is resized

◆ setIndex()

void ModifyTemplateDimension::setIndex ( int  index)

Set the index of the resized row/column.

Parameters
indexIndex of the resized row/column.
Here is the call graph for this function:

◆ setType()

void ModifyTemplateDimension::setType ( bool  type)

Indicates whether this object resizes a row or a column.

Parameters
typetrue if this object is about resizing a row, false for a column.
Here is the call graph for this function:

◆ type()

int ModifyTemplateDimension::type ( ) const
Returns
true if this object is about resizing a row, false for a column.
Here is the caller graph for this function:

◆ undo()

void ModifyTemplateDimension::undo ( )
override

Restore the previous size of the row/column.

Here is the call graph for this function:

◆ updateText()

void ModifyTemplateDimension::updateText ( )
private

Update the text describing what the command does.

Here is the caller graph for this function:

Member Data Documentation

◆ after_

TitleBlockDimension ModifyTemplateDimension::after_
private

Size of the row/column after it is changed.

◆ before_

TitleBlockDimension ModifyTemplateDimension::before_
private

Size of the row/column before it is changed.

◆ index_

int ModifyTemplateDimension::index_
private

Index of the resized row/column.

◆ type_

bool ModifyTemplateDimension::type_
private

true for a row, false for a column


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