6#include <QGraphicsLineItem>
7#include <QGraphicsRectItem>
8#include <QGraphicsScene>
9#include <QGraphicsSimpleTextItem>
10#include <QKeySequence>
26class Timeline :
public QWidget {
30 Timeline(QWidget *parent =
nullptr);
31 Timeline(
const Timeline &T) =
delete;
32 Timeline &operator=(
const Timeline &T) =
delete;
33 Timeline &operator=(Timeline &&T) =
delete;
34 Timeline(Timeline &&T) =
delete;
53 int m_currentIndexLeft;
57 QGraphicsScene *timelineScene;
58 QGraphicsLineItem *cursor;
59 QGraphicsLineItem *cursorLeft;
60 QGraphicsSimpleTextItem *indexNumber;
64 void setLayout(
const int width,
const int imageNumber);
66 bool eventFilter(QObject *target, QEvent *event)
override;
69 void update(
const int index);
72 void valueChanged(
int value);
void update(const int index)
Redraw the widget keeping markers and cursors.
Definition timeline.cpp:211
void setMaximum(const int max)
Set the maximum value.
Definition timeline.cpp:281
void setMinimum(const int min)
Set the minimum value, currently forced to zero.
Definition timeline.cpp:289
void setCursorValue(const int index)
Set the cursor at a given value.
Definition timeline.cpp:226
void drawMarker(const int index)
Draw a line marker at a given index.
Definition timeline.cpp:191
bool eventFilter(QObject *target, QEvent *event) override
Handle the pointer event, click and hover.
Definition timeline.cpp:139
void setValue(const int index)
Set the left cursor (left click cursor) at a given value.
Definition timeline.cpp:246
int value()
Return the last left value.
Definition timeline.cpp:266
void setLayout(const int width, const int imageNumber)
Set the layout of the timeline.
Definition timeline.cpp:90
void clearMarker(const int index)
Delete a line marker at a given index.
Definition timeline.cpp:202
int currentValue()
Return the current value.
Definition timeline.cpp:273
void togglePlay()
Start/Stop the autoplay of the replay.
Definition timeline.cpp:296
void resizeEvent(QResizeEvent *event) override
Handle the widget redrawing when resized.
Definition timeline.cpp:130