FastTrack 6.1.0
Tracks multiples objects dealing with occlusion and identities.
Signals | Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | List of all members
Timeline Class Reference

Draw a time line with cursor, hover and marker set. More...

Inheritance diagram for Timeline:

Signals

void valueChanged (int value)
 

Public Member Functions

 Timeline (QWidget *parent=nullptr)
 
void setValue (const int index)
 Set the left cursor (left click cursor) at a given value. More...
 
void setCursorValue (const int index)
 Set the cursor at a given value. More...
 
void setMaximum (const int max)
 Set the maximum value. More...
 
void setMinimum (const int min)
 Set the minimum value, currently forced to zero. More...
 
int value ()
 Return the last left value.
 
int currentValue ()
 Return the current value.
 
void togglePlay ()
 Start/Stop the autoplay of the replay.
 

Public Attributes

int isAutoplay
 

Private Member Functions

void setLayout (const int width, const int imageNumber)
 Set the layout of the timeline. More...
 
void resizeEvent (QResizeEvent *event)
 Handle the widget redrawing when resized. More...
 
bool eventFilter (QObject *target, QEvent *event)
 Handle the pointer event, click and hover. More...
 
void drawMarker (const int index)
 Draw a line marker at a given index. More...
 
void clearMarker (const int index)
 Delete a line marker at a given index. More...
 
void update (const int index)
 Redraw the widget keeping markers and cursors. More...
 

Private Attributes

Ui::Timeline * ui
 
int m_imageNumber
 
int m_imageMin
 
int m_width
 
int m_offset
 
int m_currentIndex
 
int m_currentIndexLeft
 
int m_scale
 
QTimer * timer
 
QGraphicsScene * timelineScene
 
QGraphicsLineItem * cursor
 
QGraphicsLineItem * cursorLeft
 
QGraphicsSimpleTextItem * indexNumber
 
QList< int > markers
 

Detailed Description

Draw a time line with cursor, hover and marker set.

Author
Benjamin Gallois
Version
Revision
5.0

Contact: benja.nosp@m.min..nosp@m.gallo.nosp@m.is@f.nosp@m.asttr.nosp@m.ack..nosp@m.sh

Member Function Documentation

◆ clearMarker()

void Timeline::clearMarker ( const int  index)
private

Delete a line marker at a given index.

Parameters
[in]indexIndex.

◆ drawMarker()

void Timeline::drawMarker ( const int  index)
private

Draw a line marker at a given index.

Parameters
[in]indexIndex.

◆ eventFilter()

bool Timeline::eventFilter ( QObject *  target,
QEvent *  event 
)
private

Handle the pointer event, click and hover.

Parameters
[in]*targetPointer to the target widget.
[in]*eventPointer to the event.

◆ resizeEvent()

void Timeline::resizeEvent ( QResizeEvent *  event)
private

Handle the widget redrawing when resized.

Parameters
[in]*eventPointer to the event.

◆ setCursorValue()

void Timeline::setCursorValue ( const int  index)

Set the cursor at a given value.

Parameters
[in]indexIndex.

◆ setLayout()

void Timeline::setLayout ( const int  width,
const int  imageNumber 
)
private

Set the layout of the timeline.

Parameters
[in]widthThe width of the widget.
[in]imageNumberThe number of images.

◆ setMaximum()

void Timeline::setMaximum ( const int  max)

Set the maximum value.

Parameters
[in]maxMaximum value.

◆ setMinimum()

void Timeline::setMinimum ( const int  min)

Set the minimum value, currently forced to zero.

Parameters
[in]maxminimum value.

◆ setValue()

void Timeline::setValue ( const int  index)

Set the left cursor (left click cursor) at a given value.

Parameters
[in]indexIndex.

◆ update()

void Timeline::update ( const int  index)
private

Redraw the widget keeping markers and cursors.

Parameters
[in]indexIndex.

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