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

#include <Gui/Timeline/TimelineFrameSelector.hpp>

+ Collaboration diagram for Ra::Gui::TimelineFrameSelector:

Public Slots

void onAddingKeyFrame (Scalar time=-1.0, bool internal=true)
 
void onDeletingKeyFrame (bool internal=true)
 
void onMoveKeyFrame (Scalar time0, Scalar time1, bool internal=true)
 
void onMoveKeyFrames (Scalar time, Scalar offset, bool internal=true)
 
void onClearKeyFrames ()
 

Signals

void startChanged (Scalar time)
 
void endChanged (Scalar time)
 
void durationChanged (Scalar time)
 
void cursorChanged (Scalar time)
 
void keyFrameAdded (Scalar time)
 
void keyFrameDeleted (size_t i)
 
void keyFrameChanged (size_t i)
 
void keyFrameMoved (size_t i, Scalar time1)
 
void keyFramesMoved (size_t first, Scalar offset)
 

Public Member Functions

 TimelineFrameSelector (QWidget *parent=nullptr)
 
void setTimelineUi (Ui::Timeline *ui)
 Registers the Timeline's UI for update.
 
void onChangeStart (Scalar time, bool internal=true)
 
void onChangeEnd (Scalar time, bool internal=true)
 
void onChangeDuration (Scalar time, bool internal=true)
 
void onChangeCursor (Scalar time, bool internal=true)
 

Protected Member Functions

virtual void paintEvent (QPaintEvent *event) override
 
void mousePressEvent (QMouseEvent *event) override
 
void mouseMoveEvent (QMouseEvent *event) override
 
void mouseReleaseEvent (QMouseEvent *event) override
 

Detailed Description

The TimelineFrameSelector manages the display of keyframes in the Timeline. It also manages the update of the Timeline UI.

Definition at line 23 of file TimelineFrameSelector.hpp.

Constructor & Destructor Documentation

◆ TimelineFrameSelector()

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

Definition at line 15 of file TimelineFrameSelector.cpp.

◆ ~TimelineFrameSelector()

Ra::Gui::TimelineFrameSelector::~TimelineFrameSelector ( )
override

Definition at line 20 of file TimelineFrameSelector.cpp.

Member Function Documentation

◆ cursorChanged

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

Emitted when the playzone current time has been changed though

  • the user changing the current time of the Timeline's playzone,
  • the user offsetting a set of KeyFrames,
  • the user deleting an entire timezone.

◆ durationChanged

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

Emitted when the playzone duration has been changed though an internal call to onChangeDuration().

◆ endChanged

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

Emitted when the playzone end has been changed though

  • the user changing the end point of the Timeline's playzone,
  • the user offsetting a set of KeyFrames,
  • the user deleting an entire timezone containing the playzone end.

◆ keyFrameAdded

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

Emitted when a KeyFrame has been added through an internal call to onAddingKeyFrame().

◆ keyFrameChanged

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

Emitted when a KeyFrame has been added through an internal call to onAddingKeyFrame().

◆ keyFrameDeleted

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

Emitted when a KeyFrame has been deleted through

  • the user deleting a single KeyFrame.
  • the user deleting an entire timezone containing a KeyFrame.
    Note
    Emitted for each suppressed KeyFrame.

◆ keyFrameMoved

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

Emitted when a KeyFrame has been added through an internal call to onMoveKeyFrame().

◆ keyFramesMoved

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

Emitted when a KeyFrame has been added through

  • the user offsetting a set of keyframes.
  • the user deleting an entire timezone preceding KeyFrames.

◆ mouseMoveEvent()

void Ra::Gui::TimelineFrameSelector::mouseMoveEvent ( QMouseEvent * event)
overrideprotected

Definition at line 525 of file TimelineFrameSelector.cpp.

◆ mousePressEvent()

void Ra::Gui::TimelineFrameSelector::mousePressEvent ( QMouseEvent * event)
overrideprotected

Definition at line 444 of file TimelineFrameSelector.cpp.

◆ mouseReleaseEvent()

void Ra::Gui::TimelineFrameSelector::mouseReleaseEvent ( QMouseEvent * event)
overrideprotected

Definition at line 536 of file TimelineFrameSelector.cpp.

◆ onAddingKeyFrame

void Ra::Gui::TimelineFrameSelector::onAddingKeyFrame ( Scalar time = -1.0,
bool internal = true )
slot

Adds a KeyFrame at the given time.

Parameters
timethe time to add a KeyFrame at.
internalwhether the call has been made internally by the Timeline, e.g. through the UI; or externally, e.g. by setting Keyrames in the Timeline.
Note
If time is set to its default value, then it is considered as the current time.
If there already is a KeyFrame at time time, then it will be replaced, and the KeyFrame display will Flash.
If internal is set to true:

Definition at line 202 of file TimelineFrameSelector.cpp.

+ Here is the call graph for this function:

◆ onChangeCursor()

void Ra::Gui::TimelineFrameSelector::onChangeCursor ( Scalar time,
bool internal = true )

Set the current time of the Timeline's playzone to the given time.

Parameters
timethe new current time.
internalwhether the call has been made internally by the Timeline, e.g. through the UI; or externally through Timeline::onChangeEnd().
Note
If internal is set to true, the signal cursorChanged() will be emitted.

Definition at line 183 of file TimelineFrameSelector.cpp.

+ Here is the call graph for this function:

◆ onChangeDuration()

void Ra::Gui::TimelineFrameSelector::onChangeDuration ( Scalar time,
bool internal = true )

Set the duration of the Timeline's playzone.

Parameters
timethe new duration.
internalwhether the call has been made internally by the Timeline, e.g. through the UI; or externally through Timeline::onChangeDuration().
Note
If internal is set to true, the signal durationChanged() will be emitted.

Definition at line 155 of file TimelineFrameSelector.cpp.

+ Here is the call graph for this function:

◆ onChangeEnd()

void Ra::Gui::TimelineFrameSelector::onChangeEnd ( Scalar time,
bool internal = true )

Sets the end point of the Timeline's playzone to the given time.

Parameters
timethe new end point.
internalwhether the call has been made internally by the Timeline, e.g. through the UI; or externally through Timeline::onChangeEnd().
Note
If internal is set to true, the signal endChanged() will be emitted.

Definition at line 136 of file TimelineFrameSelector.cpp.

+ Here is the call graph for this function:

◆ onChangeStart()

void Ra::Gui::TimelineFrameSelector::onChangeStart ( Scalar time,
bool internal = true )

Sets the start point of the Timeline's playzone to the given time.

Parameters
timethe new start point.
internalwhether the call has been made internally by the Timeline, e.g. through the UI; or externally through Timeline::onChangeStart().
Note
If internal is set to true, the signal startChanged() will be emitted.

Definition at line 117 of file TimelineFrameSelector.cpp.

+ Here is the call graph for this function:

◆ onClearKeyFrames

void Ra::Gui::TimelineFrameSelector::onClearKeyFrames ( )
slot

Removes all KeyFrames.

Definition at line 324 of file TimelineFrameSelector.cpp.

◆ onDeletingKeyFrame

void Ra::Gui::TimelineFrameSelector::onDeletingKeyFrame ( bool internal = true)
slot

Removes the KeyFrame at the current time, if any.

Parameters
internalwhether the call has been made internally by the Timeline, e.g. through the UI; or externally.
Note
If internal is set to true, the signal keyFrameDeleted() will be emitted if a KeyFrame has been effectively removed.

Definition at line 236 of file TimelineFrameSelector.cpp.

+ Here is the call graph for this function:

◆ onMoveKeyFrame

void Ra::Gui::TimelineFrameSelector::onMoveKeyFrame ( Scalar time0,
Scalar time1,
bool internal = true )
slot

Removes the KeyFrame at time time0 and adds a new one at time time1.

Parameters
time0the time to remove the KeyFrame at.
time1the time to add the KeyFrame at.
internalwhether the call has been made internally by the Timeline, e.g. through the UI; or externally.
Note
If time0 == time1, does nothing.
If internal is set to true, the signal keyFrameMoved() will be emitted if the KeyFrame has been effectively moved.

Definition at line 253 of file TimelineFrameSelector.cpp.

+ Here is the call graph for this function:

◆ onMoveKeyFrames

void Ra::Gui::TimelineFrameSelector::onMoveKeyFrames ( Scalar time,
Scalar offset,
bool internal = true )
slot

Offsets the KeyFrames after time time of an offsets offset.

Parameters
timethe time from which to offset KeyFrames.
offsetthe offset to offset KeyFrames of.
internalwhether the call has been made internally by the Timeline, e.g. through the UI; or externally .
Note
If offset == 0, or time has no KeyFrame, does nothing.
If internal is set to true, the signal keyFramesMoved() will be emitted if the KeyFrames have been effectively moved.
If offset is negative and offsetting the KeyFrame at time covers the start point of the Timeline's playzone, this one is offset too. In this case, if internal is set to true, the signal startChanged() will be emitted.
If offsetting the last KeyFrame overtakes the duration, this one comes along. In this case, if internal is set to true, the signal durationChanged() will be emitted.
If time comes before the end point of the Timeline's playzone, this one will be offset too. In this case, if internal is set to true, the signal endChanged() will be emitted.
If offset is negative and offsetting the KeyFrame at time covers the current time, this one will be offset too. In this case, if internal is set to true, the signal cursorChanged() will be emitted.

Definition at line 274 of file TimelineFrameSelector.cpp.

+ Here is the call graph for this function:

◆ paintEvent()

void Ra::Gui::TimelineFrameSelector::paintEvent ( QPaintEvent * event)
overrideprotectedvirtual

Definition at line 374 of file TimelineFrameSelector.cpp.

◆ setTimelineUi()

void Ra::Gui::TimelineFrameSelector::setTimelineUi ( Ui::Timeline * ui)

Registers the Timeline's UI for update.

Definition at line 24 of file TimelineFrameSelector.cpp.

◆ startChanged

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

Emitted when the playzone start has been changed though

  • the user changing the start point of the Timeline's playzone,
  • the user offsetting a set of KeyFrames,
  • the user deleting an entire timezone containing the playzone start.

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