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

The AddTextsGroupCommand class Manage the adding of a texts group. More...

#include <addelementtextcommand.h>

Inherits QUndoCommand.

Collaboration diagram for AddTextsGroupCommand:
Collaboration graph

Public Member Functions

 AddTextsGroupCommand (Element *element, QString groupe_name, QUndoCommand *parent=nullptr)
 AddTextsGroupCommand::AddTextsGroupCommand.
 
 AddTextsGroupCommand (Element *element, const QDomElement &dom_element, QUndoCommand *parent=nullptr)
 AddTextsGroupCommand::AddTextsGroupCommand.
 
 AddTextsGroupCommand (Element *element, QString groupe_name, QList< DynamicElementTextItem * > texts_list, QUndoCommand *parent=nullptr)
 AddTextsGroupCommand::AddTextsGroupCommand.
 
 ~AddTextsGroupCommand () override
 AddTextsGroupCommand::~AddTextsGroupCommand Destructor.
 
void undo () override
 AddTextsGroupCommand::undo.
 
void redo () override
 AddTextsGroupCommand::redo.
 

Private Attributes

QPointer< Elementm_element
 
QPointer< ElementTextItemGroupm_group
 
QList< DynamicElementTextItem * > m_deti_list
 
QDomElement m_dom_element
 
QString m_name
 
bool m_first_undo = true
 

Detailed Description

The AddTextsGroupCommand class Manage the adding of a texts group.

Constructor & Destructor Documentation

◆ AddTextsGroupCommand() [1/3]

AddTextsGroupCommand::AddTextsGroupCommand ( Element element,
QString  groupe_name,
QUndoCommand *  parent = nullptr 
)

AddTextsGroupCommand::AddTextsGroupCommand.

Parameters
element: the element to add a new group
groupe_name: the name of the group
parent: parent undo

◆ AddTextsGroupCommand() [2/3]

AddTextsGroupCommand::AddTextsGroupCommand ( Element element,
const QDomElement &  dom_element,
QUndoCommand *  parent = nullptr 
)

AddTextsGroupCommand::AddTextsGroupCommand.

Parameters
element: The element to add a new group
dom_element: the first time the group is created, we call the function fromXml of the group, and give dom_element has argument.
parent: parent undo

◆ AddTextsGroupCommand() [3/3]

AddTextsGroupCommand::AddTextsGroupCommand ( Element element,
QString  groupe_name,
QList< DynamicElementTextItem * >  texts_list,
QUndoCommand *  parent = nullptr 
)

AddTextsGroupCommand::AddTextsGroupCommand.

Parameters
element: The element to add a new group
groupe_name
texts_list: a list of texts to add to the created group (texts must be child of element)
parent: parent undo

◆ ~AddTextsGroupCommand()

AddTextsGroupCommand::~AddTextsGroupCommand ( )
override

Member Function Documentation

◆ redo()

void AddTextsGroupCommand::redo ( )
override

◆ undo()

void AddTextsGroupCommand::undo ( )
override

Member Data Documentation

◆ m_deti_list

QList<DynamicElementTextItem *> AddTextsGroupCommand::m_deti_list
private

◆ m_dom_element

QDomElement AddTextsGroupCommand::m_dom_element
private

◆ m_element

QPointer<Element> AddTextsGroupCommand::m_element
private

◆ m_first_undo

bool AddTextsGroupCommand::m_first_undo = true
private

◆ m_group

QPointer<ElementTextItemGroup> AddTextsGroupCommand::m_group
private

◆ m_name

QString AddTextsGroupCommand::m_name
private

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