|
Krita Source Code Documentation
|
requests regeneration of a frame. The regeneration should be requested after switching the KisImage to the relevant frame.
More...
#include <KisAsyncStoryboardThumbnailRenderer.h>
Inheritance diagram for KisAsyncStoryboardThumbnailRenderer:Signals | |
| void | sigNotifyFrameCancelled (int frame, KisAsyncAnimationRendererBase::CancelReason cancelReason) |
| void | sigNotifyFrameCompleted (int frameTime) |
| void | sigNotifyFrameCompleted (int frameTime, KisPaintDeviceSP frameContents) |
Signals inherited from KisAsyncAnimationRendererBase | |
| void | sigFrameCancelled (int frame, KisAsyncAnimationRendererBase::CancelReason cancelReason) |
| void | sigFrameCompleted (int frame) |
Public Member Functions | |
| KisAsyncStoryboardThumbnailRenderer (QObject *parent) | |
| ~KisAsyncStoryboardThumbnailRenderer () | |
Public Member Functions inherited from KisAsyncAnimationRendererBase | |
| bool | isActive () const |
| KisAsyncAnimationRendererBase (QObject *parent=0) | |
| void | startFrameRegeneration (KisImageSP image, int frame, const KisRegion ®ionOfInterest, Flags flags, KisLockFrameGenerationLock &&frameGenerationLock) |
| void | startFrameRegeneration (KisImageSP image, int frame, Flags flags, KisLockFrameGenerationLock &&frameGenerationLock) |
| virtual | ~KisAsyncAnimationRendererBase () |
Public Member Functions inherited from Private | |
| Private (KisCanvas2 *c) | |
Protected Member Functions | |
| void | clearFrameRegenerationState (bool isCancelled) override |
| void | frameCancelledCallback (int frame, CancelReason cancelReason) override |
| frameCancelledCallback is called when the rendering of the frame was cancelled. | |
| void | frameCompletedCallback (int frame, const KisRegion &requestedRegion) override |
| frameCompletedCallback is called by the renderer when a new frame becomes ready | |
Protected Member Functions inherited from KisAsyncAnimationRendererBase | |
| KisImageSP | requestedImage () const |
Additional Inherited Members | |
Public Types inherited from KisAsyncAnimationRendererBase | |
| enum | CancelReason { UserCancelled = 0 , RenderingFailed , RenderingTimedOut } |
| enum | Flag { None = 0x0 , Cancellable = 0x1 } |
Public Slots inherited from KisAsyncAnimationRendererBase | |
| void | cancelCurrentFrameRendering (CancelReason cancelReason) |
| cancels current rendering operation | |
Public Attributes inherited from KisAsyncAnimationRendererBase | |
| KisSignalAutoConnectionsStore | imageRequestConnections |
| bool | isCancelled = false |
| QTimer | regenerationTimeout |
| int | requestedFrame = -1 |
| KisImageSP | requestedImage |
| KisRegion | requestedRegion |
Public Attributes inherited from Private | |
| KisCanvas2 * | canvas |
| int | displayedFrame |
| int | intendedFrame |
Protected Slots inherited from KisAsyncAnimationRendererBase | |
| void | notifyFrameCancelled (int frame, KisAsyncAnimationRendererBase::CancelReason cancelReason) |
| void | notifyFrameCompleted (int frame) |
requests regeneration of a frame. The regeneration should be requested after switching the KisImage to the relevant frame.
Definition at line 19 of file KisAsyncStoryboardThumbnailRenderer.h.
| KisAsyncStoryboardThumbnailRenderer::KisAsyncStoryboardThumbnailRenderer | ( | QObject * | parent | ) |
Definition at line 11 of file KisAsyncStoryboardThumbnailRenderer.cpp.
References connect(), KisAsyncAnimationRendererBase::notifyFrameCancelled(), KisAsyncAnimationRendererBase::notifyFrameCompleted(), sigNotifyFrameCancelled(), and sigNotifyFrameCompleted().
| KisAsyncStoryboardThumbnailRenderer::~KisAsyncStoryboardThumbnailRenderer | ( | ) |
Definition at line 20 of file KisAsyncStoryboardThumbnailRenderer.cpp.
|
overrideprotectedvirtual |
Called by KisAsyncAnimationRendererBase when the processing has been completed and the internal state of the populator should be cleared
| isCancelled | tells if frame regeneration has failed to be regenerated |
Reimplemented from KisAsyncAnimationRendererBase.
Definition at line 42 of file KisAsyncStoryboardThumbnailRenderer.cpp.
References KisAsyncAnimationRendererBase::clearFrameRegenerationState(), and KisAsyncAnimationRendererBase::isCancelled.
|
overrideprotectedvirtual |
frameCancelledCallback is called when the rendering of the frame was cancelled.
The rendering of the frame can be either cancelled by the image itself or by receiving a timeout signal (10 seconds).
NOTE: the slot is called in the GUI thread. Don't forget to call notifyFrameCancelled() in he end of your call.
Implements KisAsyncAnimationRendererBase.
Definition at line 37 of file KisAsyncStoryboardThumbnailRenderer.cpp.
References sigNotifyFrameCancelled().
|
overrideprotectedvirtual |
frameCompletedCallback is called by the renderer when a new frame becomes ready
NOTE1: the callback is called from the context of a image worker thread! So it is asynchronous from the GUI thread. NOTE2: in case of successful processing of the frame, the callback must issue some signal, connected to notifyFrameCompleted() via auto connection, to continue processing. Please do not call the method directly, because notifyFame*() slots should be called from the context of the GUI thread. NOTE3: In case of failure, notifyFrameCancelled(). The same threading rules apply.
Implements KisAsyncAnimationRendererBase.
Definition at line 24 of file KisAsyncStoryboardThumbnailRenderer.cpp.
References KritaUtils::CopySnapshot, KisImage::projection(), KisAsyncAnimationRendererBase::RenderingFailed, KisAsyncAnimationRendererBase::requestedFrame, KisAsyncAnimationRendererBase::requestedImage, sigNotifyFrameCancelled(), and sigNotifyFrameCompleted().
|
signal |
|
signal |
|
signal |