]> git.sesse.net Git - pkanalytics/blob - mainwindow.h
Make it possible to delete 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 seek(int64_t delta_ms);
20         void set_current_event_type(const std::string &type);
21         void delete_current_event();
22
23         Ui::MainWindow *ui;
24         EventsModel *model;
25         bool seeking = false;
26         bool playing = true;
27         std::optional<uint64_t> buffered_seek;
28         QMediaPlayer *player;
29 };