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

The ChangeDiagramTextCommand class This command 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.
 
 ~ChangeDiagramTextCommand () override
 ChangeDiagramTextCommand::~ChangeDiagramTextCommand destructeur.
 
void undo () override
 ChangeDiagramTextCommand::undo annule la modification de texte.
 
void redo () override
 ChangeDiagramTextCommand::redo.
 

Private Member Functions

 ChangeDiagramTextCommand (const ChangeDiagramTextCommand &)
 

Private Attributes

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

Detailed Description

The ChangeDiagramTextCommand class This command 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: