7#include "slideablelabel.h"
8#include "timelinelabel.h"
9#include "ui_timeline.h"
11#define MARKER_COLOR Qt::black
12#define BOUNDARY_COLOR Qt::black
38 explicit Timeline(QWidget *parent =
nullptr);
52 void setFrames(
const std::vector<uint> &keyframes, uint frameCount);
95 void resetBoundaries();
98 void sig_selectedChanged(uint index);
99 void sig_boundariesChanged(QPoint boundaries);
103 void highlighterMoved(
int xMovement);
104 void markerMoved(
int xMovement);
105 void sbIndexChanged(
int index);
108 void slot_totalTimelineClicked(QPoint pos);
109 void slot_zoomTimelineClicked(QPoint pos);
127 QDoubleSpinBox *m_zoomSpinBox = 0;
128 QSpinBox *m_indexSpinBox = 0;
130 QPointF getHighlighterRange();
131 void setupSpinBoxes();
132 QPixmap drawMarker(uint pixWidth, uint pixHeight, uint symbolWidth, uint symbolHeigth, uint topMargin);
136 QPixmap drawBoundary(uint pixWidth, uint pixHeight, uint symbolWidth, uint topBottomMargin,
bool isStart);
137 void positionBoundaries(uint startPos, uint endPos);
140 std::vector<uint> m_keyframes;
141 uint m_frameCount = 1;
143 bool m_selectActive =
false;
144 bool m_enableWindow =
false;
The SlideableLabel class is the label which sits on the timeline and can be moved on it.
Definition slideablelabel.h:20
The Timeline class is the class wich coordinates and manages all timeline events and elements.
Definition timeline.h:30
uint selectedFrame()
selectedFrame returns the index of the frame which is currently selected
Definition timeline.cpp:121
void selectFrame(uint index)
selectFrame moves markers to new positions
Definition timeline.cpp:127
QPoint getBoundaries()
getBoundaries gets the boundaries of the working set
Definition timeline.cpp:207
void resizeEvent(QResizeEvent *ev) override
resizeEvent redraws timeline when window resizes
Definition timeline.cpp:162
void updateHighlighterWidth()
updateHighlighterWidth redraws highlighter with new width
Definition timeline.cpp:145
void updateKeyframes(const std::vector< uint > &newKeyframes)
updateKeyframes redraws timeline with new keyframe positions
Definition timeline.cpp:64
void setFrames(const std::vector< uint > &keyframes, uint frameCount)
setFrames sets the frame
Definition timeline.cpp:109
void setEnabled(bool enable)
setEnabled en/disables the timeline
Definition timeline.cpp:175
void resize()
resize redraws the timeline when window resizes
Definition timeline.cpp:70
void setBoundaries(QPoint boundaries)
setBoundaries sets the boundaries of the working set and moves them to the desired position
Definition timeline.cpp:212
The TimelineLabel class is the background of the timeline, it displays positions of frames and keyfra...
Definition timelinelabel.h:29