|
Krita Source Code Documentation
|
#include <KisChangeValueCommand.h>
A simple command that flips the state of a member variable in a contained structure.
For example, to change the variable m_d->fooBar to the value newValue in an undoable fashion, just create a command like that:
\code{.cpp}
KUndo2Command *cmd =
makeChangeValueCommand<&Private::fooBar>(m_d.data(), newValue);
\endcode
It is not strictly necessary that newValue had the same type as the type of the member variable. They may differ, given the types are convertible.
Definition at line 25 of file KisChangeValueCommand.h.