23#include "camerafieldoption.h"
24#include "cameraeasingtype.h"
36 void loadImageAtFrame(
int frame, qreal dx, qreal dy, qreal rotate, qreal scale, CameraEasingType easing,
const QPointF& pathPoint,
bool pathMoved);
39 void loadDomElement(
const QDomElement& element,
QString dataDirPath, ProgressCallback progressStep)
override;
42 bool removeKeyFrame(
int position)
override;
43 void replaceKeyFrame(
const KeyFrame* camera)
override;
45 Camera* getCameraAtFrame(
int frameNumber)
const;
46 Camera* getLastCameraAtFrame(
int frameNumber,
int increment)
const;
47 QTransform getViewAtFrame(
int frameNumber)
const;
49 QRect getViewRect()
const;
50 QSize getViewSize()
const;
51 void setViewRect(
QRect newViewRect);
54 void setShowCameraPath(
bool show) { mShowPath = show; }
55 bool getShowCameraPath()
const {
return mShowPath; }
56 void setCameraEasingAtFrame(CameraEasingType type,
int frame)
const;
57 void resetCameraAtFrame(CameraFieldOption type,
int frame)
const;
58 void updateDotColor(DotColorType color);
59 QColor getDotColor()
const {
return mDotColor; }
60 DotColorType getDotColorType()
const {
return mDotColorType; }
62 QString getInterpolationTextAtFrame(
int frame)
const;
63 QPointF getPathControlPointAtFrame(
int frame)
const;
64 bool hasSameTranslation(
int frame1,
int frame2)
const;
66 QPointF getCenteredPathPoint(
int frame)
const;
67 void updatePathControlPointAtFrame(
const QPointF& point,
int frame)
const;
68 void setPathMovedAtFrame(
int frame,
bool moved)
const;
70 void splitControlPointIfNeeded(
int frame)
const;
71 void mergeControlPointIfNeeded(
int frame)
const;
75 KeyFrame* createKeyFrame(
int position)
override;
78 void linearInterpolateTransform(
Camera*);
79 qreal getInterpolationPercent(CameraEasingType type, qreal percent)
const;
86 bool mShowPath =
false;
88 DotColorType mDotColorType = DotColorType::RED;
90 const int mControlPointMergeThreshold = 2000;
bool addKeyFrame(int position, KeyFrame *pKeyFrame) override
Adds a keyframe at the given position, unless one already exists.