Radium Engine  1.5.20
Loading...
Searching...
No Matches
Ra::Gui::Timeline Class Reference

The Timeline class provides display and management of time, as well as keyframes. More...

#include <Gui/Timeline/Timeline.hpp>

+ Collaboration diagram for Ra::Gui::Timeline:

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
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ Timeline()

Ra::Gui::Timeline::Timeline ( QWidget * parent = nullptr)
explicit

Definition at line 26 of file Timeline.cpp.

◆ ~Timeline()

Ra::Gui::Timeline::~Timeline ( )

Definition at line 130 of file Timeline.cpp.

Member Function Documentation

◆ cursorChanged

void Ra::Gui::Timeline::cursorChanged ( Scalar time)
signal

cursorChanged is emitted when user move cursor.

Parameters
timeis the new time of cursor to render in engine.

◆ detachFromEngine()

void Ra::Gui::Timeline::detachFromEngine ( )

Detach from engine signals

Definition at line 107 of file Timeline.cpp.

◆ durationChanged

void Ra::Gui::Timeline::durationChanged ( Scalar time)
signal

durationChanged is emitted when user change duration time in top right spin.

Parameters
timeis the new time for animation.

◆ endChanged

void Ra::Gui::Timeline::endChanged ( Scalar time)
signal

endChanged is emitted when user move right slider of playzone or set new value in end spin (red)

Parameters
timeis the new end time for playzone.

◆ getTime()

Scalar Ra::Gui::Timeline::getTime ( ) const
Returns
the current time.

Definition at line 286 of file Timeline.cpp.

◆ keyFrameAdded

void Ra::Gui::Timeline::keyFrameAdded ( Scalar time)
signal

keyFrameAdded is emitted when user add new keyFrame.

Parameters
timeis the time of new keyFrame, if a keyFrame is already here so signal keyFrameChanged is called.

◆ keyFrameChanged

void Ra::Gui::Timeline::keyFrameChanged ( size_t i)
signal

keyFrameChanged is emitted when user insert keyFrame in a known keyFrame position.

Parameters
iis the ith keyFrame to change.

◆ keyFrameDeleted

void Ra::Gui::Timeline::keyFrameDeleted ( size_t i)
signal

keyFrameDeleted is emitted when user remove keyFrame.

Parameters
iis the ith keyFrame to remove (chronological order).

◆ keyFrameMoved

void Ra::Gui::Timeline::keyFrameMoved ( size_t i,
Scalar time1 )
signal

keyFrameMoved is emitted when user move the keyFrame on cursor to a new position (on mouse)

Parameters
iis the index of the keyFrame.
time1is the new time of the keyFrame.

◆ keyFramesMoved

void Ra::Gui::Timeline::keyFramesMoved ( size_t first,
Scalar offset )
signal

keyFramesMoved is emitted when user move keyFrames.

Parameters
firstis the index of the first keyFrame to move.
offsetis sliding distance for moving.

◆ onChangeCursor

void Ra::Gui::Timeline::onChangeCursor ( Scalar time)
slot

onChangeCursor change cursor in timeline.

Parameters
timeis the new cursor.

Definition at line 302 of file Timeline.cpp.

+ Here is the call graph for this function:

◆ onChangeDuration

void Ra::Gui::Timeline::onChangeDuration ( Scalar time)
slot

onChangeDuration change duration in timeline.

Parameters
timeis the new duration.

Definition at line 298 of file Timeline.cpp.

◆ onChangeEnd

void Ra::Gui::Timeline::onChangeEnd ( Scalar time)
slot

onChangeEnd change end in timeline.

Parameters
timeis the new end.

Definition at line 294 of file Timeline.cpp.

◆ onChangeStart

void Ra::Gui::Timeline::onChangeStart ( Scalar time)
slot

onChangeStart change start in timeline.

Parameters
timeis the new start.

Definition at line 290 of file Timeline.cpp.

◆ onSetPlay

void Ra::Gui::Timeline::onSetPlay ( bool play)
slot

onSetPlay set play mode in timeline.

Definition at line 308 of file Timeline.cpp.

◆ registerKeyFramedValue() [1/3]

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.

+ Here is the call graph for this function:

◆ registerKeyFramedValue() [2/3]

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.

+ Here is the call graph for this function:

◆ registerKeyFramedValue() [3/3]

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.

+ Here is the call graph for this function:

◆ resizeEvent()

void Ra::Gui::Timeline::resizeEvent ( QResizeEvent * ev)
overrideprotected

Definition at line 313 of file Timeline.cpp.

◆ selectionChanged()

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.

+ Here is the call graph for this function:

◆ startChanged

void Ra::Gui::Timeline::startChanged ( Scalar time)
signal

startChanged is emitted when user move left slider of playzone or set new value in start spin (green)

Parameters
timeis the new start time for playzone.

◆ unregisterKeyFramedValue() [1/3]

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.

+ Here is the call graph for this function:

◆ unregisterKeyFramedValue() [2/3]

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.

+ Here is the call graph for this function:

◆ unregisterKeyFramedValue() [3/3]

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.

+ Here is the call graph for this function:

The documentation for this class was generated from the following files: