]> git.sesse.net Git - nageru/blob - mainwindow.cpp
Start working on a clip list.
[nageru] / mainwindow.cpp
1 #include "mainwindow.h"
2
3 #include "clip_list.h"
4 #include "ui_mainwindow.h"
5
6 #include <string>
7 #include <vector>
8
9 #include <QShortcut>
10
11 using namespace std;
12
13 MainWindow *global_mainwindow = nullptr;
14
15 MainWindow::MainWindow()
16         : ui(new Ui::MainWindow)
17 {
18         global_mainwindow = this;
19         ui->setupUi(this);
20
21         ClipList *clips = new ClipList;
22         ui->clip_list->setModel(clips);
23
24         QShortcut *shortcut = new QShortcut(QKeySequence(Qt::Key_Q), this);
25         connect(shortcut, &QShortcut::activated, [clips]{
26                 clips->add_clip(12345);
27         });
28 }