forked from lsk-china/FaceRec
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mainwindow.cpp
40 lines (35 loc) · 1009 Bytes
/
mainwindow.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
#include "mainwindow.h"
#include "ui_mainwindow.h"
MainWindow::MainWindow(QWidget *parent)
: QMainWindow(parent)
, ui(new Ui::MainWindow)
{
Database::getInstace();
Recognizer::getInstance();
ui->setupUi(this);
this->facePickFrame = new FacePickFrame(this, nullptr);
this->faceRecFrame = new FaceRecFrame(this, nullptr);
connect(this->ui->pushButton_3, &QPushButton::clicked, this, &QCoreApplication::quit);
connect(this->ui->pushButton, &QPushButton::clicked, this, [this]() {
this->hide();
this->facePickFrame->show();
});
connect(this->ui->pushButton_2, &QPushButton::clicked, this, [this]() {
this->hide();
this->faceRecFrame->show();
});
}
Recognizer *MainWindow::getRecognizer() {
return this->recognizer;
}
Database *MainWindow::getDatabase() {
return this->database;
}
MainWindow::~MainWindow()
{
delete recognizer;
delete database;
delete ui;
delete facePickFrame;
delete faceRecFrame;
}