X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fmainapp%2Fmain.cpp;h=c205e292d476b6185f5244e0f50a5a32c8d03b4f;hb=e1d1cacbb43055988d0d9db632fdf05c0bea9543;hp=72eac0e96f335bfe51968eaa6aa566569330d86f;hpb=3239ef39dcee08fa6e8cd68cdf2727fc68cc7a8c;p=architektonas diff --git a/src/mainapp/main.cpp b/src/mainapp/main.cpp index 72eac0e..c205e29 100644 --- a/src/mainapp/main.cpp +++ b/src/mainapp/main.cpp @@ -24,7 +24,7 @@ QSplashScreen * splash = 0; -#ifdef RS_SCRIPTING +#ifdef SCRIPTING #include #endif @@ -76,8 +76,8 @@ int main(int argc, char * argv[]) // Init compiled-in resources Q_INIT_RESOURCE(architektonas); - RS_DEBUG->setLevel(RS_Debug::D_WARNING); - RS_DEBUG->print("param 0: %s", argv[0]); + DEBUG->setLevel(Debug::D_WARNING); + DEBUG->print("param 0: %s", argv[0]); // avoid . / , confusion on German environments setlocale(LC_ALL, "C"); @@ -86,19 +86,19 @@ int main(int argc, char * argv[]) for(int i=0; isetLevel(RS_Debug::D_DEBUGGING); + DEBUG->setLevel(Debug::D_DEBUGGING); QFileInfo prgInfo(QFile::decodeName(argv[0])); QString prgDir(prgInfo.absolutePath()); -//fail RS_SYSTEM->init(QC_APPNAME, QC_VERSION, QC_APPDIR, prgDir); -// RS_SYSTEM->init("Architektonas", QC_VERSION, "qcad", prgDir); - RS_SYSTEM->init("Architektonas", QC_VERSION, "architektonas", prgDir); +//fail SYSTEM->init(QC_APPNAME, QC_VERSION, QC_APPDIR, prgDir); +// SYSTEM->init("Architektonas", QC_VERSION, "qcad", prgDir); + SYSTEM->init("Architektonas", QC_VERSION, "architektonas", prgDir); - RS_FILEIO->registerFilter(new RS_FilterCXF()); - RS_FILEIO->registerFilter(new RS_FilterDXF()); - RS_FILEIO->registerFilter(new RS_FilterDXF1()); + FILEIO->registerFilter(new FilterCXF()); + FILEIO->registerFilter(new FilterDXF()); + FILEIO->registerFilter(new FilterDXF1()); #ifdef RS_OPT_CAM - RS_FILEIO->registerFilter(new RS_FilterCAM()); + FILEIO->registerFilter(new FilterCAM()); #endif // parse command line arguments that might not need a launched program: @@ -119,7 +119,7 @@ int main(int argc, char * argv[]) // show initial config dialog: if (unit == "Invalid") { - RS_DEBUG->print("main: show initial config dialog.."); + DEBUG->print("main: show initial config dialog.."); DlgInitial di(NULL); di.setText("Welcome to Architektonas" "
" @@ -137,11 +137,11 @@ int main(int argc, char * argv[]) settings.endGroup(); } - RS_DEBUG->print("main: show initial config dialog: OK"); + DEBUG->print("main: show initial config dialog: OK"); } #ifdef QSPLASHSCREEN_H - RS_DEBUG->print("main: splashscreen.."); + DEBUG->print("main: splashscreen.."); //# ifdef QC_CUSTOM_SPLASH // QPixmap * pixmap = new QPixmap(qPixmapFromMimeSource(QC_CUSTOM_SPLASH)); @@ -156,23 +156,23 @@ int main(int argc, char * argv[]) splash->show(); splash->message(app.tr("Loading.."), Qt::AlignRight|Qt::AlignBottom, QC_SPLASH_TXTCOL); - RS_DEBUG->print("main: splashscreen: OK"); + DEBUG->print("main: splashscreen: OK"); */ #endif - RS_DEBUG->print("main: init fontlist.."); - RS_FONTLIST->init(); - RS_DEBUG->print("main: init fontlist: OK"); + DEBUG->print("main: init fontlist.."); + FONTLIST->init(); + DEBUG->print("main: init fontlist: OK"); - RS_DEBUG->print("main: init patternlist.."); - RS_PATTERNLIST->init(); - RS_DEBUG->print("main: init patternlist: OK"); + DEBUG->print("main: init patternlist.."); + PATTERNLIST->init(); + DEBUG->print("main: init patternlist: OK"); - RS_DEBUG->print("main: init scriptlist.."); - RS_SCRIPTLIST->init(); - RS_DEBUG->print("main: init scriptlist: OK"); + DEBUG->print("main: init scriptlist.."); + SCRIPTLIST->init(); + DEBUG->print("main: init scriptlist: OK"); - RS_DEBUG->print("main: loading translation.."); + DEBUG->print("main: loading translation.."); settings.beginGroup("Appearance"); #ifdef QC_PREDEFINED_LOCALE lang = settings.value("Language", "").toString(); @@ -196,15 +196,15 @@ int main(int argc, char * argv[]) #endif settings.endGroup(); - RS_SYSTEM->loadTranslation(lang, langCmd); - RS_DEBUG->print("main: loading translation: OK"); + SYSTEM->loadTranslation(lang, langCmd); + DEBUG->print("main: loading translation: OK"); #ifdef QSPLASHSCREEN_H splash = new QSplashScreen(*pixmap); splash->show(); // splash->message(QObject::tr("Loading.."), Qt::AlignRight | Qt::AlignBottom, QC_SPLASH_TXTCOL); splash->showMessage(QObject::tr("Loading..."), Qt::AlignRight | Qt::AlignBottom, QC_SPLASH_TXTCOL); - RS_DEBUG->print("main: splashscreen: OK"); + DEBUG->print("main: splashscreen: OK"); #endif //QApplication::setStyle(new QWindowsStyle()); @@ -214,35 +214,35 @@ int main(int argc, char * argv[]) #endif #ifdef QC_BUILTIN_STYLE //js: - RS_DEBUG->print("main: applying built in style.."); + DEBUG->print("main: applying built in style.."); applyBuiltinStyle(); #endif - RS_DEBUG->print("main: creating main window.."); + DEBUG->print("main: creating main window.."); ApplicationWindow * appWin = new ApplicationWindow(); - RS_DEBUG->print("main: setting caption"); + DEBUG->print("main: setting caption"); appWin->setWindowTitle("Architektonas"); - RS_DEBUG->print("main: show main window"); + DEBUG->print("main: show main window"); appWin->show(); - RS_DEBUG->print("main: set focus"); + DEBUG->print("main: set focus"); appWin->setFocus(); - RS_DEBUG->print("main: creating main window: OK"); + DEBUG->print("main: creating main window: OK"); #ifdef QSPLASHSCREEN_H if (splash) { - RS_DEBUG->print("main: updating splash.."); + DEBUG->print("main: updating splash.."); // splash->message(QObject::tr("Loading Library Paths.."), splash->showMessage(QObject::tr("Loading Library Paths.."), Qt::AlignRight | Qt::AlignBottom, QC_SPLASH_TXTCOL); - RS_DEBUG->print("main: processing events"); + DEBUG->print("main: processing events"); qApp->processEvents(); - RS_DEBUG->print("main: updating splash: OK"); + DEBUG->print("main: updating splash: OK"); } #endif // loading files: - RS_DEBUG->print("main: loading files.."); + DEBUG->print("main: loading files.."); bool files_loaded = false; for(QStringList::Iterator it=fileList.begin(); it!=fileList.end(); ++it) @@ -260,7 +260,7 @@ int main(int argc, char * argv[]) files_loaded = true; } - RS_DEBUG->print("main: loading files: OK"); + DEBUG->print("main: loading files: OK"); //none of this demo shit //#ifdef RS_DEMO @@ -285,7 +285,7 @@ int main(int argc, char * argv[]) //setlocale(LC_NUMERIC, "C"); setlocale(LC_ALL, "C"); - RS_DEBUG->print("main: app.exec()"); + DEBUG->print("main: app.exec()"); if (!files_loaded) appWin->slotFileNew(); @@ -296,7 +296,7 @@ int main(int argc, char * argv[]) delete appWin; - RS_DEBUG->print("main: finished"); + DEBUG->print("main: finished"); return r; } @@ -308,7 +308,7 @@ int main(int argc, char * argv[]) */ QStringList handleArgs(int argc, char * argv[]) { - RS_DEBUG->print("main: handling args.."); + DEBUG->print("main: handling args.."); QStringList ret; bool doexit = false; @@ -337,7 +337,7 @@ QStringList handleArgs(int argc, char * argv[]) machine = QString(argv[i]); else { - RS_DEBUG->print(RS_Debug::D_WARNING, "No machine configuration given after --convert. Aborting.."); + DEBUG->print(Debug::D_WARNING, "No machine configuration given after --convert. Aborting.."); exit(1); } @@ -347,7 +347,7 @@ QStringList handleArgs(int argc, char * argv[]) input = QString(argv[i]); else { - RS_DEBUG->print(RS_Debug::D_WARNING, "No input given after --convert. Aborting.."); + DEBUG->print(Debug::D_WARNING, "No input given after --convert. Aborting.."); exit(1); } @@ -357,7 +357,7 @@ QStringList handleArgs(int argc, char * argv[]) output = QString(argv[i]); else { - RS_DEBUG->print(RS_Debug::D_WARNING, "No output given after --convert. Aborting.."); + DEBUG->print(Debug::D_WARNING, "No output given after --convert. Aborting.."); exit(1); } } @@ -368,9 +368,9 @@ QStringList handleArgs(int argc, char * argv[]) // auto cam convert if (machine.isEmpty() == false && input.isEmpty() == false && output.isEmpty() == false) { - RS_FilterCAM fc; + FilterCAM fc; Drawing gr; - RS_FILEIO->fileImport(gr, input, RS2::FormatUnknown); + FILEIO->fileImport(gr, input, RS2::FormatUnknown); RS_CamDialog dlg(gr, NULL); dlg.activateMachineGenerator(machine); dlg.externalOK(); @@ -382,6 +382,6 @@ QStringList handleArgs(int argc, char * argv[]) if (doexit) exit(0); - RS_DEBUG->print("main: handling args: OK"); + DEBUG->print("main: handling args: OK"); return ret; }