X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=events.cpp;h=ad70407bdfae7754022551e53ca601fc8e4801c6;hb=98adfa69244097657696e8e183331ebfa1d47205;hp=92ca3271188154e13e914642836052cf7592da43;hpb=756289c7b37c3e77d79b8a26096e678dccc943fa;p=pkanalytics diff --git a/events.cpp b/events.cpp index 92ca327..ad70407 100644 --- a/events.cpp +++ b/events.cpp @@ -58,7 +58,30 @@ QVariant EventsModel::data(const QModelIndex &index, int role) const return QVariant(); } } else if (index.column() == 2) { - return QString::fromUtf8(events[index.row()].type); + string type = e.type; + type[0] = toupper(e.type[0]); + for (char &ch : type) { + if (ch == '_') { + ch = ' '; + } + } + + // Various fixups. + if (type == "Pull oob") { + type = "Pull OOB"; + } else if (type == "Formation defense") { + type = "Defensive formation"; + } else if (type == "Formation offense") { + type = "Offensive formation"; + } else if (type == "Set offense") { + type = "On offense"; + } else if (type == "Set defense") { + type = "On defense"; + } else if (type == "Catch") { + type = "Catch/take"; + } + + return QString::fromUtf8(type); } return QVariant(); }