X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=mainwindow.h;h=83ed90957118262b443acb0eabbfb318926acb3b;hb=6506c1cff280fa5eecc29f59de9ad21b8dddecc3;hp=a51b88bd3e7ff99f420e4f90884de883275492a7;hpb=b0bbddfe5b054eb9d40fa8b12d9f5bf86dd6dcee;p=pkanalytics diff --git a/mainwindow.h b/mainwindow.h index a51b88b..83ed909 100644 --- a/mainwindow.h +++ b/mainwindow.h @@ -6,26 +6,39 @@ #include "ui_mainwindow.h" class EventsModel; +class PlayersModel; +class FormationsModel; class MainWindow : public QMainWindow { Q_OBJECT public: - MainWindow(EventsModel *events); + 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 update_status(); + 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); + void update_player_buttons(uint64_t t); + void update_action_buttons(uint64_t t); Ui::MainWindow *ui; EventsModel *events; + PlayersModel *players; + FormationsModel *offensive_formations; + FormationsModel *defensive_formations; bool seeking = false; bool playing = true; std::optional buffered_seek; - QMediaPlayer *player; + QMediaPlayer *video; };