Krita Source Code Documentation
Loading...
Searching...
No Matches
KisAsyncAnimationRenderDialogBase.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2017 Dmitry Kazakov <dimula73@gmail.com>
3 *
4 * SPDX-License-Identifier: GPL-2.0-or-later
5 */
6
7#ifndef KISASYNCANIMATIONRENDERDIALOGBASE_H
8#define KISASYNCANIMATIONRENDERDIALOGBASE_H
9
10#include <QObject>
11#include "kis_types.h"
12#include "kritaui_export.h"
13
15
16class KisTimeSpan;
17class KisViewManager;
18class KisRegion;
19
50class KRITAUI_EXPORT KisAsyncAnimationRenderDialogBase : public QObject
51{
52 Q_OBJECT
53public:
60
61public:
69 KisAsyncAnimationRenderDialogBase(const QString &actionTitle, KisImageSP image, int busyWait = 200);
71
78 virtual Result regenerateRange(KisViewManager *viewManager);
79
84 void setRegionOfInterest(const KisRegion &roi);
85
89 KisRegion regionOfInterest() const;
90
98 void setBatchMode(bool value);
99
103 bool batchMode() const;
104
105private Q_SLOTS:
106 void slotFrameCompleted(int frame);
107 void slotFrameCancelled(int frame, KisAsyncAnimationRendererBase::CancelReason cancelReason);
108
109 void slotCancelRegeneration();
110 void slotUpdateCompressedProgressData();
111
112private:
113 void tryInitiateFrameRegeneration();
114 void updateProgressLabel();
115 void cancelProcessingImpl(KisAsyncAnimationRendererBase::CancelReason cancelReason);
116
117protected:
123 virtual QList<int> calcDirtyFrames() const = 0;
124
134
136 KisImageSP image, int frame) = 0;
137
138private:
139 struct Private;
140 const QScopedPointer<Private> m_d;
141};
142
143#endif // KISASYNCANIMATIONRENDERDIALOGBASE_H
float value(const T *src, size_t ch)
KisAsyncAnimationRenderDialogBase is a special class for rendering multiple frames of the image and p...
virtual KisAsyncAnimationRendererBase * createRenderer(KisImageSP image)=0
create a renderer object linked to image
virtual void initializeRendererForFrame(KisAsyncAnimationRendererBase *renderer, KisImageSP image, int frame)=0
virtual QList< int > calcDirtyFrames() const =0
returns a list of frames that should be regenerated by the dialog