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

The AlignmentTextsGroupCommand class. More...

#include <addelementtextcommand.h>

Inherits QUndoCommand.

Collaboration diagram for AlignmentTextsGroupCommand:
Collaboration graph

Public Member Functions

 AlignmentTextsGroupCommand (ElementTextItemGroup *group, Qt::Alignment new_alignment, QUndoCommand *parent=nullptr)
 AlignmentTextsGroupCommand::AlignmentTextsGroupCommand. More...
 
 ~AlignmentTextsGroupCommand () override
 AlignmentTextsGroupCommand::~AlignmentTextsGroupCommand Destructor. More...
 
int id () const override
 
bool mergeWith (const QUndoCommand *other) override
 AlignmentTextsGroupCommand::mergeWith Try to merge this command with other command. More...
 
void undo () override
 AlignmentTextsGroupCommand::undo. More...
 
void redo () override
 AlignmentTextsGroupCommand::redo. More...
 

Private Attributes

QPointer< ElementTextItemGroupm_group
 
Qt::Alignment m_previous_alignment
 
Qt::Alignment m_new_alignment
 
QHash< DynamicElementTextItem *, QPointF > m_texts_pos
 

Detailed Description

The AlignmentTextsGroupCommand class.

Constructor & Destructor Documentation

◆ AlignmentTextsGroupCommand()

AlignmentTextsGroupCommand::AlignmentTextsGroupCommand ( ElementTextItemGroup group,
Qt::Alignment  new_alignment,
QUndoCommand *  parent = nullptr 
)

AlignmentTextsGroupCommand::AlignmentTextsGroupCommand.

Parameters
group: Group to change the alignment
new_alignment: the new alignment of the group
parent: the parent QUndoCommand of this undo
Here is the call graph for this function:

◆ ~AlignmentTextsGroupCommand()

AlignmentTextsGroupCommand::~AlignmentTextsGroupCommand ( )
override

Member Function Documentation

◆ id()

int AlignmentTextsGroupCommand::id ( ) const
inlineoverride

◆ mergeWith()

bool AlignmentTextsGroupCommand::mergeWith ( const QUndoCommand *  other)
override

AlignmentTextsGroupCommand::mergeWith Try to merge this command with other command.

Parameters
other
Returns
true if was merged, else false
Here is the call graph for this function:

◆ redo()

void AlignmentTextsGroupCommand::redo ( )
override

◆ undo()

void AlignmentTextsGroupCommand::undo ( )
override

AlignmentTextsGroupCommand::undo.

Here is the caller graph for this function:

Member Data Documentation

◆ m_group

QPointer<ElementTextItemGroup> AlignmentTextsGroupCommand::m_group
private

◆ m_new_alignment

Qt::Alignment AlignmentTextsGroupCommand::m_new_alignment
private

◆ m_previous_alignment

Qt::Alignment AlignmentTextsGroupCommand::m_previous_alignment
private

◆ m_texts_pos

QHash<DynamicElementTextItem *, QPointF> AlignmentTextsGroupCommand::m_texts_pos
private

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