X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;ds=sidebyside;f=events.h;h=56fcbaff53a07ec93278b9af3a9d4bcc94794229;hb=b43930ea43a1ddd27d607b859a8539edc61bb994;hp=26524687ca3003741cd4bdbd04f184949b10df73;hpb=28ad46bcaad05cd2e55ad74977053bedd3070070;p=pkanalytics diff --git a/events.h b/events.h index 2652468..56fcbaf 100644 --- a/events.h +++ b/events.h @@ -25,8 +25,18 @@ public: QVariant headerData(int section, Qt::Orientation orientation, int role) const override; QVariant data(const QModelIndex &index, int role) const override; - int insert_event(uint64_t t, int player_id); + unsigned insert_event(uint64_t t, int player_id); // Returns the row. + void delete_event(unsigned row); void set_event_type(unsigned row, const std::string &type); + uint64_t get_time(unsigned row) { return events[row].t; } + + struct Status { + unsigned our_score, their_score; + bool offense; + unsigned num_passes; + unsigned possession_sec; + }; + Status get_status_at(uint64_t t); private: struct Player {