X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=mainwindow.h;h=9408436ae6e1e1e8a62f7f98fd62144a715d1202;hb=38bbba081db455d5f84e64bd74dcc10236fa2120;hp=9f27068b0dc5089cd710c55f0c795c2c256ae05b;hpb=776ee56ce2e268706ebd677fdf2f5ac903aa9d43;p=pkanalytics diff --git a/mainwindow.h b/mainwindow.h index 9f27068..9408436 100644 --- a/mainwindow.h +++ b/mainwindow.h @@ -7,28 +7,39 @@ 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 insert_or_change_formation(bool offense); void delete_current_event(); void make_substitution(); - void update_status(); + 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; };