Walls And Holes  1
EmptyParentCommand Class Reference

The EmptyParentCommand class works almost exactly like the default QUndoCommand implementation, except that it sets itself obsolete if all of its children are obsolete. This way, command macros that do nothing will get removed. More...

#include <emptyparentcommand.h>

Inheritance diagram for EmptyParentCommand:
Collaboration diagram for EmptyParentCommand:

Public Member Functions

void redo () override
 
void undo () override
 

Static Public Member Functions

static EmptyParentCommandmake (const QString &text, QUndoCommand *parent=nullptr)
 make Makes an empty parent command with the given text. More...
 

Detailed Description

The EmptyParentCommand class works almost exactly like the default QUndoCommand implementation, except that it sets itself obsolete if all of its children are obsolete. This way, command macros that do nothing will get removed.

Member Function Documentation

◆ make()

EmptyParentCommand * EmptyParentCommand::make ( const QString &  text,
QUndoCommand *  parent = nullptr 
)
static

make Makes an empty parent command with the given text.

Parameters
textThe text of the command.
parentAn optional parent command.
Returns
Here is the caller graph for this function:

◆ redo()

void EmptyParentCommand::redo ( )
override

◆ undo()

void EmptyParentCommand::undo ( )
override

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