23#include "camerafieldoption.h"
24#include "cameraeasingtype.h"
35 void loadImageAtFrame(
int frame, qreal dx, qreal dy, qreal rotate, qreal scale, CameraEasingType easing,
const QPointF& pathPoint,
bool pathMoved);
38 void loadDomElement(
const QDomElement& element,
QString dataDirPath, ProgressCallback progressStep)
override;
40 bool addKeyFrame(
int position,
KeyFrame* pKeyFrame)
override;
41 bool removeKeyFrame(
int position)
override;
43 Camera* getCameraAtFrame(
int frameNumber)
const;
44 Camera* getLastCameraAtFrame(
int frameNumber,
int increment)
const;
45 QTransform getViewAtFrame(
int frameNumber)
const;
47 QRect getViewRect()
const;
48 QSize getViewSize()
const;
49 void setViewRect(
QRect newViewRect);
52 void setShowCameraPath(
bool show) { mShowPath = show; }
53 bool getShowCameraPath()
const {
return mShowPath; }
54 void setCameraEasingAtFrame(CameraEasingType type,
int frame)
const;
55 void resetCameraAtFrame(CameraFieldOption type,
int frame)
const;
56 void updateDotColor(DotColorType color);
57 QColor getDotColor()
const {
return mDotColor; }
58 DotColorType getDotColorType()
const {
return mDotColorType; }
60 QString getInterpolationTextAtFrame(
int frame)
const;
61 QPointF getPathControlPointAtFrame(
int frame)
const;
62 bool hasSameTranslation(
int frame1,
int frame2)
const;
64 QPointF getCenteredPathPoint(
int frame)
const;
65 void updatePathControlPointAtFrame(
const QPointF& point,
int frame)
const;
66 void setPathMovedAtFrame(
int frame,
bool moved)
const;
68 void splitControlPointIfNeeded(
int frame)
const;
69 void mergeControlPointIfNeeded(
int frame)
const;
76 void linearInterpolateTransform(
Camera*);
77 qreal getInterpolationPercent(CameraEasingType type, qreal percent)
const;
84 bool mShowPath =
false;
86 DotColorType mDotColorType = DotColorType::RED;
88 const int mControlPointMergeThreshold = 2000;