-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmain.cpp
More file actions
42 lines (35 loc) · 1.52 KB
/
main.cpp
File metadata and controls
42 lines (35 loc) · 1.52 KB
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
41
42
#include <clocale>
#include <QApplication>
#include <QMessageBox>
#include "biotracker/settings/Messages.h"
#include "biotracker/settings/Settings.h"
#include "biotracker/settings/SystemCompatibilityCheck.h"
#include "../Gui.h"
#include "biotracker/util/stdext.h"
int main(int argc, char *argv[]) {
QApplication app(argc, argv);
// workaround for cereal issue 144
// see: https://github.com/USCiLab/cereal/issues/144
std::setlocale(LC_NUMERIC, "C");
// meta types
qRegisterMetaType<cv::Mat>("cv::Mat");
qRegisterMetaType<BioTracker::Core::Messages::MessageType>("BioTracker::Core::Messages::MessageType");
qRegisterMetaType<BioTracker::Core::Messages::MessageType>("MessageType");
qRegisterMetaType<std::string>("std::string");
qRegisterMetaType<std::size_t>("std::size_t");
qRegisterMetaType<size_t>("size_t");
qRegisterMetaType<BioTracker::Core::TrackerType>("TrackerType");
if (SystemCompatibilityCheck::checkOpenGLSupport()) {
app.setOrganizationName("Biorobotics Lab / FU Berlin");
app.setApplicationName("BioTracker");
BioTracker::Gui::Gui w;
return app.exec();
} else {
static const std::string title = BioTracker::Core::Messages::System::APPLICATION_CANNOT_START;
static const std::string msg = BioTracker::Core::Messages::System::NO_OPENGL;
QMessageBox::critical(nullptr,
QString::fromStdString(title),
QString::fromStdString(msg));
}
return EXIT_FAILURE;
}