24#include "pencilerror.h"
26#include "importimageconfig.h"
28#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
29Q_MOC_INCLUDE(
"colormanager.h")
30Q_MOC_INCLUDE("toolmanager.h")
31Q_MOC_INCLUDE("layermanager.h")
32Q_MOC_INCLUDE("playbackmanager.h")
33Q_MOC_INCLUDE("viewmanager.h")
34Q_MOC_INCLUDE("preferencemanager.h")
35Q_MOC_INCLUDE("selectionmanager.h")
36Q_MOC_INCLUDE("soundmanager.h")
37Q_MOC_INCLUDE("overlaymanager.h")
38Q_MOC_INCLUDE("clipboardmanager.h")
39Q_MOC_INCLUDE("undoredomanager.h")
108 Object* object()
const {
return mObject.get(); }
109 Status openObject(
const QString& strFilePath,
const std::function<
void(
int)>& progressChanged,
const std::function<
void(
int)>& progressRangeChanged);
114 void setScribbleArea(
ScribbleArea* pScirbbleArea) { mScribbleArea = pScirbbleArea; }
115 ScribbleArea* getScribbleArea() {
return mScribbleArea; }
117 int currentFrame()
const;
119 void setFps(
int fps);
121 int currentLayerIndex()
const {
return mCurrentLayerIndex; }
122 void setCurrentLayerIndex(
int i);
124 void scrubTo(
int frameNumber);
130 LayerVisibility layerVisibility();
132 qreal viewScaleInversed();
133 void deselectAll()
const;
134 void selectAll()
const;
136 void clipboardChanged();
148 void selectedFramesChanged();
150 void updateTimeLine()
const;
151 void updateTimeLineCached();
152 void updateLayerCount();
156 void fpsChanged(
int fps);
160 void needDisplayInfoNoTitle(
const QString& body);
162 void canCopyChanged(
bool enabled);
163 void canPasteChanged(
bool enabled);
172 void setModified(
int layerNumber,
int frameNumber);
174 void clearCurrentFrame();
177 Status importAnimatedImage(
const QString& filePath,
int frameSpacing,
const std::function<
void (
int)>& progressChanged,
const std::function<
bool ()>& wasCanceled);
179 void scrubNextKeyFrame();
180 void scrubPreviousKeyFrame();
182 void scrubBackward();
203 void switchVisibilityOfLayer(
int layerNumber);
204 void swapLayers(
int i,
int j);
205 bool canSwapLayers(
int layerIndexLeft,
int layerIndexRight)
const;
207 void backup(
const QString& undoText);
208 bool backup(
int layerNumber,
int frameNumber,
const QString& undoText);
210 void onCurrentLayerWillChange(
int index);
214 void pasteFromPreviousFrame();
217 bool canCopy()
const;
218 bool canPaste()
const;
220 void increaseLayerVisibilityIndex();
221 void decreaseLayerVisibilityIndex();
222 void flipSelection(
bool flipVertical);
223 void repositionImage(
QPoint transform,
int frame);
225 void clearTemporary();
228 void settingUpdated(SETTING);
230 void dontAskAutoSave(
bool b) { mAutosaveNeverAskAgain = b; }
231 bool autoSaveNeverAskAgain()
const {
return mAutosaveNeverAskAgain; }
232 void resetAutoSaveCounter();
238 void pasteToCanvas(
BitmapImage* bitmapImage,
int frameNumber);
239 void pasteToCanvas(
VectorImage* vectorImage,
int frameNumber);
240 void pasteToFrames();
242 bool canCopyBitmapImage(
BitmapImage* bitmapImage)
const;
243 bool canCopyFrames(
const Layer* layer)
const;
244 bool canCopyVectorImage(
const VectorImage* vectorImage)
const;
247 std::unique_ptr<Object> mObject;
250 int mCurrentLayerIndex = 0;
266 std::vector< BaseManager* > mAllManagers;
268 bool mIsAutosave =
true;
269 int mAutosaveNumber = 12;
270 int mAutosaveCounter = 0;
271 bool mAutosaveNeverAskAgain =
false;
273 void makeConnections();
277 void updateAutoSaveCounter();
ActiveFramePool implemented a LRU cache to keep tracking the most recent accessed key frames A key fr...
void framesModified()
This should be emitted after modifying multiple frames.
KeyFrame * addNewKey()
Attempts to create a new keyframe at the current frame and layer.
void frameModified(int frameNumber)
This should be emitted after modifying the frame content.
void updateFrame()
Will call update() and update the canvas Only call this directly If you need the cache to be intact a...
void scrubbed(int frameNumber)
This should be emitted after scrubbing.
void setLayerVisibility(LayerVisibility visibility)
The visibility value should match any of the VISIBILITY enum values.
KeyFrame * addKeyFrame(int layerNumber, int frameIndex)
Attempts to create a new keyframe at the given position and layer.
QObject * parent() const const