QElectroTech  0.70
Public Member Functions | Private Member Functions | Private Attributes | List of all members
RotateTextsCommand Class Reference

The RotateTextsCommand class Open a dialog for edit the rotation of the current selected texts and texts group in diagram. Just instantiate this undo command and push it in a QUndoStack. More...

#include <rotatetextscommand.h>

Public Member Functions

 RotateTextsCommand (Diagram *diagram, QUndoCommand *parent=nullptr)
 RotateTextsCommand::RotateTextsCommand. More...
 
void undo () override
 
void redo () override
 

Private Member Functions

void openDialog ()
 
void setupAnimation (QObject *target, const QByteArray &propertyName, const QVariant &start, const QVariant &end)
 

Private Attributes

QPointer< Diagramm_diagram
 
QHash< ConductorTextItem *, bool > m_cond_texts
 
qreal m_rotation =0
 
QParallelAnimationGroup * m_anim_group = nullptr
 

Detailed Description

The RotateTextsCommand class Open a dialog for edit the rotation of the current selected texts and texts group in diagram. Just instantiate this undo command and push it in a QUndoStack.

Definition at line 33 of file rotatetextscommand.h.

Constructor & Destructor Documentation

◆ RotateTextsCommand()

RotateTextsCommand::RotateTextsCommand ( Diagram diagram,
QUndoCommand *  parent = nullptr 
)

RotateTextsCommand::RotateTextsCommand.

Parameters
diagram: Apply the rotation to the selected texts and group of texts of diagram at construction time.
parent: undo parent

Definition at line 33 of file rotatetextscommand.cpp.

References m_cond_texts, m_diagram, m_rotation, openDialog(), DiagramContent::selectedTexts(), DiagramContent::selectedTextsGroup(), setupAnimation(), QET::Icons::tr, ConductorTextItem::Type, and ConductorTextItem::wasRotateByUser().

Member Function Documentation

◆ openDialog()

void RotateTextsCommand::openDialog ( )
private

◆ redo()

void RotateTextsCommand::redo ( )
override

Definition at line 96 of file rotatetextscommand.cpp.

References m_anim_group, m_cond_texts, and m_diagram.

◆ setupAnimation()

void RotateTextsCommand::setupAnimation ( QObject *  target,
const QByteArray &  propertyName,
const QVariant &  start,
const QVariant &  end 
)
private

Definition at line 141 of file rotatetextscommand.cpp.

References m_anim_group.

Referenced by RotateTextsCommand().

◆ undo()

void RotateTextsCommand::undo ( )
override

Definition at line 84 of file rotatetextscommand.cpp.

References m_anim_group, m_cond_texts, and m_diagram.

Member Data Documentation

◆ m_anim_group

QParallelAnimationGroup* RotateTextsCommand::m_anim_group = nullptr
private

Definition at line 49 of file rotatetextscommand.h.

Referenced by redo(), setupAnimation(), and undo().

◆ m_cond_texts

QHash<ConductorTextItem *, bool> RotateTextsCommand::m_cond_texts
private

Definition at line 47 of file rotatetextscommand.h.

Referenced by redo(), RotateTextsCommand(), and undo().

◆ m_diagram

QPointer<Diagram> RotateTextsCommand::m_diagram
private

Definition at line 46 of file rotatetextscommand.h.

Referenced by redo(), RotateTextsCommand(), and undo().

◆ m_rotation

qreal RotateTextsCommand::m_rotation =0
private

Definition at line 48 of file rotatetextscommand.h.

Referenced by openDialog(), and RotateTextsCommand().


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