Radium Engine
1.5.20
|
The Timeline class provides display and management of time, as well as keyframes. More...
#include <Gui/Timeline/Timeline.hpp>
Public Slots | |
void | onChangeStart (Scalar time) |
onChangeStart change start in timeline. | |
void | onChangeEnd (Scalar time) |
onChangeEnd change end in timeline. | |
void | onChangeDuration (Scalar time) |
onChangeDuration change duration in timeline. | |
void | onChangeCursor (Scalar time) |
onChangeCursor change cursor in timeline. | |
void | onSetPlay (bool play) |
onSetPlay set play mode in timeline. | |
Signals | |
void | startChanged (Scalar time) |
startChanged is emitted when user move left slider of playzone or set new value in start spin (green) | |
void | endChanged (Scalar time) |
endChanged is emitted when user move right slider of playzone or set new value in end spin (red) | |
void | cursorChanged (Scalar time) |
cursorChanged is emitted when user move cursor. | |
void | durationChanged (Scalar time) |
durationChanged is emitted when user change duration time in top right spin. | |
void | playClicked (bool play) |
playClicked is emitted when user click on play button. | |
void | setPingPong (bool) |
setPingPong is emitted when user click on PingPong button. | |
void | keyFrameAdded (Scalar time) |
keyFrameAdded is emitted when user add new keyFrame. | |
void | keyFrameDeleted (size_t i) |
keyFrameDeleted is emitted when user remove keyFrame. | |
void | keyFrameChanged (size_t i) |
keyFrameChanged is emitted when user insert keyFrame in a known keyFrame position. | |
void | keyFrameMoved (size_t i, Scalar time1) |
keyFrameMoved is emitted when user move the keyFrame on cursor to a new position (on mouse) | |
void | keyFramesMoved (size_t first, Scalar offset) |
keyFramesMoved is emitted when user move keyFrames. | |
Public Member Functions | |
Timeline (QWidget *parent=nullptr) | |
void | selectionChanged (const Ra::Engine::Scene::ItemEntry &ent) |
void | registerKeyFramedValue (Ra::Engine::Scene::Entity *ent, const Ra::Core::Animation::KeyFramedValueController &keyFramedValueController) |
void | unregisterKeyFramedValue (Ra::Engine::Scene::Entity *ent, const std::string &name) |
void | registerKeyFramedValue (Ra::Engine::Scene::Component *comp, const Ra::Core::Animation::KeyFramedValueController &keyFramedValueController) |
void | unregisterKeyFramedValue (Ra::Engine::Scene::Component *comp, const std::string &name) |
void | registerKeyFramedValue (Ra::Core::Utils::Index roIdx, const Ra::Core::Animation::KeyFramedValueController &keyFramedValueController) |
void | unregisterKeyFramedValue (Ra::Core::Utils::Index roIdx, const std::string &name) |
Scalar | getTime () const |
void | detachFromEngine () |
Protected Member Functions | |
void | resizeEvent (QResizeEvent *ev) override |
The Timeline class provides display and management of time, as well as keyframes.
The Timeline is to be linked to the TimeSystem in the RadiumEngine through the application's MainWindow.
Doing so, time manipulations from the user can be done through the timeline, such as play, pause and reset animations or simulations, but also going to a given point in time.
Regarding KeyFramedValues, the Timeline provides their editing / manipulation. To do so, KeyFramedValues must be registered into the Timeline, which can be done using the registerKeyFramedValue methods (see the related Documentation page ).
Initial implementation from https://github.com/hiergaut/AnimTimeline.git Gauthier Bouyjou (email gauth.nosp@m.ierb.nosp@m.ouyjo.nosp@m.u@ao.nosp@m.l.com), april 2019.
Definition at line 37 of file Timeline.hpp.
|
explicit |
Definition at line 26 of file Timeline.cpp.
Ra::Gui::Timeline::~Timeline | ( | ) |
Definition at line 130 of file Timeline.cpp.
|
signal |
cursorChanged is emitted when user move cursor.
time | is the new time of cursor to render in engine. |
void Ra::Gui::Timeline::detachFromEngine | ( | ) |
Detach from engine signals
Definition at line 107 of file Timeline.cpp.
|
signal |
durationChanged is emitted when user change duration time in top right spin.
time | is the new time for animation. |
|
signal |
endChanged is emitted when user move right slider of playzone or set new value in end spin (red)
time | is the new end time for playzone. |
Scalar Ra::Gui::Timeline::getTime | ( | ) | const |
Definition at line 286 of file Timeline.cpp.
|
signal |
keyFrameAdded is emitted when user add new keyFrame.
time | is the time of new keyFrame, if a keyFrame is already here so signal keyFrameChanged is called. |
|
signal |
keyFrameChanged is emitted when user insert keyFrame in a known keyFrame position.
i | is the ith keyFrame to change. |
|
signal |
keyFrameDeleted is emitted when user remove keyFrame.
i | is the ith keyFrame to remove (chronological order). |
|
signal |
keyFrameMoved is emitted when user move the keyFrame on cursor to a new position (on mouse)
i | is the index of the keyFrame. |
time1 | is the new time of the keyFrame. |
|
signal |
keyFramesMoved is emitted when user move keyFrames.
first | is the index of the first keyFrame to move. |
offset | is sliding distance for moving. |
|
slot |
onChangeCursor change cursor in timeline.
time | is the new cursor. |
Definition at line 302 of file Timeline.cpp.
|
slot |
onChangeDuration change duration in timeline.
time | is the new duration. |
Definition at line 298 of file Timeline.cpp.
|
slot |
onChangeEnd change end in timeline.
time | is the new end. |
Definition at line 294 of file Timeline.cpp.
|
slot |
onChangeStart change start in timeline.
time | is the new start. |
Definition at line 290 of file Timeline.cpp.
|
slot |
onSetPlay set play mode in timeline.
Definition at line 308 of file Timeline.cpp.
void Ra::Gui::Timeline::registerKeyFramedValue | ( | Ra::Core::Utils::Index | roIdx, |
const Ra::Core::Animation::KeyFramedValueController & | keyFramedValueController ) |
Registers value
as a new KeyFramedValue for roIdx
with the given name.
Definition at line 257 of file Timeline.cpp.
void Ra::Gui::Timeline::registerKeyFramedValue | ( | Ra::Engine::Scene::Component * | comp, |
const Ra::Core::Animation::KeyFramedValueController & | keyFramedValueController ) |
Registers value
as a new KeyFramedValue for comp
with the given name.
Definition at line 230 of file Timeline.cpp.
void Ra::Gui::Timeline::registerKeyFramedValue | ( | Ra::Engine::Scene::Entity * | ent, |
const Ra::Core::Animation::KeyFramedValueController & | keyFramedValueController ) |
Registers value
as a new KeyFramedValue for ent
with the given name.
Definition at line 204 of file Timeline.cpp.
|
overrideprotected |
Definition at line 313 of file Timeline.cpp.
void Ra::Gui::Timeline::selectionChanged | ( | const Ra::Engine::Scene::ItemEntry & | ent | ) |
Updates the keyframes display according to ent
.
Definition at line 135 of file Timeline.cpp.
|
signal |
startChanged is emitted when user move left slider of playzone or set new value in start spin (green)
time | is the new start time for playzone. |
void Ra::Gui::Timeline::unregisterKeyFramedValue | ( | Ra::Core::Utils::Index | roIdx, |
const std::string & | name ) |
Unregisters the KeyFramedValue for roIdx
with the given name.
Definition at line 278 of file Timeline.cpp.
void Ra::Gui::Timeline::unregisterKeyFramedValue | ( | Ra::Engine::Scene::Component * | comp, |
const std::string & | name ) |
Unregisters the KeyFramedValue for comp
with the given name.
Definition at line 248 of file Timeline.cpp.
void Ra::Gui::Timeline::unregisterKeyFramedValue | ( | Ra::Engine::Scene::Entity * | ent, |
const std::string & | name ) |
Unregisters the KeyFramedValue for ent
with the given name.
Definition at line 222 of file Timeline.cpp.