Walls And Holes  1
ChangeValueCommand< ValueType > Class Template Reference

#include <changevaluecommand.h>

Inheritance diagram for ChangeValueCommand< ValueType >:
Collaboration diagram for ChangeValueCommand< ValueType >:

Public Member Functions

void redo () override
 
void undo () override
 

Static Public Member Functions

template<typename Func >
static ChangeValueCommandmake (ValueType *variable, ValueType newValue, ValueType oldValue, const QString &text, Func postChangeFunc, QUndoCommand *parent=nullptr)
 make Creates a change-value command. More...
 
template<typename Func >
static ChangeValueCommandmake (ValueType *variable, ValueType newValue, const QString &text, Func postChangeFunc, QUndoCommand *parent=nullptr)
 make Creates a change-value command. More...
 
static ChangeValueCommandmake (ValueType *variable, ValueType newValue, const QString &text, QUndoCommand *parent=nullptr)
 make Creates a change-value command. More...
 

Member Function Documentation

◆ make() [1/3]

template<typename ValueType >
template<typename Func >
static ChangeValueCommand* ChangeValueCommand< ValueType >::make ( ValueType *  variable,
ValueType  newValue,
ValueType  oldValue,
const QString &  text,
Func  postChangeFunc,
QUndoCommand *  parent = nullptr 
)
inlinestatic

make Creates a change-value command.

Parameters
variableThe pointer to the variable that is modified.
newValueThe variable's new value.
oldValueThe variable's old value (sometimes the pre-action value doesn't match the current value).
textA short name or description (see QUndoCommand documentation).
postChangeFuncAction to perform after changing the variable. Should have no parameters and no return value.
parentThe parent of the command.
Returns
The command that was performed.
Here is the caller graph for this function:

◆ make() [2/3]

template<typename ValueType >
template<typename Func >
static ChangeValueCommand* ChangeValueCommand< ValueType >::make ( ValueType *  variable,
ValueType  newValue,
const QString &  text,
Func  postChangeFunc,
QUndoCommand *  parent = nullptr 
)
inlinestatic

make Creates a change-value command.

Parameters
variableThe pointer to the variable that is modified.
newValueThe variable's new value.
textA short name or description (see QUndoCommand documentation).
postChangeFuncAction to perform after changing the variable. Should have no parameters and no return value.
parentThe parent of the command.
Returns
The command that was performed.
Here is the call graph for this function:

◆ make() [3/3]

template<typename ValueType >
static ChangeValueCommand* ChangeValueCommand< ValueType >::make ( ValueType *  variable,
ValueType  newValue,
const QString &  text,
QUndoCommand *  parent = nullptr 
)
inlinestatic

make Creates a change-value command.

Parameters
variableThe pointer to the variable that is modified.
newValueThe variable's new value.
textA short name or description (see QUndoCommand documentation).
parentThe parent of the command.
Returns
The command that was performed.
Here is the call graph for this function:

◆ redo()

template<typename ValueType >
void ChangeValueCommand< ValueType >::redo ( )
inlineoverride

◆ undo()

template<typename ValueType >
void ChangeValueCommand< ValueType >::undo ( )
inlineoverride

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