#include "ui_mainwindow.h"
#include "events.h"
#include "players.h"
+#include "json.h"
using namespace std;
QShortcut *pgup = new QShortcut(QKeySequence(Qt::Key_PageUp), this);
connect(pgup, &QShortcut::activated, [this]() { seek(120000); });
+ // Ugh. Used when Qt messes up and hangs the video.
+ QShortcut *f5 = new QShortcut(QKeySequence(Qt::Key_F5), this);
+ connect(f5, &QShortcut::activated, [this]() {
+ QVideoWidget *nvw = new QVideoWidget(ui->video->parentWidget());
+ nvw->setObjectName("video");
+ nvw->setMinimumSize(QSize(320, 240));
+ video->setVideoOutput(nvw);
+ ui->main_grid->replaceWidget(ui->video, nvw);
+ ui->video = nvw;
+ });
+
connect(ui->minus10s, &QPushButton::clicked, [this]() { seek(-10000); });
connect(ui->plus10s, &QPushButton::clicked, [this]() { seek(10000); });
QApplication app(argc, argv);
sqlite3 *db = open_db("ultimate.db");
+ // TODO: do this on-demand instead, from a menu
+ export_to_json(db, "ultimate.json");
+
int requested_match = -1;
if (argc >= 2) {
requested_match = atoi(argv[1]);