iVS3D v2.0.0
Loading...
Searching...
No Matches
TimelineLabel Class Reference

The TimelineLabel class is the background of the timeline, it displays positions of frames and keyframes. More...

#include <timelinelabel.h>

Inheritance diagram for TimelineLabel:

Public Member Functions

 TimelineLabel (QWidget *parent=0)
 TimelineLabel empty constructor.
 
void updateTimelinelabel (std::vector< uint > *keyframes, QPointF indexBounds, bool drawTimestamps, QPoint boundaries=QPoint(-1,-1))
 adjustTimeline sets atributtes and redraws TimelineLabel
 
float relPosToIndex (int relativePosition)
 relPosToIndex returns the respective index as float number to the relative position the timelinelabel
 
uint indexToRelPos (float index)
 indexToRelPos returns the relative position which correspondes to the global index (firstIndex computation is involved in function)
 
uint getFirstIndex ()
 getFirstIndex gets the index of the first diplayed frame
 
uint getLastIndex ()
 getLastIndexgets the index of the last diplayed frame
 
void redraw (QPoint boundaries=QPoint(-1, -1))
 redraw redraws entire label
 
void mousePressEvent (QMouseEvent *ev)
 mousePressEvent signals a mousepress event
 

Detailed Description

The TimelineLabel class is the background of the timeline, it displays positions of frames and keyframes.

Author
Dominic Zahn
Date
2021/04/12

Constructor & Destructor Documentation

◆ TimelineLabel()

TimelineLabel::TimelineLabel ( QWidget *  parent = 0)
explicit

TimelineLabel empty constructor.

Parameters
parentparent

Member Function Documentation

◆ getFirstIndex()

uint TimelineLabel::getFirstIndex ( )

getFirstIndex gets the index of the first diplayed frame

Returns
first index

◆ getLastIndex()

uint TimelineLabel::getLastIndex ( )

getLastIndexgets the index of the last diplayed frame

Returns
last index

◆ indexToRelPos()

uint TimelineLabel::indexToRelPos ( float  index)

indexToRelPos returns the relative position which correspondes to the global index (firstIndex computation is involved in function)

Parameters
indexas a float number to also represent a position between two frames
Returns
relative position on the timelinelinelabel in pixels

◆ mousePressEvent()

void TimelineLabel::mousePressEvent ( QMouseEvent *  ev)

mousePressEvent signals a mousepress event

Parameters
evthe event

◆ redraw()

void TimelineLabel::redraw ( QPoint  boundaries = QPoint(-1, -1))

redraw redraws entire label

Parameters
(optional)boundaries defines which frames are defined as out of bound and should be colored diffrent

◆ relPosToIndex()

float TimelineLabel::relPosToIndex ( int  relativePosition)

relPosToIndex returns the respective index as float number to the relative position the timelinelabel

Parameters
relativePositionon the timelinelinelabel in pixels
Returns
index as a float number to also represent a position between two frames

◆ updateTimelinelabel()

void TimelineLabel::updateTimelinelabel ( std::vector< uint > *  keyframes,
QPointF  indexBounds,
bool  drawTimestamps,
QPoint  boundaries = QPoint(-1,-1) 
)

adjustTimeline sets atributtes and redraws TimelineLabel

Parameters
keyframesnew keayframes
indexBoundsrepresents the bounds of the timelinelabel in form of indices. They can be represented as floads so that the first and last displayed frame has an offset to its boundarie.
(optional)boundaries defines which keyframelines will be outside of the bound and will color them diffrent
drawTimestampsshould timestamps be drawn

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