score::PropertyCommand Class Reference

The PropertyCommand class. More...

Inheritance diagram for score::PropertyCommand:
score::Command Interpolation::SetTween Mapping::SetMappingSourceMax Mapping::SetMappingSourceMin Mapping::SetMappingTargetMax Mapping::SetMappingTargetMin Media::SetMax Media::SetMergeInCount Media::SetMergeMode Media::SetMin Media::SetStepCount Media::SetStepDuration Pd::SetAudioIns Pd::SetAudioOuts Pd::SetMidiIn Pd::SetMidiOut Scenario::Command::SetOffsetBehavior

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 CommandGroupKeyparentKey () const noexcept=0
 
virtual const CommandKeykey () 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: