|
Krita Source Code Documentation
|
The KisScalarKeyframe class is a concrete subclass of KisKeyframe that wraps a scalar value and interpolation parameters. More...
#include <kis_scalar_keyframe_channel.h>
Inheritance diagram for KisScalarKeyframe:Public Types | |
| enum | InterpolationMode { Constant , Linear , Bezier } |
| Controls the type of interpolation between this KisScalarKeyframe and the next. More... | |
| enum | TangentsMode { Sharp , Smooth } |
| Controls the behavior of the left and right tangents on a given keyframe for different curve shapes. More... | |
Signals | |
| void | sigChanged (const KisScalarKeyframe *scalarKey) |
Public Attributes | |
| QMetaObject::Connection | valueChangedChannelConnection |
| For now, scalar keyframes have a callback connection to the channel that owns them in order to signal that their internal state has changed. Created by the channel. | |
Private Attributes | |
| QWeakPointer< ScalarKeyframeLimits > | m_channelLimits |
| InterpolationMode | m_interpolationMode |
| QPointF | m_leftTangent |
| QPointF | m_rightTangent |
| TangentsMode | m_tangentsMode |
| qreal | m_value |
Friends | |
| class | KisScalarKeyframeUpdateCommand |
The KisScalarKeyframe class is a concrete subclass of KisKeyframe that wraps a scalar value and interpolation parameters.
Definition at line 39 of file kis_scalar_keyframe_channel.h.
Controls the type of interpolation between this KisScalarKeyframe and the next.
Definition at line 45 of file kis_scalar_keyframe_channel.h.
Controls the behavior of the left and right tangents on a given keyframe for different curve shapes.
| Enumerator | |
|---|---|
| Sharp | Independent control of each tangent for sudden, sharp curve changes. |
| Smooth | Tangents are locked inline for smooth transitions across key values. |
Definition at line 54 of file kis_scalar_keyframe_channel.h.
| KisScalarKeyframe::KisScalarKeyframe | ( | qreal | value, |
| QSharedPointer< ScalarKeyframeLimits > | limits ) |
Definition at line 16 of file kis_scalar_keyframe_channel.cpp.
| KisScalarKeyframe::KisScalarKeyframe | ( | qreal | value, |
| InterpolationMode | interpMode, | ||
| TangentsMode | tangentMode, | ||
| QPointF | leftTangent, | ||
| QPointF | rightTangent, | ||
| QSharedPointer< ScalarKeyframeLimits > | limits ) |
Definition at line 25 of file kis_scalar_keyframe_channel.cpp.
|
overridevirtual |
Creates a copy of this keyframe.
| newChannel | (Optional) The channel that will hold this duplicate. This is used when some action must be taken to insert a frame into a new channel, for example, the registration of a KisRasterKeyframe with the new channel's paint device. |
Implements KisKeyframe.
Definition at line 37 of file kis_scalar_keyframe_channel.cpp.
References interpolationMode(), KIS_ASSERT, KisScalarKeyframe(), leftTangent(), KisScalarKeyframeChannel::limits(), m_channelLimits, m_interpolationMode, m_tangentsMode, m_value, rightTangent(), tangentsMode(), toQShared(), and value().
| KisScalarKeyframe::InterpolationMode KisScalarKeyframe::interpolationMode | ( | ) | const |
Definition at line 88 of file kis_scalar_keyframe_channel.cpp.
References m_interpolationMode.
| QPointF KisScalarKeyframe::leftTangent | ( | ) | const |
Definition at line 121 of file kis_scalar_keyframe_channel.cpp.
References m_leftTangent.
| QPointF KisScalarKeyframe::rightTangent | ( | ) | const |
Definition at line 126 of file kis_scalar_keyframe_channel.cpp.
References m_rightTangent.
| void KisScalarKeyframe::setInterpolationMode | ( | InterpolationMode | mode, |
| KUndo2Command * | parentUndoCmd = nullptr ) |
Definition at line 77 of file kis_scalar_keyframe_channel.cpp.
References KisScalarKeyframeUpdateCommand, m_interpolationMode, KUndo2Command::redo(), and sigChanged().
| void KisScalarKeyframe::setInterpolationTangents | ( | QPointF | leftTangent, |
| QPointF | rightTangent, | ||
| KUndo2Command * | parentUndoCmd = nullptr ) |
Definition at line 109 of file kis_scalar_keyframe_channel.cpp.
References KisScalarKeyframeUpdateCommand, leftTangent(), m_leftTangent, m_rightTangent, KUndo2Command::redo(), rightTangent(), and sigChanged().
| void KisScalarKeyframe::setLimits | ( | QSharedPointer< ScalarKeyframeLimits > | limits | ) |
Definition at line 131 of file kis_scalar_keyframe_channel.cpp.
References m_channelLimits.
| void KisScalarKeyframe::setTangentsMode | ( | TangentsMode | mode, |
| KUndo2Command * | parentUndoCmd = nullptr ) |
Definition at line 93 of file kis_scalar_keyframe_channel.cpp.
References KisScalarKeyframeUpdateCommand, m_tangentsMode, KUndo2Command::redo(), and sigChanged().
| void KisScalarKeyframe::setValue | ( | qreal | val, |
| KUndo2Command * | parentUndoCmd = nullptr ) |
Definition at line 60 of file kis_scalar_keyframe_channel.cpp.
References KisScalarKeyframeUpdateCommand, m_channelLimits, m_value, KUndo2Command::redo(), sigChanged(), and value().
|
signal |
| KisScalarKeyframe::TangentsMode KisScalarKeyframe::tangentsMode | ( | ) | const |
Definition at line 104 of file kis_scalar_keyframe_channel.cpp.
References m_tangentsMode.
| qreal KisScalarKeyframe::value | ( | ) | const |
Definition at line 55 of file kis_scalar_keyframe_channel.cpp.
References m_value.
|
friend |
Definition at line 86 of file kis_scalar_keyframe_channel.h.
|
private |
Weak pointer back to the owning channel's limits, optionally used when setting the value of a keyframe to conform to the limited range of its current channel, Should change if keyframe is moved to a different channel.
Definition at line 103 of file kis_scalar_keyframe_channel.h.
|
private |
Definition at line 93 of file kis_scalar_keyframe_channel.h.
|
private |
Controls part of between this and PREVIOUS keyframe.
Definition at line 95 of file kis_scalar_keyframe_channel.h.
|
private |
Controls part of between this and NEXT keyframe.
Definition at line 96 of file kis_scalar_keyframe_channel.h.
|
private |
Definition at line 94 of file kis_scalar_keyframe_channel.h.
|
private |
Scalar value of this keyframe. Optionally clamped to m_channelLimits.
Definition at line 92 of file kis_scalar_keyframe_channel.h.
| QMetaObject::Connection KisScalarKeyframe::valueChangedChannelConnection |
For now, scalar keyframes have a callback connection to the channel that owns them in order to signal that their internal state has changed. Created by the channel.
Definition at line 83 of file kis_scalar_keyframe_channel.h.