]> git.sesse.net Git - pkanalytics/blob - mainwindow.h
Update the status bar from the events.
[pkanalytics] / mainwindow.h
1 #include <QMediaPlayer>
2 #include <QMainWindow>
3 #include <QApplication>
4 #include <stdint.h>
5 #include <optional>
6 #include "ui_mainwindow.h"
7
8 class EventsModel;
9
10 class MainWindow : public QMainWindow
11 {
12         Q_OBJECT
13
14 public:
15         MainWindow();
16         void setModel(EventsModel *model);
17
18 private:
19         void position_changed(uint64_t pos);
20         void seek(int64_t delta_ms);
21         void set_current_event_type(const std::string &type);
22         void delete_current_event();
23         void update_status();
24
25         Ui::MainWindow *ui;
26         EventsModel *model;
27         bool seeking = false;
28         bool playing = true;
29         std::optional<uint64_t> buffered_seek;
30         QMediaPlayer *player;
31 };