]> git.sesse.net Git - pkanalytics/blobdiff - events.h
Make it possible to seek to an event by clicking on it.
[pkanalytics] / events.h
index 26524687ca3003741cd4bdbd04f184949b10df73..56fcbaff53a07ec93278b9af3a9d4bcc94794229 100644 (file)
--- 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 {