]> Shamusworld >> Repos - architektonas/blobdiff - src/widgets/qg_dialogfactory.cpp
Phase two of adding polyline functionality...
[architektonas] / src / widgets / qg_dialogfactory.cpp
index 6398633b6e61706cb555ff97f4db793d4f4325af..b0a9248535322c4d68ee2b421b380acb50768d84 100644 (file)
 #include "qg_mainwindowinterface.h"
 #include "actiondimlinear.h"
 #include "actioninterface.h"
-#include "rs_blocklist.h"
-#include "rs_document.h"
-#include "rs_hatch.h"
-#include "rs_layerlist.h"
-#include "rs_patternlist.h"
+#include "blocklist.h"
+#include "document.h"
+#include "hatch.h"
+#include "layerlist.h"
+#include "patternlist.h"
 #include "settings.h"
-#include "rs_system.h"
-#include "rs_text.h"
+#include "system.h"
+#include "text.h"
 
 #include "arcoptions.h"
 #include "arctangentialoptions.h"
@@ -74,6 +74,7 @@
 #include "linerelangleoptions.h"
 #include "mousewidget.h"
 #include "moverotateoptions.h"
+#include "polylineoptions.h"
 #include "printpreviewoptions.h"
 #include "roundoptions.h"
 #include "selectionwidget.h"
 #include "textoptions.h"
 #include "trimamountoptions.h"
 
-#ifdef RS_PROF
-#include "qg_polylineoptions.h"
-#endif
-
 #ifdef RS_CAM
-#include "rs_camdialog.h"
+#include "camdialog.h"
 #endif
 
 //QG_DialogFactory* QG_DialogFactory::uniqueInstance = NULL;
  */
 //QG_DialogFactory::QG_DialogFactory(QWidget * parent, QWidget * ow):
 QG_DialogFactory::QG_DialogFactory(QWidget * parent, QToolBar * ow):
-       RS_DialogFactoryInterface()
+       DialogFactoryInterface()
 {
-       RS_DEBUG->print("QG_DialogFactory::QG_DialogFactory");
+       DEBUG->print("QG_DialogFactory::QG_DialogFactory");
 
        this->parent = parent;
        setOptionWidget(ow);
@@ -113,7 +110,7 @@ QG_DialogFactory::QG_DialogFactory(QWidget * parent, QToolBar * ow):
        cadToolBar = NULL;
        commandWidget = NULL;
        mainWindow = NULL;
-       RS_DEBUG->print("QG_DialogFactory::QG_DialogFactory: OK");
+       DEBUG->print("QG_DialogFactory::QG_DialogFactory: OK");
 }
 
 /**
@@ -121,8 +118,8 @@ QG_DialogFactory::QG_DialogFactory(QWidget * parent, QToolBar * ow):
  */
 QG_DialogFactory::~QG_DialogFactory()
 {
-       RS_DEBUG->print("QG_DialogFactory::~QG_DialogFactory");
-       RS_DEBUG->print("QG_DialogFactory::~QG_DialogFactory: OK");
+       DEBUG->print("QG_DialogFactory::~QG_DialogFactory");
+       DEBUG->print("QG_DialogFactory::~QG_DialogFactory: OK");
 }
 
 /**
@@ -131,9 +128,9 @@ QG_DialogFactory::~QG_DialogFactory()
 ///*virtual*/ void QG_DialogFactory::setOptionWidget(QWidget * ow)
 /*virtual*/ void QG_DialogFactory::setOptionWidget(QToolBar * ow)
 {
-       RS_DEBUG->print("QG_DialogFactory::setOptionWidget");
+       DEBUG->print("QG_DialogFactory::setOptionWidget");
        optionWidget = ow;
-       RS_DEBUG->print("QG_DialogFactory::setOptionWidget: OK");
+       DEBUG->print("QG_DialogFactory::setOptionWidget: OK");
 }
 
 /**
@@ -212,7 +209,7 @@ void QG_DialogFactory::requestWarningDialog(const QString & warning)
 /**
  * Requests a new document from the main window.
  */
-GraphicView * QG_DialogFactory::requestNewDocument(const QString & fileName, RS_Document * doc)
+GraphicView * QG_DialogFactory::requestNewDocument(const QString & fileName, Document * doc)
 {
        if (mainWindow != NULL)
        {
@@ -241,9 +238,9 @@ void QG_DialogFactory::requestSimulationControls()
  * @return a pointer to the newly created layer that
  * should be added.
  */
-RS_Layer * QG_DialogFactory::requestNewLayerDialog(RS_LayerList * layerList)
+Layer * QG_DialogFactory::requestNewLayerDialog(LayerList * layerList)
 {
-       RS_Layer * layer = NULL;
+       Layer * layer = NULL;
        QString layer_name = "noname";
        int i = 2;
 
@@ -254,7 +251,7 @@ RS_Layer * QG_DialogFactory::requestNewLayerDialog(RS_LayerList * layerList)
        }
 
        // Layer for parameter livery
-       layer = new RS_Layer(layer_name);
+       layer = new Layer(layer_name);
 
 //     QG_LayerDialog dlg(parent, "Layer Dialog");
        LayerDialog dlg(parent);
@@ -278,13 +275,13 @@ RS_Layer * QG_DialogFactory::requestNewLayerDialog(RS_LayerList * layerList)
  *
  * @return a pointer to the layer that should be removed.
  */
-RS_Layer * QG_DialogFactory::requestLayerRemovalDialog(RS_LayerList * layerList)
+Layer * QG_DialogFactory::requestLayerRemovalDialog(LayerList * layerList)
 {
-    RS_Layer * layer = NULL;
+    Layer * layer = NULL;
 
        if (layerList == NULL)
        {
-        RS_DEBUG->print(RS_Debug::D_WARNING,
+        DEBUG->print(Debug::D_WARNING,
                "QG_DialogFactory::requestLayerRemovalDialog(): layerList is NULL");
 
         return NULL;
@@ -292,7 +289,7 @@ RS_Layer * QG_DialogFactory::requestLayerRemovalDialog(RS_LayerList * layerList)
     /*
        if (layerList==NULL) {
            if (container!=NULL && container->rtti()==RS2::EntityGraphic) {
-               layerList = (RS_LayerList*)container;
+               layerList = (LayerList*)container;
            } else {
                return NULL;
            }
@@ -335,31 +332,22 @@ RS_Layer * QG_DialogFactory::requestLayerRemovalDialog(RS_LayerList * layerList)
  * @return A pointer to a new layer with the changed attributes
  *         or NULL if the dialog was cancelled.
  */
-RS_Layer * QG_DialogFactory::requestEditLayerDialog(RS_LayerList * layerList)
+Layer * QG_DialogFactory::requestEditLayerDialog(LayerList * layerList)
 {
-       RS_DEBUG->print("QG_DialogFactory::requestEditLayerDialog");
-       RS_Layer * layer = NULL;
-       /*
-       if (layerList==NULL) {
-               if (container!=NULL && container->rtti()==RS2::EntityGraphic) {
-                       layerList = (RS_LayerList*)container;
-               } else {
-                       return NULL;
-               }
-       }
-       */
+       DEBUG->print("QG_DialogFactory::requestEditLayerDialog");
+       Layer * layer = NULL;
 
-       if (layerList == NULL)
+       if (!layerList)
        {
-               RS_DEBUG->print(RS_Debug::D_WARNING, "QG_DialogFactory::requestEditLayerDialog(): "
+               DEBUG->print(Debug::D_WARNING, "QG_DialogFactory::requestEditLayerDialog(): "
                        "layerList is NULL");
                return NULL;
        }
 
        // Layer for parameter livery
-       if (layerList->getActive() != NULL)
+       if (layerList->getActive())
        {
-               layer = new RS_Layer(*layerList->getActive());
+               layer = new Layer(*layerList->getActive());
 
 //        QG_LayerDialog dlg(parent, QMessageBox::tr("Layer Dialog"));
                LayerDialog dlg(parent);
@@ -386,21 +374,21 @@ RS_Layer * QG_DialogFactory::requestEditLayerDialog(RS_LayerList * layerList)
  * @return a pointer to the newly created block that
  * should be added.
  */
-RS_BlockData QG_DialogFactory::requestNewBlockDialog(RS_BlockList * blockList)
+BlockData QG_DialogFactory::requestNewBlockDialog(BlockList * blockList)
 {
-       //RS_Block* block = NULL;
-       RS_BlockData ret;
-       ret = RS_BlockData("", Vector(false), false);
+       //Block* block = NULL;
+       BlockData ret;
+       ret = BlockData("", Vector(false), false);
 
        if (blockList == NULL)
        {
-               RS_DEBUG->print(RS_Debug::D_WARNING, "QG_DialogFactory::requestNewBlockDialog(): "
+               DEBUG->print(Debug::D_WARNING, "QG_DialogFactory::requestNewBlockDialog(): "
                        "blockList is NULL");
                return ret;
        }
 
        // Block for parameter livery
-       //block = new RS_Block(container, "noname", Vector(0.0,0.0));
+       //block = new Block(container, "noname", Vector(0.0,0.0));
 
        BlockDialog dlg(parent);
        dlg.setBlockList(blockList);
@@ -416,22 +404,22 @@ RS_BlockData QG_DialogFactory::requestNewBlockDialog(RS_BlockList * blockList)
  *
  * @return a pointer to the modified block or NULL on cancellation.
  */
-RS_BlockData QG_DialogFactory::requestBlockAttributesDialog(RS_BlockList * blockList)
+BlockData QG_DialogFactory::requestBlockAttributesDialog(BlockList * blockList)
 {
-       //RS_Block* block = NULL;
-       RS_BlockData ret;
-       ret = RS_BlockData("", Vector(false), false);
+       //Block* block = NULL;
+       BlockData ret;
+       ret = BlockData("", Vector(false), false);
 
        if (blockList == NULL)
        {
-               RS_DEBUG->print(RS_Debug::D_WARNING, "QG_DialogFactory::requestBlockAttributesDialog(): "
+               DEBUG->print(Debug::D_WARNING, "QG_DialogFactory::requestBlockAttributesDialog(): "
                        "blockList is NULL");
                return ret;
        }
        /*
                if (blockList==NULL) {
                        if (container!=NULL && container->rtti()==RS2::EntityGraphic) {
-                               blockList = (RS_BlockList*)container;
+                               blockList = (BlockList*)container;
                        } else {
                                return NULL;
                        }
@@ -452,17 +440,17 @@ RS_BlockData QG_DialogFactory::requestBlockAttributesDialog(RS_BlockList * block
                ret = dlg.getBlockData();
        }
        //else {
-       //      ret = RS_BlockData("", Vector(false));
+       //      ret = BlockData("", Vector(false));
        //}
 
        return ret;
 }
 
-/*virtual*/ void QG_DialogFactory::requestEditBlockWindow(RS_BlockList * /*blockList*/)
+/*virtual*/ void QG_DialogFactory::requestEditBlockWindow(BlockList * /*blockList*/)
 {
 }
 
-/*virtual*/ void QG_DialogFactory::closeEditBlockWindow(RS_Block * /*blockList*/)
+/*virtual*/ void QG_DialogFactory::closeEditBlockWindow(Block * /*blockList*/)
 {
 }
 
@@ -472,13 +460,13 @@ RS_BlockData QG_DialogFactory::requestBlockAttributesDialog(RS_BlockList * block
  *
  * @return a pointer to the block that should be removed.
  */
-RS_Block * QG_DialogFactory::requestBlockRemovalDialog(RS_BlockList * blockList)
+Block * QG_DialogFactory::requestBlockRemovalDialog(BlockList * blockList)
 {
-       RS_Block * block = NULL;
+       Block * block = NULL;
 
        if (blockList == NULL)
        {
-               RS_DEBUG->print(RS_Debug::D_WARNING, "QG_DialogFactory::requestBlockRemovalDialog(): "
+               DEBUG->print(Debug::D_WARNING, "QG_DialogFactory::requestBlockRemovalDialog(): "
                        "blockList is NULL");
                return NULL;
        }
@@ -516,7 +504,7 @@ QString QG_DialogFactory::requestFileSaveAsDialog() {
     // read default settings:
     RS_SETTINGS->beginGroup("/Paths");
     QString defDir = RS_SETTINGS->readEntry("/Save",
-                       RS_SYSTEM->getHomeDir());
+                       SYSTEM->getHomeDir());
     QString defFilter = RS_SETTINGS->readEntry("/SaveFilter",
                           "Drawing Exchange (*.dxf)");
     RS_SETTINGS->endGroup();
@@ -608,7 +596,7 @@ QString QG_DialogFactory::requestImageOpenDialog()
 
        // read default settings:
        settings.beginGroup("Paths");
-       QString defDir = settings.value("OpenImage", RS_SYSTEM->getHomeDir()).toString();
+       QString defDir = settings.value("OpenImage", SYSTEM->getHomeDir()).toString();
        QString defFilter = settings.value("ImageFilter", "Portable Network Graphic (*.png)").toString();
        settings.endGroup();
 
@@ -712,11 +700,11 @@ QString QG_DialogFactory::requestImageOpenDialog()
 
 void QG_DialogFactory::requestOptions(ActionInterface * action, bool on, bool update)
 {
-       RS_DEBUG->print("QG_DialogFactory::requestOptions");
+       DEBUG->print("QG_DialogFactory::requestOptions");
 
     if (action == NULL)
        {
-        RS_DEBUG->print(RS_Debug::D_WARNING, "QG_DialogFactory::requestOptions: action is NULL");
+        DEBUG->print(Debug::D_WARNING, "QG_DialogFactory::requestOptions: action is NULL");
         return;
     }
 
@@ -727,9 +715,9 @@ void QG_DialogFactory::requestOptions(ActionInterface * action, bool on, bool up
         break;
 
     case RS2::ActionDrawLine:
-               RS_DEBUG->print("QG_DialogFactory::requestOptions: line");
+               DEBUG->print("QG_DialogFactory::requestOptions: line");
         requestLineOptions(action, on);
-               RS_DEBUG->print("QG_DialogFactory::requestOptions: line: OK");
+               DEBUG->print("QG_DialogFactory::requestOptions: line: OK");
         break;
 
     case RS2::ActionDrawPolyline:
@@ -840,7 +828,7 @@ void QG_DialogFactory::requestOptions(ActionInterface * action, bool on, bool up
         break;
     }
 
-       RS_DEBUG->print("QG_DialogFactory::requestOptions: OK");
+       DEBUG->print("QG_DialogFactory::requestOptions: OK");
 }
 
 /**
@@ -896,7 +884,7 @@ them over and over. May need to do some more refactoring based on this idea...
                toolWidget->setAction(action);
        }
 
-       RS_DEBUG->print("QG_DialogFactory::requestLineOptions: OK");
+       DEBUG->print("QG_DialogFactory::requestLineOptions: OK");
 }
 
 /**
@@ -904,7 +892,6 @@ them over and over. May need to do some more refactoring based on this idea...
  */
 void QG_DialogFactory::requestPolylineOptions(ActionInterface * action, bool on, bool update)
 {
-#ifdef RS_PROF
        static PolylineOptions * toolWidget = NULL;
 
        if (!optionWidget)
@@ -921,7 +908,6 @@ void QG_DialogFactory::requestPolylineOptions(ActionInterface * action, bool on,
                toolWidget = new PolylineOptions(optionWidget);
                toolWidget->setAction(action, update);
        }
-#endif
 }
 
 /**
@@ -1408,7 +1394,7 @@ void QG_DialogFactory::requestLibraryInsertOptions(ActionInterface * action, boo
  */
 void QG_DialogFactory::requestToolBar(RS2::ToolBarId id)
 {
-       if (cadToolBar != NULL)
+       if (cadToolBar)
                cadToolBar->showToolBar(id);
 }
 
@@ -1426,7 +1412,7 @@ void QG_DialogFactory::requestToolBarSelect(ActionInterface * selectAction,
  * Shows a dialog to edit the attributes of the given dimension entity.
  */
  /*
-bool QG_DialogFactory::requestDimAlignedDialog(RS_DimAligned* dim) {
+bool QG_DialogFactory::requestDimAlignedDialog(DimAligned* dim) {
     if (dim==NULL) {
         return false;
     }
@@ -1445,7 +1431,7 @@ bool QG_DialogFactory::requestDimAlignedDialog(RS_DimAligned* dim) {
 /**
  * Shows attributes options dialog presenting the given data.
  */
-bool QG_DialogFactory::requestAttributesDialog(RS_AttributesData & data, RS_LayerList & layerList)
+bool QG_DialogFactory::requestAttributesDialog(AttributesData & data, LayerList & layerList)
 {
        DlgAttributes dlg(parent);
        dlg.setData(&data, layerList);
@@ -1462,7 +1448,7 @@ bool QG_DialogFactory::requestAttributesDialog(RS_AttributesData & data, RS_Laye
 /**
  * Shows move options dialog presenting the given data.
  */
-bool QG_DialogFactory::requestMoveDialog(RS_MoveData & data)
+bool QG_DialogFactory::requestMoveDialog(MoveData & data)
 {
        DlgMove dlg(parent);
        dlg.setData(&data);
@@ -1479,7 +1465,7 @@ bool QG_DialogFactory::requestMoveDialog(RS_MoveData & data)
 /**
  * Shows rotate options dialog presenting the given data.
  */
-bool QG_DialogFactory::requestRotateDialog(RS_RotateData & data)
+bool QG_DialogFactory::requestRotateDialog(RotateData & data)
 {
        DlgRotate dlg(parent);
        dlg.setData(&data);
@@ -1496,7 +1482,7 @@ bool QG_DialogFactory::requestRotateDialog(RS_RotateData & data)
 /**
  * Shows scale options dialog presenting the given data.
  */
-bool QG_DialogFactory::requestScaleDialog(RS_ScaleData & data)
+bool QG_DialogFactory::requestScaleDialog(ScaleData & data)
 {
        DlgScale dlg(parent);
        dlg.setData(&data);
@@ -1513,7 +1499,7 @@ bool QG_DialogFactory::requestScaleDialog(RS_ScaleData & data)
 /**
  * Shows mirror options dialog presenting the given data.
  */
-bool QG_DialogFactory::requestMirrorDialog(RS_MirrorData & data)
+bool QG_DialogFactory::requestMirrorDialog(MirrorData & data)
 {
        DlgMirror dlg(parent);
        dlg.setData(&data);
@@ -1530,7 +1516,7 @@ bool QG_DialogFactory::requestMirrorDialog(RS_MirrorData & data)
 /**
  * Shows move/rotate options dialog presenting the given data.
  */
-bool QG_DialogFactory::requestMoveRotateDialog(RS_MoveRotateData & data)
+bool QG_DialogFactory::requestMoveRotateDialog(MoveRotateData & data)
 {
        DlgMoveRotate dlg(parent);
        dlg.setData(&data);
@@ -1547,7 +1533,7 @@ bool QG_DialogFactory::requestMoveRotateDialog(RS_MoveRotateData & data)
 /**
  * Shows rotate around two centers options dialog presenting the given data.
  */
-bool QG_DialogFactory::requestRotate2Dialog(RS_Rotate2Data & data)
+bool QG_DialogFactory::requestRotate2Dialog(Rotate2Data & data)
 {
        DlgRotate2 dlg(parent);
        dlg.setData(&data);
@@ -1564,7 +1550,7 @@ bool QG_DialogFactory::requestRotate2Dialog(RS_Rotate2Data & data)
 /**
  * Shows a dialog to edit the given entity.
  */
-bool QG_DialogFactory::requestModifyEntityDialog(RS_Entity * entity)
+bool QG_DialogFactory::requestModifyEntityDialog(Entity * entity)
 {
        if (entity == NULL)
                return false;
@@ -1576,7 +1562,7 @@ bool QG_DialogFactory::requestModifyEntityDialog(RS_Entity * entity)
        case RS2::EntityPoint:
        {
                DlgPoint dlg(parent);
-               dlg.setPoint(*((RS_Point *)entity));
+               dlg.setPoint(*((Point *)entity));
 
                if (dlg.exec())
                {
@@ -1589,7 +1575,7 @@ bool QG_DialogFactory::requestModifyEntityDialog(RS_Entity * entity)
        case RS2::EntityLine:
        {
                DlgLine dlg(parent);
-               dlg.setLine(*((RS_Line *)entity));
+               dlg.setLine(*((Line *)entity));
 
                if (dlg.exec())
                {
@@ -1602,7 +1588,7 @@ bool QG_DialogFactory::requestModifyEntityDialog(RS_Entity * entity)
        case RS2::EntityArc:
        {
                DlgArc dlg(parent);
-               dlg.setArc(*((RS_Arc *)entity));
+               dlg.setArc(*((Arc *)entity));
 
                if (dlg.exec())
                {
@@ -1615,7 +1601,7 @@ bool QG_DialogFactory::requestModifyEntityDialog(RS_Entity * entity)
        case RS2::EntityCircle:
        {
                DlgCircle dlg(parent);
-               dlg.setCircle(*((RS_Circle *)entity));
+               dlg.setCircle(*((Circle *)entity));
 
                if (dlg.exec())
                {
@@ -1628,7 +1614,7 @@ bool QG_DialogFactory::requestModifyEntityDialog(RS_Entity * entity)
        case RS2::EntityEllipse:
        {
                DlgEllipse dlg(parent);
-               dlg.setEllipse(*((RS_Ellipse *)entity));
+               dlg.setEllipse(*((Ellipse *)entity));
 
                if (dlg.exec())
                {
@@ -1641,7 +1627,7 @@ bool QG_DialogFactory::requestModifyEntityDialog(RS_Entity * entity)
        case RS2::EntitySpline:
        {
                DlgSpline dlg(parent);
-               dlg.setSpline(*((RS_Spline *)entity));
+               dlg.setSpline(*((Spline *)entity));
 
                if (dlg.exec())
                {
@@ -1654,7 +1640,7 @@ bool QG_DialogFactory::requestModifyEntityDialog(RS_Entity * entity)
        case RS2::EntityInsert:
        {
                DlgInsert dlg(parent);
-               dlg.setInsert(*((RS_Insert *)entity));
+               dlg.setInsert(*((Insert *)entity));
 
                if (dlg.exec())
                {
@@ -1671,13 +1657,13 @@ bool QG_DialogFactory::requestModifyEntityDialog(RS_Entity * entity)
        case RS2::EntityDimRadial:
        {
                DlgDimension dlg(parent);
-               dlg.setDim(*((RS_Dimension *)entity));
+               dlg.setDim(*((Dimension *)entity));
 
                if (dlg.exec())
                {
                        dlg.updateDim();
                        ret = true;
-                       ((RS_Dimension *)entity)->update(true);
+                       ((Dimension *)entity)->update(true);
                }
        }
                break;
@@ -1685,13 +1671,13 @@ bool QG_DialogFactory::requestModifyEntityDialog(RS_Entity * entity)
        case RS2::EntityDimLinear:
        {
                DlgDimLinear dlg(parent);
-               dlg.setDim(*((RS_DimLinear *)entity));
+               dlg.setDim(*((DimLinear *)entity));
 
                if (dlg.exec())
                {
                        dlg.updateDim();
                        ret = true;
-                       ((RS_DimLinear *)entity)->update(true);
+                       ((DimLinear *)entity)->update(true);
                }
        }
                break;
@@ -1699,13 +1685,13 @@ bool QG_DialogFactory::requestModifyEntityDialog(RS_Entity * entity)
        case RS2::EntityText:
        {
                DlgText dlg(parent);
-               dlg.setText(*((RS_Text *)entity), false);
+               dlg.setText(*((Text *)entity), false);
 
                if (dlg.exec())
                {
                        dlg.updateText();
                        ret = true;
-                       ((RS_Text *)entity)->update();
+                       ((Text *)entity)->update();
                }
        }
                break;
@@ -1713,13 +1699,13 @@ bool QG_DialogFactory::requestModifyEntityDialog(RS_Entity * entity)
        case RS2::EntityHatch:
        {
                DlgHatch dlg(parent);
-               dlg.setHatch(*((RS_Hatch *)entity), false);
+               dlg.setHatch(*((Hatch *)entity), false);
 
                if (dlg.exec())
                {
                        dlg.updateHatch();
                        ret = true;
-                       ((RS_Hatch *)entity)->update();
+                       ((Hatch *)entity)->update();
                }
        }
                break;
@@ -1732,7 +1718,7 @@ bool QG_DialogFactory::requestModifyEntityDialog(RS_Entity * entity)
 }
 
  /*
-bool QG_DialogFactory::requestDimAlignedDialog(RS_DimAligned* dim) {
+bool QG_DialogFactory::requestDimAlignedDialog(DimAligned* dim) {
     return false;
 }
 */
@@ -1740,7 +1726,7 @@ bool QG_DialogFactory::requestDimAlignedDialog(RS_DimAligned* dim) {
 /**
  * Shows a dialog to edit the attributes of the given text entity.
  */
-bool QG_DialogFactory::requestTextDialog(RS_Text * text)
+bool QG_DialogFactory::requestTextDialog(Text * text)
 {
        if (text == NULL)
                return false;
@@ -1760,12 +1746,12 @@ bool QG_DialogFactory::requestTextDialog(RS_Text * text)
 /**
  * Shows a dialog to edit pattern / hatch attributes of the given entity.
  */
-bool QG_DialogFactory::requestHatchDialog(RS_Hatch * hatch)
+bool QG_DialogFactory::requestHatchDialog(Hatch * hatch)
 {
        if (hatch == NULL)
                return false;
 
-       RS_PATTERNLIST->init();
+       PATTERNLIST->init();
 
        DlgHatch dlg(parent);
        dlg.setHatch(*hatch, true);
@@ -1785,17 +1771,17 @@ bool QG_DialogFactory::requestHatchDialog(RS_Hatch * hatch)
  */
 bool QG_DialogFactory::requestCamOptionsDialog(Drawing& graphic)
 {
-       RS_DEBUG->print("QG_DialogFactory::requestCamOptionsDialog");
+       DEBUG->print("QG_DialogFactory::requestCamOptionsDialog");
        RS_CamDialog dlg(graphic, parent);
-       RS_DEBUG->print("QG_DialogFactory::requestCamOptionsDialog: exec");
+       DEBUG->print("QG_DialogFactory::requestCamOptionsDialog: exec");
 
        if (dlg.exec())
        {
-               RS_DEBUG->print("QG_DialogFactory::requestCamOptionsDialog: OK");
+               DEBUG->print("QG_DialogFactory::requestCamOptionsDialog: OK");
                return true;
        }
 
-       RS_DEBUG->print("QG_DialogFactory::requestCamOptionsDialog: Cancel");
+       DEBUG->print("QG_DialogFactory::requestCamOptionsDialog: Cancel");
        return false;
 }
 #endif
@@ -1864,12 +1850,12 @@ void QG_DialogFactory::updateSelectionWidget(int num)
  */
 void QG_DialogFactory::commandMessage(const QString& message)
 {
-       RS_DEBUG->print("QG_DialogFactory::commandMessage");
+       DEBUG->print("QG_DialogFactory::commandMessage");
 
        if (commandWidget != NULL)
                commandWidget->appendHistory(message);
 
-       RS_DEBUG->print("QG_DialogFactory::commandMessage: OK");
+       DEBUG->print("QG_DialogFactory::commandMessage: OK");
 }
 
 /*virtual*/ bool QG_DialogFactory::isAdapter()