Classes | |
struct | FrameState |
A structure to hold all necessary information about frame. More... | |
Signals | |
void | animationChanged () |
Public Member Functions | |
ObjectAnimation (int frameNum, FrameRange masterFrameRange, QPointF initialPos) | |
Construct a new object animation with a specified framerange and initial position. | |
FrameState | getFrameState (int frameNum) |
Perform position interpolation on the fly. | |
bool | moveKeyframe (int from_fnum, int to_fnum) |
Move a keyframe from one frame to another (likely because of a drag-and-drop operation). | |
void | setPosition (int frameNum, QPointF pos, bool visible=true) |
Insert a new keyframe at frameNumber indicating the object is at position pos. | |
void | constructContextMenu (QPoint pos, int column) |
Draw a dropdown context menu to allow users to modify the animation. | |
FrameRange | getFrameRange () const |
Get the animation framerange. | |
std::pair< QMap< int, FrameState >::const_iterator, QMap< int, FrameState > ::const_iterator > | getBoundingKeyframes (int fnum) |
Find the bounding keyframes for a given framenumber. | |
AnimationDelegate::FrameType | getFrameType (int fnum) |
QMap< int, FrameState > & | getKeyFrames () |
void | clear () |
Clear all keyframes from the keyframe storage. |
Definition at line 11 of file ObjectAnimation.qt.H.
ObjectAnimation::ObjectAnimation | ( | int | frameNum, | |
FrameRange | masterFrameRange, | |||
QPointF | initialPos | |||
) |
Construct a new object animation with a specified framerange and initial position.
The masterFrameRange parameter must be the FrameRange for the entire move so that frames can be properly mapped into the animation.
Definition at line 8 of file ObjectAnimation.qt.C.
void ObjectAnimation::clear | ( | ) |
Clear all keyframes from the keyframe storage.
Definition at line 271 of file ObjectAnimation.qt.C.
Referenced by AnnotationObject::clearAnimation(), and AnnotationObjectVertex::clearAnimation().
void ObjectAnimation::constructContextMenu | ( | QPoint | pos, | |
int | column | |||
) |
Draw a dropdown context menu to allow users to modify the animation.
Definition at line 187 of file ObjectAnimation.qt.C.
References getFrameState().
Referenced by AnnotationObject::constructAnimationContextMenu().
std::pair< QMap< int, ObjectAnimation::FrameState >::const_iterator, QMap< int, ObjectAnimation::FrameState >::const_iterator > ObjectAnimation::getBoundingKeyframes | ( | int | fnum | ) |
Find the bounding keyframes for a given framenumber.
If the requested frame is either before the first keyframe, or after the last, then both iterators in the pair will just be set to itsKeyframes.end()
Definition at line 24 of file ObjectAnimation.qt.C.
Referenced by getFrameState().
FrameRange ObjectAnimation::getFrameRange | ( | ) | const [inline] |
Get the animation framerange.
Definition at line 43 of file ObjectAnimation.qt.H.
Referenced by AnimationModel::animationChanged(), AnnotationObject::AnnotationObject(), AnimationModel::columnCount(), AnimationModel::data(), AnimationModel::dropMimeData(), AnimationModel::flags(), AnnotationObject::insertVertexAtPoint(), AnnotationObject::renderAnimation(), and AnnotationObject::setVertices().
ObjectAnimation::FrameState ObjectAnimation::getFrameState | ( | int | frameNum | ) |
Perform position interpolation on the fly.
Definition at line 57 of file ObjectAnimation.qt.C.
References getBoundingKeyframes().
Referenced by constructContextMenu(), AnnotationObject::frameChanged(), AnnotationObjectVertex::frameChanged(), AnnotationObject::getFrameState(), AnnotationObject::getVertexStates(), AnnotationObject::mouseReleaseEvent(), AnnotationObjectVertex::mouseReleaseEvent(), and AnnotationObject::renderAnimation().
bool ObjectAnimation::moveKeyframe | ( | int | from_fnum, | |
int | to_fnum | |||
) |
Move a keyframe from one frame to another (likely because of a drag-and-drop operation).
Definition at line 156 of file ObjectAnimation.qt.C.
Referenced by AnimationModel::dropMimeData().
void ObjectAnimation::setPosition | ( | int | frameNum, | |
QPointF | pos, | |||
bool | visible = true | |||
) |
Insert a new keyframe at frameNumber indicating the object is at position pos.
Definition at line 173 of file ObjectAnimation.qt.C.
Referenced by AnnotationObject::mouseReleaseEvent(), AnnotationObjectVertex::mouseReleaseEvent(), AnnotationObject::setKeyframe(), and AnnotationObjectVertex::setKeyframe().