-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmainwindow.cpp
More file actions
57 lines (43 loc) · 1.15 KB
/
mainwindow.cpp
File metadata and controls
57 lines (43 loc) · 1.15 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
50
51
52
53
54
55
56
57
#include "mainwindow.h"
MainWindow::MainWindow(const QString _appDir, const QString _version)
//: QMainWindow(parent)
{
dxc = new DXClusterTWidget(_appDir, "dxfun.com", 8000, this);
appDir = _appDir;
softwareVersion = _version;
configured = false;
setupDialog = new SetupDialog(!configured);
db = new DataBase(softwareVersion);
world = new World(appDir);
if (!db->createConnection())
{
//qDebug() << "MainWindow::MainWindow: 4" << endl;
world->create(appDir);
return;
}
else
{
world->create(appDir);
//db->updateIfNeeded(); // Check if we need to update the DB
}
initClass();
// <MENU>
setupMenu = menuBar()->addMenu(tr("&Setup"));
setupAct = new QAction(tr("&Setup..."), this);
setupMenu->addAction(setupAct);
setupAct->setMenuRole(QAction::PreferencesRole);
connect(setupAct, SIGNAL(triggered()), this, SLOT(slotSetup()));
// </MENU>
setCentralWidget(dxc);
}
MainWindow::~MainWindow()
{
}
void MainWindow::initClass()
{
}
void MainWindow::slotSetup()
{
qDebug() << "MainWindow::slotSetup" << endl;
setupDialog->exec();
}