forked from tiendan/OpenGazer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDebugWindow.cpp
41 lines (30 loc) · 1.36 KB
/
DebugWindow.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#include <QObject>
#include <QShortcut>
#include <QString>
#include "DebugWindow.h"
#include "Application.h"
DebugWindow::DebugWindow() :
_window(1, true) // Create this window in the debug screen
{
screenImage.create(cv::Size(_window.size().width(), _window.size().height()), CV_8UC3);
QShortcut *shortcut = new QShortcut(QKeySequence(Qt::Key_C), &_window);
QObject::connect(shortcut, SIGNAL(activated()), Application::Components::mainTracker, SLOT(startCalibration()));
shortcut = new QShortcut(QKeySequence(Qt::Key_T), &_window);
QObject::connect(shortcut, SIGNAL(activated()), Application::Components::mainTracker, SLOT(startTesting()));
shortcut = new QShortcut(QKeySequence(Qt::Key_X), &_window);
QObject::connect(shortcut, SIGNAL(activated()), Application::Components::mainTracker, SLOT(choosePoints()));
shortcut = new QShortcut(QKeySequence(Qt::Key_Z), &_window);
QObject::connect(shortcut, SIGNAL(activated()), Application::Components::mainTracker, SLOT(clearPoints()));
_window.show();
_window.raise();
}
DebugWindow::~DebugWindow() {}
// Main processing function
void DebugWindow::display() {
_window.showImage(Application::Components::videoInput->debugFrame);
_window.setWindowTitle("Opengazer (" + QString::number(Application::Components::videoInput->frameRate, 'g', 4) + " fps)");
}
void DebugWindow::raise() {
_window.show();
_window.raise();
}