]> git.sesse.net Git - pkanalytics/blobdiff - events.h
Make it possible to sub (in/out events only, no real effect).
[pkanalytics] / events.h
index 910e2b92a6517ad88803e16b9b42a405fa010e9a..946ebb543b2dc7db95a6bb4461f1df3c35cdd205 100644 (file)
--- a/events.h
+++ b/events.h
@@ -7,6 +7,7 @@
 #include <map>
 #include <vector>
 #include <optional>
+#include <set>
 
 class EventsModel : public QAbstractTableModel
 {
@@ -24,7 +25,7 @@ public:
        QVariant headerData(int section, Qt::Orientation orientation, int role) const override;
        QVariant data(const QModelIndex &index, int role) const override;
 
-       unsigned insert_event(uint64_t t, int player_id);  // Returns the row.
+       unsigned insert_event(uint64_t t, int player_id, const std::string &type = "unknown");  // 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; }
@@ -36,6 +37,7 @@ public:
                unsigned possession_sec;
        };
        Status get_status_at(uint64_t t);
+       std::set<int> get_team_at(uint64_t t);
 
 private:
        struct Player {