mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-26 08:33:54 -07:00
* 1/3 Add .clang-format file and travis compilation check * 2/3 Run clang-format * 3/3 Fix compilation problems due to include reordering * 3bis/3 AfterControlStatement: false
47 lines
955 B
C++
47 lines
955 B
C++
#ifndef REPLAY_TIMELINE_WIDGET
|
|
#define REPLAY_TIMELINE_WIDGET
|
|
|
|
#include <QList>
|
|
#include <QWidget>
|
|
|
|
class QPaintEvent;
|
|
class QTimer;
|
|
|
|
class ReplayTimelineWidget : public QWidget
|
|
{
|
|
Q_OBJECT
|
|
signals:
|
|
void processNextEvent();
|
|
void replayFinished();
|
|
|
|
private:
|
|
QTimer *replayTimer;
|
|
QList<int> replayTimeline;
|
|
QList<int> histogram;
|
|
static const int binLength;
|
|
int maxBinValue, maxTime;
|
|
qreal timeScaleFactor;
|
|
int currentTime;
|
|
int currentEvent;
|
|
private slots:
|
|
void replayTimerTimeout();
|
|
|
|
public:
|
|
ReplayTimelineWidget(QWidget *parent = 0);
|
|
void setTimeline(const QList<int> &_replayTimeline);
|
|
QSize sizeHint() const;
|
|
QSize minimumSizeHint() const;
|
|
void setTimeScaleFactor(qreal _timeScaleFactor);
|
|
int getCurrentEvent() const
|
|
{
|
|
return currentEvent;
|
|
}
|
|
public slots:
|
|
void startReplay();
|
|
void stopReplay();
|
|
|
|
protected:
|
|
void paintEvent(QPaintEvent *event);
|
|
};
|
|
|
|
#endif
|