-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmain.cpp
executable file
·47 lines (31 loc) · 1.14 KB
/
main.cpp
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
#include <QtDebug>
#include <Quarter/Quarter.h>
#include "MainWindow.h"
using namespace SIM::Coin3D::Quarter;
int main(int argc, char *argv[]) {
// instantiate as a Quarter application
QApplication app(argc, argv);
// init the Coin3d libraries
Quarter::init();
// initialize and show the main window
MainWindow mainWin;
// command line arguments treated as files to be loaded
for (int i=1; i < argc; ++i)
{
//qDebug() << "\nDebug. [ main ] Loading ... " << argv[i];
QFile file(argv[i]);
mainWin.openFile(file);
}
// show main window and start the event loop
//qDebug() << "\nDebug. [ main ] Showing the window ... " ;
mainWin.show();
//qDebug() << "Debug. [ main ] Going to event loop ... " ;
app.exec(); // Loop until exit.
// sleep young prince
//qDebug() << "\nDebug. [ main ] Closing ... " ;
mainWin.quitApplication(); // Clean up resources. root->unref(); delete viewer;
// detach the Coin3d libraries
// qDebug() << "\nDebug. [ main ] Cleaning detach the Coined library ... " ;
Quarter::clean();
return 0;
}