Krita Source Code Documentation
Loading...
Searching...
No Matches
KisStoryboardThumbnailRenderScheduler.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2020 Saurabh Kumar <saurabhk660@gmail.com>
3 *
4 * SPDX-License-Identifier: GPL-2.0-or-later
5 */
6
7#ifndef KISASYNCSTORYBOARDTHUMBNAILRENDERSCHEDULER_H
8#define KISASYNCSTORYBOARDTHUMBNAILRENDERSCHEDULER_H
9
10#include <QObject>
11#include <QVector>
12
13#include <kis_image.h>
14
15class KisPaintDevice;
17
25{
26 Q_OBJECT
27public:
30
38 void setImage(KisImageSP image);
45 void scheduleFrameForRegeneration(int frame, bool affected);
54 void cancelFrameRendering(int frame);
55
56public Q_SLOTS:
58
59private Q_SLOTS:
64 void slotFrameRegenerationCompleted(int frame, KisPaintDeviceSP contents);
65
69 void slotFrameRegenerationCancelled(int frame);
70
71private:
76
82 void renderNextFrame();
83
84Q_SIGNALS:
85 void sigFrameCompleted(int frame, KisPaintDeviceSP dev);
86 void sigFrameCancelled(int frame);
87
88private:
94};
95
96#endif
requests regeneration of a frame. The regeneration should be requested after switching the KisImage t...
This class maintains queues of dirty frames sorted in the order of proximity to the last changed fram...
void slotFrameRegenerationCancelled(int frame)
Emits sigFrameCancelled(int) and schedules the next frame for regeneration.
void renderNextFrame()
Renders the next frame, either from affected or changed queue. Changed queue is given preference....
void slotFrameRegenerationCompleted(int frame, KisPaintDeviceSP contents)
Emits sigFrameCompleted(int,KisPaintDeviceSP) if the regeneration was complete and calls regeneration...
void sigFrameCompleted(int frame, KisPaintDeviceSP dev)
void sortAffectedFrameQueue()
Sorts the m_affectedFramesQueue based on proximity to the last changed frame.
void cancelFrameRendering(int frame)
Cancel rendering of a single frame.
void scheduleFrameForRegeneration(int frame, bool affected)
Adds the frame to the list of "to be regenerated" frames.
void cancelAllFrameRendering()
Cancels all frame rendering. Empties all queues and cancels the current rendering,...
void setImage(KisImageSP image)
Sets an image, the class takes an image, clones it and calls frame regeneration on the clone so do no...