]> git.sesse.net Git - pkanalytics/blobdiff - mainwindow.h
Show formation name in the status bar.
[pkanalytics] / mainwindow.h
index 805fb125f6c2dc7a056889488cf3c9d2f7777b42..83ed90957118262b443acb0eabbfb318926acb3b 100644 (file)
@@ -7,22 +7,25 @@
 
 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);
 
 private:
        void position_changed(uint64_t pos);
        void seek(int64_t delta_ms);
-       void insert_event(int button_id);
+       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 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,6 +35,8 @@ 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;