-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
49 lines (37 loc) · 1.23 KB
/
main.cpp
File metadata and controls
49 lines (37 loc) · 1.23 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
43
44
45
46
47
48
49
#include "mainwindow.h"
#include <QApplication>
#include "configworker.h"
#include "resultswindow.h"
#include "gen3tablewindow.h"
#include "settingswindow.h"
#include <QDebug>
#include <QtPlugin>
//Q_IMPORT_PLUGIN(QWindowsIntegrationPlugin)
int main(int argc, char *argv[]) {
QApplication a(argc, argv);
ConfigWorker * cw = new ConfigWorker();
MainWindow w(cw);
SettingsWindow sw(cw);
ResultsWindow rw(cw);
Gen3TableWindow gtw(cw);
cw->setConfigFile();
if (cw->openDB() == 0) {
qDebug() << "Norm";
}
else {
qDebug() << "Bad";
}
w.init();
gtw.init();
sw.init();
w.show();
QObject::connect(&w, SIGNAL(startAnalize(QVector<Criterions>)), &rw, SLOT(startAnalize(QVector<Criterions>)));
QObject::connect(&w, SIGNAL(showSavedResults(QList<ResAnalize>)), &rw, SLOT(sshowSavedResults(QList<ResAnalize>)));
//QObject::connect(&rw, SIGNAL(destroyed(QObject *)), &w, SLOT(enablePercentEdit(QObject*)));
QObject::connect(&w, SIGNAL(showGenTableWindow()), >w, SLOT(show()));
QObject::connect(&w, SIGNAL(showSettingsWindow()), &sw, SLOT(show()));
a.exec();
cw->saveConfigFile();
delete cw;
return 0;
}