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

The ChangeDiagramTextCommand class This commad modifies a text item. More...

#include <diagramcommands.h>

Inherits QUndoCommand.

Collaboration diagram for ChangeDiagramTextCommand:
Collaboration graph

Public Member Functions

 ChangeDiagramTextCommand (DiagramTextItem *, const QString &before, const QString &after, QUndoCommand *=nullptr)
 ChangeDiagramTextCommand::ChangeDiagramTextCommand Constructeur. More...
 
 ~ChangeDiagramTextCommand () override
 ChangeDiagramTextCommand::~ChangeDiagramTextCommand destructeur. More...
 
void undo () override
 ChangeDiagramTextCommand::undo annule la modification de texte. More...
 
void redo () override
 ChangeDiagramTextCommand::redo. More...
 

Private Member Functions

 ChangeDiagramTextCommand (const ChangeDiagramTextCommand &)
 

Private Attributes

DiagramTextItemtext_item
 modified text item More...
 
QString text_before
 former text More...
 
QString text_after
 new text More...
 
bool first_redo
 prevent the first call to redo() More...
 
Diagramdiagram
 

Detailed Description

The ChangeDiagramTextCommand class This commad modifies a text item.

Constructor & Destructor Documentation

◆ ChangeDiagramTextCommand() [1/2]

ChangeDiagramTextCommand::ChangeDiagramTextCommand ( DiagramTextItem dti,
const QString &  before,
const QString &  after,
QUndoCommand *  parent = nullptr 
)

ChangeDiagramTextCommand::ChangeDiagramTextCommand Constructeur.

Parameters
dtiChamp de texte modifie
beforetexte avant
aftertexte apres
parentQUndoCommand parent

◆ ~ChangeDiagramTextCommand()

ChangeDiagramTextCommand::~ChangeDiagramTextCommand ( )
override

◆ ChangeDiagramTextCommand() [2/2]

ChangeDiagramTextCommand::ChangeDiagramTextCommand ( const ChangeDiagramTextCommand )
private

Member Function Documentation

◆ redo()

void ChangeDiagramTextCommand::redo ( )
override

ChangeDiagramTextCommand::redo.

Here is the call graph for this function:

◆ undo()

void ChangeDiagramTextCommand::undo ( )
override

ChangeDiagramTextCommand::undo annule la modification de texte.

Member Data Documentation

◆ diagram

Diagram* ChangeDiagramTextCommand::diagram
private

◆ first_redo

bool ChangeDiagramTextCommand::first_redo
private

prevent the first call to redo()

◆ text_after

QString ChangeDiagramTextCommand::text_after
private

new text

◆ text_before

QString ChangeDiagramTextCommand::text_before
private

former text

◆ text_item

DiagramTextItem* ChangeDiagramTextCommand::text_item
private

modified text item


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