score::PropertyCommand Class Reference
The PropertyCommand class. More...
Inheritance diagram for score::PropertyCommand:
Detailed Description
The PropertyCommand class.
This generic command allows for a very simple operation when changing a property specified with Q_PROPERTY.
It will save the current state and switch between the current and new state upon undo / redo.
Public Member Functions | |
template<typename T , typename... Args> | |
PropertyCommand (const T &obj, QString property, QVariant newval) | |
void | undo (const score::DocumentContext &ctx) const final override |
void | redo (const score::DocumentContext &ctx) const final override |
template<typename Path_T > | |
void | update (const Path_T &, QVariant newval) |
Command () | |
Public Member Functions inherited from score::Command | |
virtual const CommandGroupKey & | parentKey () const noexcept=0 |
virtual const CommandKey & | key () const noexcept=0 |
QByteArray | serialize () const |
void | deserialize (const QByteArray &) |
virtual QString | description () const =0 |
Protected Member Functions | |
void | serializeImpl (DataStreamInput &) const final override |
void | deserializeImpl (DataStreamOutput &) final override |
The documentation for this class was generated from the following files:
- PropertyCommand.hpp
- PropertyCommand.cpp