|
Krita Source Code Documentation
|
The KisCanvasAnimationState class stores all of the canvas-specific animation state. More...
#include <KisCanvasAnimationState.h>
Inheritance diagram for KisCanvasAnimationState:Classes | |
| struct | Private |
Public Slots | |
| void | showFrame (int frame, bool finalize=false) |
Signals | |
| void | sigAudioLevelChanged (qreal value) |
| void | sigCancelPlayback () |
| void | sigFrameChanged () |
| void | sigPlaybackMediaChanged () |
| void | sigPlaybackSpeedChanged (qreal value) |
| void | sigPlaybackStateChanged (PlaybackState state) |
| void | sigPlaybackStatisticsUpdated () |
Public Member Functions | |
| qreal | currentVolume () |
| class KisFrameDisplayProxy * | displayProxy () |
| KisCanvasAnimationState (KisCanvas2 *canvas) | |
| boost::optional< QFileInfo > | mediaInfo () |
| Get the media file info associated with this canvas, if available. | |
| boost::optional< int > | playbackOrigin () |
| Get the animation frame to return to (for this canvas) when playback is stopped, if available. | |
| qreal | playbackSpeed () const |
| PlaybackState | playbackState () |
| void | setPlaybackSpeed (qreal value) |
| void | setPlaybackState (PlaybackState state) |
| setPlaybackState changes the animation playback state for this canvas. KisPlaybackEngine should respond to changes in state while canvas is active, and use appropriate state when a new canvas is made active. | |
| void | setupAudioTracks () |
| Sets up the audio tracks for a given animation. (The only reason this is public is because we have to defer this until after canvas construction.) | |
| ~KisCanvasAnimationState () override | |
Private Member Functions | |
| KisTimeSpan | activePlaybackRange () |
Private Attributes | |
| QScopedPointer< Private > | m_d |
The KisCanvasAnimationState class stores all of the canvas-specific animation state.
Krita drives animation using a single KisPlaybackEngine instance (found in KisPart). However, there is some data that we want/need to store per-canvas (typically per-document). This might include the frame where playback started, audio volume, or anything else that we may need to persist between canvas changes.
Definition at line 38 of file KisCanvasAnimationState.h.
| KisCanvasAnimationState::KisCanvasAnimationState | ( | KisCanvas2 * | canvas | ) |
Definition at line 236 of file KisCanvasAnimationState.cpp.
References connect(), m_d, setPlaybackState(), sigFrameChanged(), KisImageAnimationInterface::sigKeyframeAdded(), and STOPPED.
|
override |
Definition at line 263 of file KisCanvasAnimationState.cpp.
|
private |
Definition at line 348 of file KisCanvasAnimationState.cpp.
References KisImageAnimationInterface::activePlaybackRange(), KisImage::animationInterface(), KisImageAnimationInterface::image(), KisTimeSpan::infinite(), and m_d.
| qreal KisCanvasAnimationState::currentVolume | ( | ) |
| KisFrameDisplayProxy * KisCanvasAnimationState::displayProxy | ( | ) |
Definition at line 299 of file KisCanvasAnimationState.cpp.
References m_d.
| boost::optional< QFileInfo > KisCanvasAnimationState::mediaInfo | ( | ) |
Get the media file info associated with this canvas, if available.
Definition at line 272 of file KisCanvasAnimationState.cpp.
References m_d.
| boost::optional< int > KisCanvasAnimationState::playbackOrigin | ( | ) |
Get the animation frame to return to (for this canvas) when playback is stopped, if available.
Definition at line 290 of file KisCanvasAnimationState.cpp.
References m_d.
| qreal KisCanvasAnimationState::playbackSpeed | ( | ) | const |
Definition at line 312 of file KisCanvasAnimationState.cpp.
References m_d.
| PlaybackState KisCanvasAnimationState::playbackState | ( | ) |
Definition at line 267 of file KisCanvasAnimationState.cpp.
References m_d.
| void KisCanvasAnimationState::setPlaybackSpeed | ( | qreal | value | ) |
Definition at line 304 of file KisCanvasAnimationState.cpp.
References m_d, qFuzzyCompare(), sigPlaybackSpeedChanged(), and value().
| void KisCanvasAnimationState::setPlaybackState | ( | PlaybackState | state | ) |
setPlaybackState changes the animation playback state for this canvas. KisPlaybackEngine should respond to changes in state while canvas is active, and use appropriate state when a new canvas is made active.
Definition at line 358 of file KisCanvasAnimationState.cpp.
References connect(), m_d, PLAYING, sigPlaybackStateChanged(), sigPlaybackStatisticsUpdated(), and STOPPED.
| void KisCanvasAnimationState::setupAudioTracks | ( | ) |
Sets up the audio tracks for a given animation. (The only reason this is public is because we have to defer this until after canvas construction.)
Definition at line 317 of file KisCanvasAnimationState.cpp.
References Private::canvas, KisDocument::getAudioTracks(), KisCanvas2::imageView(), KisPart::instance(), KIS_SAFE_ASSERT_RECOVER_RETURN, m_d, sigPlaybackMediaChanged(), and KisPart::upgradeToPlaybackEngineMLT().
|
slot |
Definition at line 343 of file KisCanvasAnimationState.cpp.
References m_d.
|
signal |
|
signal |
|
signal |
|
signal |
|
signal |
|
signal |
|
signal |
|
private |
Definition at line 93 of file KisCanvasAnimationState.h.