#include <kis_keyframe_commands.h>
|
| template<typename T > |
| using | UndoStore = QPair<T, T> |
| |
|
| | KisScalarKeyframeUpdateCommand (KisScalarKeyframe *keyframe, KisScalarKeyframe::InterpolationMode interpMode, KUndo2Command *parentCmd) |
| |
| | KisScalarKeyframeUpdateCommand (KisScalarKeyframe *keyframe, KisScalarKeyframe::TangentsMode tangentMode, KUndo2Command *parentCmd) |
| |
| | KisScalarKeyframeUpdateCommand (KisScalarKeyframe *keyframe, QPointF tangentLeft, QPointF tangentRight, KUndo2Command *parentCmd) |
| |
| | KisScalarKeyframeUpdateCommand (KisScalarKeyframe *keyframe, qreal value, KisScalarKeyframe::InterpolationMode interpolationMode, KisScalarKeyframe::TangentsMode tangentMode, QPointF tangentLeft, QPointF tangentRight, KUndo2Command *parentCmd) |
| |
| | KisScalarKeyframeUpdateCommand (KisScalarKeyframe *keyframe, qreal value, KUndo2Command *parentCmd) |
| |
| void | redo () override |
| |
| void | undo () override |
| |
Public Member Functions inherited from KUndo2Command |
| QString | actionText () const |
| |
| virtual bool | canAnnihilateWith (const KUndo2Command *other) const |
| |
| const KUndo2Command * | child (int index) const |
| |
| int | childCount () const |
| |
| virtual QTime | endTime () const |
| |
| KUndo2CommandExtraData * | extraData () const |
| |
| bool | hasParent () const |
| |
| virtual int | id () const |
| |
| virtual bool | isMerged () const |
| |
| | KUndo2Command (const KUndo2MagicString &text, KUndo2Command *parent=0) |
| |
| | KUndo2Command (KUndo2Command *parent=0) |
| |
| virtual QVector< KUndo2Command * > | mergeCommandsVector () const |
| |
| virtual bool | mergeWith (const KUndo2Command *other) |
| |
| virtual void | redoMergedCommands () |
| |
| void | setEndTime () |
| |
| virtual void | setEndTime (const QTime &time) |
| |
| void | setExtraData (KUndo2CommandExtraData *data) |
| |
| void | setText (const KUndo2MagicString &text) |
| |
| void | setTime () |
| |
| virtual void | setTime (const QTime &time) |
| |
| virtual void | setTimedID (int timedID) |
| |
| KUndo2MagicString | text () const |
| |
| virtual QTime | time () const |
| |
| virtual int | timedId () const |
| |
| virtual bool | timedMergeWith (KUndo2Command *other) |
| |
| virtual void | undoMergedCommands () |
| |
| virtual | ~KUndo2Command () |
| |
Definition at line 50 of file kis_keyframe_commands.h.
◆ UndoStore
◆ KisScalarKeyframeUpdateCommand() [1/5]
Definition at line 54 of file kis_keyframe_commands.cpp.
62{}
float value(const T *src, size_t ch)
KUndo2Command(KUndo2Command *parent=0)
UndoStore< qreal > cachedValue
UndoStore< QPointF > cachedTangentRight
KisScalarKeyframe * keyframe
UndoStore< KisScalarKeyframe::TangentsMode > cachedTangentsMode
UndoStore< KisScalarKeyframe::InterpolationMode > cachedInterpolationMode
UndoStore< QPointF > cachedTangentLeft
InterpolationMode interpolationMode() const
QPointF rightTangent() const
QPointF leftTangent() const
TangentsMode tangentsMode() const
◆ KisScalarKeyframeUpdateCommand() [2/5]
Definition at line 61 of file kis_keyframe_commands.h.
KisScalarKeyframeUpdateCommand(KisScalarKeyframe *keyframe, qreal value, KisScalarKeyframe::InterpolationMode interpolationMode, KisScalarKeyframe::TangentsMode tangentMode, QPointF tangentLeft, QPointF tangentRight, KUndo2Command *parentCmd)
TangentsMode m_tangentsMode
InterpolationMode m_interpolationMode
◆ KisScalarKeyframeUpdateCommand() [3/5]
◆ KisScalarKeyframeUpdateCommand() [4/5]
◆ KisScalarKeyframeUpdateCommand() [5/5]
| KisScalarKeyframeUpdateCommand::KisScalarKeyframeUpdateCommand |
( |
KisScalarKeyframe * | keyframe, |
|
|
QPointF | tangentLeft, |
|
|
QPointF | tangentRight, |
|
|
KUndo2Command * | parentCmd ) |
|
inline |
◆ redo()
| void KisScalarKeyframeUpdateCommand::redo |
( |
| ) |
|
|
overridevirtual |
Applies a change to the document. This function must be implemented in the derived class. Calling KUndo2QStack::push(), KUndo2QStack::undo() or KUndo2QStack::redo() from this function leads to undefined behavior.
The default implementation calls redo() on all child commands.
- See also
- undo()
Reimplemented from KUndo2Command.
Definition at line 64 of file kis_keyframe_commands.cpp.
65{
67
69 if (limits) {
71 } else {
73 }
74
79
81}
void sigChanged(const KisScalarKeyframe *scalarKey)
QWeakPointer< ScalarKeyframeLimits > m_channelLimits
References cachedInterpolationMode, cachedTangentLeft, cachedTangentRight, cachedTangentsMode, cachedValue, keyframe, KIS_ASSERT, KisScalarKeyframe::m_channelLimits, KisScalarKeyframe::m_interpolationMode, KisScalarKeyframe::m_leftTangent, KisScalarKeyframe::m_rightTangent, KisScalarKeyframe::m_tangentsMode, KisScalarKeyframe::m_value, and KisScalarKeyframe::sigChanged().
◆ undo()
| void KisScalarKeyframeUpdateCommand::undo |
( |
| ) |
|
|
overridevirtual |
Reverts a change to the document. After undo() is called, the state of the document should be the same as before redo() was called. This function must be implemented in the derived class. Calling KUndo2QStack::push(), KUndo2QStack::undo() or KUndo2QStack::redo() from this function leads to undefined behavior.
The default implementation calls undo() on all child commands in reverse order.
- See also
- redo()
Reimplemented from KUndo2Command.
Definition at line 83 of file kis_keyframe_commands.cpp.
84{
86
88 if (limits) {
90 } else {
92 }
93
98
100}
References cachedInterpolationMode, cachedTangentLeft, cachedTangentRight, cachedTangentsMode, cachedValue, keyframe, KIS_ASSERT, KisScalarKeyframe::m_channelLimits, KisScalarKeyframe::m_interpolationMode, KisScalarKeyframe::m_leftTangent, KisScalarKeyframe::m_rightTangent, KisScalarKeyframe::m_tangentsMode, KisScalarKeyframe::m_value, and KisScalarKeyframe::sigChanged().
◆ cachedInterpolationMode
◆ cachedTangentLeft
| UndoStore<QPointF> KisScalarKeyframeUpdateCommand::cachedTangentLeft |
|
private |
◆ cachedTangentRight
| UndoStore<QPointF> KisScalarKeyframeUpdateCommand::cachedTangentRight |
|
private |
◆ cachedTangentsMode
◆ cachedValue
| UndoStore<qreal> KisScalarKeyframeUpdateCommand::cachedValue |
|
private |
◆ keyframe
The documentation for this class was generated from the following files: