File indexing completed on 2024-05-12 16:01:45

0001 /*
0002  *  SPDX-FileCopyrightText: 2017 Dmitry Kazakov <dimula73@gmail.com>
0003  *
0004  *  SPDX-License-Identifier: GPL-2.0-or-later
0005  */
0006 
0007 #ifndef KISASYNCANIMATIONFRAMESSAVINGRENDERER_H
0008 #define KISASYNCANIMATIONFRAMESSAVINGRENDERER_H
0009 
0010 #include <KisAsyncAnimationRendererBase.h>
0011 
0012 class KisDocument;
0013 class KisTimeSpan;
0014 
0015 class KisAsyncAnimationFramesSavingRenderer : public KisAsyncAnimationRendererBase
0016 {
0017     Q_OBJECT
0018 public:
0019     KisAsyncAnimationFramesSavingRenderer(KisImageSP image,
0020                                           const QString &fileNamePrefix,
0021                                           const QString &fileNameSuffix,
0022                                           const QByteArray &outputMimeType,
0023                                           const KisTimeSpan &range,
0024                                           const int sequenceNumberingOffset,
0025                                           const bool onlyNeedsUniqueFrames,
0026                                           KisPropertiesConfigurationSP exportConfiguration);
0027     ~KisAsyncAnimationFramesSavingRenderer();
0028 
0029 protected:
0030     void frameCompletedCallback(int frame, const KisRegion &requestedRegion) override;
0031     void frameCancelledCallback(int frame, CancelReason cancelReason) override;
0032 
0033 Q_SIGNALS:
0034     void sigCompleteRegenerationInternal(int frame);
0035     void sigCancelRegenerationInternal(int frame, KisAsyncAnimationRendererBase::CancelReason cancelReason);
0036 
0037 private:
0038     struct Private;
0039     const QScopedPointer<Private> m_d;
0040 };
0041 
0042 #endif // KISASYNCANIMATIONFRAMESSAVINGRENDERER_H