-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
40 lines (33 loc) · 1.2 KB
/
main.cpp
File metadata and controls
40 lines (33 loc) · 1.2 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
#include <QApplication>
#include <QtDebug>
#include <QDir>
#include "html5applicationviewer.h"
#include "licensekey.h"
#include <QCoreApplication>
int main(int argc, char *argv[])
{
qDebug()<<"Incident Command Tracker version 1.0";
qDebug()<<"Copyright 2014 White Helmet Technologies";
qDebug()<<"http://www.whitehelmettech.com";
// Prepare the application
QApplication app(argc, argv);
QCoreApplication::setOrganizationName("White_Helmet_Technology");
QCoreApplication::setOrganizationDomain("whitehelmettech.com");
QCoreApplication::setApplicationName("Incident_Command_Tracker");
// Check for valid license key
LicenseKey licenseKey;
bool isLicenseKeyValid = licenseKey.isLicenseKeyValid();
if(isLicenseKeyValid) {
qDebug()<<"License key is valid - launching UI";
Html5ApplicationViewer viewer;
viewer.setOrientation(Html5ApplicationViewer::ScreenOrientationAuto);
viewer.showExpanded();
viewer.setWindowState(Qt::WindowMaximized);
viewer.loadFile(QLatin1String("html/index.html"));
return app.exec();
} else {
qDebug()<<"License key is INVALID - exiting";
app.quit();
return 0;
}
}