Initial commit.
[emufront] / src / main.cpp
1 #include <QApplication>
2 #include <QTextStream>
3 #include <iostream>
4 #include "mainwindow.h"
5 //#include "db/databasemanager.h"
6 //#include "dialogs/platformnamedialog.h"
7
8 int main(int argc, char *argv[])
9 {
10         QApplication app(argc, argv);
11         QTextStream cout(stdout, QIODevice::WriteOnly);
12
13         /*DatabaseManager dbm;
14         if (dbm.openDB())
15                 cout << " Database opened succesfully!" << endl;
16         else cout << " Database connection failed!" << endl;
17
18         if (dbm.dbExists())
19                 cout << " Database exists!" << endl;
20         else 
21         {
22                 cout << " Database is missing!" << endl;
23                 if (dbm.createDB())
24                         cout << " Database created succesfully!" << endl;
25                 else {
26                         cout << "Failed creating database!" << endl;
27                         exit(1);
28                 }
29          }
30
31         if (dbm.insertPerson("Testi","Tapaus",1) > 0)
32                 cout << "Database insert successfull!" << endl;
33         else cout << "Database insert failed!" << endl;
34
35
36         cout << "Trying to select from database: " << dbm.getName(1) << endl;
37         */
38
39         /*PlatformNameDialog *nameDialog = new PlatformNameDialog;
40         nameDialog->show();*/
41         MainWindow *mw = new MainWindow;
42         mw->show();
43         return app.exec();
44 }