]> Shamusworld >> Repos - schematic/blob - src/main.cpp
Move DB access to NoteDialog class, new AlertDialog class.
[schematic] / src / main.cpp
1 //
2 // main.cpp - The Supply Chain Manager-O-Matic
3 // by James Hammons
4 // (C) 2012 Underground Software
5 //
6 // JLH = James Hammons <jlhamm@acm.org>
7 //
8 // Who  When        What
9 // ---  ----------  -------------------------------------------------------------
10 // JLH  09/14/2012  Created this file
11 //
12
13 #include "main.h"
14 #include <QApplication>
15 #include "mainwin.h"
16
17 // Main app constructor--we stick globally accessible stuff here...
18
19 MainApp::MainApp(int & argc, char * argv[]): QApplication(argc, argv)
20 {
21         mainWindow = new MainWindow;
22         mainWindow->show();
23 }
24
25
26 // Here's the main application loop--short and simple...
27 int main(int argc, char * argv[])
28 {
29         Q_INIT_RESOURCE(schematic);             // This must the same name as the exe filename
30
31         MainApp app(argc, argv);
32
33         // User either couldn't log on, or cancelled out
34         if (app.mainWindow->loggedInUID == 0)
35                 return 0;
36
37         return app.exec();
38 }