]> git.sesse.net Git - pkanalytics/blobdiff - mainwindow.h
Include was d-ed in a common per-point receiver error stat.
[pkanalytics] / mainwindow.h
index 2d702c75a4d8544b2d861ec25368e71547d6b607..f7c8830b8125ba6023cbe0f6a9f7eeb01f184ac2 100644 (file)
@@ -7,13 +7,20 @@
 
 class EventsModel;
 class PlayersModel;
+class FormationsModel;
 
 class MainWindow : public QMainWindow
 {
        Q_OBJECT
 
 public:
-       MainWindow(EventsModel *events, PlayersModel *players);
+       MainWindow(EventsModel *events, PlayersModel *players,
+                  FormationsModel *offensive_formations, FormationsModel *defensive_formations);
+       ~MainWindow() {
+               if (ui && ui->video) {
+                       ui->video->stop();
+               }
+       }
 
 private:
        void position_changed(uint64_t pos);
@@ -21,8 +28,10 @@ private:
        void insert_player_event(int button_id);
        void insert_noplayer_event(const std::string &type);
        void set_current_event_type(const std::string &type);
+       void insert_or_change_formation(bool offense);
        void delete_current_event();
        void make_substitution();
+       void formation_double_clicked(bool offense, unsigned row);
 
        void update_ui_from_time(uint64_t t);
        void update_status(uint64_t t);
@@ -32,8 +41,9 @@ private:
        Ui::MainWindow *ui;
        EventsModel *events;
        PlayersModel *players;
+       FormationsModel *offensive_formations;
+       FormationsModel *defensive_formations;
        bool seeking = false;
        bool playing = true;
        std::optional<uint64_t> buffered_seek;
-       QMediaPlayer *video;
 };