main.cpp

changeset 29
55406ce7446e
parent 26
83184d9407c7
child 30
31ff9aabd506
equal deleted inserted replaced
28:208adc847377 29:55406ce7446e
1 #include <QApplication> 1 #include <QApplication>
2 #include "gui.h" 2 #include "gui.h"
3 #include "file.h" 3 #include "file.h"
4 #include "bbox.h" 4 #include "bbox.h"
5 #include "misc.h" 5 #include "misc.h"
6 #include "config.h"
6 7
7 vector<OpenFile*> g_LoadedFiles; 8 vector<OpenFile*> g_LoadedFiles;
8 OpenFile* g_CurrentFile = NULL; 9 OpenFile* g_CurrentFile = NULL;
9 ForgeWindow* g_qWindow = NULL; 10 ForgeWindow* g_qWindow = NULL;
10 bbox g_BBox; 11 bbox g_BBox;
11 12
12 int main (int dArgC, char* saArgV[]) { 13 int main (int dArgC, char* saArgV[]) {
13 // TODO 14 // Load or create the configuration
14 g_zaFileLoadPaths.push_back ("."); 15 if (!config::load()) {
15 g_zaFileLoadPaths.push_back ("/home/arezey/ldraw/parts"); 16 printf ("Creating configuration file...\n");
16 g_zaFileLoadPaths.push_back ("/home/arezey/ldraw/parts/s"); 17 if (config::save ())
17 g_zaFileLoadPaths.push_back ("/home/arezey/ldraw/p"); 18 printf ("Configuration file successfully created.\n");
19 else
20 printf ("failed to create configuration file!\n");
21 }
18 22
19 QApplication app (dArgC, saArgV); 23 QApplication app (dArgC, saArgV);
20 ForgeWindow* win = new ForgeWindow; 24 ForgeWindow* win = new ForgeWindow;
21 g_qWindow = win; 25 g_qWindow = win;
22 win->show (); 26 win->show ();

mercurial