-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathTimeLineWidget.h
More file actions
38 lines (30 loc) · 823 Bytes
/
TimeLineWidget.h
File metadata and controls
38 lines (30 loc) · 823 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#ifndef TIMELINEWIDGET_H
#define TIMELINEWIDGET_H
#include <QTabWidget>
#include <QPaintEvent>
#include <QVector>
#include "lib/qcustomplot.h"
namespace Ui {
class TimelineWidget;
}
class TimelineWidget : public QTabWidget
{
Q_OBJECT
public:
explicit TimelineWidget(QWidget *parent = 0);
void initView();
void paintEvent(QPaintEvent *event);
static void updatePopulation(int herbivoresPopulation, int carnivoresPopulation, unsigned int time);
~TimelineWidget();
static QVector<double> time;
static QVector<double> population;
static QVector<double> herbivoresPopulation;
static QVector<double> carnivoresPopulation;
public slots:
void updateView();
private:
Ui::TimelineWidget *ui;
QTimer * updateViewTimer;
bool isTimerStarted;
};
#endif // TIMELINEWIDGET_H