Public Member Functions | List of all members
pqPythonUndoCommand Class Reference

The python text editor undo/redo command. More...

#include <pqPythonUndoCommand.h>

Inherits QUndoCommand.

Public Member Functions

 pqPythonUndoCommand (QTextEdit &text, pqPythonSyntaxHighlighter *highlighter, pqPythonTextHistoryEntry &lastHistoryEntry, const pqPythonTextHistoryEntry &&currentHistoryEntry)
 Construct an undo command. More...
 
void undo () override
 Overriden function that performs the undo. More...
 
void redo () override
 Overriden function that performs the redo. More...
 
const pqPythonTextHistoryEntrygetCurrentHistoryEntry () const
 Returns the current history entry. More...
 

Detailed Description

The python text editor undo/redo command.

The pqPythonUndoCommand models the undo/redo framework needed for QUndoStack. The actual storage of the PythonTextHistory is external to the command: this avoids duplicating entries.

Definition at line 60 of file pqPythonUndoCommand.h.

Constructor & Destructor Documentation

◆ pqPythonUndoCommand()

pqPythonUndoCommand::pqPythonUndoCommand ( QTextEdit &  text,
pqPythonSyntaxHighlighter highlighter,
pqPythonTextHistoryEntry lastHistoryEntry,
const pqPythonTextHistoryEntry &&  currentHistoryEntry 
)

Construct an undo command.

Member Function Documentation

◆ undo()

void pqPythonUndoCommand::undo ( )
override

Overriden function that performs the undo.

◆ redo()

void pqPythonUndoCommand::redo ( )
override

Overriden function that performs the redo.

◆ getCurrentHistoryEntry()

const pqPythonTextHistoryEntry& pqPythonUndoCommand::getCurrentHistoryEntry ( ) const
inline

Returns the current history entry.

Definition at line 83 of file pqPythonUndoCommand.h.


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