From 3b479913b79032e514ce8c74ba915c6c91ab0f15 Mon Sep 17 00:00:00 2001 From: Shamus Hammons Date: Wed, 16 Jun 2010 19:56:58 +0000 Subject: [PATCH] Removed more QC_ madness... --- architektonas.pro | 142 ++--- src/base/rs_creation.h | 18 +- src/base/rs_staticgraphicview.cpp | 49 +- src/base/rs_staticgraphicview.h | 29 +- ...cationwindow.cpp => applicationwindow.cpp} | 516 +++++++++--------- ...pplicationwindow.h => applicationwindow.h} | 33 +- src/mainapp/main.cpp | 4 +- .../{qc_mdiwindow.cpp => mdiwindow.cpp} | 95 ++-- src/mainapp/{qc_mdiwindow.h => mdiwindow.h} | 23 +- src/mainapp/qc_dialogfactory.cpp | 13 +- src/mainapp/qc_dialogfactory.h | 1 - src/widgets/qg_dialogfactory.h | 12 +- 12 files changed, 446 insertions(+), 489 deletions(-) rename src/mainapp/{qc_applicationwindow.cpp => applicationwindow.cpp} (88%) rename src/mainapp/{qc_applicationwindow.h => applicationwindow.h} (89%) rename src/mainapp/{qc_mdiwindow.cpp => mdiwindow.cpp} (79%) rename src/mainapp/{qc_mdiwindow.h => mdiwindow.h} (75%) diff --git a/architektonas.pro b/architektonas.pro index 0c03be4..877884a 100644 --- a/architektonas.pro +++ b/architektonas.pro @@ -27,22 +27,23 @@ INCLUDEPATH += \ src/forms HEADERS = \ - src/base/rs_actioninterface.h \ - src/base/rs_preview.h \ - src/base/rs_previewactioninterface.h \ - src/base/rs_snapper.h \ - src/base/rs_creation.h \ - src/base/rs_debug.h \ src/base/rs.h \ + src/base/rs_actioninterface.h \ src/base/rs_arc.h \ src/base/rs_atomicentity.h \ src/base/rs_block.h \ src/base/rs_blocklist.h \ src/base/rs_blocklistlistener.h \ - src/base/rs_clipboard.h \ src/base/rs_circle.h \ + src/base/rs_clipboard.h \ src/base/rs_color.h \ + src/base/rs_commandevent.h \ + src/base/rs_creation.h \ src/base/rs_constructionline.h \ + src/base/rs_debug.h \ + src/base/rs_dialogfactory.h \ + src/base/rs_dialogfactoryinterface.h \ + src/base/rs_dialogfactoryadapter.h \ src/base/rs_dimaligned.h \ src/base/rs_dimangular.h \ src/base/rs_dimdiametric.h \ @@ -50,29 +51,54 @@ HEADERS = \ src/base/rs_dimlinear.h \ src/base/rs_dimradial.h \ src/base/rs_document.h \ + src/base/drawing.h \ src/base/rs_ellipse.h \ src/base/rs_entity.h \ src/base/rs_entitycontainer.h \ + src/base/rs_eventhandler.h \ + src/base/rs_fileio.h \ + src/base/rs_filtercxf.h \ + src/base/rs_filterdxf.h \ + src/base/rs_filterdxf1.h \ + src/base/rs_filterinterface.h \ src/base/rs_flags.h \ src/base/rs_font.h \ src/base/rs_fontchar.h \ src/base/rs_fontlist.h \ - src/base/drawing.h \ + src/base/rs_graphicview.h \ + src/base/rs_grid.h \ src/base/rs_hatch.h \ - src/base/rs_insert.h \ src/base/rs_image.h \ + src/base/rs_information.h \ + src/base/rs_infoarea.h \ + src/base/rs_insert.h \ src/base/rs_layer.h \ src/base/rs_layerlist.h \ src/base/rs_layerlistlistener.h \ src/base/rs_leader.h \ src/base/rs_line.h \ + src/base/rs_linetypepattern.h \ + src/base/rs_mainwindowinterface.h \ + src/base/rs_math.h \ + src/base/rs_modification.h \ + src/base/paintintf.h \ src/base/rs_pattern.h \ src/base/rs_patternlist.h \ src/base/rs_pen.h \ src/base/rs_point.h \ src/base/rs_polyline.h \ + src/base/rs_preview.h \ + src/base/rs_previewactioninterface.h \ + src/base/rs_python.h \ + src/base/rs_python_wrappers.h \ + src/base/rs_script.h \ + src/base/rs_scriptlist.h \ + src/base/rs_selection.h \ + src/base/rs_simplepython.h \ + src/base/rs_snapper.h \ src/base/rs_solid.h \ src/base/rs_spline.h \ + src/base/rs_staticgraphicview.h \ src/base/rs_system.h \ src/base/rs_text.h \ src/base/rs_undo.h \ @@ -83,41 +109,10 @@ HEADERS = \ src/base/rs_variable.h \ src/base/rs_variabledict.h \ src/base/vector.h \ - src/base/vectorsolutions.h \ - src/base/rs_fileio.h \ - src/base/rs_filtercxf.h \ - src/base/rs_filterdxf.h \ - src/base/rs_filterdxf1.h \ - src/base/rs_filterinterface.h \ - src/base/rs_commandevent.h \ - src/base/rs_dialogfactory.h \ - src/base/rs_dialogfactoryinterface.h \ - src/base/rs_dialogfactoryadapter.h \ - src/base/rs_eventhandler.h \ - src/base/rs_graphicview.h \ - src/base/rs_grid.h \ - src/base/rs_linetypepattern.h \ - src/base/rs_mainwindowinterface.h \ - src/base/rs_staticgraphicview.h \ - src/base/rs_information.h \ - src/base/rs_infoarea.h \ - src/base/rs_modification.h \ - src/base/rs_selection.h \ - src/base/rs_math.h \ - src/base/rs_python.h \ - src/base/rs_simplepython.h \ - src/base/rs_python_wrappers.h \ - src/base/rs_script.h \ - src/base/rs_scriptlist.h \ - src/base/paintintf.h + src/base/vectorsolutions.h SOURCES = \ src/base/rs_actioninterface.cpp \ - src/base/rs_preview.cpp \ - src/base/rs_previewactioninterface.cpp \ - src/base/rs_snapper.cpp \ - src/base/rs_creation.cpp \ - src/base/rs_debug.cpp \ src/base/rs_arc.cpp \ src/base/rs_atomicentity.cpp \ src/base/rs_block.cpp \ @@ -125,7 +120,11 @@ SOURCES = \ src/base/rs_clipboard.cpp \ src/base/rs_circle.cpp \ src/base/rs_color.cpp \ + src/base/rs_commandevent.cpp \ src/base/rs_constructionline.cpp \ + src/base/rs_creation.cpp \ + src/base/rs_debug.cpp \ + src/base/rs_dialogfactory.cpp \ src/base/rs_dimaligned.cpp \ src/base/rs_dimangular.cpp \ src/base/rs_dimdiametric.cpp \ @@ -133,25 +132,49 @@ SOURCES = \ src/base/rs_dimlinear.cpp \ src/base/rs_dimradial.cpp \ src/base/rs_document.cpp \ + src/base/drawing.cpp \ src/base/rs_ellipse.cpp \ src/base/rs_entity.cpp \ src/base/rs_entitycontainer.cpp \ + src/base/rs_eventhandler.cpp \ + src/base/rs_fileio.cpp \ + src/base/rs_filtercxf.cpp \ + src/base/rs_filterdxf.cpp \ + src/base/rs_filterdxf1.cpp \ + src/base/rs_filterinterface.cpp \ src/base/rs_font.cpp \ src/base/rs_fontlist.cpp \ - src/base/drawing.cpp \ + src/base/rs_graphicview.cpp \ + src/base/rs_grid.cpp \ src/base/rs_hatch.cpp \ - src/base/rs_insert.cpp \ src/base/rs_image.cpp \ + src/base/rs_information.cpp \ + src/base/rs_infoarea.cpp \ + src/base/rs_insert.cpp \ src/base/rs_layer.cpp \ src/base/rs_layerlist.cpp \ src/base/rs_leader.cpp \ src/base/rs_line.cpp \ + src/base/rs_linetypepattern.cpp \ + src/base/rs_math.cpp \ + src/base/rs_modification.cpp \ + src/base/paintintf.cpp \ src/base/rs_pattern.cpp \ src/base/rs_patternlist.cpp \ src/base/rs_point.cpp \ src/base/rs_polyline.cpp \ + src/base/rs_preview.cpp \ + src/base/rs_previewactioninterface.cpp \ + src/base/rs_python.cpp \ + src/base/rs_python_wrappers.cpp \ + src/base/rs_script.cpp \ + src/base/rs_scriptlist.cpp \ + src/base/rs_selection.cpp \ + src/base/rs_simplepython.cpp \ + src/base/rs_snapper.cpp \ src/base/rs_solid.cpp \ src/base/rs_spline.cpp \ + src/base/rs_staticgraphicview.cpp \ src/base/rs_system.cpp \ src/base/rs_text.cpp \ src/base/rs_undo.cpp \ @@ -162,30 +185,7 @@ SOURCES = \ src/base/rs_variable.cpp \ src/base/rs_variabledict.cpp \ src/base/vector.cpp \ - src/base/vectorsolutions.cpp \ - src/base/rs_fileio.cpp \ - src/base/rs_filtercxf.cpp \ - src/base/rs_filterdxf.cpp \ - src/base/rs_filterdxf1.cpp \ - src/base/rs_filterinterface.cpp \ - src/base/rs_commandevent.cpp \ - src/base/rs_dialogfactory.cpp \ - src/base/rs_eventhandler.cpp \ - src/base/rs_graphicview.cpp \ - src/base/rs_grid.cpp \ - src/base/rs_linetypepattern.cpp \ - src/base/rs_staticgraphicview.cpp \ - src/base/rs_information.cpp \ - src/base/rs_infoarea.cpp \ - src/base/rs_math.cpp \ - src/base/rs_modification.cpp \ - src/base/rs_selection.cpp \ - src/base/rs_python.cpp \ - src/base/rs_simplepython.cpp \ - src/base/rs_python_wrappers.cpp \ - src/base/rs_script.cpp \ - src/base/rs_scriptlist.cpp \ - src/base/paintintf.cpp + src/base/vectorsolutions.cpp HEADERS += \ src/actions/rs_actionblocksadd.h \ @@ -635,21 +635,21 @@ FORMS = \ src/forms/widgetpen.ui HEADERS += \ + src/mainapp/applicationwindow.h \ src/mainapp/commands.h \ src/mainapp/createqtactions.h \ - src/mainapp/qc_applicationwindow.h \ src/mainapp/qc_dialogfactory.h \ src/mainapp/qc_graphicview.h \ - src/mainapp/qc_mdiwindow.h \ src/mainapp/main.h \ + src/mainapp/mdiwindow.h \ src/mainapp/settings.h SOURCES += \ + src/mainapp/applicationwindow.cpp \ src/mainapp/commands.cpp \ src/mainapp/createqtactions.cpp \ - src/mainapp/qc_applicationwindow.cpp \ src/mainapp/qc_dialogfactory.cpp \ src/mainapp/qc_graphicview.cpp \ - src/mainapp/qc_mdiwindow.cpp \ src/mainapp/main.cpp \ + src/mainapp/mdiwindow.cpp \ src/mainapp/settings.cpp diff --git a/src/base/rs_creation.h b/src/base/rs_creation.h index 64b4a89..7187add 100644 --- a/src/base/rs_creation.h +++ b/src/base/rs_creation.h @@ -4,20 +4,20 @@ #include #include "vector.h" -class RS_EntityContainer; -class RS_GraphicView; -class RS_Entity; -class RS_Line; -class RS_Circle; class RS_Arc; -class RS_Image; class RS_Block; -class RS_Insert; -class Drawing; +class RS_BlockData; +class RS_Circle; class RS_Document; +class Drawing; +class RS_Entity; +class RS_EntityContainer; +class RS_GraphicView; +class RS_Image; class RS_ImageData; +class RS_Insert; class RS_InsertData; -class RS_BlockData; +class RS_Line; /** * Data needed to insert library items. diff --git a/src/base/rs_staticgraphicview.cpp b/src/base/rs_staticgraphicview.cpp index 1972704..59b8b4c 100644 --- a/src/base/rs_staticgraphicview.cpp +++ b/src/base/rs_staticgraphicview.cpp @@ -10,19 +10,17 @@ // Who When What // --- ---------- ----------------------------------------------------------- // JLH 06/02/2010 Added this text. :-) +// JLH 06/15/2010 Moved implementation (however trivial) from header to here. // #include "rs_staticgraphicview.h" -#include "drawing.h" - /** * Constructor. * * @param w Width * @param h Height */ -//RS_StaticGraphicView::RS_StaticGraphicView(int w, int h, RS_Painter * p): /*painter(p),*/ width(w), RS_StaticGraphicView::RS_StaticGraphicView(int w, int h, PaintInterface * p): /*painter(p),*/ width(w), height(h) { setBackground(RS_Color(255, 255, 255)); @@ -54,40 +52,35 @@ int RS_StaticGraphicView::getHeight() } /** - * Creates a new painter for the buffer of this widget and returns a - * pointer to it. The class variable 'painter' also - * points to that object. + * Handles paint events by redrawing the graphic in this view. */ -//RS_Painter * RS_StaticGraphicView::createPainter() -PaintInterface * RS_StaticGraphicView::createPainter() +void RS_StaticGraphicView::paint() { - return painter; + RS_DEBUG->print("RS_StaticGraphicView::paint begin"); + drawIt(); + RS_DEBUG->print("RS_StaticGraphicView::paint end"); } -/** - * Creates a new painter for this widget and returns a - * pointer to it. The class variable 'painter' also - * points to that object. - */ -//RS_Painter * RS_StaticGraphicView::createDirectPainter() -PaintInterface * RS_StaticGraphicView::createDirectPainter() +/*virtual*/ void RS_StaticGraphicView::redraw() { - return createPainter(); } -/** - * Deletes the painter. - */ -void RS_StaticGraphicView::destroyPainter() +/*virtual*/ void RS_StaticGraphicView::adjustOffsetControls() { } -/** - * Handles paint events by redrawing the graphic in this view. - */ -void RS_StaticGraphicView::paint() +/*virtual*/ void RS_StaticGraphicView::adjustZoomControls() +{ +} + +/*virtual*/ void RS_StaticGraphicView::setMouseCursor(RS2::CursorType) +{ +} + +/*virtual*/ void RS_StaticGraphicView::emulateMouseMoveEvent() +{ +} + +/*virtual*/ void RS_StaticGraphicView::updateGridStatusWidget(const QString &) { - RS_DEBUG->print("RS_StaticGraphicView::paint begin"); - drawIt(); - RS_DEBUG->print("RS_StaticGraphicView::paint end"); } diff --git a/src/base/rs_staticgraphicview.h b/src/base/rs_staticgraphicview.h index 180c213..508ebb6 100644 --- a/src/base/rs_staticgraphicview.h +++ b/src/base/rs_staticgraphicview.h @@ -2,7 +2,8 @@ #define RS_STATICGRAPHICVIEW_H #include "rs_graphicview.h" -#include "rs_layerlistlistener.h" + +class PaintInterface; /** * This is an implementation of a graphic viewer with a fixed size @@ -11,36 +12,24 @@ class RS_StaticGraphicView: public RS_GraphicView { public: -// RS_StaticGraphicView(int w, int h, RS_Painter * p); RS_StaticGraphicView(int w, int h, PaintInterface * p); virtual ~RS_StaticGraphicView(); virtual int getWidth(); virtual int getHeight(); - virtual void redraw() {} - virtual void adjustOffsetControls() {} - virtual void adjustZoomControls() {} -// virtual RS_Painter * createPainter(); -// virtual RS_Painter * createDirectPainter(); - virtual PaintInterface * createPainter(); - virtual PaintInterface * createDirectPainter(); - virtual void destroyPainter(); - virtual void setMouseCursor(RS2::CursorType ) {} - - virtual void emulateMouseMoveEvent() {} - virtual void updateGridStatusWidget(const QString &) {} + virtual void redraw(); + virtual void adjustOffsetControls(); + virtual void adjustZoomControls(); + virtual void setMouseCursor(RS2::CursorType); - void paint(); + virtual void emulateMouseMoveEvent(); + virtual void updateGridStatusWidget(const QString &); - //These pure virtual methods are placeholders for QG_GraphicView... - //now here too... -// virtual void SetPreviewMode(bool mode = true) {} -// virtual void SetPreviewEntity(RS_Preview *) {} + void paint(); private: //! Width int width; - //! Height int height; }; diff --git a/src/mainapp/qc_applicationwindow.cpp b/src/mainapp/applicationwindow.cpp similarity index 88% rename from src/mainapp/qc_applicationwindow.cpp rename to src/mainapp/applicationwindow.cpp index 9b173a3..e91576f 100644 --- a/src/mainapp/qc_applicationwindow.cpp +++ b/src/mainapp/applicationwindow.cpp @@ -1,4 +1,4 @@ -// qc_applicationwindow.cpp +// applicationwindow.cpp // // Part of the Architektonas Project // Originally part of QCad Community Edition by Andrew Mustun @@ -14,10 +14,11 @@ // Qt4's much more sensible action handling // -#include "qc_applicationwindow.h" +#include "applicationwindow.h" #include #include "rs_actiondrawlinefree.h" +#include "rs_actionlibraryinsert.h" #include "rs_actionprintpreview.h" #include "rs_creation.h" #include "rs_dialogfactory.h" @@ -25,20 +26,19 @@ #include "rs_dimlinear.h" #include "rs_dimradial.h" #include "rs_ellipse.h" -#include "rs_hatch.h" -#include "rs_image.h" #include "rs_fileio.h" +#include "rs_hatch.h" #include "rs_insert.h" -#include "rs_text.h" -#include "settings.h" +#include "rs_image.h" +#include "paintintf.h" #include "rs_script.h" #include "rs_scriptlist.h" +#include "settings.h" #include "rs_solid.h" #include "rs_staticgraphicview.h" #include "rs_system.h" -#include "rs_actionlibraryinsert.h" +#include "rs_text.h" #include "rs_units.h" -#include "paintintf.h" #ifdef RS_CAM #include "rs_camdialog.h" @@ -55,12 +55,12 @@ #include "mousewidget.h" #include "selectionwidget.h" -#include "qc_mdiwindow.h" +#include "mdiwindow.h" #include "qc_dialogfactory.h" #include "createqtactions.h" #include "main.h" -QC_ApplicationWindow * QC_ApplicationWindow::appWindow = NULL; +ApplicationWindow * ApplicationWindow::appWindow = NULL; #ifndef QC_APP_ICON # define QC_APP_ICON "qcad.png" @@ -74,45 +74,45 @@ extern QSplashScreen * splash; /** * Constructor. Initializes the app. */ -QC_ApplicationWindow::QC_ApplicationWindow(): +ApplicationWindow::ApplicationWindow(): // Q3MainWindow(0, "", Qt::WDestructiveClose), QG_MainWindowInterface() QMainWindow((QWidget *)NULL/*,this is not a Qt::WindowFlags --> Qt::WA_DeleteOnClose*/), QG_MainWindowInterface() { - RS_DEBUG->print("QC_ApplicationWindow::QC_ApplicationWindow"); + RS_DEBUG->print("ApplicationWindow::ApplicationWindow"); appWindow = this; //no assistant = NULL; workspace = NULL; - RS_DEBUG->print("QC_ApplicationWindow::QC_ApplicationWindow: setting icon"); + RS_DEBUG->print("ApplicationWindow::ApplicationWindow: setting icon"); // setIcon(qPixmapFromMimeSource(QC_APP_ICON)); // setWindowIcon(qPixmapFromMimeSource(QC_APP_ICON)); setWindowIcon(QIcon(":/res/" QC_APP_ICON)); - RS_DEBUG->print("QC_ApplicationWindow::QC_ApplicationWindow: creating action handler"); + RS_DEBUG->print("ApplicationWindow::ApplicationWindow: creating action handler"); actionHandler = new QG_ActionHandler(this); - RS_DEBUG->print("QC_ApplicationWindow::QC_ApplicationWindow: creating action handler: OK"); + RS_DEBUG->print("ApplicationWindow::ApplicationWindow: creating action handler: OK"); #ifdef RS_SCRIPTING - RS_DEBUG->print("QC_ApplicationWindow::QC_ApplicationWindow: creating scripter"); + RS_DEBUG->print("ApplicationWindow::ApplicationWindow: creating scripter"); scripter = new QS_Scripter(this, this); - RS_DEBUG->print("QC_ApplicationWindow::QC_ApplicationWindow: creating scripter: OK"); + RS_DEBUG->print("ApplicationWindow::ApplicationWindow: creating scripter: OK"); #endif - RS_DEBUG->print("QC_ApplicationWindow::QC_ApplicationWindow: init view"); + RS_DEBUG->print("ApplicationWindow::ApplicationWindow: init view"); initView(); - RS_DEBUG->print("QC_ApplicationWindow::QC_ApplicationWindow: init toolbar"); + RS_DEBUG->print("ApplicationWindow::ApplicationWindow: init toolbar"); initToolBar(); - RS_DEBUG->print("QC_ApplicationWindow::QC_ApplicationWindow: init actions"); + RS_DEBUG->print("ApplicationWindow::ApplicationWindow: init actions"); initActions(); - RS_DEBUG->print("QC_ApplicationWindow::QC_ApplicationWindow: init menu bar"); + RS_DEBUG->print("ApplicationWindow::ApplicationWindow: init menu bar"); initMenuBar(); - RS_DEBUG->print("QC_ApplicationWindow::QC_ApplicationWindow: init status bar"); + RS_DEBUG->print("ApplicationWindow::ApplicationWindow: init status bar"); initStatusBar(); - RS_DEBUG->print("QC_ApplicationWindow::QC_ApplicationWindow: creating dialogFactory"); + RS_DEBUG->print("ApplicationWindow::ApplicationWindow: creating dialogFactory"); dialogFactory = new QC_DialogFactory(this, optionWidget); - RS_DEBUG->print("QC_ApplicationWindow::QC_ApplicationWindow: creating dialogFactory: OK"); + RS_DEBUG->print("ApplicationWindow::ApplicationWindow: creating dialogFactory: OK"); RS_DEBUG->print("setting dialog factory object"); if (RS_DialogFactory::instance() == NULL) @@ -123,10 +123,10 @@ QC_ApplicationWindow::QC_ApplicationWindow(): RS_DialogFactory::instance()->setFactoryObject(dialogFactory); RS_DEBUG->print("setting dialog factory object: OK"); - RS_DEBUG->print("QC_ApplicationWindow::QC_ApplicationWindow: init settings"); + RS_DEBUG->print("ApplicationWindow::ApplicationWindow: init settings"); initSettings(); - RS_DEBUG->print("QC_ApplicationWindow::QC_ApplicationWindow: init MDI"); + RS_DEBUG->print("ApplicationWindow::ApplicationWindow: init MDI"); initMDI(); // Disable menu and toolbar items @@ -140,37 +140,37 @@ QC_ApplicationWindow::QC_ApplicationWindow(): /** * Destructor. */ -QC_ApplicationWindow::~QC_ApplicationWindow() +ApplicationWindow::~ApplicationWindow() { - RS_DEBUG->print("QC_ApplicationWindow::~QC_ApplicationWindow"); + RS_DEBUG->print("ApplicationWindow::~ApplicationWindow"); #ifdef RS_SCRIPTING - RS_DEBUG->print("QC_ApplicationWindow::~QC_ApplicationWindow: deleting scripter"); + RS_DEBUG->print("ApplicationWindow::~ApplicationWindow: deleting scripter"); delete scripter; - RS_DEBUG->print("QC_ApplicationWindow::~QC_ApplicationWindow: deleting scripter: OK"); + RS_DEBUG->print("ApplicationWindow::~ApplicationWindow: deleting scripter: OK"); #endif - RS_DEBUG->print("QC_ApplicationWindow::~QC_ApplicationWindow: deleting action handler"); + RS_DEBUG->print("ApplicationWindow::~ApplicationWindow: deleting action handler"); delete actionHandler; - RS_DEBUG->print("QC_ApplicationWindow::~QC_ApplicationWindow: deleting action handler: OK"); + RS_DEBUG->print("ApplicationWindow::~ApplicationWindow: deleting action handler: OK"); - RS_DEBUG->print("QC_ApplicationWindow::~QC_ApplicationWindow: deleting dialog factory"); + RS_DEBUG->print("ApplicationWindow::~ApplicationWindow: deleting dialog factory"); delete dialogFactory; - RS_DEBUG->print("QC_ApplicationWindow::~QC_ApplicationWindow: deleting dialog factory: OK"); + RS_DEBUG->print("ApplicationWindow::~ApplicationWindow: deleting dialog factory: OK"); -//no RS_DEBUG->print("QC_ApplicationWindow::~QC_ApplicationWindow: " +//no RS_DEBUG->print("ApplicationWindow::~ApplicationWindow: " // "deleting assistant.."); // if (assistant!=NULL) { // delete assistant; // } -// RS_DEBUG->print("QC_ApplicationWindow::~QC_ApplicationWindow: " +// RS_DEBUG->print("ApplicationWindow::~ApplicationWindow: " // "deleting assistant: OK"); - RS_DEBUG->print("QC_ApplicationWindow::~QC_ApplicationWindow: OK"); + RS_DEBUG->print("ApplicationWindow::~ApplicationWindow: OK"); } /** * Runs the start script if scripting is available. */ -void QC_ApplicationWindow::slotRunStartScript() +void ApplicationWindow::slotRunStartScript() { slotRunScript("autostart.qs"); } @@ -179,16 +179,16 @@ void QC_ApplicationWindow::slotRunStartScript() * Runs a script. The action that triggers this slot has to carry the * name of the script file. */ -void QC_ApplicationWindow::slotRunScript() +void ApplicationWindow::slotRunScript() { - RS_DEBUG->print("QC_ApplicationWindow::slotRunScript"); + RS_DEBUG->print("ApplicationWindow::slotRunScript"); const QObject * s = sender(); if (s != NULL) { QString script = ((QAction *)s)->text(); - RS_DEBUG->print("QC_ApplicationWindow::slotRunScript: %s", script.toLatin1().data()); + RS_DEBUG->print("ApplicationWindow::slotRunScript: %s", script.toLatin1().data()); slotRunScript(script); } } @@ -196,14 +196,14 @@ void QC_ApplicationWindow::slotRunScript() /** * Runs the script with the given name. */ -void QC_ApplicationWindow::slotRunScript(const QString & name) +void ApplicationWindow::slotRunScript(const QString & name) { #ifdef RS_SCRIPTING - RS_DEBUG->print("QC_ApplicationWindow::slotRunScript"); + RS_DEBUG->print("ApplicationWindow::slotRunScript"); if (scripter == NULL) { - RS_DEBUG->print(RS_Debug::D_WARNING, "QC_ApplicationWindow::slotRunScript: scripter not initialized"); + RS_DEBUG->print(RS_Debug::D_WARNING, "ApplicationWindow::slotRunScript: scripter not initialized"); return; } @@ -214,12 +214,12 @@ void QC_ApplicationWindow::slotRunScript(const QString & name) for (QStringList::Iterator it = scriptList.begin(); it!=scriptList.end(); ++it) { - RS_DEBUG->print("QC_ApplicationWindow::slotRunScript: checking script '%s'", (*it).toLatin1().data(); + RS_DEBUG->print("ApplicationWindow::slotRunScript: checking script '%s'", (*it).toLatin1().data(); QFileInfo fi(*it); if (fi.exists() && fi.fileName() == name) { - RS_DEBUG->print("QC_ApplicationWindow::slotRunScript: running '%s'", (*it).toLatin1().data()); + RS_DEBUG->print("ApplicationWindow::slotRunScript: running '%s'", (*it).toLatin1().data()); scripter->runScript(*it, "main"); } } @@ -230,14 +230,14 @@ void QC_ApplicationWindow::slotRunScript(const QString & name) * Called from toolbar buttons that were added by scripts to * insert blocks. */ -void QC_ApplicationWindow::slotInsertBlock() +void ApplicationWindow::slotInsertBlock() { const QObject * s = sender(); if (s != NULL) { QString block = ((QAction *)s)->text(); - RS_DEBUG->print("QC_ApplicationWindow::slotInsertBlock: %s", block.toLatin1().data()); + RS_DEBUG->print("ApplicationWindow::slotInsertBlock: %s", block.toLatin1().data()); slotInsertBlock(block); } } @@ -245,9 +245,9 @@ void QC_ApplicationWindow::slotInsertBlock() /** * Called to insert blocks. */ -void QC_ApplicationWindow::slotInsertBlock(const QString & name) +void ApplicationWindow::slotInsertBlock(const QString & name) { - RS_DEBUG->print("QC_ApplicationWindow::slotInsertBlock: '%s'", name.toLatin1().data()); + RS_DEBUG->print("ApplicationWindow::slotInsertBlock: '%s'", name.toLatin1().data()); statusBar()->showMessage(tr("Inserting block '%1'").arg(name), 2000); @@ -265,7 +265,7 @@ void QC_ApplicationWindow::slotInsertBlock(const QString & name) /** * Shows the main application window and a splash screen. */ -void QC_ApplicationWindow::show() +void ApplicationWindow::show() { #ifdef QSPLASHSCREEN_H if (splash) @@ -292,7 +292,7 @@ void QC_ApplicationWindow::show() /** * Called when the splash screen has to terminate. */ -void QC_ApplicationWindow::finishSplashScreen() +void ApplicationWindow::finishSplashScreen() { #ifdef QSPLASHSCREEN_H if (splash) @@ -307,17 +307,17 @@ void QC_ApplicationWindow::finishSplashScreen() /** * Close Event. Called when the user tries to close the app. */ -void QC_ApplicationWindow::closeEvent(QCloseEvent * /*ce*/) +void ApplicationWindow::closeEvent(QCloseEvent * /*ce*/) { - RS_DEBUG->print("QC_ApplicationWindow::closeEvent()"); + RS_DEBUG->print("ApplicationWindow::closeEvent()"); slotFileQuit(); - RS_DEBUG->print("QC_ApplicationWindow::closeEvent(): OK"); + RS_DEBUG->print("ApplicationWindow::closeEvent(): OK"); } /** * Handles right-clicks for moving back to the last cad tool bar. */ -void QC_ApplicationWindow::mouseReleaseEvent(QMouseEvent * e) +void ApplicationWindow::mouseReleaseEvent(QMouseEvent * e) { if (e->button() == Qt::RightButton && cadToolBar != NULL) cadToolBar->showToolBarMain(); @@ -328,9 +328,9 @@ void QC_ApplicationWindow::mouseReleaseEvent(QMouseEvent * e) /** * Initializes the MDI workspace. */ -void QC_ApplicationWindow::initMDI() +void ApplicationWindow::initMDI() { - RS_DEBUG->print("QC_ApplicationWindow::initMDI() begin"); + RS_DEBUG->print("ApplicationWindow::initMDI() begin"); /* Could use QVBoxLayout instead of Q3VBox, but do we even need to? */ // Q3VBox * vb = new Q3VBox(this); @@ -340,14 +340,14 @@ void QC_ApplicationWindow::initMDI() // workspace->setScrollBarsEnabled(true); // setCentralWidget(vb); setCentralWidget(workspace);//JLH:hmm. (Yes, it works! \o/) - RS_DEBUG->print("QC_ApplicationWindow::initMDI(): workspace=%08X", workspace); + RS_DEBUG->print("ApplicationWindow::initMDI(): workspace=%08X", workspace); //#warning "Object::connect: No such signal QMdiArea::windowActivated(QWidget *)" // connect(workspace, SIGNAL(windowActivated(QWidget *)), this, SLOT(slotWindowActivated(QWidget *))); connect(workspace, SIGNAL(subWindowActivated(QMdiSubWindow *)), this, SLOT(slotWindowActivated(QMdiSubWindow *))); - RS_DEBUG->print("QC_ApplicationWindow::initMDI() end"); + RS_DEBUG->print("ApplicationWindow::initMDI() end"); } /** @@ -355,9 +355,9 @@ void QC_ApplicationWindow::initMDI() * (Actually, it creates all application menus & toolbars. All actions are * created in CreateQtActions() and simply referenced here.) */ -void QC_ApplicationWindow::initActions() +void ApplicationWindow::initActions() { - RS_DEBUG->print("QC_ApplicationWindow::initActions()"); + RS_DEBUG->print("ApplicationWindow::initActions()"); CreateQtActions(this); // @@ -1205,9 +1205,9 @@ void QC_ApplicationWindow::initActions() /** * Initializes the menu bar. */ -void QC_ApplicationWindow::initMenuBar() +void ApplicationWindow::initMenuBar() { - RS_DEBUG->print("QC_ApplicationWindow::initMenuBar()"); + RS_DEBUG->print("ApplicationWindow::initMenuBar()"); // menuBar entry windowsMenu windowsMenu = new QMenu(tr("&Window"), this); @@ -1268,9 +1268,9 @@ void QC_ApplicationWindow::initMenuBar() /** * Initializes the tool bars (file tool bar and pen tool bar). */ -void QC_ApplicationWindow::initToolBar() +void ApplicationWindow::initToolBar() { - RS_DEBUG->print("QC_ApplicationWindow::initToolBar()"); + RS_DEBUG->print("ApplicationWindow::initToolBar()"); // fileToolBar = new Q3ToolBar(this, "File Operations"); fileToolBar = addToolBar(tr("File Operations")); @@ -1329,9 +1329,9 @@ void QC_ApplicationWindow::initToolBar() /** * Initializes the status bar at the bottom. */ -void QC_ApplicationWindow::initStatusBar() +void ApplicationWindow::initStatusBar() { - RS_DEBUG->print("QC_ApplicationWindow::initStatusBar()"); + RS_DEBUG->print("ApplicationWindow::initStatusBar()"); statusBar()->setMinimumHeight(32); coordinateWidget = new CoordinateWidget(statusBar());//, "coordinates"); @@ -1346,9 +1346,9 @@ void QC_ApplicationWindow::initStatusBar() * Initializes the global application settings from the * config file (unix, mac) or registry (windows). */ -void QC_ApplicationWindow::initSettings() +void ApplicationWindow::initSettings() { - RS_DEBUG->print("QC_ApplicationWindow::initSettings()"); + RS_DEBUG->print("ApplicationWindow::initSettings()"); settings.beginGroup("RecentFiles"); for(int i=0; iMaximum(); ++i) @@ -1386,9 +1386,9 @@ void QC_ApplicationWindow::initSettings() /** * Stores the global application settings to file or registry. */ -void QC_ApplicationWindow::storeSettings() +void ApplicationWindow::storeSettings() { - RS_DEBUG->print("QC_ApplicationWindow::storeSettings()"); + RS_DEBUG->print("ApplicationWindow::storeSettings()"); settings.beginGroup("RecentFiles"); @@ -1403,15 +1403,15 @@ void QC_ApplicationWindow::storeSettings() settings.setValue("DockWindows", saveState()); settings.endGroup(); - RS_DEBUG->print("QC_ApplicationWindow::storeSettings(): OK"); + RS_DEBUG->print("ApplicationWindow::storeSettings(): OK"); } /** * Initializes the view. */ -void QC_ApplicationWindow::initView() +void ApplicationWindow::initView() { - RS_DEBUG->print("QC_ApplicationWindow::initView()"); + RS_DEBUG->print("ApplicationWindow::initView()"); RS_DEBUG->print("init view.."); QDockWidget * dw; @@ -1525,7 +1525,7 @@ void QC_ApplicationWindow::initView() * Implementation from QG_MainWindowInterface. * Can be called from scripts to add individual GUI elements. */ -/*QToolBar* QC_ApplicationWindow::createToolBar(const QString& name) { +/*QToolBar* ApplicationWindow::createToolBar(const QString& name) { QToolBar* tb = new QToolBar(this, name); tb->setLabel(name); return tb; @@ -1534,7 +1534,7 @@ void QC_ApplicationWindow::initView() /** * Creates a new button in the given tool bar for running a script. */ -/*void QC_ApplicationWindow::addToolBarButton(QToolBar* tb) { +/*void ApplicationWindow::addToolBarButton(QToolBar* tb) { if (tb!=NULL) { QAction* action = new QAction("Blah", QPixmap::fromMimeSource("zoomwindow.png"), @@ -1544,13 +1544,13 @@ void QC_ApplicationWindow::initView() } }*/ -#warning "!!! QC_ApplicationWindow::updateRecentFilesMenu() is DEPRECATED !!!" +#warning "!!! ApplicationWindow::updateRecentFilesMenu() is DEPRECATED !!!" /** * Updates the recent file list in the file menu. */ -void QC_ApplicationWindow::updateRecentFilesMenu() +void ApplicationWindow::updateRecentFilesMenu() { - RS_DEBUG->print("QC_ApplicationWindow::updateRecentFilesMenu()"); + RS_DEBUG->print("ApplicationWindow::updateRecentFilesMenu()"); RS_DEBUG->print("Updating recent file menu..."); #if 0 @@ -1570,7 +1570,7 @@ void QC_ApplicationWindow::updateRecentFilesMenu() } } #else -//#warning "!!! Need to fix QC_ApplicationWindow::updateRecentFilesMenu() !!!" +//#warning "!!! Need to fix ApplicationWindow::updateRecentFilesMenu() !!!" recentFiles->UpdateGUI(); #endif } @@ -1578,7 +1578,7 @@ void QC_ApplicationWindow::updateRecentFilesMenu() /** * Goes back to the previous menu or one step in the current action. */ -void QC_ApplicationWindow::slotBack() +void ApplicationWindow::slotBack() { RS_GraphicView * graphicView = getGraphicView(); @@ -1594,7 +1594,7 @@ void QC_ApplicationWindow::slotBack() /** * Goes one step further in the current action. */ -void QC_ApplicationWindow::slotEnter() +void ApplicationWindow::slotEnter() { if (commandWidget == NULL || !commandWidget->checkFocus()) { @@ -1613,7 +1613,7 @@ void QC_ApplicationWindow::slotEnter() /** * Sets the keyboard focus on the command line. */ -void QC_ApplicationWindow::slotFocusCommandLine() +void ApplicationWindow::slotFocusCommandLine() { if (commandWidget->isVisible()) commandWidget->setFocus(); @@ -1622,7 +1622,7 @@ void QC_ApplicationWindow::slotFocusCommandLine() /** * Shows the given error on the command line. */ -void QC_ApplicationWindow::slotError(const QString & msg) +void ApplicationWindow::slotError(const QString & msg) { commandWidget->appendHistory(msg); } @@ -1632,7 +1632,7 @@ void QC_ApplicationWindow::slotError(const QString & msg) * of a escape press from the layer widget (e.g after switching desktops * in XP). */ -void QC_ApplicationWindow::slotFocus() +void ApplicationWindow::slotFocus() { //QG_GraphicView* graphicView = getGraphicView(); /*if (graphicView!=NULL) { @@ -1646,23 +1646,22 @@ void QC_ApplicationWindow::slotFocus() /** * Called when a document window was activated. */ -//void QC_ApplicationWindow::slotWindowActivated(QWidget *) -void QC_ApplicationWindow::slotWindowActivated(QMdiSubWindow * /*w*/) +void ApplicationWindow::slotWindowActivated(QMdiSubWindow * /*w*/) { - RS_DEBUG->print("QC_ApplicationWindow::slotWindowActivated begin"); + RS_DEBUG->print("ApplicationWindow::slotWindowActivated begin"); -//the following does: return (QC_MDIWindow *)workspace->activeSubWindow(); +//the following does: return (MDIWindow *)workspace->activeSubWindow(); //which means the subwindow is NOT being activated!!! - QC_MDIWindow * m = getMDIWindow(); - RS_DEBUG->print(/*RS_Debug::D_CRITICAL,*/ "QC_ApplicationWindow::slotWindowActivated m=%08X", m); + MDIWindow * m = getMDIWindow(); + RS_DEBUG->print(/*RS_Debug::D_CRITICAL,*/ "ApplicationWindow::slotWindowActivated m=%08X", m); if (m) - RS_DEBUG->print(/*RS_Debug::D_CRITICAL,*/ "QC_ApplicationWindow::slotWindowActivated m->getDoc=%08X", m->getDocument()); + RS_DEBUG->print(/*RS_Debug::D_CRITICAL,*/ "ApplicationWindow::slotWindowActivated m->getDoc=%08X", m->getDocument()); if (m != NULL && m->getDocument() != NULL) { //m->setWindowState(WindowMaximized); - RS_DEBUG->print("QC_ApplicationWindow::slotWindowActivated: document: %d", m->getDocument()->getId()); + RS_DEBUG->print("ApplicationWindow::slotWindowActivated: document: %d", m->getDocument()->getId()); bool showByBlock = m->getDocument()->rtti() == RS2::EntityBlock; layerWidget->setLayerList(m->getDocument()->getLayerList(), showByBlock); @@ -1701,16 +1700,16 @@ void QC_ApplicationWindow::slotWindowActivated(QMdiSubWindow * /*w*/) // Disable/Enable menu and toolbar items emit windowsChanged(m != NULL && m->getDocument() != NULL); - RS_DEBUG->print("QC_ApplicationWindow::slotWindowActivated end"); + RS_DEBUG->print("ApplicationWindow::slotWindowActivated end"); } /** * Called when the menu 'windows' is about to be shown. * This is used to update the window list in the menu. */ -void QC_ApplicationWindow::slotWindowsMenuAboutToShow() +void ApplicationWindow::slotWindowsMenuAboutToShow() { - RS_DEBUG->print("QC_ApplicationWindow::slotWindowsMenuAboutToShow"); + RS_DEBUG->print("ApplicationWindow::slotWindowsMenuAboutToShow"); windowsMenu->clear(); #if 0 @@ -1765,10 +1764,9 @@ void QC_ApplicationWindow::slotWindowsMenuAboutToShow() * Called when the user selects a document window from the * window list. */ -//void QC_ApplicationWindow::slotWindowsMenuActivated(int id) -void QC_ApplicationWindow::slotWindowsMenuActivated(QAction * id) +void ApplicationWindow::slotWindowsMenuActivated(QAction * id) { - RS_DEBUG->print("QC_ApplicationWindow::slotWindowsMenuActivated"); + RS_DEBUG->print("ApplicationWindow::slotWindowsMenuActivated"); // QMdiSubWindow * w = workspace->subWindowList().at(id); QMdiSubWindow * w = workspace->subWindowList().at(id->data().toInt()); @@ -1781,9 +1779,9 @@ void QC_ApplicationWindow::slotWindowsMenuActivated(QAction * id) /** * Tiles MDI windows horizontally. */ -void QC_ApplicationWindow::slotTileHorizontal() +void ApplicationWindow::slotTileHorizontal() { - RS_DEBUG->print("QC_ApplicationWindow::slotTileHorizontal"); + RS_DEBUG->print("ApplicationWindow::slotTileHorizontal"); #if 0 // primitive horizontal tiling @@ -1824,7 +1822,7 @@ void QC_ApplicationWindow::slotTileHorizontal() /** * Tiles MDI windows vertically. */ -void QC_ApplicationWindow::slotTileVertical() +void ApplicationWindow::slotTileVertical() { #if 0 workspace->tile(); @@ -1866,7 +1864,7 @@ void QC_ApplicationWindow::slotTileVertical() */ /* #ifdef RS_CAM -void QC_ApplicationWindow::slotCamExportAuto() { +void ApplicationWindow::slotCamExportAuto() { printf("CAM export..\n"); RS_Document* d = getDocument(); @@ -1884,25 +1882,25 @@ void QC_ApplicationWindow::slotCamExportAuto() { * Called when something changed in the pen tool bar * (e.g. color, width, style). */ -void QC_ApplicationWindow::slotPenChanged(RS_Pen pen) +void ApplicationWindow::slotPenChanged(RS_Pen pen) { - RS_DEBUG->print("QC_ApplicationWindow::slotPenChanged() begin"); + RS_DEBUG->print("ApplicationWindow::slotPenChanged() begin"); RS_DEBUG->print("Setting active pen..."); - QC_MDIWindow * m = getMDIWindow(); + MDIWindow * m = getMDIWindow(); if (m != NULL) m->slotPenChanged(pen); - RS_DEBUG->print("QC_ApplicationWindow::slotPenChanged() end"); + RS_DEBUG->print("ApplicationWindow::slotPenChanged() end"); } /** * Creates a new MDI window with the given document or a new * document if 'doc' is NULL. */ -QC_MDIWindow * QC_ApplicationWindow::slotFileNew(RS_Document * doc) +MDIWindow * ApplicationWindow::slotFileNew(RS_Document * doc) { - RS_DEBUG->print("QC_ApplicationWindow::slotFileNew() begin"); + RS_DEBUG->print("ApplicationWindow::slotFileNew() begin"); static int id = 0; id++; @@ -1911,8 +1909,8 @@ QC_MDIWindow * QC_ApplicationWindow::slotFileNew(RS_Document * doc) #warning "QWidget::setMinimumSize: (/QMdi::ControlLabel) Negative sizes (-1,-1) are not possible" RS_DEBUG->print(" creating MDI window"); -// QC_MDIWindow * w = new QC_MDIWindow(doc, workspace, 0, Qt::WA_DeleteOnClose); - QC_MDIWindow * w = new QC_MDIWindow(doc, workspace, 0, Qt::SubWindow); +// MDIWindow * w = new MDIWindow(doc, workspace, 0, Qt::WA_DeleteOnClose); + MDIWindow * w = new MDIWindow(doc, workspace, 0, Qt::SubWindow); w->setAttribute(Qt::WA_DeleteOnClose); // w->setWindowState(WindowMaximized); connect(w, SIGNAL(signalClosing()), this, SLOT(slotFileClosing())); @@ -1957,7 +1955,7 @@ QC_MDIWindow * QC_ApplicationWindow::slotFileNew(RS_Document * doc) QG_DIALOGFACTORY->setMainWindow(this); #if 1 //bugfix for Qt3->4 conversion - RS_DEBUG->print(/*RS_Debug::D_CRITICAL,*/ "QC_ApplicationWindow::slotFileNew: adding window to workspace..."); + RS_DEBUG->print(/*RS_Debug::D_CRITICAL,*/ "ApplicationWindow::slotFileNew: adding window to workspace..."); // workspace->addWindow(w); workspace->addSubWindow(w); #endif @@ -1977,14 +1975,14 @@ QC_MDIWindow * QC_ApplicationWindow::slotFileNew(RS_Document * doc) //neither of these is working... Is the event being eaten somewhere??? // workspace->activateNextSubWindow(); // w->setFocus(); -//printf("--> QC_ApplicationWindow::slotFileNew(): w %s focus...\n", (w->hasFocus() ? "has" : "DOES NOT HAVE")); +//printf("--> ApplicationWindow::slotFileNew(): w %s focus...\n", (w->hasFocus() ? "has" : "DOES NOT HAVE")); #endif #warning "!!! Parameter to slotWindowActivated() is ignored !!!" slotWindowActivated(w); statusBar()->showMessage(tr("New Drawing created."), 2000); - RS_DEBUG->print("QC_ApplicationWindow::slotFileNew() OK"); + RS_DEBUG->print("ApplicationWindow::slotFileNew() OK"); setFocus(); return w; @@ -1993,28 +1991,27 @@ QC_MDIWindow * QC_ApplicationWindow::slotFileNew(RS_Document * doc) /** * Menu file -> open. */ -void QC_ApplicationWindow::slotFileOpen() +void ApplicationWindow::slotFileOpen() { - RS_DEBUG->print("QC_ApplicationWindow::slotFileOpen()"); + RS_DEBUG->print("ApplicationWindow::slotFileOpen()"); - RS_DEBUG->print("QC_ApplicationWindow::slotFileOpen() 001"); + RS_DEBUG->print("ApplicationWindow::slotFileOpen() 001"); RS2::FormatType type = RS2::FormatUnknown; - RS_DEBUG->print("QC_ApplicationWindow::slotFileOpen() 002"); + RS_DEBUG->print("ApplicationWindow::slotFileOpen() 002"); QString fileName = QG_FileDialog::getOpenFileName(this, &type); - RS_DEBUG->print("QC_ApplicationWindow::slotFileOpen() 003"); + RS_DEBUG->print("ApplicationWindow::slotFileOpen() 003"); slotFileOpen(fileName, type); - RS_DEBUG->print("QC_ApplicationWindow::slotFileOpen(): OK"); + RS_DEBUG->print("ApplicationWindow::slotFileOpen(): OK"); } /** * Called when a recently opened file is chosen from the list in the * file menu. */ -//void QC_ApplicationWindow::slotFileOpenRecent(int id) -void QC_ApplicationWindow::slotFileOpenRecent(void) +void ApplicationWindow::slotFileOpenRecent(void) { #if 0 - RS_DEBUG->print("QC_ApplicationWindow::slotFileOpenRecent()"); + RS_DEBUG->print("ApplicationWindow::slotFileOpenRecent()"); statusBar()->showMessage(tr("Opening recent file...")); QString fileName = recentFiles->get(id); @@ -2043,22 +2040,22 @@ void QC_ApplicationWindow::slotFileOpenRecent(void) /** * Menu file -> open. */ -void QC_ApplicationWindow::slotFileOpen(const QString & fileName, RS2::FormatType type) +void ApplicationWindow::slotFileOpen(const QString & fileName, RS2::FormatType type) { - RS_DEBUG->print("QC_ApplicationWindow::slotFileOpen(..)"); + RS_DEBUG->print("ApplicationWindow::slotFileOpen(..)"); QApplication::setOverrideCursor(QCursor(Qt::WaitCursor)); if (!fileName.isEmpty()) { - RS_DEBUG->print("QC_ApplicationWindow::slotFileOpen: creating new doc window"); + RS_DEBUG->print("ApplicationWindow::slotFileOpen: creating new doc window"); // Create new document window: - QC_MDIWindow * w = slotFileNew(); + MDIWindow * w = slotFileNew(); // RS_APP->processEvents(1000); //Really, is this needed??? // RS_APP->processEvents(QEventLoop::AllEvents, 1000); - RS_DEBUG->print("QC_ApplicationWindow::slotFileOpen: linking layer list"); + RS_DEBUG->print("ApplicationWindow::slotFileOpen: linking layer list"); // link the layer widget to the new document: layerWidget->setLayerList(w->getDocument()->getLayerList(), false); // link the block widget to the new document: @@ -2070,7 +2067,7 @@ void QC_ApplicationWindow::slotFileOpen(const QString & fileName, RS2::FormatTyp simulationControls->setGraphicView(w->getGraphicView()); #endif - RS_DEBUG->print("QC_ApplicationWindow::slotFileOpen: open file"); + RS_DEBUG->print("ApplicationWindow::slotFileOpen: open file"); // RS_APP->processEvents(1000); //We no longer try to do Qt better than the Qt folks... @@ -2088,8 +2085,8 @@ void QC_ApplicationWindow::slotFileOpen(const QString & fileName, RS2::FormatTyp return; } - RS_DEBUG->print("QC_ApplicationWindow::slotFileOpen: open file: OK"); - RS_DEBUG->print("QC_ApplicationWindow::slotFileOpen: update recent file menu: 1"); + RS_DEBUG->print("ApplicationWindow::slotFileOpen: open file: OK"); + RS_DEBUG->print("ApplicationWindow::slotFileOpen: update recent file menu: 1"); // update recent files menu: if (type == RS2::FormatDXF1) @@ -2097,22 +2094,22 @@ void QC_ApplicationWindow::slotFileOpen(const QString & fileName, RS2::FormatTyp else recentFiles->add(fileName); - RS_DEBUG->print("QC_ApplicationWindow::slotFileOpen: update recent file menu: 2"); + RS_DEBUG->print("ApplicationWindow::slotFileOpen: update recent file menu: 2"); // updateRecentFilesMenu(); recentFiles->UpdateGUI(); - RS_DEBUG->print("QC_ApplicationWindow::slotFileOpen: update recent file menu: OK"); + RS_DEBUG->print("ApplicationWindow::slotFileOpen: update recent file menu: OK"); - RS_DEBUG->print("QC_ApplicationWindow::slotFileOpen: set caption"); + RS_DEBUG->print("ApplicationWindow::slotFileOpen: set caption"); // update caption: // w->setCaption(fileName); w->setWindowTitle(fileName); - RS_DEBUG->print("QC_ApplicationWindow::slotFileOpen: set caption: OK"); + RS_DEBUG->print("ApplicationWindow::slotFileOpen: set caption: OK"); - RS_DEBUG->print("QC_ApplicationWindow::slotFileOpen: update coordinate widget"); + RS_DEBUG->print("ApplicationWindow::slotFileOpen: update coordinate widget"); // update coordinate widget format: RS_DIALOGFACTORY->updateCoordinateWidget(Vector(0.0, 0.0), Vector(0.0, 0.0), true); - RS_DEBUG->print("QC_ApplicationWindow::slotFileOpen: update coordinate widget: OK"); + RS_DEBUG->print("ApplicationWindow::slotFileOpen: update coordinate widget: OK"); // show output of filter (if any): // commandWidget->processStderr(); @@ -2126,19 +2123,19 @@ void QC_ApplicationWindow::slotFileOpen(const QString & fileName, RS2::FormatTyp } QApplication::restoreOverrideCursor(); - RS_DEBUG->print("QC_ApplicationWindow::slotFileOpen(..) OK"); + RS_DEBUG->print("ApplicationWindow::slotFileOpen(..) OK"); } /** * Menu file -> save. */ -void QC_ApplicationWindow::slotFileSave() +void ApplicationWindow::slotFileSave() { - RS_DEBUG->print("QC_ApplicationWindow::slotFileSave()"); + RS_DEBUG->print("ApplicationWindow::slotFileSave()"); statusBar()->showMessage(tr("Saving drawing...")); - QC_MDIWindow * w = getMDIWindow(); + MDIWindow * w = getMDIWindow(); QString name; if (w != NULL) @@ -2171,13 +2168,13 @@ void QC_ApplicationWindow::slotFileSave() /** * Menu file -> save as. */ -void QC_ApplicationWindow::slotFileSaveAs() +void ApplicationWindow::slotFileSaveAs() { - RS_DEBUG->print("QC_ApplicationWindow::slotFileSaveAs()"); + RS_DEBUG->print("ApplicationWindow::slotFileSaveAs()"); statusBar()->showMessage(tr("Saving drawing under new filename...")); - QC_MDIWindow * w = getMDIWindow(); + MDIWindow * w = getMDIWindow(); QString name; if (w != NULL) @@ -2213,13 +2210,13 @@ void QC_ApplicationWindow::slotFileSaveAs() /** * Menu file -> export. */ -void QC_ApplicationWindow::slotFileExport() +void ApplicationWindow::slotFileExport() { - RS_DEBUG->print("QC_ApplicationWindow::slotFileExport()"); + RS_DEBUG->print("ApplicationWindow::slotFileExport()"); statusBar()->showMessage(tr("Exporting drawing...")); - QC_MDIWindow * w = getMDIWindow(); + MDIWindow * w = getMDIWindow(); QString fn; if (w != NULL) @@ -2347,13 +2344,13 @@ void QC_ApplicationWindow::slotFileExport() * @param black true: Black background, false: white * @param bw true: black/white export, false: color */ -bool QC_ApplicationWindow::slotFileExport(const QString & name, const QString & format, QSize size, bool black, bool bw) +bool ApplicationWindow::slotFileExport(const QString & name, const QString & format, QSize size, bool black, bool bw) { - QC_MDIWindow * w = getMDIWindow(); + MDIWindow * w = getMDIWindow(); if (w == NULL) { - RS_DEBUG->print(RS_Debug::D_WARNING, "QC_ApplicationWindow::slotFileExport: no window opened"); + RS_DEBUG->print(RS_Debug::D_WARNING, "ApplicationWindow::slotFileExport: no window opened"); return false; } @@ -2361,7 +2358,7 @@ bool QC_ApplicationWindow::slotFileExport(const QString & name, const QString & if (graphic == NULL) { - RS_DEBUG->print(RS_Debug::D_WARNING, "QC_ApplicationWindow::slotFileExport: no graphic"); + RS_DEBUG->print(RS_Debug::D_WARNING, "ApplicationWindow::slotFileExport: no graphic"); return false; } @@ -2438,11 +2435,11 @@ bool QC_ApplicationWindow::slotFileExport(const QString & name, const QString & /** * Menu file -> close. */ -void QC_ApplicationWindow::slotFileClose() +void ApplicationWindow::slotFileClose() { - RS_DEBUG->print("QC_ApplicationWindow::slotFileClose()"); + RS_DEBUG->print("ApplicationWindow::slotFileClose()"); - QC_MDIWindow * m = getMDIWindow(); + MDIWindow * m = getMDIWindow(); if (m != NULL) // m->close(true); @@ -2461,9 +2458,9 @@ void QC_ApplicationWindow::slotFileClose() * Called when a MDI window is actually about to close. Used to * detach widgets from the document. */ -void QC_ApplicationWindow::slotFileClosing() +void ApplicationWindow::slotFileClosing() { - RS_DEBUG->print("QC_ApplicationWindow::slotFileClosing()"); + RS_DEBUG->print("ApplicationWindow::slotFileClosing()"); RS_DEBUG->print("detaching lists"); layerWidget->setLayerList(NULL, false); @@ -2477,15 +2474,15 @@ void QC_ApplicationWindow::slotFileClosing() /** * Menu file -> print. */ -void QC_ApplicationWindow::slotFilePrint() +void ApplicationWindow::slotFilePrint() { - RS_DEBUG->print("QC_ApplicationWindow::slotFilePrint()"); + RS_DEBUG->print("ApplicationWindow::slotFilePrint()"); - QC_MDIWindow * w = getMDIWindow(); + MDIWindow * w = getMDIWindow(); if (w == NULL) { - RS_DEBUG->print(RS_Debug::D_WARNING, "QC_ApplicationWindow::slotFilePrint: no window opened"); + RS_DEBUG->print(RS_Debug::D_WARNING, "ApplicationWindow::slotFilePrint: no window opened"); return; } @@ -2493,7 +2490,7 @@ void QC_ApplicationWindow::slotFilePrint() if (graphic == NULL) { - RS_DEBUG->print(RS_Debug::D_WARNING, "QC_ApplicationWindow::slotFilePrint: no graphic"); + RS_DEBUG->print(RS_Debug::D_WARNING, "ApplicationWindow::slotFilePrint: no graphic"); return; } @@ -2572,27 +2569,27 @@ void QC_ApplicationWindow::slotFilePrint() /** * Menu file -> print preview. */ -void QC_ApplicationWindow::slotFilePrintPreview(bool on) +void ApplicationWindow::slotFilePrintPreview(bool on) { - RS_DEBUG->print("QC_ApplicationWindow::slotFilePrintPreview()"); + RS_DEBUG->print("ApplicationWindow::slotFilePrintPreview()"); RS_DEBUG->print(" creating MDI window"); - QC_MDIWindow * parent = getMDIWindow(); + MDIWindow * parent = getMDIWindow(); if (parent == NULL) { - RS_DEBUG->print(RS_Debug::D_WARNING, "QC_ApplicationWindow::slotFilePrintPreview: no window opened"); + RS_DEBUG->print(RS_Debug::D_WARNING, "ApplicationWindow::slotFilePrintPreview: no window opened"); return; } // close print preview: if (!on) { - RS_DEBUG->print("QC_ApplicationWindow::slotFilePrintPreview(): off"); + RS_DEBUG->print("ApplicationWindow::slotFilePrintPreview(): off"); if (parent->getGraphicView()->isPrintPreview()) { - RS_DEBUG->print("QC_ApplicationWindow::slotFilePrintPreview(): close"); + RS_DEBUG->print("ApplicationWindow::slotFilePrintPreview(): close"); slotFileClose(); } } @@ -2600,11 +2597,11 @@ void QC_ApplicationWindow::slotFilePrintPreview(bool on) else { // look for an existing print preview: - QC_MDIWindow * ppv = parent->getPrintPreview(); + MDIWindow * ppv = parent->getPrintPreview(); if (ppv != NULL) { - RS_DEBUG->print("QC_ApplicationWindow::slotFilePrintPreview(): show existing"); + RS_DEBUG->print("ApplicationWindow::slotFilePrintPreview(): show existing"); slotWindowActivated(ppv); ppv->showNormal(); } @@ -2612,9 +2609,9 @@ void QC_ApplicationWindow::slotFilePrintPreview(bool on) { if (!parent->getGraphicView()->isPrintPreview()) { - RS_DEBUG->print("QC_ApplicationWindow::slotFilePrintPreview(): create"); + RS_DEBUG->print("ApplicationWindow::slotFilePrintPreview(): create"); - QC_MDIWindow * w = new QC_MDIWindow(parent->getDocument(), workspace, 0, Qt::SubWindow); + MDIWindow * w = new MDIWindow(parent->getDocument(), workspace, 0, Qt::SubWindow); w->setAttribute(Qt::WA_DeleteOnClose); parent->addChildWindow(w); //connect(w, SIGNAL(signalClosing()), @@ -2676,9 +2673,9 @@ void QC_ApplicationWindow::slotFilePrintPreview(bool on) /** * Menu file -> quit. */ -void QC_ApplicationWindow::slotFileQuit() +void ApplicationWindow::slotFileQuit() { - RS_DEBUG->print("QC_ApplicationWindow::slotFileQuit()"); + RS_DEBUG->print("ApplicationWindow::slotFileQuit()"); statusBar()->showMessage(tr("Exiting application...")); @@ -2689,7 +2686,7 @@ void QC_ApplicationWindow::slotFileQuit() /** * Forces termination of QCad (demo version). */ -void QC_ApplicationWindow::slotFileDemoQuit() +void ApplicationWindow::slotFileDemoQuit() { statusBar()->showMessage(tr("Exiting application...")); @@ -2702,11 +2699,11 @@ void QC_ApplicationWindow::slotFileDemoQuit() * * @param toggle true: show, false: hide. */ -void QC_ApplicationWindow::slotViewGrid(bool toggle) +void ApplicationWindow::slotViewGrid(bool toggle) { - RS_DEBUG->print("QC_ApplicationWindow::slotViewGrid()"); + RS_DEBUG->print("ApplicationWindow::slotViewGrid()"); - QC_MDIWindow * m = getMDIWindow(); + MDIWindow * m = getMDIWindow(); if (m != NULL) { @@ -2719,7 +2716,7 @@ void QC_ApplicationWindow::slotViewGrid(bool toggle) updateGrids(); redrawAll(); - RS_DEBUG->print("QC_ApplicationWindow::slotViewGrid() OK"); + RS_DEBUG->print("ApplicationWindow::slotViewGrid() OK"); } /** @@ -2727,11 +2724,11 @@ void QC_ApplicationWindow::slotViewGrid(bool toggle) * * @param toggle true: enable, false: disable. */ -void QC_ApplicationWindow::slotViewDraft(bool toggle) +void ApplicationWindow::slotViewDraft(bool toggle) { - RS_DEBUG->print("QC_ApplicationWindow::slotViewDraft()"); + RS_DEBUG->print("ApplicationWindow::slotViewDraft()"); - /*QC_MDIWindow* m = getMDIWindow(); + /*MDIWindow* m = getMDIWindow(); if (m!=NULL) { Drawing* g = m->getGraphic(); if (g!=NULL) { @@ -2749,7 +2746,7 @@ void QC_ApplicationWindow::slotViewDraft(bool toggle) /** * Redraws all mdi windows. */ -void QC_ApplicationWindow::redrawAll() +void ApplicationWindow::redrawAll() { if (workspace != NULL) { @@ -2757,7 +2754,7 @@ void QC_ApplicationWindow::redrawAll() for(int i=0; iprint("QC_ApplicationWindow::slotViewStatusBar()"); + RS_DEBUG->print("ApplicationWindow::slotViewStatusBar()"); if (showSB) statusBar()->show(); @@ -2814,8 +2811,8 @@ void QC_ApplicationWindow::slotViewStatusBar(bool showSB) * * @param toggle true: show, false: hide. */ -/*void QC_ApplicationWindow::slotViewLayerList(bool toggle) { - RS_DEBUG->print("QC_ApplicationWindow::slotViewLayerList()"); +/*void ApplicationWindow::slotViewLayerList(bool toggle) { + RS_DEBUG->print("ApplicationWindow::slotViewLayerList()"); if (toggle==false) { layerDockWindow->hide(); @@ -2831,8 +2828,8 @@ void QC_ApplicationWindow::slotViewStatusBar(bool showSB) * @param toggle true: show, false: hide. */ /* -void QC_ApplicationWindow::slotViewBlockList(bool toggle) { - RS_DEBUG->print("QC_ApplicationWindow::slotViewBlockList()"); +void ApplicationWindow::slotViewBlockList(bool toggle) { + RS_DEBUG->print("ApplicationWindow::slotViewBlockList()"); if (toggle==false) { blockDockWindow->hide(); @@ -2848,8 +2845,8 @@ void QC_ApplicationWindow::slotViewBlockList(bool toggle) { * @param toggle true: show, false: hide. */ /* -void QC_ApplicationWindow::slotViewCommandLine(bool toggle) { - RS_DEBUG->print("QC_ApplicationWindow::slotViewCommandLine()"); +void ApplicationWindow::slotViewCommandLine(bool toggle) { + RS_DEBUG->print("ApplicationWindow::slotViewCommandLine()"); if (toggle==false) { commandDockWindow->hide(); @@ -2870,8 +2867,8 @@ void QC_ApplicationWindow::slotViewCommandLine(bool toggle) { * @param toggle true: show, false: hide. */ /* -void QC_ApplicationWindow::slotViewOptionToolbar(bool toggle) { - RS_DEBUG->print("QC_ApplicationWindow::slotViewOptionToolbar()"); +void ApplicationWindow::slotViewOptionToolbar(bool toggle) { + RS_DEBUG->print("ApplicationWindow::slotViewOptionToolbar()"); if (toggle==false) { optionWidget->hide(); @@ -2885,16 +2882,16 @@ void QC_ApplicationWindow::slotViewOptionToolbar(bool toggle) { * Creates a new MDI window for editing the selected block. */ /* -void QC_ApplicationWindow::slotBlocksEdit() { - RS_DEBUG->print("QC_ApplicationWindow::slotBlocksEdit()"); +void ApplicationWindow::slotBlocksEdit() { + RS_DEBUG->print("ApplicationWindow::slotBlocksEdit()"); - QC_MDIWindow* parent = getMDIWindow(); + MDIWindow* parent = getMDIWindow(); if (parent!=NULL) { RS_BlockList* blist = blockWidget->getBlockList(); if (blist!=NULL) { RS_Block* blk = blist->getActiveBlock(); if (blk!=NULL) { - QC_MDIWindow* w = slotFileNew(blk); + MDIWindow* w = slotFileNew(blk); // the parent needs a pointer to the block window and // vice versa parent->addChildWindow(w); @@ -2908,7 +2905,7 @@ void QC_ApplicationWindow::slotBlocksEdit() { /** * Shows the dialog for general application preferences. */ -void QC_ApplicationWindow::slotOptionsGeneral() +void ApplicationWindow::slotOptionsGeneral() { RS_DIALOGFACTORY->requestOptionsGeneralDialog(); @@ -2925,7 +2922,7 @@ void QC_ApplicationWindow::slotOptionsGeneral() for(int i=0; i show ide */ -void QC_ApplicationWindow::slotScriptOpenIDE() +void ApplicationWindow::slotScriptOpenIDE() { #ifdef RS_SCRIPTING scripter->openIDE(); @@ -2958,7 +2955,7 @@ void QC_ApplicationWindow::slotScriptOpenIDE() /** * Menu script -> run */ -void QC_ApplicationWindow::slotScriptRun() +void ApplicationWindow::slotScriptRun() { #ifdef RS_SCRIPTING scripter->runScript(); @@ -2968,9 +2965,9 @@ void QC_ApplicationWindow::slotScriptRun() /** * Menu help -> about. */ -void QC_ApplicationWindow::slotHelpAbout() +void ApplicationWindow::slotHelpAbout() { - RS_DEBUG->print("QC_ApplicationWindow::slotHelpAbout()"); + RS_DEBUG->print("ApplicationWindow::slotHelpAbout()"); QStringList modules; #ifdef RS_CAM @@ -3019,16 +3016,16 @@ void QC_ApplicationWindow::slotHelpAbout() /** * Menu help -> help. */ -void QC_ApplicationWindow::slotHelpManual() +void ApplicationWindow::slotHelpManual() { #warning "No help system ported to Qt4... !!! FIX !!!" #if 0 - RS_DEBUG->print("QC_ApplicationWindow::slotHelpManual()"); + RS_DEBUG->print("ApplicationWindow::slotHelpManual()"); if (assistant == NULL) { - RS_DEBUG->print("QC_ApplicationWindow::slotHelpManual(): appdir: %s", RS_SYSTEM->getAppDir().toLatin1().data()); - RS_DEBUG->print("QC_ApplicationWindow::slotHelpManual(): appdir: %s", RS_SYSTEM->getAppDir().toLatin1().data()); + RS_DEBUG->print("ApplicationWindow::slotHelpManual(): appdir: %s", RS_SYSTEM->getAppDir().toLatin1().data()); + RS_DEBUG->print("ApplicationWindow::slotHelpManual(): appdir: %s", RS_SYSTEM->getAppDir().toLatin1().data()); assistant = new QAssistantClient(RS_SYSTEM->getAppDir()+"/bin", this); connect(assistant, SIGNAL(error(const QString&)), this, SLOT(slotError(const QString&))); QStringList args; @@ -3048,9 +3045,9 @@ void QC_ApplicationWindow::slotHelpManual() /** * Testing function. */ -void QC_ApplicationWindow::slotTestDumpEntities(RS_EntityContainer * d) +void ApplicationWindow::slotTestDumpEntities(RS_EntityContainer * d) { - RS_DEBUG->print("QC_ApplicationWindow::slotTestDumpEntities()"); + RS_DEBUG->print("ApplicationWindow::slotTestDumpEntities()"); static int level = 0; std::ofstream dumpFile; @@ -3334,9 +3331,9 @@ void QC_ApplicationWindow::slotTestDumpEntities(RS_EntityContainer * d) /** * Testing function. */ -void QC_ApplicationWindow::slotTestDumpUndo() +void ApplicationWindow::slotTestDumpUndo() { - RS_DEBUG->print("QC_ApplicationWindow::slotTestDumpUndo()"); + RS_DEBUG->print("ApplicationWindow::slotTestDumpUndo()"); RS_Document * d = getDocument(); @@ -3350,9 +3347,9 @@ void QC_ApplicationWindow::slotTestDumpUndo() /** * Testing function. */ -void QC_ApplicationWindow::slotTestUpdateInserts() +void ApplicationWindow::slotTestUpdateInserts() { - RS_DEBUG->print("QC_ApplicationWindow::slotTestUpdateInserts()"); + RS_DEBUG->print("ApplicationWindow::slotTestUpdateInserts()"); RS_Document * d = getDocument(); @@ -3363,9 +3360,9 @@ void QC_ApplicationWindow::slotTestUpdateInserts() /** * Testing function. */ -void QC_ApplicationWindow::slotTestDrawFreehand() +void ApplicationWindow::slotTestDrawFreehand() { - RS_DEBUG->print("QC_ApplicationWindow::slotTestDrawFreehand()"); + RS_DEBUG->print("ApplicationWindow::slotTestDrawFreehand()"); //Drawing* g = document->getMarking(); /* @@ -3420,9 +3417,9 @@ void QC_ApplicationWindow::slotTestDrawFreehand() /** * Testing function. */ -void QC_ApplicationWindow::slotTestInsertBlock() +void ApplicationWindow::slotTestInsertBlock() { - RS_DEBUG->print("QC_ApplicationWindow::slotTestInsertBlock()"); + RS_DEBUG->print("ApplicationWindow::slotTestInsertBlock()"); RS_Document * d = getDocument(); @@ -3521,9 +3518,9 @@ void QC_ApplicationWindow::slotTestInsertBlock() /** * Testing function. */ -void QC_ApplicationWindow::slotTestInsertEllipse() +void ApplicationWindow::slotTestInsertEllipse() { - RS_DEBUG->print("QC_ApplicationWindow::slotTestInsertEllipse()"); + RS_DEBUG->print("ApplicationWindow::slotTestInsertEllipse()"); RS_Document * d = getDocument(); @@ -3663,9 +3660,9 @@ void QC_ApplicationWindow::slotTestInsertEllipse() /** * Testing function. */ -void QC_ApplicationWindow::slotTestInsertText() +void ApplicationWindow::slotTestInsertText() { - RS_DEBUG->print("QC_ApplicationWindow::slotTestInsertText()"); + RS_DEBUG->print("ApplicationWindow::slotTestInsertText()"); RS_Document * d = getDocument(); @@ -3766,9 +3763,9 @@ void QC_ApplicationWindow::slotTestInsertText() /** * Testing function. */ -void QC_ApplicationWindow::slotTestInsertImage() +void ApplicationWindow::slotTestInsertImage() { - RS_DEBUG->print("QC_ApplicationWindow::slotTestInsertImage()"); + RS_DEBUG->print("ApplicationWindow::slotTestInsertImage()"); RS_Document * d = getDocument(); @@ -3794,9 +3791,9 @@ void QC_ApplicationWindow::slotTestInsertImage() /** * Testing function. */ -void QC_ApplicationWindow::slotTestUnicode() +void ApplicationWindow::slotTestUnicode() { - RS_DEBUG->print("QC_ApplicationWindow::slotTestUnicode()"); + RS_DEBUG->print("ApplicationWindow::slotTestUnicode()"); slotFileOpen("./fonts/unicode.cxf", RS2::FormatCXF); RS_Document* d = getDocument(); @@ -3853,9 +3850,9 @@ void QC_ApplicationWindow::slotTestUnicode() /** * Testing function. */ -void QC_ApplicationWindow::slotTestMath01() +void ApplicationWindow::slotTestMath01() { - RS_DEBUG->print("QC_ApplicationWindow::slotTestMath01()"); + RS_DEBUG->print("ApplicationWindow::slotTestMath01()"); RS_Document* d = getDocument(); if (d!=NULL) { @@ -3915,9 +3912,9 @@ void QC_ApplicationWindow::slotTestMath01() /** * Testing function. */ -void QC_ApplicationWindow::slotTestResize640() +void ApplicationWindow::slotTestResize640() { - RS_DEBUG->print("QC_ApplicationWindow::slotTestResize640()"); + RS_DEBUG->print("ApplicationWindow::slotTestResize640()"); resize(640, 480); } @@ -3925,9 +3922,9 @@ void QC_ApplicationWindow::slotTestResize640() /** * Testing function. */ -void QC_ApplicationWindow::slotTestResize800() +void ApplicationWindow::slotTestResize800() { - RS_DEBUG->print("QC_ApplicationWindow::slotTestResize800()"); + RS_DEBUG->print("ApplicationWindow::slotTestResize800()"); resize(800, 600); } @@ -3935,9 +3932,9 @@ void QC_ApplicationWindow::slotTestResize800() /** * Testing function. */ -void QC_ApplicationWindow::slotTestResize1024() +void ApplicationWindow::slotTestResize1024() { - RS_DEBUG->print("QC_ApplicationWindow::slotTestResize1024()"); + RS_DEBUG->print("ApplicationWindow::slotTestResize1024()"); resize(1024, 768); } @@ -3945,9 +3942,9 @@ void QC_ApplicationWindow::slotTestResize1024() /** * overloaded for Message box on last window exit. */ -bool QC_ApplicationWindow::queryExit(bool force) +bool ApplicationWindow::queryExit(bool force) { - RS_DEBUG->print("QC_ApplicationWindow::queryExit()"); + RS_DEBUG->print("ApplicationWindow::queryExit()"); bool succ = true; @@ -3976,7 +3973,7 @@ bool QC_ApplicationWindow::queryExit(bool force) // for(QWidget * w=list.first(); w!=NULL; w=list.next()) for(int i=0; icloseMDI(force); + succ = ((MDIWindow *)list[i])->closeMDI(force); if (!succ) break; @@ -3985,7 +3982,7 @@ bool QC_ApplicationWindow::queryExit(bool force) if (succ) storeSettings(); - RS_DEBUG->print("QC_ApplicationWindow::queryExit(): OK"); + RS_DEBUG->print("ApplicationWindow::queryExit(): OK"); return succ; } @@ -3995,7 +3992,7 @@ bool QC_ApplicationWindow::queryExit(bool force) * it will consume them also if a text field is active * which means it's impossible to enter a command. */ -void QC_ApplicationWindow::keyPressEvent(QKeyEvent * e) +void ApplicationWindow::keyPressEvent(QKeyEvent * e) { // timer static QTime ts = QTime(); @@ -4090,7 +4087,7 @@ void QC_ApplicationWindow::keyPressEvent(QKeyEvent * e) QMainWindow::keyPressEvent(e); } -void QC_ApplicationWindow::keyReleaseEvent(QKeyEvent * e) +void ApplicationWindow::keyReleaseEvent(QKeyEvent * e) { switch (e->key()) { @@ -4121,7 +4118,7 @@ void QC_ApplicationWindow::keyReleaseEvent(QKeyEvent * e) /** * @return Pointer to application window. */ -/*static*/ QC_ApplicationWindow * QC_ApplicationWindow::getAppWindow() +/*static*/ ApplicationWindow * ApplicationWindow::getAppWindow() { return appWindow; } @@ -4129,7 +4126,7 @@ void QC_ApplicationWindow::keyReleaseEvent(QKeyEvent * e) /** * @return Pointer to workspace. */ -QMdiArea * QC_ApplicationWindow::getWorkspace() +QMdiArea * ApplicationWindow::getWorkspace() { return workspace; } @@ -4138,17 +4135,17 @@ QMdiArea * QC_ApplicationWindow::getWorkspace() * @return Pointer to the currently active MDI Window or NULL if no * MDI Window is active. */ -QC_MDIWindow * QC_ApplicationWindow::getMDIWindow() +MDIWindow * ApplicationWindow::getMDIWindow() { - RS_DEBUG->print(/*RS_Debug::D_CRITICAL,*/ "QC_ApplicationWindow::getMDIWindow: workspace=%08X", workspace); + RS_DEBUG->print(/*RS_Debug::D_CRITICAL,*/ "ApplicationWindow::getMDIWindow: workspace=%08X", workspace); if (workspace != NULL) { - RS_DEBUG->print("QC_ApplicationWindow::getMDIWindow: activeSubWindow=%08X", workspace->activeSubWindow()); - return (QC_MDIWindow *)workspace->activeSubWindow(); + RS_DEBUG->print("ApplicationWindow::getMDIWindow: activeSubWindow=%08X", workspace->activeSubWindow()); + return (MDIWindow *)workspace->activeSubWindow(); } - RS_DEBUG->print("QC_ApplicationWindow::getMDIWindow: activeSubWindow=??? (workspace == NULL)"); + RS_DEBUG->print("ApplicationWindow::getMDIWindow: activeSubWindow=??? (workspace == NULL)"); return NULL; } @@ -4158,9 +4155,9 @@ QC_MDIWindow * QC_ApplicationWindow::getMDIWindow() * @return Pointer to the graphic view of the currently active document * window or NULL if no window is available. */ -/*virtual*/ RS_GraphicView * QC_ApplicationWindow::getGraphicView() +/*virtual*/ RS_GraphicView * ApplicationWindow::getGraphicView() { - QC_MDIWindow * m = getMDIWindow(); + MDIWindow * m = getMDIWindow(); if (m != NULL) return m->getGraphicView(); @@ -4174,9 +4171,9 @@ QC_MDIWindow * QC_ApplicationWindow::getMDIWindow() * @return Pointer to the graphic document of the currently active document * window or NULL if no window is available. */ -/*virtual*/ RS_Document * QC_ApplicationWindow::getDocument() +/*virtual*/ RS_Document * ApplicationWindow::getDocument() { - QC_MDIWindow * m = getMDIWindow(); + MDIWindow * m = getMDIWindow(); if (m != NULL) return m->getDocument(); @@ -4187,7 +4184,7 @@ QC_MDIWindow * QC_ApplicationWindow::getMDIWindow() /** * Creates a new document. Implementation from RS_MainWindowInterface. */ -/*virtual*/ void QC_ApplicationWindow::createNewDocument(const QString & fileName/*= QString::null*/, +/*virtual*/ void ApplicationWindow::createNewDocument(const QString & fileName/*= QString::null*/, RS_Document * doc/*= NULL*/) { slotFileNew(doc); @@ -4201,8 +4198,7 @@ QC_MDIWindow * QC_ApplicationWindow::getMDIWindow() * * @return Pointer to this. */ -// /*virtual*/ Q3MainWindow * QC_ApplicationWindow::GetMainWindow() -/*virtual*/ QMainWindow * QC_ApplicationWindow::GetMainWindow() +/*virtual*/ QMainWindow * ApplicationWindow::GetMainWindow() { return this; } @@ -4210,7 +4206,7 @@ QC_MDIWindow * QC_ApplicationWindow::getMDIWindow() /** * @return Pointer to action handler. Implementation from QG_MainWindowInterface. */ -/*virtual*/ QG_ActionHandler * QC_ApplicationWindow::getActionHandler() +/*virtual*/ QG_ActionHandler * ApplicationWindow::getActionHandler() { return actionHandler; } @@ -4218,7 +4214,7 @@ QC_MDIWindow * QC_ApplicationWindow::getMDIWindow() /** * Implementation from QG_MainWindowInterface. */ -/*virtual*/ void QC_ApplicationWindow::showSimulationControls() +/*virtual*/ void ApplicationWindow::showSimulationControls() { #ifdef RS_CAM simulationDockWindow->show(); @@ -4229,7 +4225,7 @@ QC_MDIWindow * QC_ApplicationWindow::getMDIWindow() /** * @return Pointer to the qsa object. */ -QSProject * QC_ApplicationWindow::getQSAProject() +QSProject * ApplicationWindow::getQSAProject() { if (scripter != NULL) return scripter->getQSAProject(); @@ -4241,7 +4237,7 @@ QSProject * QC_ApplicationWindow::getQSAProject() /** * Implementation from QG_MainWindowInterface. */ -/*virtual*/ void QC_ApplicationWindow::setFocus2() +/*virtual*/ void ApplicationWindow::setFocus2() { setFocus(); } diff --git a/src/mainapp/qc_applicationwindow.h b/src/mainapp/applicationwindow.h similarity index 89% rename from src/mainapp/qc_applicationwindow.h rename to src/mainapp/applicationwindow.h index c80ab1f..79ca2c1 100644 --- a/src/mainapp/qc_applicationwindow.h +++ b/src/mainapp/applicationwindow.h @@ -1,14 +1,13 @@ -#ifndef QC_APPLICATIONWINDOW_H -#define QC_APPLICATIONWINDOW_H +#ifndef __APPLICATIONWINDOW_H__ +#define __APPLICATIONWINDOW_H__ #include #include "rs_document.h" #include "qc_dialogfactory.h" #include "qc_graphicview.h" -#include "qc_mdiwindow.h" +#include "mdiwindow.h" #include "qg_actionhandler.h" -//#include "qg_actionfactory.h" #include "qg_blockwidget.h" #include "qg_layerwidget.h" #include "qg_mainwindowinterface.h" @@ -33,13 +32,13 @@ * @author James L. Hammons * @author Andrew Mustun */ -class QC_ApplicationWindow: public QMainWindow, public QG_MainWindowInterface +class ApplicationWindow: public QMainWindow, public QG_MainWindowInterface { Q_OBJECT public: - QC_ApplicationWindow(); - ~QC_ApplicationWindow(); + ApplicationWindow(); + ~ApplicationWindow(); void initActions(); void initMenuBar(); @@ -66,10 +65,8 @@ class QC_ApplicationWindow: public QMainWindow, public QG_MainWindowInterface void slotFocusCommandLine(); void slotError(const QString & msg); -// void slotWindowActivated(QWidget * w); void slotWindowActivated(QMdiSubWindow * w); void slotWindowsMenuAboutToShow(); -// void slotWindowsMenuActivated(int); void slotWindowsMenuActivated(QAction *); void slotTileHorizontal(); void slotTileVertical(); @@ -77,14 +74,13 @@ class QC_ApplicationWindow: public QMainWindow, public QG_MainWindowInterface void slotPenChanged(RS_Pen p); /** generates a new document for a graphic. */ - QC_MDIWindow * slotFileNew(RS_Document * doc = NULL); + MDIWindow * slotFileNew(RS_Document * doc = NULL); /** opens a document */ void slotFileOpen(); /** * opens a recent file document * @param id File Menu id of the file */ -// void slotFileOpenRecent(int id); void slotFileOpenRecent(void); /** * opens the given file. @@ -178,13 +174,12 @@ class QC_ApplicationWindow: public QMainWindow, public QG_MainWindowInterface void windowsChanged(bool windowsLeft); public: - static QC_ApplicationWindow * getAppWindow(); + static ApplicationWindow * getAppWindow(); QMdiArea * getWorkspace(); - QC_MDIWindow * getMDIWindow(); + MDIWindow * getMDIWindow(); virtual RS_GraphicView * getGraphicView(); virtual RS_Document * getDocument(); virtual void createNewDocument(const QString & fileName = QString::null, RS_Document * doc = NULL); -// virtual Q3MainWindow * getMainWindow(); virtual QMainWindow * GetMainWindow(); virtual QG_ActionHandler * getActionHandler(); virtual void showSimulationControls(); @@ -213,7 +208,7 @@ class QC_ApplicationWindow: public QMainWindow, public QG_MainWindowInterface private: /** Pointer to the application window (this). */ - static QC_ApplicationWindow * appWindow; + static ApplicationWindow * appWindow; /** Workspace for MDI */ QMdiArea * workspace; @@ -233,23 +228,18 @@ class QC_ApplicationWindow: public QMainWindow, public QG_MainWindowInterface #endif /** Layer list dock widget */ -// Q3DockWindow * layerDockWindow; QDockWidget * layerDockWindow; /** Block list dock widget */ -// Q3DockWindow * blockDockWindow; QDockWidget * blockDockWindow; /** Library list dock widget */ -// Q3DockWindow * libraryDockWindow; QDockWidget * libraryDockWindow; #ifdef RS_CAM /** Simulation controls dock widget */ -// Q3DockWindow * simulationDockWindow; QDockWidget * simulationDockWindow; #endif /** Command line */ CommandWidget * commandWidget; -// Q3DockWindow * commandDockWindow; QDockWidget * commandDockWindow; /** Coordinate widget */ @@ -260,7 +250,6 @@ class QC_ApplicationWindow: public QMainWindow, public QG_MainWindowInterface SelectionWidget * selectionWidget; /** Option widget for individual tool options */ -// Q3ToolBar * optionWidget; QToolBar * optionWidget; /** Recent files list */ @@ -315,4 +304,4 @@ class QC_ApplicationWindow: public QMainWindow, public QG_MainWindowInterface QAction * testResize1024; }; -#endif +#endif // __APPLICATIONWINDOW_H__ diff --git a/src/mainapp/main.cpp b/src/mainapp/main.cpp index 558465c..9e7bc7e 100644 --- a/src/mainapp/main.cpp +++ b/src/mainapp/main.cpp @@ -38,7 +38,7 @@ QSplashScreen * splash = 0; #include "dlginitial.h" -#include "qc_applicationwindow.h" +#include "applicationwindow.h" #ifdef RS_CAM # include "rs_filtercam.h" @@ -217,7 +217,7 @@ int main(int argc, char * argv[]) #endif RS_DEBUG->print("main: creating main window.."); - QC_ApplicationWindow * appWin = new QC_ApplicationWindow(); + ApplicationWindow * appWin = new ApplicationWindow(); RS_DEBUG->print("main: setting caption"); appWin->setWindowTitle("Architektonas"); RS_DEBUG->print("main: show main window"); diff --git a/src/mainapp/qc_mdiwindow.cpp b/src/mainapp/mdiwindow.cpp similarity index 79% rename from src/mainapp/qc_mdiwindow.cpp rename to src/mainapp/mdiwindow.cpp index fa3c12f..d4f4e1a 100644 --- a/src/mainapp/qc_mdiwindow.cpp +++ b/src/mainapp/mdiwindow.cpp @@ -1,4 +1,4 @@ -// qc_mdiwindow.cpp +// mdiwindow.cpp // // Part of the Architektonas Project // Originally part of QCad Community Edition by Andrew Mustun @@ -12,7 +12,7 @@ // JLH 05/17/2010 Added this text. :-) // -#include "qc_mdiwindow.h" +#include "mdiwindow.h" #include "drawing.h" #include "rs_eventhandler.h" @@ -20,7 +20,7 @@ #include "qg_filedialog.h" // Class variable -int QC_MDIWindow::idCounter = 0; +int MDIWindow::idCounter = 0; /** * Constructor. @@ -29,9 +29,8 @@ int QC_MDIWindow::idCounter = 0; * document shall be created for this window. * @param parent Parent widget. Usually a workspace. */ -QC_MDIWindow::QC_MDIWindow(RS_Document * doc, QWidget * parent, const char * name/*= NULL*/, +MDIWindow::MDIWindow(RS_Document * doc, QWidget * parent, const char * name/*= NULL*/, Qt::WindowFlags wflags/*= Qt::WDestructiveClose*/): -// Q3MainWindow(parent, name, wflags) QMdiSubWindow(parent, Qt::SubWindow) #warning "!!! wflags is ignored !!!" { @@ -66,7 +65,7 @@ QC_MDIWindow::QC_MDIWindow(RS_Document * doc, QWidget * parent, const char * nam * * Deletes the document associated with this window. */ -QC_MDIWindow::~QC_MDIWindow() +MDIWindow::~MDIWindow() { if (document->getLayerList() != NULL) document->getLayerList()->removeListener(graphicView); @@ -85,7 +84,7 @@ QC_MDIWindow::~QC_MDIWindow() * depend on this one. This can be another view or a view for * a particular block. */ -void QC_MDIWindow::addChildWindow(QC_MDIWindow * w) +void MDIWindow::addChildWindow(MDIWindow * w) { RS_DEBUG->print("RS_MDIWindow::addChildWindow()"); @@ -100,7 +99,7 @@ void QC_MDIWindow::addChildWindow(QC_MDIWindow * w) * * @see addChildWindow */ -void QC_MDIWindow::removeChildWindow(QC_MDIWindow * w) +void MDIWindow::removeChildWindow(MDIWindow * w) { RS_DEBUG->print("RS_MDIWindow::removeChildWindow()"); @@ -114,7 +113,7 @@ void QC_MDIWindow::removeChildWindow(QC_MDIWindow * w) /** * @return pointer to the print preview of this drawing or NULL. */ -QC_MDIWindow * QC_MDIWindow::getPrintPreview() +MDIWindow * MDIWindow::getPrintPreview() { for(uint i=0; iclose(); @@ -199,16 +198,16 @@ bool QC_MDIWindow::closeMDI(bool force, bool ask) /** * Called by Qt when the user closes this MDI window. */ -void QC_MDIWindow::closeEvent(QCloseEvent * ce) +void MDIWindow::closeEvent(QCloseEvent * ce) { - RS_DEBUG->print("QC_MDIWindow::closeEvent begin"); + RS_DEBUG->print("MDIWindow::closeEvent begin"); if (closeMDI(false, !forceClosing)) ce->accept(); else ce->ignore(); - RS_DEBUG->print("QC_MDIWindow::closeEvent end"); + RS_DEBUG->print("MDIWindow::closeEvent end"); } /** @@ -218,9 +217,9 @@ void QC_MDIWindow::closeEvent(QCloseEvent * ce) * @param container Entity container to be used as document or NULL * if a new document should be created. */ -void QC_MDIWindow::initDoc(RS_Document * doc) +void MDIWindow::initDoc(RS_Document * doc) { - RS_DEBUG->print("QC_MDIWindow::initDoc()"); + RS_DEBUG->print("MDIWindow::initDoc()"); if (doc == NULL) { @@ -238,9 +237,9 @@ void QC_MDIWindow::initDoc(RS_Document * doc) /** * Init the view. */ -void QC_MDIWindow::initView() +void MDIWindow::initView() { - RS_DEBUG->print("QC_MDIWindow::initView()"); + RS_DEBUG->print("MDIWindow::initView()"); graphicView = new QC_GraphicView(document, this); // setCentralWidget(graphicView); @@ -252,22 +251,22 @@ void QC_MDIWindow::initView() * Called when the current pen (color, style, width) has changed. * Sets the active pen for the document in this MDI window. */ -void QC_MDIWindow::slotPenChanged(RS_Pen pen) +void MDIWindow::slotPenChanged(RS_Pen pen) { - RS_DEBUG->print("QC_MDIWindow::slotPenChanged() begin"); + RS_DEBUG->print("MDIWindow::slotPenChanged() begin"); if (document != NULL) document->setActivePen(pen); - RS_DEBUG->print("QC_MDIWindow::slotPenChanged() end"); + RS_DEBUG->print("MDIWindow::slotPenChanged() end"); } /** * Creates a new empty document in this MDI window. */ -void QC_MDIWindow::slotFileNew() +void MDIWindow::slotFileNew() { - RS_DEBUG->print("QC_MDIWindow::slotFileNew begin"); + RS_DEBUG->print("MDIWindow::slotFileNew begin"); if (document != NULL && graphicView != NULL) { @@ -275,15 +274,15 @@ void QC_MDIWindow::slotFileNew() graphicView->redraw(); } - RS_DEBUG->print("QC_MDIWindow::slotFileNew end"); + RS_DEBUG->print("MDIWindow::slotFileNew end"); } /** * Opens the given file in this MDI window. */ -bool QC_MDIWindow::slotFileOpen(const QString & fileName, RS2::FormatType type) +bool MDIWindow::slotFileOpen(const QString & fileName, RS2::FormatType type) { - RS_DEBUG->print("QC_MDIWindow::slotFileOpen"); + RS_DEBUG->print("MDIWindow::slotFileOpen"); bool ret = false; if (document != NULL && !fileName.isEmpty()) @@ -300,22 +299,22 @@ bool QC_MDIWindow::slotFileOpen(const QString & fileName, RS2::FormatType type) //QString message=tr("Loaded document: ")+fileName; //statusBar()->message(message, 2000); - RS_DEBUG->print("QC_MDIWindow::slotFileOpen: autoZoom"); + RS_DEBUG->print("MDIWindow::slotFileOpen: autoZoom"); graphicView->zoomAuto(false); - RS_DEBUG->print("QC_MDIWindow::slotFileOpen: autoZoom: OK"); + RS_DEBUG->print("MDIWindow::slotFileOpen: autoZoom: OK"); } else { - RS_DEBUG->print("QC_MDIWindow::slotFileOpen: failed"); + RS_DEBUG->print("MDIWindow::slotFileOpen: failed"); } } else { - RS_DEBUG->print("QC_MDIWindow::slotFileOpen: cancelled"); + RS_DEBUG->print("MDIWindow::slotFileOpen: cancelled"); //statusBar()->message(tr("Opening aborted"), 2000); } - RS_DEBUG->print("QC_MDIWindow::slotFileOpen: OK"); + RS_DEBUG->print("MDIWindow::slotFileOpen: OK"); return ret; } @@ -327,9 +326,9 @@ bool QC_MDIWindow::slotFileOpen(const QString & fileName, RS2::FormatType type) * false if the file could not be saved or the document * is invalid. */ -bool QC_MDIWindow::slotFileSave(bool & cancelled) +bool MDIWindow::slotFileSave(bool & cancelled) { - RS_DEBUG->print("QC_MDIWindow::slotFileSave()"); + RS_DEBUG->print("MDIWindow::slotFileSave()"); bool ret = false; cancelled = false; @@ -356,9 +355,9 @@ bool QC_MDIWindow::slotFileSave(bool & cancelled) * false if the file could not be saved or the document * is invalid. */ -bool QC_MDIWindow::slotFileSaveAs(bool & cancelled) +bool MDIWindow::slotFileSaveAs(bool & cancelled) { - RS_DEBUG->print("QC_MDIWindow::slotFileSaveAs"); + RS_DEBUG->print("MDIWindow::slotFileSaveAs"); bool ret = false; cancelled = false; RS2::FormatType t = RS2::FormatDXF; @@ -386,9 +385,9 @@ bool QC_MDIWindow::slotFileSaveAs(bool & cancelled) * * @param force Force closing by disabling the cancel button (for demo versions). */ -bool QC_MDIWindow::slotFileClose(bool force) +bool MDIWindow::slotFileClose(bool force) { - RS_DEBUG->print("QC_MDIWindow::slotFileClose()"); + RS_DEBUG->print("MDIWindow::slotFileClose()"); bool succ = true; int exit = 0; @@ -450,9 +449,9 @@ bool QC_MDIWindow::slotFileClose(bool force) return succ; } -void QC_MDIWindow::slotFilePrint() +void MDIWindow::slotFilePrint() { - RS_DEBUG->print("QC_MDIWindow::slotFilePrint"); + RS_DEBUG->print("MDIWindow::slotFilePrint"); //statusBar()->message(tr("Printing...")); QPrinter printer; @@ -475,25 +474,25 @@ void QC_MDIWindow::slotFilePrint() } /** @return Pointer to graphic view */ -QC_GraphicView * QC_MDIWindow::getGraphicView() +QC_GraphicView * MDIWindow::getGraphicView() { return graphicView; } /** @return Pointer to document */ -RS_Document * QC_MDIWindow::getDocument() +RS_Document * MDIWindow::getDocument() { return document; } /** @return Pointer to graphic or NULL */ -Drawing * QC_MDIWindow::getGraphic() +Drawing * MDIWindow::getGraphic() { return document->getGraphic(); } /** @return Pointer to current event handler */ -RS_EventHandler * QC_MDIWindow::getEventHandler() +RS_EventHandler * MDIWindow::getEventHandler() { if (graphicView != NULL) return graphicView->getEventHandler(); @@ -504,7 +503,7 @@ RS_EventHandler * QC_MDIWindow::getEventHandler() /** * Sets the parent window that will be notified if this */ -void QC_MDIWindow::setParentWindow(QC_MDIWindow * p) +void MDIWindow::setParentWindow(MDIWindow * p) { RS_DEBUG->print("setParentWindow"); parentWindow = p; @@ -513,12 +512,12 @@ void QC_MDIWindow::setParentWindow(QC_MDIWindow * p) /** * @return The MDI window id. */ -int QC_MDIWindow::getId() +int MDIWindow::getId() { return id; } -void QC_MDIWindow::setForceClosing(bool on) +void MDIWindow::setForceClosing(bool on) { forceClosing = on; } @@ -526,9 +525,9 @@ void QC_MDIWindow::setForceClosing(bool on) /** * Streams some info about an MDI window to stdout. */ -std::ostream & operator<<(std::ostream & os, QC_MDIWindow & w) +std::ostream & operator<<(std::ostream & os, MDIWindow & w) { - os << "QC_MDIWindow[" << w.getId() << "]:\n"; + os << "MDIWindow[" << w.getId() << "]:\n"; if (w.parentWindow!=NULL) os << " parentWindow: " << w.parentWindow->getId() << "\n"; diff --git a/src/mainapp/qc_mdiwindow.h b/src/mainapp/mdiwindow.h similarity index 75% rename from src/mainapp/qc_mdiwindow.h rename to src/mainapp/mdiwindow.h index e07ed7f..0f5ddad 100644 --- a/src/mainapp/qc_mdiwindow.h +++ b/src/mainapp/mdiwindow.h @@ -13,16 +13,15 @@ * * @author Andrew Mustun */ -//class QC_MDIWindow: public Q3MainWindow -class QC_MDIWindow: public QMdiSubWindow +class MDIWindow: public QMdiSubWindow { Q_OBJECT public: - QC_MDIWindow(RS_Document * doc, QWidget * parent, const char * name = NULL, + MDIWindow(RS_Document * doc, QWidget * parent, const char * name = NULL, // Qt::WindowFlags wflags = Qt::WDestructiveClose); Qt::WindowFlags wflags = Qt::SubWindow); - ~QC_MDIWindow(); + ~MDIWindow(); void initDoc(RS_Document * doc = NULL); void initView(); @@ -42,17 +41,17 @@ class QC_MDIWindow: public QMdiSubWindow Drawing * getGraphic(); RS_EventHandler * getEventHandler(); - void addChildWindow(QC_MDIWindow * w); - void removeChildWindow(QC_MDIWindow * w); - QC_MDIWindow * getPrintPreview(); - void setParentWindow(QC_MDIWindow * p); + void addChildWindow(MDIWindow * w); + void removeChildWindow(MDIWindow * w); + MDIWindow * getPrintPreview(); + void setParentWindow(MDIWindow * p); int getId(); bool closeMDI(bool force, bool ask = true); void setForceClosing(bool on); - friend std::ostream & operator<<(std::ostream & os, QC_MDIWindow & w); + friend std::ostream & operator<<(std::ostream & os, MDIWindow & w); signals: void signalClosing(); @@ -74,14 +73,12 @@ class QC_MDIWindow: public QMdiSubWindow /** * List of known child windows that show blocks of the same drawing. */ -// Q3PtrList childWindows; - QList childWindows; + QList childWindows; /** * Pointer to parent window which needs to know if this window * is closed or NULL. */ - QC_MDIWindow * parentWindow; - + MDIWindow * parentWindow; /** * If flag is set, the user will not be asked about closing this file. */ diff --git a/src/mainapp/qc_dialogfactory.cpp b/src/mainapp/qc_dialogfactory.cpp index 8a6c79a..4e46d6d 100644 --- a/src/mainapp/qc_dialogfactory.cpp +++ b/src/mainapp/qc_dialogfactory.cpp @@ -14,9 +14,8 @@ #include "qc_dialogfactory.h" -#include "qc_applicationwindow.h" +#include "applicationwindow.h" -//QC_DialogFactory::QC_DialogFactory(QWidget * parent, QWidget * ow): QG_DialogFactory(parent, ow) QC_DialogFactory::QC_DialogFactory(QWidget * parent, QToolBar * ow): QG_DialogFactory(parent, ow) { } @@ -32,8 +31,8 @@ void QC_DialogFactory::requestEditBlockWindow(RS_BlockList * blockList) { RS_DEBUG->print("QC_DialogFactory::requestEditBlockWindow()"); - QC_ApplicationWindow * appWindow = QC_ApplicationWindow::getAppWindow(); - QC_MDIWindow * parent = appWindow->getMDIWindow(); + ApplicationWindow * appWindow = ApplicationWindow::getAppWindow(); + MDIWindow * parent = appWindow->getMDIWindow(); if (parent != NULL) { @@ -44,7 +43,7 @@ void QC_DialogFactory::requestEditBlockWindow(RS_BlockList * blockList) if (blk != NULL) { - QC_MDIWindow * w = appWindow->slotFileNew(blk); + MDIWindow * w = appWindow->slotFileNew(blk); // the parent needs a pointer to the block window and // vice versa parent->addChildWindow(w); @@ -61,7 +60,7 @@ void QC_DialogFactory::closeEditBlockWindow(RS_Block * block) { RS_DEBUG->print("QC_DialogFactory::closeEditBlockWindow"); - QC_ApplicationWindow * appWindow = QC_ApplicationWindow::getAppWindow(); + ApplicationWindow * appWindow = ApplicationWindow::getAppWindow(); QMdiArea * workspace = appWindow->getWorkspace(); if (workspace != NULL) @@ -73,7 +72,7 @@ void QC_DialogFactory::closeEditBlockWindow(RS_Block * block) for(int i=0; iprint("QC_DialogFactory::closeEditBlockWindow: window: %d", i); - QC_MDIWindow * m = (QC_MDIWindow *)windows.at(i); + MDIWindow * m = (MDIWindow *)windows.at(i); if (m != NULL) { diff --git a/src/mainapp/qc_dialogfactory.h b/src/mainapp/qc_dialogfactory.h index 3ddd8d9..50d8b3f 100644 --- a/src/mainapp/qc_dialogfactory.h +++ b/src/mainapp/qc_dialogfactory.h @@ -12,7 +12,6 @@ class QC_DialogFactory: public QG_DialogFactory { public: -// QC_DialogFactory(QWidget * parent, QWidget * ow); QC_DialogFactory(QWidget * parent, QToolBar * ow); virtual ~QC_DialogFactory(); diff --git a/src/widgets/qg_dialogfactory.h b/src/widgets/qg_dialogfactory.h index d901cd7..a4d6cb0 100644 --- a/src/widgets/qg_dialogfactory.h +++ b/src/widgets/qg_dialogfactory.h @@ -7,12 +7,12 @@ #include "rs_debug.h" class CadToolBar; -class CoordinateWidget; -class SelectionWidget; -class MouseWidget; class CommandWidget; -class QG_MainWindowInterface; +class CoordinateWidget; class RS_Document; +class QG_MainWindowInterface; +class MouseWidget; +class SelectionWidget; #define QG_DIALOGFACTORY (RS_DialogFactory::instance()->getFactoryObject()->isAdapter()==false ? ((QG_DialogFactory*)RS_DialogFactory::instance()->getFactoryObject()) : NULL) @@ -24,12 +24,10 @@ class RS_Document; class QG_DialogFactory: public RS_DialogFactoryInterface { public: -// QG_DialogFactory(QWidget * parent, QWidget * ow); QG_DialogFactory(QWidget * parent, QToolBar * ow); virtual ~QG_DialogFactory(); protected: -// virtual void setOptionWidget(QWidget * ow); virtual void setOptionWidget(QToolBar * ow); public: @@ -129,8 +127,6 @@ class QG_DialogFactory: public RS_DialogFactoryInterface //! Pointer to the widget which can host dialogs QWidget * parent; //! Pointer to the widget which can host individual tool options -//[DONE]#warning "!!! Need to change optionWidget from class QWidget to QToolBar !!!" -// QWidget * optionWidget; QToolBar * optionWidget; //! Pointer to the coordinate widget. CoordinateWidget * coordinateWidget; -- 2.37.2