// Part of the Architektonas Project
// Originally part of QCad Community Edition by Andrew Mustun
// Extensively rewritten and refactored by James L. Hammons
-// (C) 2010 Underground Software
+// Portions copyright (C) 2001-2003 RibbonSoft
+// Copyright (C) 2010 Underground Software
+// See the README and GPLv2 files for licensing and warranty information
//
// JLH = James L. Hammons <jlhamm@acm.org>
//
QSplashScreen * splash = 0;
-#ifdef RS_SCRIPTING
+#ifdef SCRIPTING
#include <qsproject.h>
#endif
-#include "rs_fontlist.h"
-#include "rs_patternlist.h"
-#include "rs_scriptlist.h"
+#include "fontlist.h"
+#include "patternlist.h"
+#include "scriptlist.h"
#include "settings.h"
-#include "rs_system.h"
-#include "rs_fileio.h"
-#include "rs_filtercxf.h"
-#include "rs_filterdxf.h"
-#include "rs_filterdxf1.h"
+#include "system.h"
+#include "fileio.h"
+#include "filtercxf.h"
+#include "filterdxf.h"
+#include "filterdxf1.h"
#include "dlginitial.h"
-#include "qc_applicationwindow.h"
+#include "applicationwindow.h"
#ifdef RS_CAM
-# include "rs_filtercam.h"
-# include "rs_camdialog.h"
+# include "filtercam.h"
+# include "camdialog.h"
#endif
//#ifdef RS_CAM
// 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");
for(int i=0; i<app.argc(); i++)
if (QString("--debug") == app.argv()[i])
- RS_DEBUG->setLevel(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:
// 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("<font size=\"+1\"><b>Welcome to Architektonas</b></font>"
"<br>"
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));
//# else
//// QPixmap * pixmap = new QPixmap(":/res/splash.xpm");
- QPixmap * pixmap = new QPixmap(":/res/splash_qcad.xpm");
+// QPixmap * pixmap = new QPixmap(":/res/splash_qcad.xpm");
+ QPixmap * pixmap = new QPixmap(":/res/splash.png");
//# endif
/*
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();
#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());
#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..");
- QC_ApplicationWindow * appWin = new QC_ApplicationWindow();
- RS_DEBUG->print("main: setting caption");
+ DEBUG->print("main: creating main window..");
+ ApplicationWindow * appWin = new ApplicationWindow();
+ 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)
files_loaded = true;
}
- RS_DEBUG->print("main: loading files: OK");
+ DEBUG->print("main: loading files: OK");
//none of this demo shit
//#ifdef RS_DEMO
//setlocale(LC_NUMERIC, "C");
setlocale(LC_ALL, "C");
- RS_DEBUG->print("main: app.exec()");
+ DEBUG->print("main: app.exec()");
if (!files_loaded)
appWin->slotFileNew();
delete appWin;
- RS_DEBUG->print("main: finished");
+ DEBUG->print("main: finished");
return r;
}
*/
QStringList handleArgs(int argc, char * argv[])
{
- RS_DEBUG->print("main: handling args..");
+ DEBUG->print("main: handling args..");
QStringList ret;
bool doexit = false;
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);
}
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);
}
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);
}
}
// 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();
if (doexit)
exit(0);
- RS_DEBUG->print("main: handling args: OK");
+ DEBUG->print("main: handling args: OK");
return ret;
}