]> Shamusworld >> Repos - architektonas/commitdiff
Removed unnecessary RS_ prefix from classes and whatnot.
authorShamus Hammons <jlhamm@acm.org>
Fri, 10 Sep 2010 06:02:12 +0000 (06:02 +0000)
committerShamus Hammons <jlhamm@acm.org>
Fri, 10 Sep 2010 06:02:12 +0000 (06:02 +0000)
476 files changed:
architektonas.pro
src/actions/actionblocksadd.cpp
src/actions/actionblocksadd.h
src/actions/actionblocksattributes.cpp
src/actions/actionblocksattributes.h
src/actions/actionblockscreate.cpp
src/actions/actionblockscreate.h
src/actions/actionblocksedit.cpp
src/actions/actionblocksedit.h
src/actions/actionblocksexplode.cpp
src/actions/actionblocksexplode.h
src/actions/actionblocksfreezeall.cpp
src/actions/actionblocksfreezeall.h
src/actions/actionblocksinsert.cpp
src/actions/actionblocksinsert.h
src/actions/actionblocksremove.cpp
src/actions/actionblocksremove.h
src/actions/actionblockstoggleview.cpp
src/actions/actionblockstoggleview.h
src/actions/actiondefault.cpp
src/actions/actiondefault.h
src/actions/actiondimaligned.cpp
src/actions/actiondimaligned.h
src/actions/actiondimangular.cpp
src/actions/actiondimangular.h
src/actions/actiondimdiametric.cpp
src/actions/actiondimdiametric.h
src/actions/actiondimension.cpp
src/actions/actiondimension.h
src/actions/actiondimleader.cpp
src/actions/actiondimleader.h
src/actions/actiondimlinear.cpp
src/actions/actiondimlinear.h
src/actions/actiondimradial.cpp
src/actions/actiondimradial.h
src/actions/actiondrawarc.cpp
src/actions/actiondrawarc.h
src/actions/actiondrawarc3p.cpp
src/actions/actiondrawarc3p.h
src/actions/actiondrawarctangential.cpp
src/actions/actiondrawarctangential.h
src/actions/actiondrawcircle.cpp
src/actions/actiondrawcircle.h
src/actions/actiondrawcircle2p.cpp
src/actions/actiondrawcircle2p.h
src/actions/actiondrawcircle3p.cpp
src/actions/actiondrawcircle3p.h
src/actions/actiondrawcirclecr.cpp
src/actions/actiondrawcirclecr.h
src/actions/actiondrawellipseaxis.cpp
src/actions/actiondrawellipseaxis.h
src/actions/actiondrawhatch.cpp
src/actions/actiondrawhatch.h
src/actions/actiondrawimage.cpp
src/actions/actiondrawimage.h
src/actions/actiondrawline.cpp
src/actions/actiondrawline.h
src/actions/actiondrawlineangle.cpp
src/actions/actiondrawlineangle.h
src/actions/actiondrawlinebisector.cpp
src/actions/actiondrawlinebisector.h
src/actions/actiondrawlinefree.cpp
src/actions/actiondrawlinefree.h
src/actions/actiondrawlinehorvert.cpp
src/actions/actiondrawlinehorvert.h
src/actions/actiondrawlineparallel.cpp
src/actions/actiondrawlineparallel.h
src/actions/actiondrawlineparallelthrough.cpp
src/actions/actiondrawlineparallelthrough.h
src/actions/actiondrawlinepolygon.cpp
src/actions/actiondrawlinepolygon.h
src/actions/actiondrawlinepolygon2.cpp
src/actions/actiondrawlinepolygon2.h
src/actions/actiondrawlinerectangle.cpp
src/actions/actiondrawlinerectangle.h
src/actions/actiondrawlinerelangle.cpp
src/actions/actiondrawlinerelangle.h
src/actions/actiondrawlinetangent1.cpp
src/actions/actiondrawlinetangent1.h
src/actions/actiondrawlinetangent2.cpp
src/actions/actiondrawlinetangent2.h
src/actions/actiondrawpoint.cpp
src/actions/actiondrawpoint.h
src/actions/actiondrawspline.cpp
src/actions/actiondrawspline.h
src/actions/actiondrawtext.cpp
src/actions/actiondrawtext.h
src/actions/actioneditcopy.cpp
src/actions/actioneditcopy.h
src/actions/actioneditpaste.cpp
src/actions/actioneditpaste.h
src/actions/actioneditundo.cpp
src/actions/actioneditundo.h
src/actions/actionfilenew.cpp
src/actions/actionfilenew.h
src/actions/actionfileopen.cpp
src/actions/actionfileopen.h
src/actions/actionfilesave.cpp
src/actions/actionfilesave.h
src/actions/actionfilesaveas.cpp
src/actions/actionfilesaveas.h
src/actions/actioninfoangle.cpp
src/actions/actioninfoangle.h
src/actions/actioninfoarea.cpp
src/actions/actioninfoarea.h
src/actions/actioninfodist.cpp
src/actions/actioninfodist.h
src/actions/actioninfodist2.cpp
src/actions/actioninfodist2.h
src/actions/actioninfoinside.cpp
src/actions/actioninfoinside.h
src/actions/actioninfototallength.cpp
src/actions/actioninfototallength.h
src/actions/actionlayersadd.cpp
src/actions/actionlayersadd.h
src/actions/actionlayersedit.cpp
src/actions/actionlayersedit.h
src/actions/actionlayersfreezeall.cpp
src/actions/actionlayersfreezeall.h
src/actions/actionlayersremove.cpp
src/actions/actionlayersremove.h
src/actions/actionlayerstogglelock.cpp
src/actions/actionlayerstogglelock.h
src/actions/actionlayerstoggleview.cpp
src/actions/actionlayerstoggleview.h
src/actions/actionlibraryinsert.cpp
src/actions/actionlibraryinsert.h
src/actions/actionlockrelativezero.cpp
src/actions/actionlockrelativezero.h
src/actions/actionmodifyattributes.cpp
src/actions/actionmodifyattributes.h
src/actions/actionmodifybevel.cpp
src/actions/actionmodifybevel.h
src/actions/actionmodifycut.cpp
src/actions/actionmodifycut.h
src/actions/actionmodifydelete.cpp
src/actions/actionmodifydelete.h
src/actions/actionmodifydeletefree.cpp
src/actions/actionmodifydeletefree.h
src/actions/actionmodifydeletequick.cpp
src/actions/actionmodifydeletequick.h
src/actions/actionmodifyentity.cpp
src/actions/actionmodifyentity.h
src/actions/actionmodifyexplodetext.cpp
src/actions/actionmodifyexplodetext.h
src/actions/actionmodifymirror.cpp
src/actions/actionmodifymirror.h
src/actions/actionmodifymove.cpp
src/actions/actionmodifymove.h
src/actions/actionmodifymoverotate.cpp
src/actions/actionmodifymoverotate.h
src/actions/actionmodifyrotate.cpp
src/actions/actionmodifyrotate.h
src/actions/actionmodifyrotate2.cpp
src/actions/actionmodifyrotate2.h
src/actions/actionmodifyround.cpp
src/actions/actionmodifyround.h
src/actions/actionmodifyscale.cpp
src/actions/actionmodifyscale.h
src/actions/actionmodifystretch.cpp
src/actions/actionmodifystretch.h
src/actions/actionmodifytrim.cpp
src/actions/actionmodifytrim.h
src/actions/actionmodifytrimamount.cpp
src/actions/actionmodifytrimamount.h
src/actions/actionoptionsdrawing.cpp
src/actions/actionoptionsdrawing.h
src/actions/actionprintpreview.cpp
src/actions/actionprintpreview.h
src/actions/actionselect.cpp
src/actions/actionselect.h
src/actions/actionselectall.cpp
src/actions/actionselectall.h
src/actions/actionselectbase.cpp
src/actions/actionselectbase.h
src/actions/actionselectcontour.cpp
src/actions/actionselectcontour.h
src/actions/actionselectintersected.cpp
src/actions/actionselectintersected.h
src/actions/actionselectinvert.cpp
src/actions/actionselectinvert.h
src/actions/actionselectlayer.cpp
src/actions/actionselectlayer.h
src/actions/actionselectsingle.cpp
src/actions/actionselectsingle.h
src/actions/actionselectwindow.cpp
src/actions/actionselectwindow.h
src/actions/actionsetrelativezero.cpp
src/actions/actionsetrelativezero.h
src/actions/actionsetsnapmode.cpp
src/actions/actionsetsnapmode.h
src/actions/actionsetsnaprestriction.cpp
src/actions/actionsetsnaprestriction.h
src/actions/actionsnapintersectionmanual.cpp
src/actions/actionsnapintersectionmanual.h
src/actions/actionzoomauto.cpp
src/actions/actionzoomauto.h
src/actions/actionzoomautoy.cpp
src/actions/actionzoomautoy.h
src/actions/actionzoomin.cpp
src/actions/actionzoomin.h
src/actions/actionzoompan.cpp
src/actions/actionzoompan.h
src/actions/actionzoomprevious.cpp
src/actions/actionzoomprevious.h
src/actions/actionzoomredraw.cpp
src/actions/actionzoomredraw.h
src/actions/actionzoomscroll.cpp
src/actions/actionzoomscroll.h
src/actions/actionzoomwindow.cpp
src/actions/actionzoomwindow.h
src/base/actioninterface.cpp
src/base/actioninterface.h
src/base/arc.cpp
src/base/arc.h
src/base/atomicentity.cpp
src/base/atomicentity.h
src/base/block.cpp
src/base/block.h
src/base/blocklist.cpp
src/base/blocklist.h
src/base/circle.cpp
src/base/circle.h
src/base/clipboard.cpp
src/base/clipboard.h
src/base/color.cpp
src/base/color.h
src/base/commandevent.cpp
src/base/commandevent.h
src/base/constructionline.cpp
src/base/constructionline.h
src/base/creation.cpp
src/base/creation.h
src/base/debug.cpp
src/base/debug.h
src/base/dialogfactory.cpp
src/base/dialogfactory.h
src/base/dialogfactoryadapter.h
src/base/dialogfactoryinterface.h
src/base/dimaligned.cpp
src/base/dimaligned.h
src/base/dimangular.cpp
src/base/dimangular.h
src/base/dimdiametric.cpp
src/base/dimdiametric.h
src/base/dimension.cpp
src/base/dimension.h
src/base/dimlinear.cpp
src/base/dimlinear.h
src/base/dimradial.cpp
src/base/dimradial.h
src/base/document.cpp
src/base/document.h
src/base/drawing.cpp
src/base/drawing.h
src/base/ellipse.cpp
src/base/ellipse.h
src/base/entity.cpp
src/base/entity.h
src/base/entitycontainer.cpp
src/base/entitycontainer.h
src/base/enums.h [moved from src/base/rs.h with 75% similarity]
src/base/eventhandler.cpp
src/base/eventhandler.h
src/base/fileio.cpp
src/base/fileio.h
src/base/filtercxf.cpp
src/base/filtercxf.h
src/base/filterdxf.cpp
src/base/filterdxf.h
src/base/filterdxf1.cpp
src/base/filterdxf1.h
src/base/filterinterface.cpp
src/base/filterinterface.h
src/base/flags.cpp
src/base/flags.h
src/base/font.cpp
src/base/font.h
src/base/fontchar.h
src/base/fontlist.cpp
src/base/fontlist.h
src/base/grid.cpp
src/base/grid.h
src/base/hatch.cpp
src/base/hatch.h
src/base/image.cpp
src/base/image.h
src/base/infoarea.cpp
src/base/infoarea.h
src/base/information.cpp
src/base/information.h
src/base/insert.cpp
src/base/insert.h
src/base/layer.cpp
src/base/layer.h
src/base/layerlist.cpp
src/base/layerlist.h
src/base/leader.cpp
src/base/leader.h
src/base/line.cpp
src/base/line.h
src/base/linetypepattern.cpp
src/base/linetypepattern.h
src/base/mainwindowinterface.h
src/base/mathextra.cpp
src/base/mathextra.h
src/base/modification.cpp
src/base/modification.h
src/base/paintinterface.cpp
src/base/paintinterface.h
src/base/pattern.cpp
src/base/pattern.h
src/base/patternlist.cpp
src/base/patternlist.h
src/base/pen.cpp
src/base/pen.h
src/base/point.cpp
src/base/point.h
src/base/polyline.cpp
src/base/polyline.h
src/base/preview.cpp
src/base/preview.h
src/base/python.cpp [deleted file]
src/base/python.h [deleted file]
src/base/python_wrappers.cpp [deleted file]
src/base/python_wrappers.h [deleted file]
src/base/script.cpp
src/base/script.h
src/base/scriptlist.cpp
src/base/scriptlist.h
src/base/selection.cpp
src/base/selection.h
src/base/simplepython.cpp [deleted file]
src/base/simplepython.h [deleted file]
src/base/snapper.cpp
src/base/snapper.h
src/base/solid.cpp
src/base/solid.h
src/base/spline.cpp
src/base/spline.h
src/base/staticgraphicview.cpp
src/base/staticgraphicview.h
src/base/system.cpp
src/base/system.h
src/base/text.cpp
src/base/text.h
src/base/undo.cpp
src/base/undo.h
src/base/undoable.cpp
src/base/undoable.h
src/base/undocycle.cpp
src/base/undocycle.h
src/base/units.cpp
src/base/units.h
src/base/utility.cpp
src/base/utility.h
src/base/variable.cpp
src/base/variable.h
src/base/variabledict.cpp
src/base/variabledict.h
src/base/vector.cpp
src/base/vectorsolutions.cpp
src/forms/arcoptions.cpp
src/forms/arctangentialoptions.cpp
src/forms/beveloptions.cpp
src/forms/blockdialog.cpp
src/forms/blockdialog.h
src/forms/cadtoolbar.cpp
src/forms/circleoptions.cpp
src/forms/commandwidget.cpp
src/forms/coordinatewidget.cpp
src/forms/coordinatewidget.h
src/forms/dimlinearoptions.cpp
src/forms/dimoptions.cpp
src/forms/dlgarc.cpp
src/forms/dlgarc.h
src/forms/dlgattributes.cpp
src/forms/dlgattributes.h
src/forms/dlgcircle.cpp
src/forms/dlgcircle.h
src/forms/dlgdimension.cpp
src/forms/dlgdimension.h
src/forms/dlgdimlinear.cpp
src/forms/dlgdimlinear.h
src/forms/dlgellipse.cpp
src/forms/dlgellipse.h
src/forms/dlghatch.cpp
src/forms/dlghatch.h
src/forms/dlgimageoptions.cpp
src/forms/dlginitial.cpp
src/forms/dlginsert.cpp
src/forms/dlginsert.h
src/forms/dlgline.cpp
src/forms/dlgline.h
src/forms/dlgmirror.cpp
src/forms/dlgmirror.h
src/forms/dlgmove.cpp
src/forms/dlgmove.h
src/forms/dlgmoverotate.cpp
src/forms/dlgmoverotate.h
src/forms/dlgoptionsdrawing.cpp
src/forms/dlgoptionsgeneral.cpp
src/forms/dlgpoint.cpp
src/forms/dlgpoint.h
src/forms/dlgrotate.cpp
src/forms/dlgrotate.h
src/forms/dlgrotate2.cpp
src/forms/dlgrotate2.h
src/forms/dlgscale.cpp
src/forms/dlgscale.h
src/forms/dlgspline.cpp
src/forms/dlgspline.h
src/forms/dlgtext.cpp
src/forms/dlgtext.h
src/forms/imageoptions.cpp
src/forms/insertoptions.cpp
src/forms/layerdialog.cpp
src/forms/layerdialog.h
src/forms/libraryinsertoptions.cpp
src/forms/librarywidget.cpp
src/forms/lineangleoptions.cpp
src/forms/linebisectoroptions.cpp
src/forms/lineoptions.cpp
src/forms/lineparalleloptions.cpp
src/forms/lineparallelthroughoptions.cpp
src/forms/linepolygon2options.cpp
src/forms/linepolygonoptions.cpp
src/forms/linerelangleoptions.cpp
src/forms/moverotateoptions.cpp
src/forms/printpreviewoptions.cpp
src/forms/roundoptions.cpp
src/forms/snapdistoptions.cpp
src/forms/splineoptions.cpp
src/forms/textoptions.cpp
src/forms/trimamountoptions.cpp
src/forms/widgetpen.cpp
src/forms/widgetpen.h
src/mainapp/applicationwindow.cpp
src/mainapp/applicationwindow.h
src/mainapp/commands.cpp
src/mainapp/commands.h
src/mainapp/graphicview.cpp
src/mainapp/graphicview.h
src/mainapp/main.cpp
src/mainapp/mdiwindow.cpp
src/mainapp/mdiwindow.h
src/mainapp/qc_dialogfactory.cpp
src/mainapp/qc_dialogfactory.h
src/widgets/actionhandler.cpp
src/widgets/actionhandler.h
src/widgets/blockwidget.cpp
src/widgets/blockwidget.h
src/widgets/colorbox.cpp
src/widgets/colorbox.h
src/widgets/filedialog.cpp
src/widgets/filedialog.h
src/widgets/fontbox.cpp
src/widgets/fontbox.h
src/widgets/layerbox.cpp
src/widgets/layerbox.h
src/widgets/layerwidget.cpp
src/widgets/layerwidget.h
src/widgets/linetypebox.cpp
src/widgets/linetypebox.h
src/widgets/patternbox.cpp
src/widgets/patternbox.h
src/widgets/pentoolbar.cpp
src/widgets/pentoolbar.h
src/widgets/qg_dialogfactory.cpp
src/widgets/qg_dialogfactory.h
src/widgets/qg_graphicview.cpp
src/widgets/qg_graphicview.h
src/widgets/qg_mainwindowinterface.h
src/widgets/recentfiles.cpp
src/widgets/widthbox.cpp
src/widgets/widthbox.h

index 3824c0363270651650b4f657b86d45364eedf791..7bb1245d3ac6cdefd867d99c643f877168744d55 100644 (file)
@@ -28,7 +28,6 @@ INCLUDEPATH += \
        src/forms
 
 HEADERS = \
-       src/base/rs.h \
        src/base/actioninterface.h \
        src/base/arc.h \
        src/base/atomicentity.h \
@@ -55,6 +54,7 @@ HEADERS = \
        src/base/ellipse.h \
        src/base/entity.h \
        src/base/entitycontainer.h \
+       src/base/enums.h \
        src/base/eventhandler.h \
        src/base/fileio.h \
        src/base/filtercxf.h \
@@ -86,12 +86,9 @@ HEADERS = \
        src/base/point.h \
        src/base/polyline.h \
        src/base/preview.h \
-       src/base/python.h \
-       src/base/python_wrappers.h \
        src/base/script.h \
        src/base/scriptlist.h \
        src/base/selection.h \
-       src/base/simplepython.h \
        src/base/snapper.h \
        src/base/solid.h \
        src/base/spline.h \
@@ -133,6 +130,7 @@ SOURCES = \
        src/base/ellipse.cpp \
        src/base/entity.cpp \
        src/base/entitycontainer.cpp \
+       src/base/enums.cpp \
        src/base/eventhandler.cpp \
        src/base/fileio.cpp \
        src/base/filtercxf.cpp \
@@ -162,12 +160,9 @@ SOURCES = \
        src/base/point.cpp \
        src/base/polyline.cpp \
        src/base/preview.cpp \
-       src/base/python.cpp \
-       src/base/python_wrappers.cpp \
        src/base/script.cpp \
        src/base/scriptlist.cpp \
        src/base/selection.cpp \
-       src/base/simplepython.cpp \
        src/base/snapper.cpp \
        src/base/solid.cpp \
        src/base/spline.cpp \
index 88171393f5bd36a1cdc9870157d8241d6ec7f7c5..f2f9e8f292c2793afa6a5ca4b0d100f062f75338 100644 (file)
@@ -19,7 +19,7 @@
 #include "drawing.h"
 #include "dialogfactory.h"
 
-ActionBlocksAdd::ActionBlocksAdd(RS_EntityContainer & container, GraphicView & graphicView):
+ActionBlocksAdd::ActionBlocksAdd(EntityContainer & container, GraphicView & graphicView):
        ActionInterface("Add Block", container, graphicView)
 {
 }
@@ -30,18 +30,18 @@ ActionBlocksAdd::~ActionBlocksAdd()
 
 void ActionBlocksAdd::trigger()
 {
-       RS_DEBUG->print("adding block");
+       DEBUG->print("adding block");
 
        if (graphic)
        {
-               RS_BlockList * blockList = graphic->getBlockList();
+               BlockList * blockList = graphic->getBlockList();
 
                if (blockList)
                {
-                       RS_BlockData d = RS_DIALOGFACTORY->requestNewBlockDialog(blockList);
+                       BlockData d = DIALOGFACTORY->requestNewBlockDialog(blockList);
 
                        if (d.isValid())
-                               graphic->addBlock(new RS_Block(container, d));
+                               graphic->addBlock(new Block(container, d));
                }
        }
 
index 491f46990a3ae59288e0e87d7b817df7447facc2..c1e49bf2225e4b86bfd2995e5763e32dcacb281f 100644 (file)
@@ -12,7 +12,7 @@
 class ActionBlocksAdd: public ActionInterface
 {
        public:
-               ActionBlocksAdd(RS_EntityContainer & container, GraphicView & graphicView);
+               ActionBlocksAdd(EntityContainer & container, GraphicView & graphicView);
                ~ActionBlocksAdd();
 
                virtual void init(int status = 0);
index b8f5082c3dcdf3ec5cfa0f24fa4b422d7b7a6e0b..31a2601309ba4ca89b499ecf6e4d8edf6e40d8bd 100644 (file)
@@ -20,7 +20,7 @@
 #include "dialogfactory.h"
 
 ActionBlocksAttributes::ActionBlocksAttributes(
-       RS_EntityContainer & container, GraphicView & graphicView):
+       EntityContainer & container, GraphicView & graphicView):
        ActionInterface("Edit Block Attributes", container, graphicView)
 {
 }
@@ -31,17 +31,17 @@ ActionBlocksAttributes::~ActionBlocksAttributes()
 
 void ActionBlocksAttributes::trigger()
 {
-       RS_DEBUG->print("editing block attributes");
+       DEBUG->print("editing block attributes");
 
-       if (graphic && RS_DIALOGFACTORY)
+       if (graphic && DIALOGFACTORY)
        {
-               RS_Block * block = graphic->getActiveBlock();
-               RS_BlockList * blockList = graphic->getBlockList();
+               Block * block = graphic->getActiveBlock();
+               BlockList * blockList = graphic->getBlockList();
 
                if (blockList && block)
                {
                        QString oldName = block->getName();
-                       RS_BlockData d = RS_DIALOGFACTORY->requestBlockAttributesDialog(blockList);
+                       BlockData d = DIALOGFACTORY->requestBlockAttributesDialog(blockList);
 
                        if (d.isValid())
                        {
index c825ad1d718cd1dd6195fdfc318bcfe8853ec23f..2b8be394d818297727f6111c5f5b0298afef3ac4 100644 (file)
@@ -12,7 +12,7 @@
 class ActionBlocksAttributes: public ActionInterface
 {
        public:
-               ActionBlocksAttributes(RS_EntityContainer & container, GraphicView & graphicView);
+               ActionBlocksAttributes(EntityContainer & container, GraphicView & graphicView);
                ~ActionBlocksAttributes();
 
                virtual void init(int status = 0);
index 172c071b34bb35a47a7a564b58448545a51292f0..723b95c35ac5977f596431917acad8004b073d95 100644 (file)
@@ -12,7 +12,7 @@
 // Who  When        What
 // ---  ----------  -----------------------------------------------------------
 // JLH  06/03/2010  Added this text. :-)
-// JLH  06/03/2010  Scrubbed out all occurances of RS_CoordinateEvent
+// JLH  06/03/2010  Scrubbed out all occurances of CoordinateEvent
 //
 
 #include "actionblockscreate.h"
@@ -26,7 +26,7 @@
 /**
  * Constructor.
  */
-ActionBlocksCreate::ActionBlocksCreate(RS_EntityContainer & container, GraphicView & graphicView): ActionInterface("Blocks Create", container, graphicView)
+ActionBlocksCreate::ActionBlocksCreate(EntityContainer & container, GraphicView & graphicView): ActionInterface("Blocks Create", container, graphicView)
 {
        referencePoint = Vector(false);
 }
@@ -65,24 +65,24 @@ void ActionBlocksCreate::trigger()
        //deletePreview();
        //clearPreview();
 
-       //RS_Modification m(*container, graphicView);
+       //Modification m(*container, graphicView);
        //m.paste(data.insertionPoint);
-       //std::cout << *RS_Clipboard::instance();
+       //std::cout << *Clipboard::instance();
 
        if (graphic != NULL)
        {
-               RS_BlockList * blockList = graphic->getBlockList();
+               BlockList * blockList = graphic->getBlockList();
 
                if (blockList != NULL)
                {
-                       RS_BlockData d = RS_DIALOGFACTORY->requestNewBlockDialog(blockList);
+                       BlockData d = DIALOGFACTORY->requestNewBlockDialog(blockList);
 
                        if (!d.name.isEmpty())
                        {
-                               RS_Creation creation(container, graphicView);
+                               Creation creation(container, graphicView);
                                creation.createBlock(d, referencePoint, true);
 
-                               RS_InsertData id(d.name, referencePoint, Vector(1.0, 1.0), 0.0, 1, 1, Vector(0.0, 0.0));
+                               InsertData id(d.name, referencePoint, Vector(1.0, 1.0), 0.0, 1, 1, Vector(0.0, 0.0));
                                creation.createInsert(id);
                        }
                }
@@ -108,7 +108,7 @@ void ActionBlocksCreate::mouseMoveEvent(QMouseEvent * e)
                        clearPreview();
                        //preview->addAllFrom(*block);
                        //preview->move(data.insertionPoint);
-                       RS_Creation creation(preview, NULL, false);
+                       Creation creation(preview, NULL, false);
                        creation.createInsert(data);
                        drawPreview();
                   }*/
@@ -156,11 +156,11 @@ void ActionBlocksCreate::updateMouseButtonHints()
        switch (getStatus())
        {
        case SetReferencePoint:
-               RS_DIALOGFACTORY->updateMouseWidget(tr("Specify reference point"), tr("Cancel"));
+               DIALOGFACTORY->updateMouseWidget(tr("Specify reference point"), tr("Cancel"));
                break;
 
        default:
-               RS_DIALOGFACTORY->updateMouseWidget("", "");
+               DIALOGFACTORY->updateMouseWidget("", "");
                break;
        }
 }
@@ -173,8 +173,8 @@ void ActionBlocksCreate::updateMouseCursor()
 void ActionBlocksCreate::updateToolBar()
 {
        if (!isFinished())
-               RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
+               DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
        else
-               RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarMain);
+               DIALOGFACTORY->requestToolBar(RS2::ToolBarMain);
 }
 
index 27a462a3cc079dc3b197a9f00dab913d7e54e3b3..722a1e28c309deb825954b37bd1e52bd0f0e4cec 100644 (file)
@@ -23,7 +23,7 @@ class ActionBlocksCreate: public ActionInterface
                };
 
        public:
-               ActionBlocksCreate(RS_EntityContainer & container, GraphicView & graphicView);
+               ActionBlocksCreate(EntityContainer & container, GraphicView & graphicView);
                ~ActionBlocksCreate();
 
                virtual RS2::ActionType rtti();
index 46f549af90644452fc96453f672383f7472bcd41..6776e02133f0ab68fafa3148dd1ac2f97cf807aa 100644 (file)
@@ -19,7 +19,7 @@
 #include "drawing.h"
 #include "dialogfactory.h"
 
-ActionBlocksEdit::ActionBlocksEdit(RS_EntityContainer & container, GraphicView & graphicView):
+ActionBlocksEdit::ActionBlocksEdit(EntityContainer & container, GraphicView & graphicView):
        ActionInterface("Edit Block", container, graphicView)
 {
 }
@@ -30,12 +30,12 @@ ActionBlocksEdit::~ActionBlocksEdit()
 
 void ActionBlocksEdit::trigger()
 {
-       RS_DEBUG->print("edit block");
+       DEBUG->print("edit block");
 
-       if (graphic && RS_DIALOGFACTORY)
-               RS_DIALOGFACTORY->requestEditBlockWindow(graphic->getBlockList());
+       if (graphic && DIALOGFACTORY)
+               DIALOGFACTORY->requestEditBlockWindow(graphic->getBlockList());
        else
-               RS_DEBUG->print(RS_Debug::D_WARNING, "ActionBlocksEdit::trigger(): graphic is NULL");
+               DEBUG->print(Debug::D_WARNING, "ActionBlocksEdit::trigger(): graphic is NULL");
 
        finish();
 }
index eab361061263182b5ae07f4da50b695ed6f31f25..ce0499cd093f0103e3382095f4f42d3a26acf1c7 100644 (file)
@@ -12,7 +12,7 @@
 class ActionBlocksEdit: public ActionInterface
 {
        public:
-               ActionBlocksEdit(RS_EntityContainer & container, GraphicView & graphicView);
+               ActionBlocksEdit(EntityContainer & container, GraphicView & graphicView);
                ~ActionBlocksEdit();
 
                virtual void init(int status = 0);
index 3e29a70ba14aed7a2ec09b0d5e6f7880d6607cd1..f000b18f06e97ae49f2e7f6fff8c9f81b94a9f68 100644 (file)
@@ -21,7 +21,7 @@
 /**
  * Constructor.
  */
-ActionBlocksExplode::ActionBlocksExplode(RS_EntityContainer & container, GraphicView & graphicView):
+ActionBlocksExplode::ActionBlocksExplode(EntityContainer & container, GraphicView & graphicView):
        ActionInterface("Blocks Explode", container, graphicView)
 {
 }
@@ -45,6 +45,6 @@ void ActionBlocksExplode::init(int status)
 
 void ActionBlocksExplode::trigger()
 {
-       RS_Modification m(*container, graphicView);
+       Modification m(*container, graphicView);
        m.explode();
 }
index 8ab8aa516763f70fa77d70c628940fe55336bb92..f9a1bb517f6f725e5e756e175e26abc432756eda 100644 (file)
@@ -14,7 +14,7 @@
 class ActionBlocksExplode: public ActionInterface
 {
        public:
-               ActionBlocksExplode(RS_EntityContainer & container, GraphicView & graphicView);
+               ActionBlocksExplode(EntityContainer & container, GraphicView & graphicView);
                ~ActionBlocksExplode();
 
                virtual RS2::ActionType rtti();
index 99d4db0f51f764bbde51c3f9a02183cae8c7458b..6a152f194799e63a6a2f228f1f96ce246899910e 100644 (file)
@@ -19,7 +19,7 @@
 #include "drawing.h"
 #include "graphicview.h"
 
-ActionBlocksFreezeAll::ActionBlocksFreezeAll(bool freeze, RS_EntityContainer & container,
+ActionBlocksFreezeAll::ActionBlocksFreezeAll(bool freeze, EntityContainer & container,
        GraphicView & graphicView): ActionInterface("Freeze all Blocks", container, graphicView)
 {
        this->freeze = freeze;
@@ -31,7 +31,7 @@ ActionBlocksFreezeAll::~ActionBlocksFreezeAll()
 
 void ActionBlocksFreezeAll::trigger()
 {
-       RS_DEBUG->print("ActionBlocksFreezeAll::trigger");
+       DEBUG->print("ActionBlocksFreezeAll::trigger");
 
        if (graphic)
                graphic->freezeAllBlocks(freeze);
index 31c359a3ef962d4411017c7f3d451f8d84c0870d..274b70ba373fd24a70560ff92aa1e9519f0e59f9 100644 (file)
@@ -12,7 +12,7 @@
 class ActionBlocksFreezeAll: public ActionInterface
 {
        public:
-               ActionBlocksFreezeAll(bool freeze, RS_EntityContainer & container, GraphicView & graphicView);
+               ActionBlocksFreezeAll(bool freeze, EntityContainer & container, GraphicView & graphicView);
                ~ActionBlocksFreezeAll();
 
                virtual void init(int status = 0);
index 09eae0f22245b60ecbc47e42725d31020ab7f626..48d6ff985c15c08c39a229b4fb5c5473ccf062c6 100644 (file)
@@ -12,7 +12,7 @@
 // Who  When        What
 // ---  ----------  -----------------------------------------------------------
 // JLH  06/03/2010  Added this text. :-)
-// JLH  06/03/2010  Scrubbed out all occurances of RS_CoordinateEvent
+// JLH  06/03/2010  Scrubbed out all occurances of CoordinateEvent
 //
 
 #include "actionblocksinsert.h"
@@ -27,7 +27,7 @@
 /**
  * Constructor.
  */
-ActionBlocksInsert::ActionBlocksInsert(RS_EntityContainer & container, GraphicView & graphicView):
+ActionBlocksInsert::ActionBlocksInsert(EntityContainer & container, GraphicView & graphicView):
        ActionInterface("Blocks Insert", container, graphicView)
 {
 }
@@ -59,7 +59,7 @@ void ActionBlocksInsert::init(int status /*= 0*/)
 
 void ActionBlocksInsert::reset()
 {
-       data = RS_InsertData("", Vector(0.0, 0.0), Vector(1.0, 1.0), 0.0, 1, 1,
+       data = InsertData("", Vector(0.0, 0.0), Vector(1.0, 1.0), 0.0, 1, 1,
                Vector(1.0, 1.0), NULL, RS2::Update);
 }
 
@@ -69,13 +69,13 @@ void ActionBlocksInsert::trigger()
 //     deletePreview();
 //     clearPreview();
 
-       //RS_Modification m(*container, graphicView);
+       //Modification m(*container, graphicView);
        //m.paste(data.insertionPoint);
-       //std::cout << *RS_Clipboard::instance();
+       //std::cout << *Clipboard::instance();
 
        if (block)
        {
-               RS_Creation creation(container, graphicView);
+               Creation creation(container, graphicView);
                data.updateMode = RS2::Update;
                creation.createInsert(data);
        }
@@ -97,8 +97,8 @@ void ActionBlocksInsert::mouseMoveEvent(QMouseEvent * e)
 //                     clearPreview();
                        //preview->addAllFrom(*block);
                        //preview->move(data.insertionPoint);
-//                     RS_Creation creation(preview, NULL, false);
-                       RS_Creation creation(&(graphicView->preview), NULL, false);
+//                     Creation creation(preview, NULL, false);
+                       Creation creation(&(graphicView->preview), NULL, false);
                        // Create insert as preview only
                        data.updateMode = RS2::PreviewUpdate;
                        creation.createInsert(data);
@@ -135,13 +135,13 @@ void ActionBlocksInsert::coordinateEvent(Vector * e)
        trigger();
 }
 
-void ActionBlocksInsert::commandEvent(RS_CommandEvent * e)
+void ActionBlocksInsert::commandEvent(CommandEvent * e)
 {
        QString c = e->getCommand().toLower();
 
        if (checkCommand("help", c))
        {
-               RS_DIALOGFACTORY->commandMessage(msgAvailableCommands()
+               DIALOGFACTORY->commandMessage(msgAvailableCommands()
                        + getAvailableCommands().join(", "));
                return;
        }
@@ -203,14 +203,14 @@ void ActionBlocksInsert::commandEvent(RS_CommandEvent * e)
        case SetAngle:
        {
                bool ok;
-               double a = RS_Math::eval(c, &ok);
+               double a = Math::eval(c, &ok);
 
                if (ok)
-                       data.angle = RS_Math::deg2rad(a);
+                       data.angle = Math::deg2rad(a);
                else
-                       RS_DIALOGFACTORY->commandMessage(tr("Not a valid expression"));
+                       DIALOGFACTORY->commandMessage(tr("Not a valid expression"));
 
-               RS_DIALOGFACTORY->requestOptions(this, true, true);
+               DIALOGFACTORY->requestOptions(this, true, true);
                setStatus(lastStatus);
        }
        break;
@@ -218,14 +218,14 @@ void ActionBlocksInsert::commandEvent(RS_CommandEvent * e)
        case SetFactor:
        {
                bool ok;
-               double f = RS_Math::eval(c, &ok);
+               double f = Math::eval(c, &ok);
 
                if (ok)
                        setFactor(f);
                else
-                       RS_DIALOGFACTORY->commandMessage(tr("Not a valid expression"));
+                       DIALOGFACTORY->commandMessage(tr("Not a valid expression"));
 
-               RS_DIALOGFACTORY->requestOptions(this, true, true);
+               DIALOGFACTORY->requestOptions(this, true, true);
                setStatus(lastStatus);
        }
        break;
@@ -233,14 +233,14 @@ void ActionBlocksInsert::commandEvent(RS_CommandEvent * e)
        case SetColumns:
        {
                bool ok;
-               int cols = (int)RS_Math::eval(c, &ok);
+               int cols = (int)Math::eval(c, &ok);
 
                if (ok)
                        data.cols = cols;
                else
-                       RS_DIALOGFACTORY->commandMessage(tr("Not a valid expression"));
+                       DIALOGFACTORY->commandMessage(tr("Not a valid expression"));
 
-               RS_DIALOGFACTORY->requestOptions(this, true, true);
+               DIALOGFACTORY->requestOptions(this, true, true);
                setStatus(lastStatus);
        }
        break;
@@ -248,14 +248,14 @@ void ActionBlocksInsert::commandEvent(RS_CommandEvent * e)
        case SetRows:
        {
                bool ok;
-               int rows = (int)RS_Math::eval(c, &ok);
+               int rows = (int)Math::eval(c, &ok);
 
                if (ok)
                        data.rows = rows;
                else
-                       RS_DIALOGFACTORY->commandMessage(tr("Not a valid expression"));
+                       DIALOGFACTORY->commandMessage(tr("Not a valid expression"));
 
-               RS_DIALOGFACTORY->requestOptions(this, true, true);
+               DIALOGFACTORY->requestOptions(this, true, true);
                setStatus(lastStatus);
        }
        break;
@@ -263,14 +263,14 @@ void ActionBlocksInsert::commandEvent(RS_CommandEvent * e)
        case SetColumnSpacing:
        {
                bool ok;
-               double cs = (int)RS_Math::eval(c, &ok);
+               double cs = (int)Math::eval(c, &ok);
 
                if (ok)
                        data.spacing.x = cs;
                else
-                       RS_DIALOGFACTORY->commandMessage(tr("Not a valid expression"));
+                       DIALOGFACTORY->commandMessage(tr("Not a valid expression"));
 
-               RS_DIALOGFACTORY->requestOptions(this, true, true);
+               DIALOGFACTORY->requestOptions(this, true, true);
                setStatus(lastStatus);
        }
        break;
@@ -278,14 +278,14 @@ void ActionBlocksInsert::commandEvent(RS_CommandEvent * e)
        case SetRowSpacing:
        {
                bool ok;
-               int rs = (int)RS_Math::eval(c, &ok);
+               int rs = (int)Math::eval(c, &ok);
 
                if (ok)
                        data.spacing.y = rs;
                else
-                       RS_DIALOGFACTORY->commandMessage(tr("Not a valid expression"));
+                       DIALOGFACTORY->commandMessage(tr("Not a valid expression"));
 
-               RS_DIALOGFACTORY->requestOptions(this, true, true);
+               DIALOGFACTORY->requestOptions(this, true, true);
                setStatus(lastStatus);
        }
        break;
@@ -320,13 +320,13 @@ QStringList ActionBlocksInsert::getAvailableCommands()
 void ActionBlocksInsert::showOptions()
 {
        ActionInterface::showOptions();
-       RS_DIALOGFACTORY->requestOptions(this, true);
+       DIALOGFACTORY->requestOptions(this, true);
 }
 
 void ActionBlocksInsert::hideOptions()
 {
        ActionInterface::hideOptions();
-       RS_DIALOGFACTORY->requestOptions(this, false);
+       DIALOGFACTORY->requestOptions(this, false);
 }
 
 void ActionBlocksInsert::updateMouseButtonHints()
@@ -334,35 +334,35 @@ void ActionBlocksInsert::updateMouseButtonHints()
        switch (getStatus())
        {
        case SetTargetPoint:
-               RS_DIALOGFACTORY->updateMouseWidget(tr("Specify reference point"), tr("Cancel"));
+               DIALOGFACTORY->updateMouseWidget(tr("Specify reference point"), tr("Cancel"));
                break;
 
        case SetAngle:
-               RS_DIALOGFACTORY->updateMouseWidget(tr("Enter angle:"), "");
+               DIALOGFACTORY->updateMouseWidget(tr("Enter angle:"), "");
                break;
 
        case SetFactor:
-               RS_DIALOGFACTORY->updateMouseWidget(tr("Enter factor:"), "");
+               DIALOGFACTORY->updateMouseWidget(tr("Enter factor:"), "");
                break;
 
        case SetColumns:
-               RS_DIALOGFACTORY->updateMouseWidget(tr("Enter columns:"), "");
+               DIALOGFACTORY->updateMouseWidget(tr("Enter columns:"), "");
                break;
 
        case SetRows:
-               RS_DIALOGFACTORY->updateMouseWidget(tr("Enter rows:"), "");
+               DIALOGFACTORY->updateMouseWidget(tr("Enter rows:"), "");
                break;
 
        case SetColumnSpacing:
-               RS_DIALOGFACTORY->updateMouseWidget(tr("Enter column spacing:"), "");
+               DIALOGFACTORY->updateMouseWidget(tr("Enter column spacing:"), "");
                break;
 
        case SetRowSpacing:
-               RS_DIALOGFACTORY->updateMouseWidget(tr("Enter row spacing:"), "");
+               DIALOGFACTORY->updateMouseWidget(tr("Enter row spacing:"), "");
                break;
 
        default:
-               RS_DIALOGFACTORY->updateMouseWidget("", "");
+               DIALOGFACTORY->updateMouseWidget("", "");
                break;
        }
 }
@@ -375,9 +375,9 @@ void ActionBlocksInsert::updateMouseCursor()
 void ActionBlocksInsert::updateToolBar()
 {
        if (!isFinished())
-               RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
+               DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
        else
-               RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarMain);
+               DIALOGFACTORY->requestToolBar(RS2::ToolBarMain);
 }
 
 double ActionBlocksInsert::getAngle()
index 70303027d93d345f11f86f647ec518cd6f7f8d07..2685a4da329f831199a9cef6fd685ca749fe5d17 100644 (file)
@@ -28,7 +28,7 @@ class ActionBlocksInsert: public ActionInterface
                };
 
        public:
-               ActionBlocksInsert(RS_EntityContainer & container, GraphicView & graphicView);
+               ActionBlocksInsert(EntityContainer & container, GraphicView & graphicView);
                ~ActionBlocksInsert();
 
                virtual RS2::ActionType rtti();
@@ -38,7 +38,7 @@ class ActionBlocksInsert: public ActionInterface
                virtual void mouseMoveEvent(QMouseEvent * e);
                virtual void mouseReleaseEvent(QMouseEvent * e);
                virtual void coordinateEvent(Vector * e);
-               virtual void commandEvent(RS_CommandEvent * e);
+               virtual void commandEvent(CommandEvent * e);
                virtual QStringList getAvailableCommands();
                virtual void showOptions();
                virtual void hideOptions();
@@ -60,8 +60,8 @@ class ActionBlocksInsert: public ActionInterface
                void setRowSpacing(double rs);
 
        protected:
-               RS_Block * block;
-               RS_InsertData data;
+               Block * block;
+               InsertData data;
 
                /** Last status before entering option. */
                Status lastStatus;
index 1eaf12bfec6e3c00da8eb366ca07d3742777e4ff..180b8ef96442ac98d50d207b9f3c1fbe0dfbaa7f 100644 (file)
@@ -22,7 +22,7 @@
 #include "graphicview.h"
 #include "insert.h"
 
-ActionBlocksRemove::ActionBlocksRemove(RS_EntityContainer & container, GraphicView & graphicView):
+ActionBlocksRemove::ActionBlocksRemove(EntityContainer & container, GraphicView & graphicView):
        ActionInterface("Remove Block", container, graphicView)
 {
 }
@@ -33,16 +33,16 @@ ActionBlocksRemove::~ActionBlocksRemove()
 
 void ActionBlocksRemove::trigger()
 {
-       RS_DEBUG->print("ActionBlocksRemove::trigger");
+       DEBUG->print("ActionBlocksRemove::trigger");
 
        if (graphic)
        {
-               RS_Block * block = RS_DIALOGFACTORY->requestBlockRemovalDialog(graphic->getBlockList());
+               Block * block = DIALOGFACTORY->requestBlockRemovalDialog(graphic->getBlockList());
 
                // list of containers that might refer to the block via inserts:
-               QList<RS_EntityContainer *> containerList;
+               QList<EntityContainer *> containerList;
                containerList.append(graphic);
-               RS_BlockList * blkLst = graphic->getBlockList();
+               BlockList * blkLst = graphic->getBlockList();
 
                for(uint bi=0; bi<blkLst->count(); bi++)
                        containerList.append(blkLst->at(bi));
@@ -51,7 +51,7 @@ void ActionBlocksRemove::trigger()
                {
                        for(int i=0; i<containerList.size(); i++)
                        {
-                               RS_EntityContainer * cont = containerList[i];
+                               EntityContainer * cont = containerList[i];
                                // remove all inserts from the graphic:
                                bool done;
 
@@ -59,12 +59,12 @@ void ActionBlocksRemove::trigger()
                                {
                                        done = true;
 
-                                       for(RS_Entity * e=cont->firstEntity(RS2::ResolveNone); e!=NULL;
+                                       for(Entity * e=cont->firstEntity(RS2::ResolveNone); e!=NULL;
                                             e=cont->nextEntity(RS2::ResolveNone))
                                        {
                                                if (e->rtti() == RS2::EntityInsert)
                                                {
-                                                       RS_Insert * ins = (RS_Insert *)e;
+                                                       Insert * ins = (Insert *)e;
 
                                                        if (ins->getName() == block->getName())
                                                        {
@@ -79,8 +79,8 @@ void ActionBlocksRemove::trigger()
                        }
 
                        // close all windows that are editing this block:
-                       if (RS_DIALOGFACTORY)
-                               RS_DIALOGFACTORY->closeEditBlockWindow(block);
+                       if (DIALOGFACTORY)
+                               DIALOGFACTORY->closeEditBlockWindow(block);
 
                        // Now remove the block from the block list:
                        graphic->removeBlock(block);
@@ -90,7 +90,7 @@ void ActionBlocksRemove::trigger()
        }
 
        finish();
-       RS_DIALOGFACTORY->updateSelectionWidget(container->countSelected());
+       DIALOGFACTORY->updateSelectionWidget(container->countSelected());
 }
 
 void ActionBlocksRemove::init(int status)
index 85c92678e9a190a78a5b3bd7840e5ca26e4d291d..1d323a11974a501cab924b94a6590b1c1c959903 100644 (file)
@@ -12,7 +12,7 @@
 class ActionBlocksRemove: public ActionInterface
 {
        public:
-               ActionBlocksRemove(RS_EntityContainer & container, GraphicView & graphicView);
+               ActionBlocksRemove(EntityContainer & container, GraphicView & graphicView);
                ~ActionBlocksRemove();
 
                virtual void init(int status = 0);
index 176f363af70df4c37272125cebb61b47dd1ea0ce..89bbcd8f12fb0fd8ff7d8339348a1aaf6c895ca5 100644 (file)
@@ -19,7 +19,7 @@
 #include "drawing.h"
 #include "graphicview.h"
 
-ActionBlocksToggleView::ActionBlocksToggleView(RS_EntityContainer & container,
+ActionBlocksToggleView::ActionBlocksToggleView(EntityContainer & container,
        GraphicView & graphicView): ActionInterface("Toggle Block Visibility",
        container, graphicView)
 {
@@ -31,11 +31,11 @@ ActionBlocksToggleView::~ActionBlocksToggleView()
 
 void ActionBlocksToggleView::trigger()
 {
-       RS_DEBUG->print("toggle block");
+       DEBUG->print("toggle block");
 
        if (graphic)
        {
-               RS_Block * block = graphic->getActiveBlock();
+               Block * block = graphic->getActiveBlock();
                graphic->toggleBlock(block);
        }
 
index b8903421d8c2596185c56f0f3f613e5c5f6efa58..0bafb484c8efea0168b3cd6b1a909c17fdae6110 100644 (file)
@@ -12,7 +12,7 @@
 class ActionBlocksToggleView: public ActionInterface
 {
        public:
-               ActionBlocksToggleView(RS_EntityContainer & container, GraphicView & graphicView);
+               ActionBlocksToggleView(EntityContainer & container, GraphicView & graphicView);
                ~ActionBlocksToggleView();
 
                virtual void init(int status = 0);
index bfbd45fa467f23038f31b9280fa19e297de96852..801a0512774e77d12c673ee47d742ebf79672bfe 100644 (file)
@@ -16,7 +16,7 @@
 
 #include "actiondefault.h"
 
-#include "rs.h"
+#include "enums.h"
 #include "commandevent.h"
 #include "debug.h"
 #include "dialogfactory.h"
 /**
  * Constructor.
  */
-ActionDefault::ActionDefault(RS_EntityContainer & container,
+ActionDefault::ActionDefault(EntityContainer & container,
        GraphicView & graphicView):
        ActionInterface("Default", container, graphicView)
 {
-       RS_DEBUG->print("ActionDefault::ActionDefault");
+       DEBUG->print("ActionDefault::ActionDefault");
        //hm.
 //     graphicView.snapper.SetVisible();
 //     graphicView.preview.SetVisible();
-       RS_DEBUG->print("ActionDefault::ActionDefault: OK");
+       DEBUG->print("ActionDefault::ActionDefault: OK");
 }
 
 ActionDefault::~ActionDefault()
@@ -51,16 +51,16 @@ ActionDefault::~ActionDefault()
 
 void ActionDefault::init(int status /*= 0*/)
 {
-       RS_DEBUG->print("ActionDefault::init");
+       DEBUG->print("ActionDefault::init");
 
        ActionInterface::init(status);
        v1 = v2 = Vector(false);
        graphicView->snapper.setSnapMode(RS2::SnapFree);
        graphicView->snapper.setSnapRestriction(RS2::RestrictNothing);
        restrBak = RS2::RestrictNothing;
-       RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarMain);
+       DIALOGFACTORY->requestToolBar(RS2::ToolBarMain);
 
-       RS_DEBUG->print("ActionDefault::init: OK");
+       DEBUG->print("ActionDefault::init: OK");
 }
 
 void ActionDefault::trigger()
@@ -88,7 +88,7 @@ void ActionDefault::mouseMoveEvent(QMouseEvent * e)
        Vector mouse = graphicView->toGraph(Vector(e->x(), e->y()));
        Vector relMouse = mouse - graphicView->getRelativeZero();
 
-       RS_DIALOGFACTORY->updateCoordinateWidget(mouse, relMouse);
+       DIALOGFACTORY->updateCoordinateWidget(mouse, relMouse);
 
        switch (getStatus())
        {
@@ -103,7 +103,7 @@ void ActionDefault::mouseMoveEvent(QMouseEvent * e)
 
                        if (ref.valid && graphicView->toGuiDX(dist) < 8)
                        {
-                               RS_DEBUG->print("ActionDefault::mouseMoveEvent: moving reference point");
+                               DEBUG->print("ActionDefault::mouseMoveEvent: moving reference point");
                                setStatus(MovingRef);
                                v1 = ref;
                                graphicView->moveRelativeZero(v1);
@@ -111,11 +111,11 @@ void ActionDefault::mouseMoveEvent(QMouseEvent * e)
                        else
                        {
                                // test for an entity to drag:
-                               RS_Entity * en = graphicView->snapper.catchEntity(v1);
+                               Entity * en = graphicView->snapper.catchEntity(v1);
 
                                if (en && en->isSelected())
                                {
-                                       RS_DEBUG->print("ActionDefault::mouseMoveEvent: moving entity");
+                                       DEBUG->print("ActionDefault::mouseMoveEvent: moving entity");
                                        setStatus(Moving);
                                        v1 = en->getNearestRef(v1);
                                        graphicView->moveRelativeZero(v1);
@@ -165,14 +165,14 @@ void ActionDefault::mouseMoveEvent(QMouseEvent * e)
 
                        graphicView->preview.clear();
 
-                       graphicView->preview.addEntity(new RS_Line(&(graphicView->preview),
-                               RS_LineData(Vector(v1.x, v1.y), Vector(v2.x, v1.y))));
-                       graphicView->preview.addEntity(new RS_Line(&(graphicView->preview),
-                               RS_LineData(Vector(v2.x, v1.y), Vector(v2.x, v2.y))));
-                       graphicView->preview.addEntity(new RS_Line(&(graphicView->preview),
-                               RS_LineData(Vector(v2.x, v2.y), Vector(v1.x, v2.y))));
-                       graphicView->preview.addEntity(new RS_Line(&(graphicView->preview),
-                               RS_LineData(Vector(v1.x, v2.y), Vector(v1.x, v1.y))));
+                       graphicView->preview.addEntity(new Line(&(graphicView->preview),
+                               LineData(Vector(v1.x, v1.y), Vector(v2.x, v1.y))));
+                       graphicView->preview.addEntity(new Line(&(graphicView->preview),
+                               LineData(Vector(v2.x, v1.y), Vector(v2.x, v2.y))));
+                       graphicView->preview.addEntity(new Line(&(graphicView->preview),
+                               LineData(Vector(v2.x, v2.y), Vector(v1.x, v2.y))));
+                       graphicView->preview.addEntity(new Line(&(graphicView->preview),
+                               LineData(Vector(v1.x, v2.y), Vector(v1.x, v1.y))));
 
                        graphicView->preview.SetVisible();
                        graphicView->redraw();
@@ -200,16 +200,16 @@ void ActionDefault::mousePressEvent(QMouseEvent * e)
 //                     deleteSnapper();
 //                     deletePreview();
 //                     clearPreview();
-                       RS_Modification m(*container, graphicView);
-                       RS_MoveData data;
+                       Modification m(*container, graphicView);
+                       MoveData data;
                        data.number = 0;
                        data.useCurrentLayer = false;
                        data.useCurrentAttributes = false;
                        data.offset = v2 - v1;
                        m.move(data);
                        setStatus(Neutral);
-                       RS_DIALOGFACTORY->updateSelectionWidget(container->countSelected());
-                       RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarMain);
+                       DIALOGFACTORY->updateSelectionWidget(container->countSelected());
+                       DIALOGFACTORY->requestToolBar(RS2::ToolBarMain);
                }
                break;
 
@@ -219,14 +219,14 @@ void ActionDefault::mousePressEvent(QMouseEvent * e)
 //                     deleteSnapper();
 //                     deletePreview();
 //                     clearPreview();
-                       RS_Modification m(*container, graphicView);
-                       RS_MoveRefData data;
+                       Modification m(*container, graphicView);
+                       MoveRefData data;
                        data.ref = v1;
                        data.offset = v2 - v1;
                        m.moveRef(data);
                        setStatus(Neutral);
-                       RS_DIALOGFACTORY->updateSelectionWidget(container->countSelected());
-                       RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarMain);
+                       DIALOGFACTORY->updateSelectionWidget(container->countSelected());
+                       DIALOGFACTORY->requestToolBar(RS2::ToolBarMain);
                }
                break;
 
@@ -238,7 +238,7 @@ void ActionDefault::mousePressEvent(QMouseEvent * e)
 
 void ActionDefault::mouseReleaseEvent(QMouseEvent * e)
 {
-       RS_DEBUG->print("ActionDefault::mouseReleaseEvent()");
+       DEBUG->print("ActionDefault::mouseReleaseEvent()");
 
        if (e->button() == Qt::LeftButton)
        {
@@ -249,7 +249,7 @@ void ActionDefault::mouseReleaseEvent(QMouseEvent * e)
                case Dragging:
                {
                        // select single entity:
-                       RS_Entity * en = graphicView->snapper.catchEntity(e);
+                       Entity * en = graphicView->snapper.catchEntity(e);
 
                        if (en)
                        {
@@ -257,10 +257,10 @@ void ActionDefault::mouseReleaseEvent(QMouseEvent * e)
 //                             deletePreview();
 //                             clearPreview();
 
-                               RS_Selection s(*container, graphicView);
+                               Selection s(*container, graphicView);
                                s.selectSingle(en);
 
-                               RS_DIALOGFACTORY->updateSelectionWidget(container->countSelected());
+                               DIALOGFACTORY->updateSelectionWidget(container->countSelected());
 
                                e->accept();
                                setStatus(Neutral);
@@ -281,10 +281,10 @@ void ActionDefault::mouseReleaseEvent(QMouseEvent * e)
                        graphicView->preview.SetVisible(false);
 
                        bool cross = (v2.y > v1.y);
-                       RS_Selection s(*container, graphicView);
+                       Selection s(*container, graphicView);
                        s.selectWindow(v1, v2, true, cross);
 
-                       RS_DIALOGFACTORY->updateSelectionWidget(container->countSelected());
+                       DIALOGFACTORY->updateSelectionWidget(container->countSelected());
 
                        setStatus(Neutral);
                        e->accept();
@@ -310,21 +310,21 @@ void ActionDefault::mouseReleaseEvent(QMouseEvent * e)
 //                     clearPreview();
 //                     deleteSnapper();
                        setStatus(Neutral);
-                       RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarMain);
+                       DIALOGFACTORY->requestToolBar(RS2::ToolBarMain);
                        e->accept();
                        break;
 
                default:
                        graphicView->snapper.SetVisible(false);
                        graphicView->preview.SetVisible(false);
-                       RS_DIALOGFACTORY->requestPreviousMenu();
+                       DIALOGFACTORY->requestPreviousMenu();
                        e->accept();
                        break;
                }
        }
 }
 
-void ActionDefault::commandEvent(RS_CommandEvent * e)
+void ActionDefault::commandEvent(CommandEvent * e)
 {
        QString c = e->getCommand().toLower();
 }
@@ -341,15 +341,15 @@ void ActionDefault::updateMouseButtonHints()
        switch (getStatus())
        {
        case Neutral:
-               RS_DIALOGFACTORY->updateMouseWidget("", "");
+               DIALOGFACTORY->updateMouseWidget("", "");
                break;
 
        case SetCorner2:
-               RS_DIALOGFACTORY->updateMouseWidget(tr("Drag to second point"), tr("Back"));
+               DIALOGFACTORY->updateMouseWidget(tr("Drag to second point"), tr("Back"));
                break;
 
        default:
-               RS_DIALOGFACTORY->updateMouseWidget("", "");
+               DIALOGFACTORY->updateMouseWidget("", "");
                break;
        }
 }
@@ -381,7 +381,7 @@ void ActionDefault::updateToolBar()
 
        case Moving:
        case MovingRef:
-               RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
+               DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
                break;
 
        default:
index 354e1725c3c188bd46146f6dcbfdd1cc08726996..6d126ca89b12f2df36c202101cd50d4c24df4312 100644 (file)
@@ -27,7 +27,7 @@ class ActionDefault: public ActionInterface
                };
 
        public:
-               ActionDefault(RS_EntityContainer & container, GraphicView & graphicView);
+               ActionDefault(EntityContainer & container, GraphicView & graphicView);
                virtual ~ActionDefault();
 
                virtual RS2::ActionType rtti();
@@ -38,7 +38,7 @@ class ActionDefault: public ActionInterface
                virtual void mouseMoveEvent(QMouseEvent * e);
                virtual void mousePressEvent(QMouseEvent * e);
                virtual void mouseReleaseEvent(QMouseEvent * e);
-               virtual void commandEvent(RS_CommandEvent * e);
+               virtual void commandEvent(CommandEvent * e);
                virtual QStringList getAvailableCommands();
                virtual void updateMouseButtonHints();
                virtual void updateMouseCursor();
index 537067093130cd1a349549308863a7b4baf8ba66..cd3007639dc1ab645712b3593ae53a6b3a130bd5 100644 (file)
@@ -24,7 +24,7 @@
 #include "preview.h"
 #include "snapper.h"
 
-ActionDimAligned::ActionDimAligned(RS_EntityContainer & container, GraphicView & graphicView): ActionDimension("Draw aligned dimensions",
+ActionDimAligned::ActionDimAligned(EntityContainer & container, GraphicView & graphicView): ActionDimension("Draw aligned dimensions",
                container, graphicView)
 {
        reset();
@@ -42,11 +42,11 @@ ActionDimAligned::~ActionDimAligned()
 void ActionDimAligned::reset()
 {
        ActionDimension::reset();
-       edata = RS_DimAlignedData(Vector(false), Vector(false));
+       edata = DimAlignedData(Vector(false), Vector(false));
        lastStatus = SetExtPoint1;
 
-       if (RS_DIALOGFACTORY != NULL)
-               RS_DIALOGFACTORY->requestOptions(this, true, true);
+       if (DIALOGFACTORY != NULL)
+               DIALOGFACTORY->requestOptions(this, true, true);
 }
 
 void ActionDimAligned::trigger()
@@ -56,7 +56,7 @@ void ActionDimAligned::trigger()
        graphicView->moveRelativeZero(data.definitionPoint);
 
        //data.text = getText();
-       RS_DimAligned * dim = new RS_DimAligned(container, data, edata);
+       DimAligned * dim = new DimAligned(container, data, edata);
        dim->setLayerToActive();
        dim->setPenToActive();
        dim->update();
@@ -77,21 +77,21 @@ void ActionDimAligned::trigger()
        graphicView->moveRelativeZero(rz);
        drawSnapper();
 
-       RS_DEBUG->print("ActionDimAligned::trigger(): dim added: %d", dim->getId());
+       DEBUG->print("ActionDimAligned::trigger(): dim added: %d", dim->getId());
 }
 
 void ActionDimAligned::preparePreview()
 {
        Vector dirV;
        dirV.setPolar(100.0, edata.extensionPoint1.angleTo(edata.extensionPoint2) + M_PI / 2.0);
-       RS_ConstructionLine cl(NULL, RS_ConstructionLineData(edata.extensionPoint2,
+       ConstructionLine cl(NULL, ConstructionLineData(edata.extensionPoint2,
                edata.extensionPoint2 + dirV));
        data.definitionPoint = cl.getNearestPointOnEntity(data.definitionPoint);
 }
 
 void ActionDimAligned::mouseMoveEvent(QMouseEvent * e)
 {
-       RS_DEBUG->print("ActionDimAligned::mouseMoveEvent begin");
+       DEBUG->print("ActionDimAligned::mouseMoveEvent begin");
        Vector mouse = snapPoint(e);
 
        switch (getStatus())
@@ -105,7 +105,7 @@ void ActionDimAligned::mouseMoveEvent(QMouseEvent * e)
                {
                        deletePreview();
                        clearPreview();
-//                     preview->addEntity(new RS_Line(preview, RS_LineData(edata.extensionPoint1, mouse)));
+//                     preview->addEntity(new Line(preview, LineData(edata.extensionPoint1, mouse)));
                        drawPreview();
                }
                break;
@@ -121,7 +121,7 @@ void ActionDimAligned::mouseMoveEvent(QMouseEvent * e)
                        preparePreview();
 
                        //data.text = getText();
-//                     RS_DimAligned * dim = new RS_DimAligned(preview, data, edata);
+//                     DimAligned * dim = new DimAligned(preview, data, edata);
 //                     dim->update();
 //                     preview->addEntity(dim);
                        drawPreview();
@@ -132,7 +132,7 @@ void ActionDimAligned::mouseMoveEvent(QMouseEvent * e)
                break;
        }
 
-       RS_DEBUG->print("ActionDimAligned::mouseMoveEvent end");
+       DEBUG->print("ActionDimAligned::mouseMoveEvent end");
 }
 
 void ActionDimAligned::mouseReleaseEvent(QMouseEvent * e)
@@ -185,14 +185,14 @@ void ActionDimAligned::coordinateEvent(Vector * e)
        }
 }
 
-void ActionDimAligned::commandEvent(RS_CommandEvent * e)
+void ActionDimAligned::commandEvent(CommandEvent * e)
 {
        QString c = e->getCommand().toLower();
 
        if (checkCommand("help", c))
        {
-               if (RS_DIALOGFACTORY != NULL)
-                       RS_DIALOGFACTORY->commandMessage(msgAvailableCommands()
+               if (DIALOGFACTORY != NULL)
+                       DIALOGFACTORY->commandMessage(msgAvailableCommands()
                                + getAvailableCommands().join(", "));
 
                return;
@@ -203,8 +203,8 @@ void ActionDimAligned::commandEvent(RS_CommandEvent * e)
        case SetText:
                setText(c);
 
-               if (RS_DIALOGFACTORY != NULL)
-                       RS_DIALOGFACTORY->requestOptions(this, true, true);
+               if (DIALOGFACTORY != NULL)
+                       DIALOGFACTORY->requestOptions(this, true, true);
 
                setStatus(lastStatus);
                graphicView->enableCoordinateInput();
@@ -243,28 +243,28 @@ QStringList ActionDimAligned::getAvailableCommands()
 
 void ActionDimAligned::updateMouseButtonHints()
 {
-       if (RS_DIALOGFACTORY != NULL)
+       if (DIALOGFACTORY != NULL)
        {
                switch (getStatus())
                {
                case SetExtPoint1:
-                       RS_DIALOGFACTORY->updateMouseWidget(tr("Specify first extension line origin"), tr("Cancel"));
+                       DIALOGFACTORY->updateMouseWidget(tr("Specify first extension line origin"), tr("Cancel"));
                        break;
 
                case SetExtPoint2:
-                       RS_DIALOGFACTORY->updateMouseWidget(tr("Specify second extension line origin"), tr("Back"));
+                       DIALOGFACTORY->updateMouseWidget(tr("Specify second extension line origin"), tr("Back"));
                        break;
 
                case SetDefPoint:
-                       RS_DIALOGFACTORY->updateMouseWidget(tr("Specify dimension line location"), tr("Back"));
+                       DIALOGFACTORY->updateMouseWidget(tr("Specify dimension line location"), tr("Back"));
                        break;
 
                case SetText:
-                       RS_DIALOGFACTORY->updateMouseWidget(tr("Enter dimension text:"), "");
+                       DIALOGFACTORY->updateMouseWidget(tr("Enter dimension text:"), "");
                        break;
 
                default:
-                       RS_DIALOGFACTORY->updateMouseWidget("", "");
+                       DIALOGFACTORY->updateMouseWidget("", "");
                        break;
                }
        }
@@ -272,8 +272,8 @@ void ActionDimAligned::updateMouseButtonHints()
 
 void ActionDimAligned::hideOptions()
 {
-       if (RS_DIALOGFACTORY != NULL)
-               RS_DIALOGFACTORY->requestOptions(this, false);
+       if (DIALOGFACTORY != NULL)
+               DIALOGFACTORY->requestOptions(this, false);
 
        ActionDimension::hideOptions();
 }
@@ -282,7 +282,7 @@ void ActionDimAligned::showOptions()
 {
        ActionDimension::showOptions();
 
-       if (RS_DIALOGFACTORY != NULL)
-               RS_DIALOGFACTORY->requestOptions(this, true);
+       if (DIALOGFACTORY != NULL)
+               DIALOGFACTORY->requestOptions(this, true);
 }
 
index ba4900f9c0f277e377bc81097b88fd0cf5582661..89044baa65fd0727139a9a643c3bd5bf0b8febaa 100644 (file)
@@ -25,7 +25,7 @@ class ActionDimAligned: public ActionDimension
                };
 
        public:
-               ActionDimAligned(RS_EntityContainer & container, GraphicView & graphicView);
+               ActionDimAligned(EntityContainer & container, GraphicView & graphicView);
                ~ActionDimAligned();
 
                virtual RS2::ActionType rtti();
@@ -35,7 +35,7 @@ class ActionDimAligned: public ActionDimension
                virtual void mouseMoveEvent(QMouseEvent * e);
                virtual void mouseReleaseEvent(QMouseEvent * e);
                virtual void coordinateEvent(Vector * e);
-               virtual void commandEvent(RS_CommandEvent * e);
+               virtual void commandEvent(CommandEvent * e);
                virtual QStringList getAvailableCommands();
                virtual void hideOptions();
                virtual void showOptions();
@@ -45,7 +45,7 @@ class ActionDimAligned: public ActionDimension
                /**
                 * Aligned dimension data.
                 */
-               RS_DimAlignedData edata;
+               DimAlignedData edata;
 
                /** Last status before entering text. */
                Status lastStatus;
index d2da018ab5a6f212a3fba01e3ac361382688b8e3..b672222b32eb83dc68c9bfcde92db8a981bee218 100644 (file)
@@ -23,7 +23,7 @@
 #include "information.h"
 #include "preview.h"
 
-ActionDimAngular::ActionDimAngular(RS_EntityContainer & container, GraphicView & graphicView): ActionDimension("Draw Angular Dimensions",
+ActionDimAngular::ActionDimAngular(EntityContainer & container, GraphicView & graphicView): ActionDimension("Draw Angular Dimensions",
                container, graphicView)
 {
        reset();
@@ -41,11 +41,11 @@ ActionDimAngular::~ActionDimAngular()
 void ActionDimAngular::reset()
 {
        ActionDimension::reset();
-       edata = RS_DimAngularData(Vector(false), Vector(false), Vector(false), Vector(false));
+       edata = DimAngularData(Vector(false), Vector(false), Vector(false), Vector(false));
        line1 = NULL;
        line2 = NULL;
        center = Vector(false);
-       RS_DIALOGFACTORY->requestOptions(this, true, true);
+       DIALOGFACTORY->requestOptions(this, true, true);
 }
 
 void ActionDimAngular::trigger()
@@ -54,9 +54,9 @@ void ActionDimAngular::trigger()
 
        if (line1 != NULL && line2 != NULL)
        {
-               RS_DimAngular * newEntity = NULL;
+               DimAngular * newEntity = NULL;
 
-               newEntity = new RS_DimAngular(container,
+               newEntity = new DimAngular(container,
                                data,
                                edata);
 
@@ -79,13 +79,13 @@ void ActionDimAngular::trigger()
                graphicView->moveRelativeZero(rz);
        }
        else
-               RS_DEBUG->print("ActionDimAngular::trigger:"
+               DEBUG->print("ActionDimAngular::trigger:"
                        " Entity is NULL\n");
 }
 
 void ActionDimAngular::mouseMoveEvent(QMouseEvent * e)
 {
-       RS_DEBUG->print("ActionDimAngular::mouseMoveEvent begin");
+       DEBUG->print("ActionDimAngular::mouseMoveEvent begin");
 
        Vector mouse(graphicView->toGraphX(e->x()), graphicView->toGraphY(e->y()));
 
@@ -104,7 +104,7 @@ void ActionDimAngular::mouseMoveEvent(QMouseEvent * e)
                        Vector mouse = snapPoint(e);
                        edata.definitionPoint4 = mouse;
 
-//                     RS_DimAngular * d = new RS_DimAngular(preview, data, edata);
+//                     DimAngular * d = new DimAngular(preview, data, edata);
 //                     d->update();
 //
 //                     deletePreview();
@@ -118,7 +118,7 @@ void ActionDimAngular::mouseMoveEvent(QMouseEvent * e)
                break;
        }
 
-       RS_DEBUG->print("ActionDimAngular::mouseMoveEvent end");
+       DEBUG->print("ActionDimAngular::mouseMoveEvent end");
 }
 
 void ActionDimAngular::mouseReleaseEvent(QMouseEvent * e)
@@ -129,12 +129,12 @@ void ActionDimAngular::mouseReleaseEvent(QMouseEvent * e)
                {
                case SetLine1:
                {
-                       RS_Entity * en = catchEntity(e, RS2::ResolveAll);
+                       Entity * en = catchEntity(e, RS2::ResolveAll);
 
                        if (en != NULL
                            && en->rtti() == RS2::EntityLine)
                        {
-                               line1 = (RS_Line *)en;
+                               line1 = (Line *)en;
                                setStatus(SetLine2);
                        }
                }
@@ -142,15 +142,15 @@ void ActionDimAngular::mouseReleaseEvent(QMouseEvent * e)
 
                case SetLine2:
                {
-                       RS_Entity * en = catchEntity(e, RS2::ResolveAll);
+                       Entity * en = catchEntity(e, RS2::ResolveAll);
 
                        if (en != NULL
                            && en->rtti() == RS2::EntityLine)
                        {
-                               line2 = (RS_Line *)en;
+                               line2 = (Line *)en;
 
                                VectorSolutions sol =
-                                       RS_Information::getIntersectionLineLine(line1, line2);
+                                       Information::getIntersectionLineLine(line1, line2);
 
                                if (sol.get(0).valid)
                                {
@@ -222,13 +222,13 @@ void ActionDimAngular::coordinateEvent(Vector * e)
        }
 }
 
-void ActionDimAngular::commandEvent(RS_CommandEvent * e)
+void ActionDimAngular::commandEvent(CommandEvent * e)
 {
        QString c = e->getCommand().toLower();
 
        if (checkCommand("help", c))
        {
-               RS_DIALOGFACTORY->commandMessage(msgAvailableCommands()
+               DIALOGFACTORY->commandMessage(msgAvailableCommands()
                        + getAvailableCommands().join(", "));
                return;
        }
@@ -237,7 +237,7 @@ void ActionDimAngular::commandEvent(RS_CommandEvent * e)
        if (getStatus() == SetText)
        {
                setText(c);
-               RS_DIALOGFACTORY->requestOptions(this, true, true);
+               DIALOGFACTORY->requestOptions(this, true, true);
                graphicView->enableCoordinateInput();
                setStatus(lastStatus);
                return;
@@ -275,14 +275,14 @@ void ActionDimAngular::showOptions()
 {
        ActionInterface::showOptions();
 
-       RS_DIALOGFACTORY->requestOptions(this, true);
+       DIALOGFACTORY->requestOptions(this, true);
 }
 
 void ActionDimAngular::hideOptions()
 {
        ActionInterface::hideOptions();
 
-       RS_DIALOGFACTORY->requestOptions(this, false);
+       DIALOGFACTORY->requestOptions(this, false);
 }
 
 void ActionDimAngular::updateMouseButtonHints()
@@ -290,26 +290,26 @@ void ActionDimAngular::updateMouseButtonHints()
        switch (getStatus())
        {
        case SetLine1:
-               RS_DIALOGFACTORY->updateMouseWidget(tr("Select first line"),
+               DIALOGFACTORY->updateMouseWidget(tr("Select first line"),
                        tr("Cancel"));
                break;
 
        case SetLine2:
-               RS_DIALOGFACTORY->updateMouseWidget(tr("Select second line"),
+               DIALOGFACTORY->updateMouseWidget(tr("Select second line"),
                        tr("Cancel"));
                break;
 
        case SetPos:
-               RS_DIALOGFACTORY->updateMouseWidget(
+               DIALOGFACTORY->updateMouseWidget(
                        tr("Specify dimension arc line location"), tr("Cancel"));
                break;
 
        case SetText:
-               RS_DIALOGFACTORY->updateMouseWidget(tr("Enter dimension text:"), "");
+               DIALOGFACTORY->updateMouseWidget(tr("Enter dimension text:"), "");
                break;
 
        default:
-               RS_DIALOGFACTORY->updateMouseWidget("", "");
+               DIALOGFACTORY->updateMouseWidget("", "");
                break;
        }
 }
index 26e6b0edd5d3382d59f6236975aa90240075b9f6..c790bb4962d0e8183d259c39890395a665836160 100644 (file)
@@ -5,7 +5,7 @@
 #include "dimangular.h"
 #include "vector.h"
 
-class RS_Line;
+class Line;
 
 /**
  * This action class can handle user events to draw angular dimensions.
@@ -23,7 +23,7 @@ class ActionDimAngular: public ActionDimension
                };
 
        public:
-               ActionDimAngular(RS_EntityContainer & container, GraphicView & graphicView);
+               ActionDimAngular(EntityContainer & container, GraphicView & graphicView);
                ~ActionDimAngular();
 
                virtual RS2::ActionType rtti();
@@ -32,7 +32,7 @@ class ActionDimAngular: public ActionDimension
                virtual void mouseMoveEvent(QMouseEvent * e);
                virtual void mouseReleaseEvent(QMouseEvent * e);
                virtual void coordinateEvent(Vector * e);
-               virtual void commandEvent(RS_CommandEvent * e);
+               virtual void commandEvent(CommandEvent * e);
                virtual QStringList getAvailableCommands();
                virtual void hideOptions();
                virtual void showOptions();
@@ -40,13 +40,13 @@ class ActionDimAngular: public ActionDimension
 
        private:
                /** 1st chosen line */
-               RS_Line * line1;
+               Line * line1;
                /** 2nd chosen line */
-               RS_Line * line2;
+               Line * line2;
                /** Center of arc */
                Vector center;
                /** Data of new dimension */
-               RS_DimAngularData edata;
+               DimAngularData edata;
                /** Last status before entering text. */
                Status lastStatus;
 };
index fad94bf95207ca9bd72c3637f2347c068538cbd8..8b513501ac1f5e614ad8b222667822354231c75a 100644 (file)
@@ -22,7 +22,7 @@
 #include "graphicview.h"
 #include "preview.h"
 
-ActionDimDiametric::ActionDimDiametric(RS_EntityContainer & container,
+ActionDimDiametric::ActionDimDiametric(EntityContainer & container,
        GraphicView & graphicView): ActionDimension("Draw Diametric Dimensions",
        container, graphicView)
 {
@@ -41,10 +41,10 @@ ActionDimDiametric::~ActionDimDiametric()
 void ActionDimDiametric::reset()
 {
        ActionDimension::reset();
-       edata = RS_DimDiametricData(Vector(false), 0.0);
+       edata = DimDiametricData(Vector(false), 0.0);
        entity = NULL;
        pos = Vector(false);
-       RS_DIALOGFACTORY->requestOptions(this, true, true);
+       DIALOGFACTORY->requestOptions(this, true, true);
 }
 
 void ActionDimDiametric::trigger()
@@ -54,9 +54,9 @@ void ActionDimDiametric::trigger()
 
        if (entity)
        {
-               RS_DimDiametric * newEntity = NULL;
+               DimDiametric * newEntity = NULL;
 
-               newEntity = new RS_DimDiametric(container,
+               newEntity = new DimDiametric(container,
                                data,
                                edata);
 
@@ -80,7 +80,7 @@ void ActionDimDiametric::trigger()
                graphicView->moveRelativeZero(rz);
        }
        else
-               RS_DEBUG->print("ActionDimDiametric::trigger: Entity is NULL\n");
+               DEBUG->print("ActionDimDiametric::trigger: Entity is NULL\n");
 }
 
 void ActionDimDiametric::preparePreview()
@@ -92,13 +92,13 @@ void ActionDimDiametric::preparePreview()
 
                if (entity->rtti() == RS2::EntityArc)
                {
-                       radius = ((RS_Arc *)entity)->getRadius();
-                       center = ((RS_Arc *)entity)->getCenter();
+                       radius = ((Arc *)entity)->getRadius();
+                       center = ((Arc *)entity)->getCenter();
                }
                else if (entity->rtti() == RS2::EntityCircle)
                {
-                       radius = ((RS_Circle *)entity)->getRadius();
-                       center = ((RS_Circle *)entity)->getCenter();
+                       radius = ((Circle *)entity)->getRadius();
+                       center = ((Circle *)entity)->getCenter();
                }
                double angle = center.angleTo(pos);
 
@@ -112,7 +112,7 @@ void ActionDimDiametric::preparePreview()
 
 void ActionDimDiametric::mouseMoveEvent(QMouseEvent * e)
 {
-       RS_DEBUG->print("ActionDimDiametric::mouseMoveEvent begin");
+       DEBUG->print("ActionDimDiametric::mouseMoveEvent begin");
 
        Vector mouse(graphicView->toGraphX(e->x()), graphicView->toGraphY(e->y()));
 
@@ -129,7 +129,7 @@ void ActionDimDiametric::mouseMoveEvent(QMouseEvent * e)
                        pos = snapPoint(e);
 
                        preparePreview();
-//                     RS_DimDiametric * d = new RS_DimDiametric(preview, data, edata);
+//                     DimDiametric * d = new DimDiametric(preview, data, edata);
 //                     d->update();
 //
 //                     deletePreview();
@@ -143,7 +143,7 @@ void ActionDimDiametric::mouseMoveEvent(QMouseEvent * e)
                break;
        }
 
-       RS_DEBUG->print("ActionDimDiametric::mouseMoveEvent end");
+       DEBUG->print("ActionDimDiametric::mouseMoveEvent end");
 }
 
 void ActionDimDiametric::mouseReleaseEvent(QMouseEvent * e)
@@ -153,7 +153,7 @@ void ActionDimDiametric::mouseReleaseEvent(QMouseEvent * e)
                switch (getStatus())
                {
                case SetEntity: {
-                       RS_Entity * en = catchEntity(e, RS2::ResolveAll);
+                       Entity * en = catchEntity(e, RS2::ResolveAll);
 
                        if (en != NULL)
                        {
@@ -165,15 +165,15 @@ void ActionDimDiametric::mouseReleaseEvent(QMouseEvent * e)
 
                                        if (entity->rtti() == RS2::EntityArc)
                                                center =
-                                                       ((RS_Arc *)entity)->getCenter();
+                                                       ((Arc *)entity)->getCenter();
                                        else if (entity->rtti() == RS2::EntityCircle)
                                                center =
-                                                       ((RS_Circle *)entity)->getCenter();
+                                                       ((Circle *)entity)->getCenter();
                                        graphicView->moveRelativeZero(center);
                                        setStatus(SetPos);
                                }
                                else
-                                       RS_DIALOGFACTORY->commandMessage(tr("Not a circle "
+                                       DIALOGFACTORY->commandMessage(tr("Not a circle "
                                                        "or arc entity"));
                        }
                }
@@ -217,13 +217,13 @@ void ActionDimDiametric::coordinateEvent(Vector * e)
        }
 }
 
-void ActionDimDiametric::commandEvent(RS_CommandEvent * e)
+void ActionDimDiametric::commandEvent(CommandEvent * e)
 {
        QString c = e->getCommand().toLower();
 
        if (checkCommand("help", c))
        {
-               RS_DIALOGFACTORY->commandMessage(msgAvailableCommands()
+               DIALOGFACTORY->commandMessage(msgAvailableCommands()
                        + getAvailableCommands().join(", "));
                return;
        }
@@ -232,7 +232,7 @@ void ActionDimDiametric::commandEvent(RS_CommandEvent * e)
        if (getStatus() == SetText)
        {
                setText(c);
-               RS_DIALOGFACTORY->requestOptions(this, true, true);
+               DIALOGFACTORY->requestOptions(this, true, true);
                graphicView->enableCoordinateInput();
                setStatus(lastStatus);
                return;
@@ -250,18 +250,18 @@ void ActionDimDiametric::commandEvent(RS_CommandEvent * e)
        if (getStatus() == SetPos)
        {
                bool ok;
-               double a = RS_Math::eval(c, &ok);
+               double a = Math::eval(c, &ok);
 
                if (ok == true)
                {
-                       pos.setPolar(1.0, RS_Math::deg2rad(a));
+                       pos.setPolar(1.0, Math::deg2rad(a));
                        pos += data.definitionPoint;
                        trigger();
                        reset();
                        setStatus(SetEntity);
                }
                else
-                       RS_DIALOGFACTORY->commandMessage(tr("Not a valid expression"));
+                       DIALOGFACTORY->commandMessage(tr("Not a valid expression"));
                return;
        }
 }
@@ -289,21 +289,21 @@ void ActionDimDiametric::updateMouseButtonHints()
        switch (getStatus())
        {
        case SetEntity:
-               RS_DIALOGFACTORY->updateMouseWidget(tr("Select arc or circle entity"),
+               DIALOGFACTORY->updateMouseWidget(tr("Select arc or circle entity"),
                        tr("Cancel"));
                break;
 
        case SetPos:
-               RS_DIALOGFACTORY->updateMouseWidget(
+               DIALOGFACTORY->updateMouseWidget(
                        tr("Specify dimension line location"), tr("Cancel"));
                break;
 
        case SetText:
-               RS_DIALOGFACTORY->updateMouseWidget(tr("Enter dimension text:"), "");
+               DIALOGFACTORY->updateMouseWidget(tr("Enter dimension text:"), "");
                break;
 
        default:
-               RS_DIALOGFACTORY->updateMouseWidget("", "");
+               DIALOGFACTORY->updateMouseWidget("", "");
                break;
        }
 }
@@ -312,13 +312,13 @@ void ActionDimDiametric::showOptions()
 {
        ActionInterface::showOptions();
 
-       RS_DIALOGFACTORY->requestOptions(this, true);
+       DIALOGFACTORY->requestOptions(this, true);
 }
 
 void ActionDimDiametric::hideOptions()
 {
        ActionInterface::hideOptions();
 
-       //RS_DIALOGFACTORY->requestDimDiametricOptions(edata, false);
-       RS_DIALOGFACTORY->requestOptions(this, false);
+       //DIALOGFACTORY->requestDimDiametricOptions(edata, false);
+       DIALOGFACTORY->requestOptions(this, false);
 }
index 86c11823da463f8d8ae896ee80e526691e386417..676509ff2847a06d1b5ebf6300e8069c9662165b 100644 (file)
@@ -5,7 +5,7 @@
 #include "dimdiametric.h"
 #include "vector.h"
 
-class RS_Entity;
+class Entity;
 
 /**
  * This action class can handle user events to draw diametric dimensions.
@@ -23,7 +23,7 @@ class ActionDimDiametric: public ActionDimension
                };
 
        public:
-               ActionDimDiametric(RS_EntityContainer & container, GraphicView & graphicView);
+               ActionDimDiametric(EntityContainer & container, GraphicView & graphicView);
                ~ActionDimDiametric();
 
                virtual RS2::ActionType rtti();
@@ -33,7 +33,7 @@ class ActionDimDiametric: public ActionDimension
                virtual void mouseMoveEvent(QMouseEvent * e);
                virtual void mouseReleaseEvent(QMouseEvent * e);
                virtual void coordinateEvent(Vector * e);
-               virtual void commandEvent(RS_CommandEvent * e);
+               virtual void commandEvent(CommandEvent * e);
                virtual QStringList getAvailableCommands();
                virtual void hideOptions();
                virtual void showOptions();
@@ -41,11 +41,11 @@ class ActionDimDiametric: public ActionDimension
 
        private:
                /** Chosen entity (arc / circle) */
-               RS_Entity * entity;
+               Entity * entity;
                /** Chosen position */
                Vector pos;
                /** Data of new dimension */
-               RS_DimDiametricData edata;
+               DimDiametricData edata;
                /** Last status before entering text. */
                Status lastStatus;
 };
index 2de208563c6ee42d46eb4c8c99fd41e4bb6c0901..86bae2c2baad9809bbf4edf71eacb666ca909d00 100644 (file)
@@ -19,7 +19,7 @@
 #include "dialogfactory.h"
 #include "graphicview.h"
 
-ActionDimension::ActionDimension(const char * name, RS_EntityContainer & container, GraphicView & graphicView):
+ActionDimension::ActionDimension(const char * name, EntityContainer & container, GraphicView & graphicView):
        ActionInterface(name, container, graphicView)
 {
        reset();
@@ -31,7 +31,7 @@ ActionDimension::~ActionDimension()
 
 void ActionDimension::reset()
 {
-       data = RS_DimensionData(Vector(false), Vector(false), RS2::VAlignMiddle,
+       data = DimensionData(Vector(false), Vector(false), RS2::VAlignMiddle,
                RS2::HAlignCenter, RS2::Exact, 1.0, "", "Standard", 0.0);
        diameter = false;
 }
@@ -45,16 +45,16 @@ void ActionDimension::hideOptions()
 {
        ActionInterface::hideOptions();
 
-       if (RS_DIALOGFACTORY)
-               RS_DIALOGFACTORY->requestOptions(this, false);
+       if (DIALOGFACTORY)
+               DIALOGFACTORY->requestOptions(this, false);
 }
 
 void ActionDimension::showOptions()
 {
        ActionInterface::showOptions();
 
-       if (RS_DIALOGFACTORY)
-               RS_DIALOGFACTORY->requestOptions(this, true, true);
+       if (DIALOGFACTORY)
+               DIALOGFACTORY->requestOptions(this, true, true);
 }
 
 void ActionDimension::updateMouseCursor()
@@ -64,13 +64,13 @@ void ActionDimension::updateMouseCursor()
 
 void ActionDimension::updateToolBar()
 {
-       if (!RS_DIALOGFACTORY)
+       if (!DIALOGFACTORY)
                return;
 
        if (!isFinished())
-               RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
+               DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
        else
-               RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarDim);
+               DIALOGFACTORY->requestToolBar(RS2::ToolBarDim);
 }
 
 QString ActionDimension::getText()
index 23840ab08c625a43570b79b7d7c191e200847f9c..935fe68df6b4b9e491c86aa690cd664e450e8db9 100644 (file)
@@ -14,7 +14,7 @@
 class ActionDimension: public ActionInterface
 {
        public:
-               ActionDimension(const char * name, RS_EntityContainer & container, GraphicView & graphicView);
+               ActionDimension(const char * name, EntityContainer & container, GraphicView & graphicView);
                ~ActionDimension();
 
                virtual void reset();
@@ -39,7 +39,7 @@ class ActionDimension: public ActionInterface
                /**
                 * Generic dimension data.
                 */
-               RS_DimensionData data;
+               DimensionData data;
 
                QString label;
                QString tol1;
index c0ef6f9698e79c5ceb558135e1046cd183c628bd..f65ff3192240e4f884381be10541baa88097b7de 100644 (file)
@@ -22,7 +22,7 @@
 #include "graphicview.h"
 #include "preview.h"
 
-ActionDimLeader::ActionDimLeader(RS_EntityContainer & container, GraphicView & graphicView):
+ActionDimLeader::ActionDimLeader(EntityContainer & container, GraphicView & graphicView):
        ActionInterface("Draw leaders", container, graphicView)
 {
        reset();
@@ -39,7 +39,7 @@ ActionDimLeader::~ActionDimLeader()
 
 void ActionDimLeader::reset()
 {
-       //data = RS_LineData(Vector(false), Vector(false));
+       //data = LineData(Vector(false), Vector(false));
        //start = Vector(false);
        //history.clear();
        points.clear();
@@ -58,7 +58,7 @@ void ActionDimLeader::trigger()
 
        if (points.count() > 0)
        {
-               RS_Leader * leader = new RS_Leader(container, RS_LeaderData(true));
+               Leader * leader = new Leader(container, LeaderData(true));
                leader->setLayerToActive();
                leader->setPenToActive();
 
@@ -86,13 +86,13 @@ void ActionDimLeader::trigger()
                graphicView->moveRelativeZero(rz);
                //drawSnapper();
 
-               RS_DEBUG->print("ActionDimLeader::trigger(): leader added: %d", leader->getId());
+               DEBUG->print("ActionDimLeader::trigger(): leader added: %d", leader->getId());
        }
 }
 
 void ActionDimLeader::mouseMoveEvent(QMouseEvent * e)
 {
-       RS_DEBUG->print("ActionDimLeader::mouseMoveEvent begin");
+       DEBUG->print("ActionDimLeader::mouseMoveEvent begin");
 
        Vector mouse = snapPoint(e);
 
@@ -109,17 +109,17 @@ void ActionDimLeader::mouseMoveEvent(QMouseEvent * e)
                        Vector * v = points[i];
 
 //                     if (last.valid)
-//                             preview->addEntity(new RS_Line(preview, RS_LineData(last, *v)));
+//                             preview->addEntity(new Line(preview, LineData(last, *v)));
 
                        last = *v;
                }
 
                Vector p = *points.last();
-//             preview->addEntity(new RS_Line(preview, RS_LineData(p, mouse)));
+//             preview->addEntity(new Line(preview, LineData(p, mouse)));
                drawPreview();
        }
 
-       RS_DEBUG->print("ActionDimLeader::mouseMoveEvent end");
+       DEBUG->print("ActionDimLeader::mouseMoveEvent end");
 }
 
 void ActionDimLeader::mouseReleaseEvent(QMouseEvent * e)
@@ -187,14 +187,14 @@ void ActionDimLeader::coordinateEvent(Vector * e)
        }
 }
 
-void ActionDimLeader::commandEvent(RS_CommandEvent * e)
+void ActionDimLeader::commandEvent(CommandEvent * e)
 {
        QString c = e->getCommand().toLower();
 
        if (checkCommand("help", c))
        {
-               if (RS_DIALOGFACTORY != NULL)
-                       RS_DIALOGFACTORY->commandMessage(msgAvailableCommands()
+               if (DIALOGFACTORY != NULL)
+                       DIALOGFACTORY->commandMessage(msgAvailableCommands()
                                + getAvailableCommands().join(", "));
 
                return;
@@ -219,20 +219,20 @@ QStringList ActionDimLeader::getAvailableCommands()
 
 void ActionDimLeader::updateMouseButtonHints()
 {
-       if (RS_DIALOGFACTORY != NULL)
+       if (DIALOGFACTORY != NULL)
        {
                switch (getStatus())
                {
                case SetStartpoint:
-                       RS_DIALOGFACTORY->updateMouseWidget(tr("Specify target point"), tr("Cancel"));
+                       DIALOGFACTORY->updateMouseWidget(tr("Specify target point"), tr("Cancel"));
                        break;
 
                case SetEndpoint:
-                       RS_DIALOGFACTORY->updateMouseWidget(tr("Specify next point"), tr("Finish"));
+                       DIALOGFACTORY->updateMouseWidget(tr("Specify next point"), tr("Finish"));
                        break;
 
                default:
-                       RS_DIALOGFACTORY->updateMouseWidget("", "");
+                       DIALOGFACTORY->updateMouseWidget("", "");
                        break;
                }
        }
@@ -255,11 +255,11 @@ void ActionDimLeader::updateMouseCursor()
 
 void ActionDimLeader::updateToolBar()
 {
-       if (RS_DIALOGFACTORY)
+       if (DIALOGFACTORY)
        {
                if (!isFinished())
-                       RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
+                       DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
                else
-                       RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarDim);
+                       DIALOGFACTORY->requestToolBar(RS2::ToolBarDim);
        }
 }
index 3db3b0ac75c555b6548997b748df9206f63536b3..eff25002f5cd6ec160bcee643c56259ab6fb2196 100644 (file)
@@ -25,7 +25,7 @@ class ActionDimLeader: public ActionInterface
                };
 
        public:
-               ActionDimLeader(RS_EntityContainer & container, GraphicView & graphicView);
+               ActionDimLeader(EntityContainer & container, GraphicView & graphicView);
                ~ActionDimLeader();
 
                virtual RS2::ActionType rtti();
@@ -36,7 +36,7 @@ class ActionDimLeader: public ActionInterface
                virtual void mouseReleaseEvent(QMouseEvent * e);
                virtual void keyPressEvent(QKeyEvent *);
                virtual void coordinateEvent(Vector * e);
-               virtual void commandEvent(RS_CommandEvent * e);
+               virtual void commandEvent(CommandEvent * e);
                virtual QStringList getAvailableCommands();
                virtual void showOptions();
                virtual void hideOptions();
@@ -48,7 +48,7 @@ class ActionDimLeader: public ActionInterface
                /**
                 * Leader entity.
                 */
-               RS_Leader * leader;
+               Leader * leader;
                /**
                 * Points set so far.
                 */
index cc22e46c8a6760e34b3f99dd9e97562ee18e6f08..3191f1c1c3768951bb59c0e55ac88c62cf97c977 100644 (file)
@@ -30,7 +30,7 @@
  * @param fixedAngle true: The user can't change the angle.
  *                   false: The user can change the angle in a option widget.
  */
-ActionDimLinear::ActionDimLinear(RS_EntityContainer & container,
+ActionDimLinear::ActionDimLinear(EntityContainer & container,
        GraphicView & graphicView, double angle, bool fixedAngle):
        ActionDimension("Draw linear dimensions", container, graphicView)
 {
@@ -54,17 +54,17 @@ ActionDimLinear::~ActionDimLinear()
 void ActionDimLinear::reset()
 {
        ActionDimension::reset();
-       edata = RS_DimLinearData(Vector(false), Vector(false), (fixedAngle ? edata.angle : 0.0), 0.0);
+       edata = DimLinearData(Vector(false), Vector(false), (fixedAngle ? edata.angle : 0.0), 0.0);
 
-       if (RS_DIALOGFACTORY)
-               RS_DIALOGFACTORY->requestOptions(this, true, true);
+       if (DIALOGFACTORY)
+               DIALOGFACTORY->requestOptions(this, true, true);
 }
 
 void ActionDimLinear::trigger()
 {
        ActionDimension::trigger();
        preparePreview();
-       RS_DimLinear * dim = new RS_DimLinear(container, data, edata);
+       DimLinear * dim = new DimLinear(container, data, edata);
        dim->setLayerToActive();
        dim->setPenToActive();
        dim->update();
@@ -87,7 +87,7 @@ void ActionDimLinear::trigger()
        graphicView->snapper.SetVisible(false);
        graphicView->redraw();
 
-       RS_DEBUG->print("ActionDimLinear::trigger(): dim added: %d", dim->getId());
+       DEBUG->print("ActionDimLinear::trigger(): dim added: %d", dim->getId());
 }
 
 void ActionDimLinear::preparePreview()
@@ -95,7 +95,7 @@ void ActionDimLinear::preparePreview()
        Vector dirV;
        dirV.setPolar(100.0, edata.angle + M_PI / 2.0);
 
-       RS_ConstructionLine cl(NULL, RS_ConstructionLineData(edata.extensionPoint2,
+       ConstructionLine cl(NULL, ConstructionLineData(edata.extensionPoint2,
                edata.extensionPoint2 + dirV));
 
        data.definitionPoint = cl.getNearestPointOnEntity(data.definitionPoint);
@@ -103,7 +103,7 @@ void ActionDimLinear::preparePreview()
 
 void ActionDimLinear::mouseMoveEvent(QMouseEvent * e)
 {
-       RS_DEBUG->print("ActionDimLinear::mouseMoveEvent begin");
+       DEBUG->print("ActionDimLinear::mouseMoveEvent begin");
 
        Vector mouse = snapPoint(e);
 
@@ -120,12 +120,12 @@ void ActionDimLinear::mouseMoveEvent(QMouseEvent * e)
                {
 //                     deletePreview();
 //                     clearPreview();
-//                     preview->addEntity(new RS_Line(preview,
-//                             RS_LineData(edata.extensionPoint1, mouse)));
+//                     preview->addEntity(new Line(preview,
+//                             LineData(edata.extensionPoint1, mouse)));
 //                     drawPreview();
                        graphicView->preview.clear();
-                       graphicView->preview.addEntity(new RS_Line(&(graphicView->preview),
-                               RS_LineData(edata.extensionPoint1, mouse)));
+                       graphicView->preview.addEntity(new Line(&(graphicView->preview),
+                               LineData(edata.extensionPoint1, mouse)));
                        graphicView->preview.SetVisible();
                        graphicView->redraw();
                }
@@ -140,13 +140,13 @@ void ActionDimLinear::mouseMoveEvent(QMouseEvent * e)
 //                     clearPreview();
                        data.definitionPoint = mouse;
 //                     preparePreview();
-//                     RS_DimLinear * dim = new RS_DimLinear(preview, data, edata);
+//                     DimLinear * dim = new DimLinear(preview, data, edata);
 //                     dim->update();
 //                     preview->addEntity(dim);
 //                     drawPreview();
                        graphicView->preview.clear();
                        preparePreview();
-                       RS_DimLinear * dim = new RS_DimLinear(&(graphicView->preview), data, edata);
+                       DimLinear * dim = new DimLinear(&(graphicView->preview), data, edata);
                        dim->update();
                        graphicView->preview.addEntity(dim);
                        graphicView->preview.SetVisible();
@@ -156,7 +156,7 @@ void ActionDimLinear::mouseMoveEvent(QMouseEvent * e)
                break;
        }
 
-       RS_DEBUG->print("ActionDimLinear::mouseMoveEvent end");
+       DEBUG->print("ActionDimLinear::mouseMoveEvent end");
 }
 
 void ActionDimLinear::mouseReleaseEvent(QMouseEvent * e)
@@ -214,14 +214,14 @@ void ActionDimLinear::coordinateEvent(Vector * e)
        }
 }
 
-void ActionDimLinear::commandEvent(RS_CommandEvent * e)
+void ActionDimLinear::commandEvent(CommandEvent * e)
 {
        QString c = e->getCommand().toLower();
 
        if (checkCommand("help", c))
        {
-               if (RS_DIALOGFACTORY)
-                       RS_DIALOGFACTORY->commandMessage(msgAvailableCommands()
+               if (DIALOGFACTORY)
+                       DIALOGFACTORY->commandMessage(msgAvailableCommands()
                                + getAvailableCommands().join(", "));
                return;
        }
@@ -231,8 +231,8 @@ void ActionDimLinear::commandEvent(RS_CommandEvent * e)
        case SetText:
                setText(c);
 
-               if (RS_DIALOGFACTORY)
-                       RS_DIALOGFACTORY->requestOptions(this, true, true);
+               if (DIALOGFACTORY)
+                       DIALOGFACTORY->requestOptions(this, true, true);
 
                graphicView->enableCoordinateInput();
                setStatus(lastStatus);
@@ -241,15 +241,15 @@ void ActionDimLinear::commandEvent(RS_CommandEvent * e)
        case SetAngle:
        {
                bool ok;
-               double a = RS_Math::eval(c, &ok);
+               double a = Math::eval(c, &ok);
 
                if (ok)
-                       setAngle(RS_Math::deg2rad(a));
-               else if (RS_DIALOGFACTORY)
-                       RS_DIALOGFACTORY->commandMessage(tr("Not a valid expression"));
+                       setAngle(Math::deg2rad(a));
+               else if (DIALOGFACTORY)
+                       DIALOGFACTORY->commandMessage(tr("Not a valid expression"));
 
-               if (RS_DIALOGFACTORY)
-                       RS_DIALOGFACTORY->requestOptions(this, true, true);
+               if (DIALOGFACTORY)
+                       DIALOGFACTORY->requestOptions(this, true, true);
 
                setStatus(lastStatus);
        }
@@ -299,35 +299,35 @@ QStringList ActionDimLinear::getAvailableCommands()
 
 void ActionDimLinear::updateMouseButtonHints()
 {
-       if (RS_DIALOGFACTORY)
+       if (DIALOGFACTORY)
        {
                switch (getStatus())
                {
                case SetExtPoint1:
-                       RS_DIALOGFACTORY->updateMouseWidget(
+                       DIALOGFACTORY->updateMouseWidget(
                                tr("Specify first extension line origin"), tr("Cancel"));
                        break;
 
                case SetExtPoint2:
-                       RS_DIALOGFACTORY->updateMouseWidget(
+                       DIALOGFACTORY->updateMouseWidget(
                                tr("Specify second extension line origin"), tr("Back"));
                        break;
 
                case SetDefPoint:
-                       RS_DIALOGFACTORY->updateMouseWidget(
+                       DIALOGFACTORY->updateMouseWidget(
                                tr("Specify dimension line location"), tr("Back"));
                        break;
 
                case SetText:
-                       RS_DIALOGFACTORY->updateMouseWidget(tr("Enter dimension text:"), "");
+                       DIALOGFACTORY->updateMouseWidget(tr("Enter dimension text:"), "");
                        break;
 
                case SetAngle:
-                       RS_DIALOGFACTORY->updateMouseWidget(tr("Enter dimension line angle:"), "");
+                       DIALOGFACTORY->updateMouseWidget(tr("Enter dimension line angle:"), "");
                        break;
 
                default:
-                       RS_DIALOGFACTORY->updateMouseWidget("", "");
+                       DIALOGFACTORY->updateMouseWidget("", "");
                        break;
                }
        }
@@ -337,16 +337,16 @@ void ActionDimLinear::showOptions()
 {
        ActionInterface::showOptions();
 
-       if (RS_DIALOGFACTORY)
-               RS_DIALOGFACTORY->requestOptions(this, true, true);
+       if (DIALOGFACTORY)
+               DIALOGFACTORY->requestOptions(this, true, true);
 }
 
 void ActionDimLinear::hideOptions()
 {
        ActionInterface::hideOptions();
 
-       if (RS_DIALOGFACTORY)
-               RS_DIALOGFACTORY->requestOptions(this, false);
+       if (DIALOGFACTORY)
+               DIALOGFACTORY->requestOptions(this, false);
 }
 
 double ActionDimLinear::getAngle()
index 8b41e94fc80d9a755d97411d3d046e54c40584c9..755b0e6b8f261af6c842a85daac2093652311879 100644 (file)
@@ -34,7 +34,7 @@ class ActionDimLinear: public ActionDimension
                };
 
        public:
-               ActionDimLinear(RS_EntityContainer & container, GraphicView & graphicView,
+               ActionDimLinear(EntityContainer & container, GraphicView & graphicView,
                        double angle = 0.0, bool fixedAngle = false);
                ~ActionDimLinear();
 
@@ -45,7 +45,7 @@ class ActionDimLinear: public ActionDimension
                virtual void mouseMoveEvent(QMouseEvent * e);
                virtual void mouseReleaseEvent(QMouseEvent * e);
                virtual void coordinateEvent(Vector * e);
-               virtual void commandEvent(RS_CommandEvent * e);
+               virtual void commandEvent(CommandEvent * e);
                virtual QStringList getAvailableCommands();
                virtual void hideOptions();
                virtual void showOptions();
@@ -58,7 +58,7 @@ class ActionDimLinear: public ActionDimension
                /**
                 * Aligned dimension data.
                 */
-               RS_DimLinearData edata;
+               DimLinearData edata;
                /**
                 * Is the angle fixed?
                 */
index 4fd12fe295e41efa348c67b0d6cb4231f23b8275..4feb389eb79fb485466c0b647509a7d0c1e9ef8f 100644 (file)
@@ -22,7 +22,7 @@
 #include "graphicview.h"
 #include "preview.h"
 
-ActionDimRadial::ActionDimRadial(RS_EntityContainer & container, GraphicView & graphicView):
+ActionDimRadial::ActionDimRadial(EntityContainer & container, GraphicView & graphicView):
        ActionDimension("Draw Radial Dimensions", container, graphicView)
 {
        reset();
@@ -41,10 +41,10 @@ void ActionDimRadial::reset()
 {
        ActionDimension::reset();
 
-       edata = RS_DimRadialData(Vector(false), 0.0);
+       edata = DimRadialData(Vector(false), 0.0);
        entity = NULL;
        pos = Vector(false);
-       RS_DIALOGFACTORY->requestOptions(this, true, true);
+       DIALOGFACTORY->requestOptions(this, true, true);
 }
 
 void ActionDimRadial::trigger()
@@ -55,7 +55,7 @@ void ActionDimRadial::trigger()
 
        if (entity)
        {
-               RS_DimRadial * newEntity = new RS_DimRadial(container, data, edata);
+               DimRadial * newEntity = new DimRadial(container, data, edata);
                newEntity->setLayerToActive();
                newEntity->setPenToActive();
                newEntity->update();
@@ -77,7 +77,7 @@ void ActionDimRadial::trigger()
                //drawSnapper();
        }
        else
-               RS_DEBUG->print("ActionDimRadial::trigger: Entity is NULL\n");
+               DEBUG->print("ActionDimRadial::trigger: Entity is NULL\n");
 }
 
 void ActionDimRadial::preparePreview()
@@ -88,9 +88,9 @@ void ActionDimRadial::preparePreview()
                double radius = 0.0;
 
                if (entity->rtti() == RS2::EntityArc)
-                       radius = ((RS_Arc *)entity)->getRadius();
+                       radius = ((Arc *)entity)->getRadius();
                else if (entity->rtti() == RS2::EntityCircle)
-                       radius = ((RS_Circle *)entity)->getRadius();
+                       radius = ((Circle *)entity)->getRadius();
 
                edata.definitionPoint.setPolar(radius, angle);
                edata.definitionPoint += data.definitionPoint;
@@ -99,7 +99,7 @@ void ActionDimRadial::preparePreview()
 
 void ActionDimRadial::mouseMoveEvent(QMouseEvent * e)
 {
-       RS_DEBUG->print("ActionDimRadial::mouseMoveEvent begin");
+       DEBUG->print("ActionDimRadial::mouseMoveEvent begin");
 
        switch (getStatus())
        {
@@ -115,7 +115,7 @@ void ActionDimRadial::mouseMoveEvent(QMouseEvent * e)
 
                        preparePreview();
 
-//                     RS_DimRadial * d = new RS_DimRadial(preview, data, edata);
+//                     DimRadial * d = new DimRadial(preview, data, edata);
 //                     d->update();
 //
 //                     deletePreview();
@@ -129,7 +129,7 @@ void ActionDimRadial::mouseMoveEvent(QMouseEvent * e)
                break;
        }
 
-       RS_DEBUG->print("ActionDimRadial::mouseMoveEvent end");
+       DEBUG->print("ActionDimRadial::mouseMoveEvent end");
 }
 
 void ActionDimRadial::mouseReleaseEvent(QMouseEvent * e)
@@ -139,7 +139,7 @@ void ActionDimRadial::mouseReleaseEvent(QMouseEvent * e)
                switch (getStatus())
                {
                case SetEntity: {
-                       RS_Entity * en = catchEntity(e, RS2::ResolveAll);
+                       Entity * en = catchEntity(e, RS2::ResolveAll);
 
                        if (en != NULL)
                        {
@@ -150,15 +150,15 @@ void ActionDimRadial::mouseReleaseEvent(QMouseEvent * e)
 
                                        if (entity->rtti() == RS2::EntityArc)
                                                data.definitionPoint =
-                                                       ((RS_Arc *)entity)->getCenter();
+                                                       ((Arc *)entity)->getCenter();
                                        else if (entity->rtti() == RS2::EntityCircle)
                                                data.definitionPoint =
-                                                       ((RS_Circle *)entity)->getCenter();
+                                                       ((Circle *)entity)->getCenter();
                                        graphicView->moveRelativeZero(data.definitionPoint);
                                        setStatus(SetPos);
                                }
                                else
-                                       RS_DIALOGFACTORY->commandMessage(tr("Not a circle "
+                                       DIALOGFACTORY->commandMessage(tr("Not a circle "
                                                        "or arc entity"));
                        }
                }
@@ -202,13 +202,13 @@ void ActionDimRadial::coordinateEvent(Vector * e)
        }
 }
 
-void ActionDimRadial::commandEvent(RS_CommandEvent * e)
+void ActionDimRadial::commandEvent(CommandEvent * e)
 {
        QString c = e->getCommand().toLower();
 
        if (checkCommand("help", c))
        {
-               RS_DIALOGFACTORY->commandMessage(msgAvailableCommands()
+               DIALOGFACTORY->commandMessage(msgAvailableCommands()
                        + getAvailableCommands().join(", "));
                return;
        }
@@ -217,7 +217,7 @@ void ActionDimRadial::commandEvent(RS_CommandEvent * e)
        if (getStatus() == SetText)
        {
                setText(c);
-               RS_DIALOGFACTORY->requestOptions(this, true, true);
+               DIALOGFACTORY->requestOptions(this, true, true);
                graphicView->enableCoordinateInput();
                setStatus(lastStatus);
                return;
@@ -235,18 +235,18 @@ void ActionDimRadial::commandEvent(RS_CommandEvent * e)
        if (getStatus() == SetPos)
        {
                bool ok;
-               double a = RS_Math::eval(c, &ok);
+               double a = Math::eval(c, &ok);
 
                if (ok == true)
                {
-                       pos.setPolar(1.0, RS_Math::deg2rad(a));
+                       pos.setPolar(1.0, Math::deg2rad(a));
                        pos += data.definitionPoint;
                        trigger();
                        reset();
                        setStatus(SetEntity);
                }
                else
-                       RS_DIALOGFACTORY->commandMessage(tr("Not a valid expression"));
+                       DIALOGFACTORY->commandMessage(tr("Not a valid expression"));
 
                return;
        }
@@ -275,22 +275,22 @@ void ActionDimRadial::updateMouseButtonHints()
        switch (getStatus())
        {
        case SetEntity:
-               RS_DIALOGFACTORY->updateMouseWidget(tr("Select arc or circle entity"),
+               DIALOGFACTORY->updateMouseWidget(tr("Select arc or circle entity"),
                        tr("Cancel"));
                break;
 
        case SetPos:
-               RS_DIALOGFACTORY->updateMouseWidget(
+               DIALOGFACTORY->updateMouseWidget(
                        tr("Specify dimension line position or enter angle:"),
                        tr("Cancel"));
                break;
 
        case SetText:
-               RS_DIALOGFACTORY->updateMouseWidget(tr("Enter dimension text:"), "");
+               DIALOGFACTORY->updateMouseWidget(tr("Enter dimension text:"), "");
                break;
 
        default:
-               RS_DIALOGFACTORY->updateMouseWidget("", "");
+               DIALOGFACTORY->updateMouseWidget("", "");
                break;
        }
 }
@@ -299,16 +299,16 @@ void ActionDimRadial::showOptions()
 {
        ActionInterface::showOptions();
 
-       RS_DIALOGFACTORY->requestOptions(this, true);
-       //RS_DIALOGFACTORY->requestDimRadialOptions(edata, true);
+       DIALOGFACTORY->requestOptions(this, true);
+       //DIALOGFACTORY->requestDimRadialOptions(edata, true);
 }
 
 void ActionDimRadial::hideOptions()
 {
        ActionInterface::hideOptions();
 
-       //RS_DIALOGFACTORY->requestDimRadialOptions(edata, false);
-       RS_DIALOGFACTORY->requestOptions(this, false);
+       //DIALOGFACTORY->requestDimRadialOptions(edata, false);
+       DIALOGFACTORY->requestOptions(this, false);
 }
 
 
index d07772fe196ef9ff53c9ff5dd700ff3b63114723..1399703a475a3f1e4b747dd47436bf5235cbb79e 100644 (file)
@@ -5,7 +5,7 @@
 #include "dimradial.h"
 #include "vector.h"
 
-class RS_Entity;
+class Entity;
 
 /**
  * This action class can handle user events to draw radial dimensions.
@@ -23,7 +23,7 @@ class ActionDimRadial: public ActionDimension
                };
 
        public:
-               ActionDimRadial(RS_EntityContainer & container, GraphicView & graphicView);
+               ActionDimRadial(EntityContainer & container, GraphicView & graphicView);
                ~ActionDimRadial();
 
                virtual RS2::ActionType rtti();
@@ -33,7 +33,7 @@ class ActionDimRadial: public ActionDimension
                virtual void mouseMoveEvent(QMouseEvent * e);
                virtual void mouseReleaseEvent(QMouseEvent * e);
                virtual void coordinateEvent(Vector * e);
-               virtual void commandEvent(RS_CommandEvent * e);
+               virtual void commandEvent(CommandEvent * e);
                virtual QStringList getAvailableCommands();
                virtual void hideOptions();
                virtual void showOptions();
@@ -41,11 +41,11 @@ class ActionDimRadial: public ActionDimension
 
        private:
                /** Chosen entity (arc / circle) */
-               RS_Entity * entity;
+               Entity * entity;
                /** Chosen position */
                Vector pos;
                /** Data of new dimension */
-               RS_DimRadialData edata;
+               DimRadialData edata;
                /** Last status before entering text. */
                Status lastStatus;
 };
index be608fe3f193c29df31a60fe1ab11dadfd343ba0..a833e58caa481b42c94fa5de44c60a253e194b5a 100644 (file)
@@ -23,7 +23,7 @@
 #include "graphicview.h"
 #include "preview.h"
 
-ActionDrawArc::ActionDrawArc(RS_EntityContainer & container, GraphicView & graphicView):
+ActionDrawArc::ActionDrawArc(EntityContainer & container, GraphicView & graphicView):
        ActionInterface("Draw arcs", container, graphicView)
 {
        reset();
@@ -41,9 +41,9 @@ RS2::ActionType ActionDrawArc::rtti()
 void ActionDrawArc::reset()
 {
        if (data.reversed)
-               data = RS_ArcData(Vector(false), 0.0, 2 * M_PI, 0.0, true);
+               data = ArcData(Vector(false), 0.0, 2 * M_PI, 0.0, true);
        else
-               data = RS_ArcData(Vector(false), 0.0, 0.0, 2 * M_PI, false);
+               data = ArcData(Vector(false), 0.0, 0.0, 2 * M_PI, false);
 }
 
 void ActionDrawArc::init(int status)
@@ -56,7 +56,7 @@ void ActionDrawArc::trigger()
 {
        ActionInterface::trigger();
 
-       RS_Arc * arc = new RS_Arc(container, data);
+       Arc * arc = new Arc(container, data);
        arc->setLayerToActive();
        arc->setPenToActive();
        container->addEntity(arc);
@@ -78,12 +78,12 @@ void ActionDrawArc::trigger()
        setStatus(SetCenter);
        reset();
 
-       RS_DEBUG->print("ActionDrawArc::trigger(): arc added: %d", arc->getId());
+       DEBUG->print("ActionDrawArc::trigger(): arc added: %d", arc->getId());
 }
 
 void ActionDrawArc::mouseMoveEvent(QMouseEvent * e)
 {
-       RS_DEBUG->print("ActionDrawArc::mouseMoveEvent begin");
+       DEBUG->print("ActionDrawArc::mouseMoveEvent begin");
        Vector mouse = snapPoint(e);
 
        switch (getStatus())
@@ -99,7 +99,7 @@ void ActionDrawArc::mouseMoveEvent(QMouseEvent * e)
                        data.radius = data.center.distanceTo(mouse);
                        deletePreview();
                        clearPreview();
-//                     preview->addEntity(new RS_Circle(preview, RS_CircleData(data.center, data.radius)));
+//                     preview->addEntity(new Circle(preview, CircleData(data.center, data.radius)));
                        drawPreview();
                }
                break;
@@ -108,13 +108,13 @@ void ActionDrawArc::mouseMoveEvent(QMouseEvent * e)
                data.angle1 = data.center.angleTo(mouse);
 
                if (data.reversed)
-                       data.angle2 = RS_Math::correctAngle(data.angle1 - M_PI / 3);
+                       data.angle2 = Math::correctAngle(data.angle1 - M_PI / 3);
                else
-                       data.angle2 = RS_Math::correctAngle(data.angle1 + M_PI / 3);
+                       data.angle2 = Math::correctAngle(data.angle1 + M_PI / 3);
 
                deletePreview();
                clearPreview();
-//             preview->addEntity(new RS_Arc(preview, data));
+//             preview->addEntity(new Arc(preview, data));
                drawPreview();
                break;
 
@@ -122,7 +122,7 @@ void ActionDrawArc::mouseMoveEvent(QMouseEvent * e)
                data.angle2 = data.center.angleTo(mouse);
                deletePreview();
                clearPreview();
-//             preview->addEntity(new RS_Arc(preview, data));
+//             preview->addEntity(new Arc(preview, data));
                drawPreview();
                break;
 
@@ -130,7 +130,7 @@ void ActionDrawArc::mouseMoveEvent(QMouseEvent * e)
                data.angle2 = data.angle1 + data.center.angleTo(mouse);
                deletePreview();
                clearPreview();
-//             preview->addEntity(new RS_Arc(preview, data));
+//             preview->addEntity(new Arc(preview, data));
                drawPreview();
                break;
 
@@ -143,7 +143,7 @@ void ActionDrawArc::mouseMoveEvent(QMouseEvent * e)
                        data.angle2 = data.angle1 + asin(x / (2 * data.radius)) * 2;
                        deletePreview();
                        clearPreview();
-//                     preview->addEntity(new RS_Arc(preview, data));
+//                     preview->addEntity(new Arc(preview, data));
                        drawPreview();
                }
        }
@@ -153,7 +153,7 @@ void ActionDrawArc::mouseMoveEvent(QMouseEvent * e)
                break;
        }
 
-       RS_DEBUG->print("ActionDrawArc::mouseMoveEvent end");
+       DEBUG->print("ActionDrawArc::mouseMoveEvent end");
 }
 
 void ActionDrawArc::mouseReleaseEvent(QMouseEvent * e)
@@ -227,25 +227,25 @@ void ActionDrawArc::coordinateEvent(Vector * e)
        }
 }
 
-void ActionDrawArc::commandEvent(RS_CommandEvent * e)
+void ActionDrawArc::commandEvent(CommandEvent * e)
 {
        QString c = e->getCommand().toLower();
 
-       if (RS_COMMANDS->checkCommand("help", c))
+       if (COMMANDS->checkCommand("help", c))
        {
-               if (RS_DIALOGFACTORY != NULL)
-                       RS_DIALOGFACTORY->commandMessage(msgAvailableCommands()
+               if (DIALOGFACTORY != NULL)
+                       DIALOGFACTORY->commandMessage(msgAvailableCommands()
                                + getAvailableCommands().join(", "));
                return;
        }
 
-       if (RS_COMMANDS->checkCommand("reversed", c))
+       if (COMMANDS->checkCommand("reversed", c))
        {
                e->accept();
                setReversed(!isReversed());
 
-               if (RS_DIALOGFACTORY != NULL)
-                       RS_DIALOGFACTORY->requestOptions(this, true, true);
+               if (DIALOGFACTORY != NULL)
+                       DIALOGFACTORY->requestOptions(this, true, true);
                return;
        }
 
@@ -253,74 +253,74 @@ void ActionDrawArc::commandEvent(RS_CommandEvent * e)
        {
        case SetRadius: {
                bool ok;
-               double r = RS_Math::eval(c, &ok);
+               double r = Math::eval(c, &ok);
 
                if (ok == true)
                {
                        data.radius = r;
                        setStatus(SetAngle1);
                }
-               else if (RS_DIALOGFACTORY != NULL)
-                       RS_DIALOGFACTORY->commandMessage(tr("Not a valid expression"));
+               else if (DIALOGFACTORY != NULL)
+                       DIALOGFACTORY->commandMessage(tr("Not a valid expression"));
 
        }
        break;
 
        case SetAngle1: {
                bool ok;
-               double a = RS_Math::eval(c, &ok);
+               double a = Math::eval(c, &ok);
 
                if (ok == true)
                {
-                       data.angle1 = RS_Math::deg2rad(a);
+                       data.angle1 = Math::deg2rad(a);
                        setStatus(SetAngle2);
                }
-               else if (RS_DIALOGFACTORY != NULL)
-                       RS_DIALOGFACTORY->commandMessage(tr("Not a valid expression"));
+               else if (DIALOGFACTORY != NULL)
+                       DIALOGFACTORY->commandMessage(tr("Not a valid expression"));
 
        }
        break;
 
        case SetAngle2:
 
-               if (RS_COMMANDS->checkCommand("angle", c))
+               if (COMMANDS->checkCommand("angle", c))
                        setStatus(SetIncAngle);
-               else if (RS_COMMANDS->checkCommand("chord length", c))
+               else if (COMMANDS->checkCommand("chord length", c))
                        setStatus(SetChordLength);
                else
                {
                        bool ok;
-                       double a = RS_Math::eval(c, &ok);
+                       double a = Math::eval(c, &ok);
 
                        if (ok == true)
                        {
-                               data.angle2 = RS_Math::deg2rad(a);
+                               data.angle2 = Math::deg2rad(a);
                                trigger();
                        }
-                       else if (RS_DIALOGFACTORY != NULL)
-                               RS_DIALOGFACTORY->commandMessage(tr("Not a valid expression"));
+                       else if (DIALOGFACTORY != NULL)
+                               DIALOGFACTORY->commandMessage(tr("Not a valid expression"));
 
                }
                break;
 
        case SetIncAngle: {
                bool ok;
-               double a = RS_Math::eval(c, &ok);
+               double a = Math::eval(c, &ok);
 
                if (ok == true)
                {
-                       data.angle2 = data.angle1 + RS_Math::deg2rad(a);
+                       data.angle2 = data.angle1 + Math::deg2rad(a);
                        trigger();
                }
-               else if (RS_DIALOGFACTORY != NULL)
-                       RS_DIALOGFACTORY->commandMessage(tr("Not a valid expression"));
+               else if (DIALOGFACTORY != NULL)
+                       DIALOGFACTORY->commandMessage(tr("Not a valid expression"));
 
        }
        break;
 
        case SetChordLength: {
                bool ok;
-               double l = RS_Math::eval(c, &ok);
+               double l = Math::eval(c, &ok);
 
                if (ok == true)
                {
@@ -329,13 +329,13 @@ void ActionDrawArc::commandEvent(RS_CommandEvent * e)
                                data.angle2 = data.angle1 + asin(l / (2 * data.radius)) * 2;
                                trigger();
                        }
-                       else if (RS_DIALOGFACTORY != NULL)
-                               RS_DIALOGFACTORY->commandMessage(
+                       else if (DIALOGFACTORY != NULL)
+                               DIALOGFACTORY->commandMessage(
                                        tr("Not a valid chord length"));
 
                }
-               else if (RS_DIALOGFACTORY != NULL)
-                       RS_DIALOGFACTORY->commandMessage(tr("Not a valid expression"));
+               else if (DIALOGFACTORY != NULL)
+                       DIALOGFACTORY->commandMessage(tr("Not a valid expression"));
 
        }
        break;
@@ -348,47 +348,47 @@ void ActionDrawArc::commandEvent(RS_CommandEvent * e)
 QStringList ActionDrawArc::getAvailableCommands()
 {
        QStringList cmd;
-       cmd += RS_COMMANDS->command("reversed");
+       cmd += COMMANDS->command("reversed");
        return cmd;
 }
 
 void ActionDrawArc::updateMouseButtonHints()
 {
-       if (RS_DIALOGFACTORY != NULL)
+       if (DIALOGFACTORY != NULL)
        {
                switch (getStatus())
                {
                case SetCenter:
-                       RS_DIALOGFACTORY->updateMouseWidget(tr("Specify center"), tr("Cancel"));
+                       DIALOGFACTORY->updateMouseWidget(tr("Specify center"), tr("Cancel"));
                        break;
 
                case SetRadius:
-                       RS_DIALOGFACTORY->updateMouseWidget(tr("Specify radius"), tr("Back"));
+                       DIALOGFACTORY->updateMouseWidget(tr("Specify radius"), tr("Back"));
                        break;
 
                case SetAngle1:
-                       RS_DIALOGFACTORY->updateMouseWidget(
+                       DIALOGFACTORY->updateMouseWidget(
                                tr("Specify start angle:"), tr("Back"));
                        break;
 
                case SetAngle2:
-                       RS_DIALOGFACTORY->updateMouseWidget(
+                       DIALOGFACTORY->updateMouseWidget(
                                tr("Specify end angle or [Angle/chord Length]"),
                                tr("Back"));
                        break;
 
                case SetIncAngle:
-                       RS_DIALOGFACTORY->updateMouseWidget(tr("Specify included angle:"),
+                       DIALOGFACTORY->updateMouseWidget(tr("Specify included angle:"),
                                tr("Back"));
                        break;
 
                case SetChordLength:
-                       RS_DIALOGFACTORY->updateMouseWidget(tr("Specify chord length:"),
+                       DIALOGFACTORY->updateMouseWidget(tr("Specify chord length:"),
                                tr("Back"));
                        break;
 
                default:
-                       RS_DIALOGFACTORY->updateMouseWidget("", "");
+                       DIALOGFACTORY->updateMouseWidget("", "");
                        break;
                }
        }
@@ -398,16 +398,16 @@ void ActionDrawArc::showOptions()
 {
        ActionInterface::showOptions();
 
-       if (RS_DIALOGFACTORY)
-               RS_DIALOGFACTORY->requestOptions(this, true);
+       if (DIALOGFACTORY)
+               DIALOGFACTORY->requestOptions(this, true);
 }
 
 void ActionDrawArc::hideOptions()
 {
        ActionInterface::hideOptions();
 
-       if (RS_DIALOGFACTORY)
-               RS_DIALOGFACTORY->requestOptions(this, false);
+       if (DIALOGFACTORY)
+               DIALOGFACTORY->requestOptions(this, false);
 }
 
 void ActionDrawArc::updateMouseCursor()
@@ -417,13 +417,13 @@ void ActionDrawArc::updateMouseCursor()
 
 void ActionDrawArc::updateToolBar()
 {
-       if (!RS_DIALOGFACTORY)
+       if (!DIALOGFACTORY)
                return;
 
        if (!isFinished())
-               RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
+               DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
        else
-               RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarArcs);
+               DIALOGFACTORY->requestToolBar(RS2::ToolBarArcs);
 }
 
 bool ActionDrawArc::isReversed()
index adf4f099fcd85b8e5356c7e1ee99ae314be275f6..5d8f74fd4f7f7e2ad67fc6a2f0a6db9fe5a01992 100644 (file)
@@ -27,7 +27,7 @@ class ActionDrawArc: public ActionInterface
                };
 
        public:
-               ActionDrawArc(RS_EntityContainer & container, GraphicView & graphicView);
+               ActionDrawArc(EntityContainer & container, GraphicView & graphicView);
                ~ActionDrawArc();
 
                virtual RS2::ActionType rtti();
@@ -37,7 +37,7 @@ class ActionDrawArc: public ActionInterface
                virtual void mouseMoveEvent(QMouseEvent * e);
                virtual void mouseReleaseEvent(QMouseEvent * e);
                virtual void coordinateEvent(Vector * e);
-               virtual void commandEvent(RS_CommandEvent * e);
+               virtual void commandEvent(CommandEvent * e);
                virtual QStringList getAvailableCommands();
                virtual void hideOptions();
                virtual void showOptions();
@@ -51,7 +51,7 @@ class ActionDrawArc: public ActionInterface
                /**
                 * Arc data defined so far.
                 */
-               RS_ArcData data;
+               ArcData data;
 };
 
 #endif // __ACTIONDRAWARC_H__
index ce3d6587850cbad5b59cf92d0c0a24e8fb7673b0..77ed90f16def627cc7306b0915142a4d555863c5 100644 (file)
@@ -23,7 +23,7 @@
 #include "graphicview.h"
 #include "preview.h"
 
-ActionDrawArc3P::ActionDrawArc3P(RS_EntityContainer & container, GraphicView & graphicView):
+ActionDrawArc3P::ActionDrawArc3P(EntityContainer & container, GraphicView & graphicView):
        ActionInterface("Draw arcs 3P", container, graphicView)
 {
        reset();
@@ -55,7 +55,7 @@ void ActionDrawArc3P::trigger()
 
        if (data.isValid())
        {
-               RS_Arc * arc = new RS_Arc(container, data);
+               Arc * arc = new Arc(container, data);
                arc->setLayerToActive();
                arc->setPenToActive();
                container->addEntity(arc);
@@ -78,7 +78,7 @@ void ActionDrawArc3P::trigger()
                reset();
        }
        else
-               RS_DIALOGFACTORY->commandMessage(tr("Invalid arc data."));
+               DIALOGFACTORY->commandMessage(tr("Invalid arc data."));
 }
 
 void ActionDrawArc3P::preparePreview()
@@ -87,7 +87,7 @@ void ActionDrawArc3P::preparePreview()
 
        if (point1.valid && point2.valid && point3.valid)
        {
-               RS_Arc arc(NULL, data);
+               Arc arc(NULL, data);
                bool suc = arc.createFrom3P(point1, point2, point3);
 
                if (suc)
@@ -110,7 +110,7 @@ void ActionDrawArc3P::mouseMoveEvent(QMouseEvent * e)
 
                if (point1.valid)
                {
-//                     RS_Line * line = new RS_Line(preview, RS_LineData(point1, point2));
+//                     Line * line = new Line(preview, LineData(point1, point2));
 //
 //                     deletePreview();
 //                     clearPreview();
@@ -125,7 +125,7 @@ void ActionDrawArc3P::mouseMoveEvent(QMouseEvent * e)
 
                if (data.isValid())
                {
-//                     RS_Arc * arc = new RS_Arc(preview, data);
+//                     Arc * arc = new Arc(preview, data);
 //
 //                     deletePreview();
 //                     clearPreview();
@@ -185,18 +185,18 @@ void ActionDrawArc3P::coordinateEvent(Vector * e)
        }
 }
 
-void ActionDrawArc3P::commandEvent(RS_CommandEvent * e)
+void ActionDrawArc3P::commandEvent(CommandEvent * e)
 {
        QString c = e->getCommand().toLower();
 
        if (checkCommand("help", c))
        {
-               RS_DIALOGFACTORY->commandMessage(msgAvailableCommands()
+               DIALOGFACTORY->commandMessage(msgAvailableCommands()
                        + getAvailableCommands().join(", "));
                return;
        }
 
-       if (RS_COMMANDS->checkCommand("center", c, rtti()))
+       if (COMMANDS->checkCommand("center", c, rtti()))
        {
                finish();
                graphicView->setCurrentAction(new ActionDrawArc(*container, *graphicView));
@@ -214,19 +214,19 @@ void ActionDrawArc3P::updateMouseButtonHints()
        switch (getStatus())
        {
        case SetPoint1:
-               RS_DIALOGFACTORY->updateMouseWidget(tr("Specify startpoint or [Center]"), tr("Cancel"));
+               DIALOGFACTORY->updateMouseWidget(tr("Specify startpoint or [Center]"), tr("Cancel"));
                break;
 
        case SetPoint2:
-               RS_DIALOGFACTORY->updateMouseWidget(tr("Specify second point"), tr("Back"));
+               DIALOGFACTORY->updateMouseWidget(tr("Specify second point"), tr("Back"));
                break;
 
        case SetPoint3:
-               RS_DIALOGFACTORY->updateMouseWidget(tr("Specify endpoint"), tr("Back"));
+               DIALOGFACTORY->updateMouseWidget(tr("Specify endpoint"), tr("Back"));
                break;
 
        default:
-               RS_DIALOGFACTORY->updateMouseWidget("", "");
+               DIALOGFACTORY->updateMouseWidget("", "");
                break;
        }
 }
@@ -239,8 +239,8 @@ void ActionDrawArc3P::updateMouseCursor()
 void ActionDrawArc3P::updateToolBar()
 {
        if (!isFinished())
-               RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
+               DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
        else
-               RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarArcs);
+               DIALOGFACTORY->requestToolBar(RS2::ToolBarArcs);
 }
 
index 64f627b6511f744fcc2ec8e8f9e1a4b9ab1ee2c8..614cbe1e4bfea98acce4a831bac23501ce7aaeff 100644 (file)
@@ -25,7 +25,7 @@ class ActionDrawArc3P: public ActionInterface
                };
 
        public:
-               ActionDrawArc3P(RS_EntityContainer & container, GraphicView & graphicView);
+               ActionDrawArc3P(EntityContainer & container, GraphicView & graphicView);
                ~ActionDrawArc3P();
 
                void reset();
@@ -35,7 +35,7 @@ class ActionDrawArc3P: public ActionInterface
                virtual void mouseMoveEvent(QMouseEvent * e);
                virtual void mouseReleaseEvent(QMouseEvent * e);
                virtual void coordinateEvent(Vector * e);
-               virtual void commandEvent(RS_CommandEvent * e);
+               virtual void commandEvent(CommandEvent * e);
                virtual QStringList getAvailableCommands();
                virtual void updateMouseButtonHints();
                virtual void updateMouseCursor();
@@ -45,7 +45,7 @@ class ActionDrawArc3P: public ActionInterface
                /**
                 * Arc data defined so far.
                 */
-               RS_ArcData data;
+               ArcData data;
                /**
                 * 1st point.
                 */
index 7ad86a7743d4f012b7cd4ef3f730e5e43cc89d2d..f1691fcf6fc051780e875b49ef6c50b2979a5270 100644 (file)
@@ -22,7 +22,7 @@
 #include "graphicview.h"
 #include "preview.h"
 
-ActionDrawArcTangential::ActionDrawArcTangential(RS_EntityContainer & container, GraphicView & graphicView): ActionInterface("Draw arcs tangential",
+ActionDrawArcTangential::ActionDrawArcTangential(EntityContainer & container, GraphicView & graphicView): ActionInterface("Draw arcs tangential",
                container, graphicView)
 {
        reset();
@@ -56,13 +56,13 @@ void ActionDrawArcTangential::trigger()
 
        if (point.valid == false || baseEntity == NULL)
        {
-               RS_DEBUG->print("ActionDrawArcTangential::trigger: "
+               DEBUG->print("ActionDrawArcTangential::trigger: "
                        "conditions not met");
                return;
        }
 
        preparePreview();
-       RS_Arc * arc = new RS_Arc(container, data);
+       Arc * arc = new Arc(container, data);
        arc->setLayerToActive();
        arc->setPenToActive();
        container->addEntity(arc);
@@ -95,15 +95,15 @@ void ActionDrawArcTangential::preparePreview()
                if (isStartPoint)
                {
                        startPoint = baseEntity->getStartpoint();
-                       direction = RS_Math::correctAngle(baseEntity->getDirection1() + M_PI);
+                       direction = Math::correctAngle(baseEntity->getDirection1() + M_PI);
                }
                else
                {
                        startPoint = baseEntity->getEndpoint();
-                       direction = RS_Math::correctAngle(baseEntity->getDirection2() + M_PI);
+                       direction = Math::correctAngle(baseEntity->getDirection2() + M_PI);
                }
 
-               RS_Arc arc(NULL, RS_ArcData());
+               Arc arc(NULL, ArcData());
                bool suc = arc.createFrom2PDirectionRadius(startPoint, point, direction, data.radius);
 
                if (suc)
@@ -124,7 +124,7 @@ void ActionDrawArcTangential::mouseMoveEvent(QMouseEvent * e)
 
                if (data.isValid())
                {
-//                     RS_Arc * arc = new RS_Arc(preview, data);
+//                     Arc * arc = new Arc(preview, data);
 //                     deletePreview();
 //                     clearPreview();
 //                     preview->addEntity(arc);
@@ -147,13 +147,13 @@ void ActionDrawArcTangential::mouseReleaseEvent(QMouseEvent * e)
                case SetBaseEntity:
                {
                        Vector coord = graphicView->toGraph(e->x(), e->y());
-                       RS_Entity * entity = catchEntity(coord, RS2::ResolveAll);
+                       Entity * entity = catchEntity(coord, RS2::ResolveAll);
 
                        if (entity != NULL)
                        {
                                if (entity->isAtomic())
                                {
-                                       baseEntity = (RS_AtomicEntity *)entity;
+                                       baseEntity = (AtomicEntity *)entity;
 
                                        if (baseEntity->getStartpoint().distanceTo(coord)
                                            < baseEntity->getEndpoint().distanceTo(coord))
@@ -212,13 +212,13 @@ void ActionDrawArcTangential::coordinateEvent(Vector * e)
        }
 }
 
-void ActionDrawArcTangential::commandEvent(RS_CommandEvent * e)
+void ActionDrawArcTangential::commandEvent(CommandEvent * e)
 {
        QString c = e->getCommand().toLower();
 
        if (checkCommand("help", c))
        {
-               RS_DIALOGFACTORY->commandMessage(msgAvailableCommands()
+               DIALOGFACTORY->commandMessage(msgAvailableCommands()
                        + getAvailableCommands().join(", "));
                return;
        }
@@ -234,8 +234,8 @@ void ActionDrawArcTangential::showOptions()
 {
        ActionInterface::showOptions();
 
-       if (RS_DIALOGFACTORY != NULL)
-               RS_DIALOGFACTORY->requestOptions(this, true);
+       if (DIALOGFACTORY != NULL)
+               DIALOGFACTORY->requestOptions(this, true);
        updateMouseButtonHints();
 }
 
@@ -243,8 +243,8 @@ void ActionDrawArcTangential::hideOptions()
 {
        ActionInterface::hideOptions();
 
-       if (RS_DIALOGFACTORY != NULL)
-               RS_DIALOGFACTORY->requestOptions(this, false);
+       if (DIALOGFACTORY != NULL)
+               DIALOGFACTORY->requestOptions(this, false);
 }
 
 void ActionDrawArcTangential::updateMouseButtonHints()
@@ -252,18 +252,18 @@ void ActionDrawArcTangential::updateMouseButtonHints()
        switch (getStatus())
        {
        case SetBaseEntity:
-               RS_DIALOGFACTORY->updateMouseWidget(
+               DIALOGFACTORY->updateMouseWidget(
                        tr("Specify base entity"),
                        tr("Cancel"));
                break;
 
        case SetEndAngle:
-               RS_DIALOGFACTORY->updateMouseWidget(
+               DIALOGFACTORY->updateMouseWidget(
                        tr("Specify end angle"), tr("Back"));
                break;
 
        default:
-               RS_DIALOGFACTORY->updateMouseWidget("", "");
+               DIALOGFACTORY->updateMouseWidget("", "");
                break;
        }
 }
@@ -276,9 +276,9 @@ void ActionDrawArcTangential::updateMouseCursor()
 void ActionDrawArcTangential::updateToolBar()
 {
        if (!isFinished())
-               RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
+               DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
        else
-               RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarArcs);
+               DIALOGFACTORY->requestToolBar(RS2::ToolBarArcs);
 }
 
 void ActionDrawArcTangential::setRadius(double r)
index 4e9ace40a7271d55cf562660118c96fc78c933da..71a6b261cec260337df13a0cd8d003bc15535f92 100644 (file)
@@ -5,7 +5,7 @@
 #include "arc.h"
 #include "vector.h"
 
-class RS_AtomicEntity;
+class AtomicEntity;
 
 /**
  * This action class can handle user events to draw
@@ -26,7 +26,7 @@ class ActionDrawArcTangential: public ActionInterface
                };
 
        public:
-               ActionDrawArcTangential(RS_EntityContainer & container, GraphicView & graphicView);
+               ActionDrawArcTangential(EntityContainer & container, GraphicView & graphicView);
                ~ActionDrawArcTangential();
 
                virtual RS2::ActionType rtti();
@@ -37,7 +37,7 @@ class ActionDrawArcTangential: public ActionInterface
                virtual void mouseMoveEvent(QMouseEvent * e);
                virtual void mouseReleaseEvent(QMouseEvent * e);
                virtual void coordinateEvent(Vector * e);
-               virtual void commandEvent(RS_CommandEvent * e);
+               virtual void commandEvent(CommandEvent * e);
                virtual QStringList getAvailableCommands();
                virtual void hideOptions();
                virtual void showOptions();
@@ -51,7 +51,7 @@ class ActionDrawArcTangential: public ActionInterface
                /**
                 * Base entity.
                 */
-               RS_AtomicEntity * baseEntity;
+               AtomicEntity * baseEntity;
                /**
                 * Start point of base entity clicked?
                 */
@@ -63,7 +63,7 @@ class ActionDrawArcTangential: public ActionInterface
                /**
                 * Arc data calculated.
                 */
-               RS_ArcData data;
+               ArcData data;
 };
 
 #endif // __ACTIONDRAWARCTANGENTIAL_H__
index 84e0640d627c7d7a4d1fa76d7edeb55ed74c5f5c..7c19be06412e87f7781e5eea632c0b239fafd763 100644 (file)
@@ -22,7 +22,7 @@
 #include "graphicview.h"
 #include "preview.h"
 
-ActionDrawCircle::ActionDrawCircle(RS_EntityContainer & container, GraphicView & graphicView):
+ActionDrawCircle::ActionDrawCircle(EntityContainer & container, GraphicView & graphicView):
        ActionInterface("Draw circles", container, graphicView)
 {
        reset();
@@ -39,7 +39,7 @@ ActionDrawCircle::~ActionDrawCircle()
 
 void ActionDrawCircle::reset()
 {
-       data = RS_CircleData(Vector(false), 0.0);
+       data = CircleData(Vector(false), 0.0);
 }
 
 void ActionDrawCircle::init(int status)
@@ -53,7 +53,7 @@ void ActionDrawCircle::trigger()
 {
        ActionInterface::trigger();
 
-       RS_Circle * circle = new RS_Circle(container, data);
+       Circle * circle = new Circle(container, data);
        circle->setLayerToActive();
        circle->setPenToActive();
        container->addEntity(circle);
@@ -76,12 +76,12 @@ void ActionDrawCircle::trigger()
        setStatus(SetCenter);
        reset();
 
-       RS_DEBUG->print("ActionDrawCircle::trigger(): circle added: %d", circle->getId());
+       DEBUG->print("ActionDrawCircle::trigger(): circle added: %d", circle->getId());
 }
 
 void ActionDrawCircle::mouseMoveEvent(QMouseEvent * e)
 {
-       RS_DEBUG->print("ActionDrawCircle::mouseMoveEvent begin");
+       DEBUG->print("ActionDrawCircle::mouseMoveEvent begin");
 
        Vector mouse = snapPoint(e);
 
@@ -98,13 +98,13 @@ void ActionDrawCircle::mouseMoveEvent(QMouseEvent * e)
                        data.radius = data.center.distanceTo(mouse);
                        deletePreview();
                        clearPreview();
-//                     preview->addEntity(new RS_Circle(preview, data));
+//                     preview->addEntity(new Circle(preview, data));
                        drawPreview();
                }
                break;
        }
 
-       RS_DEBUG->print("ActionDrawCircle::mouseMoveEvent end");
+       DEBUG->print("ActionDrawCircle::mouseMoveEvent end");
 }
 
 void ActionDrawCircle::mouseReleaseEvent(QMouseEvent * e)
@@ -153,14 +153,14 @@ void ActionDrawCircle::coordinateEvent(Vector * e)
        }
 }
 
-void ActionDrawCircle::commandEvent(RS_CommandEvent * e)
+void ActionDrawCircle::commandEvent(CommandEvent * e)
 {
        QString c = e->getCommand().toLower();
 
        if (checkCommand("help", c))
        {
-               if (RS_DIALOGFACTORY)
-                       RS_DIALOGFACTORY->commandMessage(msgAvailableCommands()
+               if (DIALOGFACTORY)
+                       DIALOGFACTORY->commandMessage(msgAvailableCommands()
                                + getAvailableCommands().join(", "));
                return;
        }
@@ -170,12 +170,12 @@ void ActionDrawCircle::commandEvent(RS_CommandEvent * e)
        case SetRadius:
        {
                bool ok;
-               double r = RS_Math::eval(c, &ok);
+               double r = Math::eval(c, &ok);
 
                if (ok)
                        data.radius = r;
-               else if (RS_DIALOGFACTORY)
-                       RS_DIALOGFACTORY->commandMessage(tr("Not a valid expression"));
+               else if (DIALOGFACTORY)
+                       DIALOGFACTORY->commandMessage(tr("Not a valid expression"));
 
                trigger();
                //setStatus(SetCenter);
@@ -198,18 +198,18 @@ void ActionDrawCircle::updateMouseButtonHints()
        switch (getStatus())
        {
        case SetCenter:
-               if (RS_DIALOGFACTORY)
-                       RS_DIALOGFACTORY->updateMouseWidget(tr("Specify center"), tr("Cancel"));
+               if (DIALOGFACTORY)
+                       DIALOGFACTORY->updateMouseWidget(tr("Specify center"), tr("Cancel"));
                break;
 
        case SetRadius:
-               if (RS_DIALOGFACTORY)
-                       RS_DIALOGFACTORY->updateMouseWidget(tr("Specify radius"), tr("Back"));
+               if (DIALOGFACTORY)
+                       DIALOGFACTORY->updateMouseWidget(tr("Specify radius"), tr("Back"));
                break;
 
        default:
-               if (RS_DIALOGFACTORY)
-                       RS_DIALOGFACTORY->updateMouseWidget("", "");
+               if (DIALOGFACTORY)
+                       DIALOGFACTORY->updateMouseWidget("", "");
                break;
        }
 }
@@ -233,10 +233,10 @@ void ActionDrawCircle::updateToolBar()
 {
        if (!isFinished())
        {
-               if (RS_DIALOGFACTORY)
-                       RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
+               if (DIALOGFACTORY)
+                       DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
        }
-       else if (RS_DIALOGFACTORY)
-               RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarCircles);
+       else if (DIALOGFACTORY)
+               DIALOGFACTORY->requestToolBar(RS2::ToolBarCircles);
 
 }
index 7357c210ed685d16dfd21d7ed67113cf2900f40e..3d02f3d617e81924a023def1cac6d2995c4389b8 100644 (file)
@@ -23,7 +23,7 @@ class ActionDrawCircle: public ActionInterface
                };
 
        public:
-               ActionDrawCircle(RS_EntityContainer & container, GraphicView & graphicView);
+               ActionDrawCircle(EntityContainer & container, GraphicView & graphicView);
                ~ActionDrawCircle();
 
                virtual RS2::ActionType rtti();
@@ -33,7 +33,7 @@ class ActionDrawCircle: public ActionInterface
                virtual void mouseMoveEvent(QMouseEvent * e);
                virtual void mouseReleaseEvent(QMouseEvent * e);
                virtual void coordinateEvent(Vector * e);
-               virtual void commandEvent(RS_CommandEvent * e);
+               virtual void commandEvent(CommandEvent * e);
                virtual QStringList getAvailableCommands();
                virtual void hideOptions();
                virtual void showOptions();
@@ -45,7 +45,7 @@ class ActionDrawCircle: public ActionInterface
                /**
                 * Circle data defined so far.
                 */
-               RS_CircleData data;
+               CircleData data;
 };
 
 #endif // __ACTIONDRAWCIRCLE_H__
index 33d55340c09a830ef5046d3c33b034e8a7e55a08..d580bb33f7e30aca5369e0c894b9f4aa8810fea4 100644 (file)
@@ -21,7 +21,7 @@
 #include "graphicview.h"
 #include "preview.h"
 
-ActionDrawCircle2P::ActionDrawCircle2P(RS_EntityContainer & container, GraphicView & graphicView): ActionInterface("Draw circles",
+ActionDrawCircle2P::ActionDrawCircle2P(EntityContainer & container, GraphicView & graphicView): ActionInterface("Draw circles",
                container, graphicView)
 {
        reset();
@@ -53,7 +53,7 @@ void ActionDrawCircle2P::trigger()
 
        if (data.isValid())
        {
-               RS_Circle * circle = new RS_Circle(container, data);
+               Circle * circle = new Circle(container, data);
                circle->setLayerToActive();
                circle->setPenToActive();
                container->addEntity(circle);
@@ -76,8 +76,8 @@ void ActionDrawCircle2P::trigger()
                setStatus(SetPoint1);
                reset();
        }
-       else    if (RS_DIALOGFACTORY != NULL)
-               RS_DIALOGFACTORY->requestWarningDialog(tr("Invalid Circle data."));
+       else    if (DIALOGFACTORY != NULL)
+               DIALOGFACTORY->requestWarningDialog(tr("Invalid Circle data."));
 }
 
 void ActionDrawCircle2P::preparePreview()
@@ -86,7 +86,7 @@ void ActionDrawCircle2P::preparePreview()
 
        if (point1.valid && point2.valid)
        {
-               RS_Circle circle(NULL, data);
+               Circle circle(NULL, data);
                bool suc = circle.createFrom2P(point1, point2);
 
                if (suc)
@@ -110,7 +110,7 @@ void ActionDrawCircle2P::mouseMoveEvent(QMouseEvent * e)
 
                if (data.isValid())
                {
-//                     RS_Circle * circle = new RS_Circle(preview, data);
+//                     Circle * circle = new Circle(preview, data);
 //                     deletePreview();
 //                     clearPreview();
 //                     preview->addEntity(circle);
@@ -164,14 +164,14 @@ void ActionDrawCircle2P::coordinateEvent(Vector * e)
        }
 }
 
-void ActionDrawCircle2P::commandEvent(RS_CommandEvent * e)
+void ActionDrawCircle2P::commandEvent(CommandEvent * e)
 {
        QString c = e->getCommand().toLower();
 
        if (checkCommand("help", c))
        {
-               if (RS_DIALOGFACTORY != NULL)
-                       RS_DIALOGFACTORY->commandMessage(msgAvailableCommands()
+               if (DIALOGFACTORY != NULL)
+                       DIALOGFACTORY->commandMessage(msgAvailableCommands()
                                + getAvailableCommands().join(", "));
                return;
        }
@@ -185,22 +185,22 @@ QStringList ActionDrawCircle2P::getAvailableCommands()
 
 void ActionDrawCircle2P::updateMouseButtonHints()
 {
-       if (RS_DIALOGFACTORY != NULL)
+       if (DIALOGFACTORY != NULL)
        {
                switch (getStatus())
                {
                case SetPoint1:
-                       RS_DIALOGFACTORY->updateMouseWidget(
+                       DIALOGFACTORY->updateMouseWidget(
                                tr("Specify first point"), tr("Cancel"));
                        break;
 
                case SetPoint2:
-                       RS_DIALOGFACTORY->updateMouseWidget(
+                       DIALOGFACTORY->updateMouseWidget(
                                tr("Specify second point"), tr("Back"));
                        break;
 
                default:
-                       RS_DIALOGFACTORY->updateMouseWidget("", "");
+                       DIALOGFACTORY->updateMouseWidget("", "");
                        break;
                }
        }
@@ -213,11 +213,11 @@ void ActionDrawCircle2P::updateMouseCursor()
 
 void ActionDrawCircle2P::updateToolBar()
 {
-       if (RS_DIALOGFACTORY)
+       if (DIALOGFACTORY)
        {
                if (!isFinished())
-                       RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
+                       DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
                else
-                       RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarCircles);
+                       DIALOGFACTORY->requestToolBar(RS2::ToolBarCircles);
        }
 }
index 86d343a5eb99e29dcade750a47f77b1649a342c4..887400a64fb91078cd096511fa96bc506fcb1aed 100644 (file)
@@ -24,7 +24,7 @@ class ActionDrawCircle2P: public ActionInterface
                };
 
        public:
-               ActionDrawCircle2P(RS_EntityContainer & container, GraphicView & graphicView);
+               ActionDrawCircle2P(EntityContainer & container, GraphicView & graphicView);
                ~ActionDrawCircle2P();
 
                void reset();
@@ -34,7 +34,7 @@ class ActionDrawCircle2P: public ActionInterface
                virtual void mouseMoveEvent(QMouseEvent * e);
                virtual void mouseReleaseEvent(QMouseEvent * e);
                virtual void coordinateEvent(Vector * e);
-               virtual void commandEvent(RS_CommandEvent * e);
+               virtual void commandEvent(CommandEvent * e);
                virtual QStringList getAvailableCommands();
                virtual void updateMouseButtonHints();
                virtual void updateMouseCursor();
@@ -44,7 +44,7 @@ class ActionDrawCircle2P: public ActionInterface
                /**
                 * Circle data defined so far.
                 */
-               RS_CircleData data;
+               CircleData data;
                /**
                 * 1st point.
                 */
index c836878032af34d5565c7297f10fe5d2c85e3b7e..eacd6d89b02b8fdbdd9a0dc33f4b380fbc6727f3 100644 (file)
@@ -21,7 +21,7 @@
 #include "graphicview.h"
 #include "preview.h"
 
-ActionDrawCircle3P::ActionDrawCircle3P(RS_EntityContainer & container,
+ActionDrawCircle3P::ActionDrawCircle3P(EntityContainer & container,
        GraphicView & graphicView): ActionInterface("Draw circles",
        container, graphicView)
 {
@@ -55,7 +55,7 @@ void ActionDrawCircle3P::trigger()
 
        if (data.isValid())
        {
-               RS_Circle * circle = new RS_Circle(container, data);
+               Circle * circle = new Circle(container, data);
                circle->setLayerToActive();
                circle->setPenToActive();
                container->addEntity(circle);
@@ -79,7 +79,7 @@ void ActionDrawCircle3P::trigger()
                reset();
        }
        else
-               RS_DIALOGFACTORY->requestWarningDialog(tr("Invalid circle data."));
+               DIALOGFACTORY->requestWarningDialog(tr("Invalid circle data."));
 }
 
 void ActionDrawCircle3P::preparePreview()
@@ -88,7 +88,7 @@ void ActionDrawCircle3P::preparePreview()
 
        if (point1.valid && point2.valid && point3.valid)
        {
-               RS_Circle circle(NULL, data);
+               Circle circle(NULL, data);
                bool success = circle.createFrom3P(point1, point2, point3);
 
                if (success)
@@ -116,7 +116,7 @@ void ActionDrawCircle3P::mouseMoveEvent(QMouseEvent * e)
 
                if (data.isValid())
                {
-//                     RS_Circle * circle = new RS_Circle(preview, data);
+//                     Circle * circle = new Circle(preview, data);
 //
 //                     deletePreview();
 //                     clearPreview();
@@ -173,13 +173,13 @@ void ActionDrawCircle3P::coordinateEvent(Vector * e)
        }
 }
 
-void ActionDrawCircle3P::commandEvent(RS_CommandEvent * e)
+void ActionDrawCircle3P::commandEvent(CommandEvent * e)
 {
        QString c = e->getCommand().toLower();
 
        if (checkCommand("help", c))
        {
-               RS_DIALOGFACTORY->commandMessage(msgAvailableCommands()
+               DIALOGFACTORY->commandMessage(msgAvailableCommands()
                        + getAvailableCommands().join(", "));
                return;
        }
@@ -196,19 +196,19 @@ void ActionDrawCircle3P::updateMouseButtonHints()
        switch (getStatus())
        {
        case SetPoint1:
-               RS_DIALOGFACTORY->updateMouseWidget(tr("Specify first point"), tr("Cancel"));
+               DIALOGFACTORY->updateMouseWidget(tr("Specify first point"), tr("Cancel"));
                break;
 
        case SetPoint2:
-               RS_DIALOGFACTORY->updateMouseWidget(tr("Specify second point"), tr("Back"));
+               DIALOGFACTORY->updateMouseWidget(tr("Specify second point"), tr("Back"));
                break;
 
        case SetPoint3:
-               RS_DIALOGFACTORY->updateMouseWidget(tr("Specify third point"), tr("Back"));
+               DIALOGFACTORY->updateMouseWidget(tr("Specify third point"), tr("Back"));
                break;
 
        default:
-               RS_DIALOGFACTORY->updateMouseWidget("", "");
+               DIALOGFACTORY->updateMouseWidget("", "");
                break;
        }
 }
@@ -221,7 +221,7 @@ void ActionDrawCircle3P::updateMouseCursor()
 void ActionDrawCircle3P::updateToolBar()
 {
        if (!isFinished())
-               RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
+               DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
        else
-               RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarCircles);
+               DIALOGFACTORY->requestToolBar(RS2::ToolBarCircles);
 }
index a5288137b3a3d8a2bda2d323445a0c58ae5a0bf9..54a8777257959ff78e567c77e1a93c907789e4f1 100644 (file)
@@ -25,7 +25,7 @@ class ActionDrawCircle3P: public ActionInterface
                };
 
        public:
-               ActionDrawCircle3P(RS_EntityContainer & container, GraphicView & graphicView);
+               ActionDrawCircle3P(EntityContainer & container, GraphicView & graphicView);
                ~ActionDrawCircle3P();
 
                void reset();
@@ -35,7 +35,7 @@ class ActionDrawCircle3P: public ActionInterface
                virtual void mouseMoveEvent(QMouseEvent * e);
                virtual void mouseReleaseEvent(QMouseEvent * e);
                virtual void coordinateEvent(Vector * e);
-               virtual void commandEvent(RS_CommandEvent * e);
+               virtual void commandEvent(CommandEvent * e);
                virtual QStringList getAvailableCommands();
                virtual void updateMouseButtonHints();
                virtual void updateMouseCursor();
@@ -45,7 +45,7 @@ class ActionDrawCircle3P: public ActionInterface
                /**
                 * Circle data defined so far.
                 */
-               RS_CircleData data;
+               CircleData data;
                /**
                 * 1st point.
                 */
index 4f41d81c0a252cdf70f143a1684fee86c09013a3..dfd1150790067a17b02a030df4999069639fc70b 100644 (file)
@@ -25,7 +25,7 @@
 /**
  * Constructor.
  */
-ActionDrawCircleCR::ActionDrawCircleCR(RS_EntityContainer & container, GraphicView & graphicView): ActionInterface("Draw circles CR",
+ActionDrawCircleCR::ActionDrawCircleCR(EntityContainer & container, GraphicView & graphicView): ActionInterface("Draw circles CR",
                container, graphicView)
 {
        reset();
@@ -42,7 +42,7 @@ ActionDrawCircleCR::~ActionDrawCircleCR()
 
 void ActionDrawCircleCR::reset()
 {
-       data = RS_CircleData(Vector(false), 0.0);
+       data = CircleData(Vector(false), 0.0);
 }
 
 void ActionDrawCircleCR::init(int status)
@@ -54,7 +54,7 @@ void ActionDrawCircleCR::trigger()
 {
        ActionInterface::trigger();
 
-       RS_Circle * circle = new RS_Circle(container, data);
+       Circle * circle = new Circle(container, data);
        circle->setLayerToActive();
        circle->setPenToActive();
        container->addEntity(circle);
@@ -76,12 +76,12 @@ void ActionDrawCircleCR::trigger()
 
        setStatus(SetCenter);
 
-       RS_DEBUG->print("ActionDrawCircleCR::trigger(): circle added: %d", circle->getId());
+       DEBUG->print("ActionDrawCircleCR::trigger(): circle added: %d", circle->getId());
 }
 
 void ActionDrawCircleCR::mouseMoveEvent(QMouseEvent * e)
 {
-       RS_DEBUG->print("ActionDrawCircleCR::mouseMoveEvent begin");
+       DEBUG->print("ActionDrawCircleCR::mouseMoveEvent begin");
        Vector mouse = snapPoint(e);
 
        switch (getStatus())
@@ -90,12 +90,12 @@ void ActionDrawCircleCR::mouseMoveEvent(QMouseEvent * e)
                data.center = mouse;
                deletePreview();
                clearPreview();
-//             preview->addEntity(new RS_Circle(preview, data));
+//             preview->addEntity(new Circle(preview, data));
                drawPreview();
                break;
        }
 
-       RS_DEBUG->print("ActionDrawCircleCR::mouseMoveEvent end");
+       DEBUG->print("ActionDrawCircleCR::mouseMoveEvent end");
 }
 
 void ActionDrawCircleCR::mouseReleaseEvent(QMouseEvent * e)
@@ -132,13 +132,13 @@ void ActionDrawCircleCR::coordinateEvent(Vector * e)
        }
 }
 
-void ActionDrawCircleCR::commandEvent(RS_CommandEvent * e)
+void ActionDrawCircleCR::commandEvent(CommandEvent * e)
 {
        QString c = e->getCommand().toLower();
 
        if (checkCommand("help", c))
        {
-               RS_DIALOGFACTORY->commandMessage(msgAvailableCommands()
+               DIALOGFACTORY->commandMessage(msgAvailableCommands()
                        + getAvailableCommands().join(", "));
                return;
        }
@@ -159,14 +159,14 @@ void ActionDrawCircleCR::commandEvent(RS_CommandEvent * e)
        case SetRadius:
        {
                bool ok;
-               double r = RS_Math::eval(c, &ok);
+               double r = Math::eval(c, &ok);
 
                if (ok == true)
                        data.radius = r;
                else
-                       RS_DIALOGFACTORY->commandMessage(tr("Not a valid expression"));
+                       DIALOGFACTORY->commandMessage(tr("Not a valid expression"));
 
-               RS_DIALOGFACTORY->requestOptions(this, true, true);
+               DIALOGFACTORY->requestOptions(this, true, true);
                setStatus(SetCenter);
        }
        break;
@@ -198,15 +198,15 @@ void ActionDrawCircleCR::updateMouseButtonHints()
        switch (getStatus())
        {
        case SetCenter:
-               RS_DIALOGFACTORY->updateMouseWidget(tr("Specify circle center"), tr("Cancel"));
+               DIALOGFACTORY->updateMouseWidget(tr("Specify circle center"), tr("Cancel"));
                break;
 
        case SetRadius:
-               RS_DIALOGFACTORY->updateMouseWidget(tr("Specify circle radius"), tr("Back"));
+               DIALOGFACTORY->updateMouseWidget(tr("Specify circle radius"), tr("Back"));
                break;
 
        default:
-               RS_DIALOGFACTORY->updateMouseWidget("", "");
+               DIALOGFACTORY->updateMouseWidget("", "");
                break;
        }
 }
@@ -215,14 +215,14 @@ void ActionDrawCircleCR::showOptions()
 {
        ActionInterface::showOptions();
 
-       RS_DIALOGFACTORY->requestOptions(this, true);
+       DIALOGFACTORY->requestOptions(this, true);
 }
 
 void ActionDrawCircleCR::hideOptions()
 {
        ActionInterface::hideOptions();
 
-       RS_DIALOGFACTORY->requestOptions(this, false);
+       DIALOGFACTORY->requestOptions(this, false);
 }
 
 void ActionDrawCircleCR::updateMouseCursor()
@@ -233,9 +233,9 @@ void ActionDrawCircleCR::updateMouseCursor()
 void ActionDrawCircleCR::updateToolBar()
 {
        if (!isFinished())
-               RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
+               DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
        else
-               RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarCircles);
+               DIALOGFACTORY->requestToolBar(RS2::ToolBarCircles);
 }
 
 double ActionDrawCircleCR::getRadius()
index e3406f0cea2ebc41dd1a794688a70cb379844045..969d6663f9b8c98fe26308f0086cae1e662377d8 100644 (file)
@@ -23,7 +23,7 @@ class ActionDrawCircleCR: public ActionInterface
                };
 
        public:
-               ActionDrawCircleCR(RS_EntityContainer & container, GraphicView & graphicView);
+               ActionDrawCircleCR(EntityContainer & container, GraphicView & graphicView);
                ~ActionDrawCircleCR();
 
                virtual RS2::ActionType rtti();
@@ -33,7 +33,7 @@ class ActionDrawCircleCR: public ActionInterface
                virtual void mouseMoveEvent(QMouseEvent * e);
                virtual void mouseReleaseEvent(QMouseEvent * e);
                virtual void coordinateEvent(Vector * e);
-               virtual void commandEvent(RS_CommandEvent * e);
+               virtual void commandEvent(CommandEvent * e);
                virtual QStringList getAvailableCommands();
                virtual void hideOptions();
                virtual void showOptions();
@@ -47,7 +47,7 @@ class ActionDrawCircleCR: public ActionInterface
                /**
                 * Circle data defined so far.
                 */
-               RS_CircleData data;
+               CircleData data;
 };
 
 #endif // __ACTIONDRAWCIRCLECR_H__
index e219649c442ace9715c123a1faa6cdfc1b8028a0..932aa15404acb7959042f57d19a3ad02137aad6e 100644 (file)
@@ -28,7 +28,7 @@
  * @param isArc true if this action will produce an ellipse arc.
  *              false if it will produce a full ellipse.
  */
-ActionDrawEllipseAxis::ActionDrawEllipseAxis(RS_EntityContainer & container, GraphicView & graphicView, bool isArc): ActionInterface("Draw ellipse with axis",
+ActionDrawEllipseAxis::ActionDrawEllipseAxis(EntityContainer & container, GraphicView & graphicView, bool isArc): ActionInterface("Draw ellipse with axis",
                container, graphicView)
 {
        this->isArc = isArc;
@@ -67,8 +67,8 @@ void ActionDrawEllipseAxis::trigger()
 {
        ActionInterface::trigger();
 
-       RS_EllipseData ellipseData(center, major, ratio, angle1, angle2, false);
-       RS_Ellipse * ellipse = new RS_Ellipse(container, ellipseData);
+       EllipseData ellipseData(center, major, ratio, angle1, angle2, false);
+       Ellipse * ellipse = new Ellipse(container, ellipseData);
        ellipse->setLayerToActive();
        ellipse->setPenToActive();
 
@@ -91,13 +91,13 @@ void ActionDrawEllipseAxis::trigger()
 
        setStatus(SetCenter);
 
-       RS_DEBUG->print("ActionDrawEllipseAxis::trigger():"
+       DEBUG->print("ActionDrawEllipseAxis::trigger():"
                " entity added: %d", ellipse->getId());
 }
 
 void ActionDrawEllipseAxis::mouseMoveEvent(QMouseEvent * e)
 {
-       RS_DEBUG->print("ActionDrawEllipseAxis::mouseMoveEvent begin");
+       DEBUG->print("ActionDrawEllipseAxis::mouseMoveEvent begin");
 
        Vector mouse = snapPoint(e);
 
@@ -112,8 +112,8 @@ void ActionDrawEllipseAxis::mouseMoveEvent(QMouseEvent * e)
                {
                        deletePreview();
                        clearPreview();
-                       RS_EllipseData ed(center, mouse - center, 0.5, 0.0, 2 * M_PI, false);
-//                     preview->addEntity(new RS_Ellipse(preview, ed));
+                       EllipseData ed(center, mouse - center, 0.5, 0.0, 2 * M_PI, false);
+//                     preview->addEntity(new Ellipse(preview, ed));
                        drawPreview();
                }
                break;
@@ -124,11 +124,11 @@ void ActionDrawEllipseAxis::mouseMoveEvent(QMouseEvent * e)
                {
                        deletePreview();
                        clearPreview();
-                       RS_Line line(NULL, RS_LineData(center - major, center + major));
+                       Line line(NULL, LineData(center - major, center + major));
                        double d = line.getDistanceToPoint(mouse);
                        ratio = d / (line.getLength() / 2);
-                       RS_EllipseData ed(center, major, ratio, 0.0, 2 * M_PI, false);
-//                     preview->addEntity(new RS_Ellipse(preview, ed));
+                       EllipseData ed(center, major, ratio, 0.0, 2 * M_PI, false);
+//                     preview->addEntity(new Ellipse(preview, ed));
                        drawPreview();
                }
                break;
@@ -148,10 +148,10 @@ void ActionDrawEllipseAxis::mouseMoveEvent(QMouseEvent * e)
                        v.scale(Vector(1.0, 1.0 / ratio));
                        angle1 = v.angle(); // + major.angle();
 
-//                     preview->addEntity(new RS_Line(preview, RS_LineData(center, mouse)));
+//                     preview->addEntity(new Line(preview, LineData(center, mouse)));
 
-                       RS_EllipseData ed(center, major, ratio, angle1, angle1 + 1.0, false);
-//                     preview->addEntity(new RS_Ellipse(preview, ed));
+                       EllipseData ed(center, major, ratio, angle1, angle1 + 1.0, false);
+//                     preview->addEntity(new Ellipse(preview, ed));
                        drawPreview();
                }
                break;
@@ -170,10 +170,10 @@ void ActionDrawEllipseAxis::mouseMoveEvent(QMouseEvent * e)
                        v.scale(Vector(1.0, 1.0 / ratio));
                        angle2 = v.angle(); // + major.angle();
 
-//                     preview->addEntity(new RS_Line(preview, RS_LineData(center, mouse)));
+//                     preview->addEntity(new Line(preview, LineData(center, mouse)));
 
-                       RS_EllipseData ed(center, major, ratio, angle1, angle2, false);
-//                     preview->addEntity(new RS_Ellipse(preview, ed));
+                       EllipseData ed(center, major, ratio, angle1, angle2, false);
+//                     preview->addEntity(new Ellipse(preview, ed));
                        drawPreview();
                }
 
@@ -181,7 +181,7 @@ void ActionDrawEllipseAxis::mouseMoveEvent(QMouseEvent * e)
                break;
        }
 
-       RS_DEBUG->print("ActionDrawEllipseAxis::mouseMoveEvent end");
+       DEBUG->print("ActionDrawEllipseAxis::mouseMoveEvent end");
 }
 
 void ActionDrawEllipseAxis::mouseReleaseEvent(QMouseEvent * e)
@@ -223,7 +223,7 @@ void ActionDrawEllipseAxis::coordinateEvent(Vector * e)
 
        case SetMinor:
        {
-               RS_Line line(NULL, RS_LineData(center - major, center + major));
+               Line line(NULL, LineData(center - major, center + major));
                double d = line.getDistanceToPoint(mouse);
                ratio = d / (line.getLength() / 2);
 
@@ -266,14 +266,14 @@ void ActionDrawEllipseAxis::coordinateEvent(Vector * e)
        }
 }
 
-void ActionDrawEllipseAxis::commandEvent(RS_CommandEvent * e)
+void ActionDrawEllipseAxis::commandEvent(CommandEvent * e)
 {
        QString c = e->getCommand().toLower();
 
        if (checkCommand("help", c))
        {
-               if (RS_DIALOGFACTORY != NULL)
-                       RS_DIALOGFACTORY->commandMessage(msgAvailableCommands()
+               if (DIALOGFACTORY != NULL)
+                       DIALOGFACTORY->commandMessage(msgAvailableCommands()
                                + getAvailableCommands().join(", "));
                return;
        }
@@ -282,7 +282,7 @@ void ActionDrawEllipseAxis::commandEvent(RS_CommandEvent * e)
        {
        case SetMinor: {
                bool ok;
-               double m = RS_Math::eval(c, &ok);
+               double m = Math::eval(c, &ok);
 
                if (ok == true)
                {
@@ -293,38 +293,38 @@ void ActionDrawEllipseAxis::commandEvent(RS_CommandEvent * e)
                        else
                                setStatus(SetAngle1);
                }
-               else if (RS_DIALOGFACTORY != NULL)
-                       RS_DIALOGFACTORY->commandMessage(tr("Not a valid expression"));
+               else if (DIALOGFACTORY != NULL)
+                       DIALOGFACTORY->commandMessage(tr("Not a valid expression"));
 
        }
        break;
 
        case SetAngle1: {
                bool ok;
-               double a = RS_Math::eval(c, &ok);
+               double a = Math::eval(c, &ok);
 
                if (ok == true)
                {
-                       angle1 = RS_Math::deg2rad(a);
+                       angle1 = Math::deg2rad(a);
                        setStatus(SetAngle2);
                }
-               else if (RS_DIALOGFACTORY != NULL)
-                       RS_DIALOGFACTORY->commandMessage(tr("Not a valid expression"));
+               else if (DIALOGFACTORY != NULL)
+                       DIALOGFACTORY->commandMessage(tr("Not a valid expression"));
 
        }
        break;
 
        case SetAngle2: {
                bool ok;
-               double a = RS_Math::eval(c, &ok);
+               double a = Math::eval(c, &ok);
 
                if (ok == true)
                {
-                       angle2 = RS_Math::deg2rad(a);
+                       angle2 = Math::deg2rad(a);
                        trigger();
                }
-               else if (RS_DIALOGFACTORY != NULL)
-                       RS_DIALOGFACTORY->commandMessage(tr("Not a valid expression"));
+               else if (DIALOGFACTORY != NULL)
+                       DIALOGFACTORY->commandMessage(tr("Not a valid expression"));
 
        }
        break;
@@ -342,38 +342,38 @@ QStringList ActionDrawEllipseAxis::getAvailableCommands()
 
 void ActionDrawEllipseAxis::updateMouseButtonHints()
 {
-       if (RS_DIALOGFACTORY != NULL)
+       if (DIALOGFACTORY != NULL)
        {
                switch (getStatus())
                {
                case SetCenter:
-                       RS_DIALOGFACTORY->updateMouseWidget(tr("Specify ellipse center"),
+                       DIALOGFACTORY->updateMouseWidget(tr("Specify ellipse center"),
                                tr("Cancel"));
                        break;
 
                case SetMajor:
-                       RS_DIALOGFACTORY->updateMouseWidget(tr("Specify endpoint of major axis"),
+                       DIALOGFACTORY->updateMouseWidget(tr("Specify endpoint of major axis"),
                                tr("Back"));
                        break;
 
                case SetMinor:
-                       RS_DIALOGFACTORY->updateMouseWidget(
+                       DIALOGFACTORY->updateMouseWidget(
                                tr("Specify endpoint or length of minor axis:"),
                                tr("Back"));
                        break;
 
                case SetAngle1:
-                       RS_DIALOGFACTORY->updateMouseWidget(tr("Specify start angle"),
+                       DIALOGFACTORY->updateMouseWidget(tr("Specify start angle"),
                                tr("Back"));
                        break;
 
                case SetAngle2:
-                       RS_DIALOGFACTORY->updateMouseWidget(tr("Specify end angle"),
+                       DIALOGFACTORY->updateMouseWidget(tr("Specify end angle"),
                                tr("Back"));
                        break;
 
                default:
-                       RS_DIALOGFACTORY->updateMouseWidget("", "");
+                       DIALOGFACTORY->updateMouseWidget("", "");
                        break;
                }
        }
@@ -386,11 +386,11 @@ void ActionDrawEllipseAxis::updateMouseCursor()
 
 void ActionDrawEllipseAxis::updateToolBar()
 {
-       if (RS_DIALOGFACTORY)
+       if (DIALOGFACTORY)
        {
                if (!isFinished())
-                       RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
+                       DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
                else
-                       RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarEllipses);
+                       DIALOGFACTORY->requestToolBar(RS2::ToolBarEllipses);
        }
 }
index 073b43110f5e41e2a0efe9cef85fa9f6444792d1..957fd6d093a4276500a52c66670a622839c77838 100644 (file)
@@ -26,7 +26,7 @@ class ActionDrawEllipseAxis: public ActionInterface
                };
 
        public:
-               ActionDrawEllipseAxis(RS_EntityContainer & container, GraphicView & graphicView, bool isArc);
+               ActionDrawEllipseAxis(EntityContainer & container, GraphicView & graphicView, bool isArc);
                ~ActionDrawEllipseAxis();
 
                virtual void init(int status = 0);
@@ -34,7 +34,7 @@ class ActionDrawEllipseAxis: public ActionInterface
                virtual void mouseMoveEvent(QMouseEvent * e);
                virtual void mouseReleaseEvent(QMouseEvent * e);
                virtual void coordinateEvent(Vector * e);
-               virtual void commandEvent(RS_CommandEvent * e);
+               virtual void commandEvent(CommandEvent * e);
                virtual QStringList getAvailableCommands();
                virtual void updateMouseButtonHints();
                virtual void updateMouseCursor();
index aa4e3e8a19819c90fa0fdae615727aa7a858c606..a85a58af7022ca419d316702443e9fa14f1f965c 100644 (file)
@@ -21,7 +21,7 @@
 #include "graphicview.h"
 #include "information.h"
 
-ActionDrawHatch::ActionDrawHatch(RS_EntityContainer & container, GraphicView & graphicView):
+ActionDrawHatch::ActionDrawHatch(EntityContainer & container, GraphicView & graphicView):
        ActionInterface("Draw Hatch", container, graphicView)
 {
        hatch = NULL;
@@ -36,11 +36,11 @@ void ActionDrawHatch::init(int status)
        ActionInterface::init(status);
        clearPreview();
 
-       RS_Hatch tmp(container, data);
+       Hatch tmp(container, data);
        tmp.setLayerToActive();
        tmp.setPenToActive();
 
-       if (RS_DIALOGFACTORY->requestHatchDialog(&tmp))
+       if (DIALOGFACTORY->requestHatchDialog(&tmp))
        {
                data = tmp.getData();
                trigger();
@@ -53,10 +53,10 @@ void ActionDrawHatch::init(int status)
 
 void ActionDrawHatch::trigger()
 {
-       RS_DEBUG->print("ActionDrawHatch::trigger()");
+       DEBUG->print("ActionDrawHatch::trigger()");
 
        deleteSnapper();
-       RS_Entity * e;
+       Entity * e;
 
        // deselect unhatchable entities:
        for(e=container->firstEntity(RS2::ResolveNone); e!=NULL;
@@ -66,7 +66,7 @@ void ActionDrawHatch::trigger()
                    && (e->rtti() == RS2::EntityHatch
                        || e->rtti() == RS2::EntityEllipse || e->rtti() == RS2::EntityPoint
                        || e->rtti() == RS2::EntityText
-                       || RS_Information::isDimension(e->rtti())))
+                       || Information::isDimension(e->rtti())))
                        e->setSelected(false);
        }
 
@@ -77,7 +77,7 @@ void ActionDrawHatch::trigger()
                        && (e->rtti() == RS2::EntityHatch
                        || e->rtti() == RS2::EntityEllipse || e->rtti() == RS2::EntityPoint
                        || e->rtti() == RS2::EntityText
-                       || RS_Information::isDimension(e->rtti())))
+                       || Information::isDimension(e->rtti())))
                        e->setSelected(false);
        }
 
@@ -95,14 +95,14 @@ void ActionDrawHatch::trigger()
                return;
        }
 
-       hatch = new RS_Hatch(container, data);
+       hatch = new Hatch(container, data);
        hatch->setLayerToActive();
        hatch->setPenToActive();
-       RS_EntityContainer * loop = new RS_EntityContainer(hatch);
-       loop->setPen(RS_Pen(RS2::FlagInvalid));
+       EntityContainer * loop = new EntityContainer(hatch);
+       loop->setPen(Pen(RS2::FlagInvalid));
 
        // add selected contour:
-       for(RS_Entity * e=container->firstEntity(RS2::ResolveAll); e!=NULL;
+       for(Entity * e=container->firstEntity(RS2::ResolveAll); e!=NULL;
             e=container->nextEntity(RS2::ResolveAll))
        {
                if (e->isSelected())
@@ -115,8 +115,8 @@ void ActionDrawHatch::trigger()
                                || e->getParent()->rtti() == RS2::EntityPolyline))
                                e->getParent()->setSelected(false);
 
-                       RS_Entity * cp = e->clone();
-                       cp->setPen(RS_Pen(RS2::FlagInvalid));
+                       Entity * cp = e->clone();
+                       cp->setPen(Pen(RS2::FlagInvalid));
                        cp->reparent(loop);
                        loop->addEntity(cp);
                }
@@ -137,20 +137,20 @@ void ActionDrawHatch::trigger()
 
                hatch->update();
                graphicView->drawEntity(hatch);
-               RS_DIALOGFACTORY->commandMessage(tr("Hatch created successfully."));
+               DIALOGFACTORY->commandMessage(tr("Hatch created successfully."));
        }
        else
        {
                delete hatch;
                hatch = NULL;
-               RS_DIALOGFACTORY->commandMessage(tr("Invalid hatch area. Please check that "
+               DIALOGFACTORY->commandMessage(tr("Invalid hatch area. Please check that "
                        "the entities chosen form one or more closed contours."));
        }
 }
 
 void ActionDrawHatch::mouseMoveEvent(QMouseEvent *)
 {
-       RS_DEBUG->print("ActionDrawHatch::mouseMoveEvent begin");
+       DEBUG->print("ActionDrawHatch::mouseMoveEvent begin");
 
        /*if (getStatus()==SetPos) {
            Vector mouse = snapPoint(e);
@@ -166,7 +166,7 @@ void ActionDrawHatch::mouseMoveEvent(QMouseEvent *)
            drawPreview();
           }*/
 
-       RS_DEBUG->print("ActionDrawHatch::mouseMoveEvent end");
+       DEBUG->print("ActionDrawHatch::mouseMoveEvent end");
 }
 
 void ActionDrawHatch::mouseReleaseEvent(QMouseEvent * e)
@@ -194,7 +194,7 @@ void ActionDrawHatch::mouseReleaseEvent(QMouseEvent * e)
 
 void ActionDrawHatch::updateMouseButtonHints()
 {
-       RS_DIALOGFACTORY->updateMouseWidget("", "");
+       DIALOGFACTORY->updateMouseWidget("", "");
 }
 
 void ActionDrawHatch::updateMouseCursor()
@@ -204,5 +204,5 @@ void ActionDrawHatch::updateMouseCursor()
 
 void ActionDrawHatch::updateToolBar()
 {
-       RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarMain);
+       DIALOGFACTORY->requestToolBar(RS2::ToolBarMain);
 }
index b04c79c55bd86ba91b9c0de336de6f1b67ed08bd..67229a6b5b5df8bc0f888a738abce044aa953423 100644 (file)
@@ -21,7 +21,7 @@ class ActionDrawHatch: public ActionInterface
                };
 
        public:
-               ActionDrawHatch(RS_EntityContainer & container, GraphicView & graphicView);
+               ActionDrawHatch(EntityContainer & container, GraphicView & graphicView);
                ~ActionDrawHatch();
 
                virtual void init(int status = 0);
@@ -33,8 +33,8 @@ class ActionDrawHatch: public ActionInterface
                virtual void updateToolBar();
 
        private:
-               RS_HatchData data;
-               RS_Hatch * hatch;
+               HatchData data;
+               Hatch * hatch;
 };
 
 #endif // __ACTIONDRAWHATCH_H__
index 524663cb24d50f74bdaf2fbced8dd4f97a7bd156..fb7e3e7d4d6efcaef979d372f8c73f0aaae95208 100644 (file)
@@ -25,7 +25,7 @@
 /**
  * Constructor.
  */
-ActionDrawImage::ActionDrawImage(RS_EntityContainer & container, GraphicView & graphicView):
+ActionDrawImage::ActionDrawImage(EntityContainer & container, GraphicView & graphicView):
        ActionInterface("Image", container, graphicView)
 {
 }
@@ -45,7 +45,7 @@ void ActionDrawImage::init(int status)
 
        reset();
 
-       data.file = RS_DIALOGFACTORY->requestImageOpenDialog();
+       data.file = DIALOGFACTORY->requestImageOpenDialog();
        graphicView->redraw();
 
        if (!data.file.isEmpty())
@@ -59,13 +59,13 @@ void ActionDrawImage::init(int status)
        {
                finish();
                updateToolBar();
-               //RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarMain);
+               //DIALOGFACTORY->requestToolBar(RS2::ToolBarMain);
        }
 }
 
 void ActionDrawImage::reset()
 {
-       data = RS_ImageData(0,
+       data = ImageData(0,
                        Vector(0.0, 0.0),
                        Vector(1.0, 0.0),
                        Vector(0.0, 1.0),
@@ -82,7 +82,7 @@ void ActionDrawImage::trigger()
 
        if (!data.file.isEmpty())
        {
-               RS_Creation creation(container, graphicView);
+               Creation creation(container, graphicView);
                creation.createImage(data);
        }
 
@@ -100,16 +100,16 @@ void ActionDrawImage::mouseMoveEvent(QMouseEvent * e)
 
 //             deletePreview();
 //             clearPreview();
-//             RS_Line * line;
-//             line = new RS_Line(preview, RS_LineData(Vector(0, 0), Vector(img.width(), 0)));
+//             Line * line;
+//             line = new Line(preview, LineData(Vector(0, 0), Vector(img.width(), 0)));
 //             preview->addEntity(line);
-//             line = new RS_Line(preview,
-//                     RS_LineData(Vector(img.width(), 0), Vector(img.width(), img.height())));
+//             line = new Line(preview,
+//                     LineData(Vector(img.width(), 0), Vector(img.width(), img.height())));
 //             preview->addEntity(line);
-//             line = new RS_Line(preview,
-//                     RS_LineData(Vector(img.width(), img.height()), Vector(0, img.height())));
+//             line = new Line(preview,
+//                     LineData(Vector(img.width(), img.height()), Vector(0, img.height())));
 //             preview->addEntity(line);
-//             line = new RS_Line(preview, RS_LineData(Vector(0, img.height()), Vector(0, 0)));
+//             line = new Line(preview, LineData(Vector(0, img.height()), Vector(0, 0)));
 //             preview->addEntity(line);
 //             preview->scale(Vector(0, 0), Vector(data.uVector.magnitude(), data.uVector.magnitude()));
 //             preview->rotate(Vector(0, 0), data.uVector.angle());
@@ -146,13 +146,13 @@ void ActionDrawImage::coordinateEvent(Vector * e)
        trigger();
 }
 
-void ActionDrawImage::commandEvent(RS_CommandEvent * e)
+void ActionDrawImage::commandEvent(CommandEvent * e)
 {
        QString c = e->getCommand().toLower();
 
        if (checkCommand("help", c))
        {
-               RS_DIALOGFACTORY->commandMessage(msgAvailableCommands()
+               DIALOGFACTORY->commandMessage(msgAvailableCommands()
                        + getAvailableCommands().join(", "));
                return;
        }
@@ -182,14 +182,14 @@ void ActionDrawImage::commandEvent(RS_CommandEvent * e)
        case SetAngle:
        {
                bool ok;
-               double a = RS_Math::eval(c, &ok);
+               double a = Math::eval(c, &ok);
 
                if (ok)
-                       setAngle(RS_Math::deg2rad(a));
+                       setAngle(Math::deg2rad(a));
                else
-                       RS_DIALOGFACTORY->commandMessage(tr("Not a valid expression"));
+                       DIALOGFACTORY->commandMessage(tr("Not a valid expression"));
 
-               RS_DIALOGFACTORY->requestOptions(this, true, true);
+               DIALOGFACTORY->requestOptions(this, true, true);
                setStatus(lastStatus);
        }
        break;
@@ -197,14 +197,14 @@ void ActionDrawImage::commandEvent(RS_CommandEvent * e)
        case SetFactor:
        {
                bool ok;
-               double f = RS_Math::eval(c, &ok);
+               double f = Math::eval(c, &ok);
 
                if (ok)
                        setFactor(f);
                else
-                       RS_DIALOGFACTORY->commandMessage(tr("Not a valid expression"));
+                       DIALOGFACTORY->commandMessage(tr("Not a valid expression"));
 
-               RS_DIALOGFACTORY->requestOptions(this, true, true);
+               DIALOGFACTORY->requestOptions(this, true, true);
                setStatus(lastStatus);
        }
        break;
@@ -236,14 +236,14 @@ void ActionDrawImage::showOptions()
 {
        ActionInterface::showOptions();
 
-       RS_DIALOGFACTORY->requestOptions(this, true);
+       DIALOGFACTORY->requestOptions(this, true);
 }
 
 void ActionDrawImage::hideOptions()
 {
        ActionInterface::hideOptions();
 
-       RS_DIALOGFACTORY->requestOptions(this, false);
+       DIALOGFACTORY->requestOptions(this, false);
 }
 
 void ActionDrawImage::updateMouseButtonHints()
@@ -251,19 +251,19 @@ void ActionDrawImage::updateMouseButtonHints()
        switch (getStatus())
        {
        case SetTargetPoint:
-               RS_DIALOGFACTORY->updateMouseWidget(tr("Specify reference point"), tr("Cancel"));
+               DIALOGFACTORY->updateMouseWidget(tr("Specify reference point"), tr("Cancel"));
                break;
 
        case SetAngle:
-               RS_DIALOGFACTORY->updateMouseWidget(tr("Enter angle:"), "");
+               DIALOGFACTORY->updateMouseWidget(tr("Enter angle:"), "");
                break;
 
        case SetFactor:
-               RS_DIALOGFACTORY->updateMouseWidget(tr("Enter factor:"), "");
+               DIALOGFACTORY->updateMouseWidget(tr("Enter factor:"), "");
                break;
 
        default:
-               RS_DIALOGFACTORY->updateMouseWidget("", "");
+               DIALOGFACTORY->updateMouseWidget("", "");
                break;
        }
 }
@@ -276,9 +276,9 @@ void ActionDrawImage::updateMouseCursor()
 void ActionDrawImage::updateToolBar()
 {
        if (!isFinished())
-               RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
+               DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
        else
-               RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarMain);
+               DIALOGFACTORY->requestToolBar(RS2::ToolBarMain);
 }
 
 double ActionDrawImage::getAngle()
index af2aacffb53938a44e0d382bcb00d2849ed66cca..41b43b72524bbf070c0f131e48e25613b47a8bd3 100644 (file)
@@ -30,7 +30,7 @@ class ActionDrawImage: public ActionInterface
                };
 
        public:
-               ActionDrawImage(RS_EntityContainer & container, GraphicView & graphicView);
+               ActionDrawImage(EntityContainer & container, GraphicView & graphicView);
                ~ActionDrawImage();
 
                virtual RS2::ActionType rtti();
@@ -40,7 +40,7 @@ class ActionDrawImage: public ActionInterface
                virtual void mouseMoveEvent(QMouseEvent * e);
                virtual void mouseReleaseEvent(QMouseEvent * e);
                virtual void coordinateEvent(Vector * e);
-               virtual void commandEvent(RS_CommandEvent * e);
+               virtual void commandEvent(CommandEvent * e);
                virtual QStringList getAvailableCommands();
                virtual void showOptions();
                virtual void hideOptions();
@@ -53,7 +53,7 @@ class ActionDrawImage: public ActionInterface
                void setFactor(double f);
 
        protected:
-               RS_ImageData data;
+               ImageData data;
                QImage img;
 
                /** Last status before entering option. */
index 50fb99087cae5b6075a613e3f536c5cfa025f711..a0be6db85b6a1812c2b6164fc4d61e61173e1c61 100644 (file)
 #include "graphicview.h"
 #include "preview.h"
 
-ActionDrawLine::ActionDrawLine(RS_EntityContainer & container, GraphicView & graphicView):
+ActionDrawLine::ActionDrawLine(EntityContainer & container, GraphicView & graphicView):
        ActionInterface("Draw lines", container, graphicView)
 {
-       RS_DEBUG->print("ActionDrawLine::ActionDrawLine");
+       DEBUG->print("ActionDrawLine::ActionDrawLine");
        reset();
        //hm.
 //     graphicView.snapper.SetContainer(&container);
 //     graphicView.snapper.SetGraphicView(&graphicView);
 //     graphicView.snapper.SetVisible();
 //     graphicView.preview.SetVisible();
-       RS_DEBUG->print("ActionDrawLine::ActionDrawLine: OK");
+       DEBUG->print("ActionDrawLine::ActionDrawLine: OK");
 }
 
 ActionDrawLine::~ActionDrawLine()
@@ -49,33 +49,33 @@ ActionDrawLine::~ActionDrawLine()
 
 void ActionDrawLine::reset()
 {
-       RS_DEBUG->print("ActionDrawLine::reset");
-       data = RS_LineData(Vector(false), Vector(false));
+       DEBUG->print("ActionDrawLine::reset");
+       data = LineData(Vector(false), Vector(false));
        start = Vector(false);
        ClearHistory();
-       RS_DEBUG->print("ActionDrawLine::reset: OK");
+       DEBUG->print("ActionDrawLine::reset: OK");
 }
 
 void ActionDrawLine::init(int status)
 {
-       RS_DEBUG->print("ActionDrawLine::init");
+       DEBUG->print("ActionDrawLine::init");
        ActionInterface::init(status);
        reset();
-       RS_DEBUG->print("ActionDrawLine::init: OK");
+       DEBUG->print("ActionDrawLine::init: OK");
 }
 
 void ActionDrawLine::trigger()
 {
        graphicView->preview.clear();
 
-       RS_Line * line = new RS_Line(container, data);
+       Line * line = new Line(container, data);
        line->setLayerToActive();
        line->setPenToActive();
        container->addEntity(line);
 //std::cout << container;
 //printf("ActionDrawLine::trigger(): new line is %f,%f to %f,%f\n", data.startpoint.x, data.startpoint.y, data.endpoint.x, data.endpoint.y);
 //This makes it come back as "Unknown Entity"
-//std::cout << *((RS_Entity *)container);
+//std::cout << *((Entity *)container);
 //std::cout << *container;
 
        // Update undo list:
@@ -89,29 +89,29 @@ void ActionDrawLine::trigger()
        graphicView->moveRelativeZero(line->getEndpoint());
        //hm. [OK, it just moves the relative zero tho. Overkill. And remove preview, so OK.]
        graphicView->redraw();
-       RS_DEBUG->print("ActionDrawLine::trigger(): line added: %d", line->getId());
+       DEBUG->print("ActionDrawLine::trigger(): line added: %d", line->getId());
 }
 
 void ActionDrawLine::mouseMoveEvent(QMouseEvent * e)
 {
-       RS_DEBUG->print("ActionDrawLine::mouseMoveEvent begin");
+       DEBUG->print("ActionDrawLine::mouseMoveEvent begin");
 
-       RS_DEBUG->print("ActionDrawLine::mouseMoveEvent: snap point");
+       DEBUG->print("ActionDrawLine::mouseMoveEvent: snap point");
        Vector mouse = graphicView->snapper.snapPoint(e);
-       RS_DEBUG->print("ActionDrawLine::mouseMoveEvent: snap point: OK");
+       DEBUG->print("ActionDrawLine::mouseMoveEvent: snap point: OK");
 
        if (getStatus() == SetEndpoint && data.startpoint.valid)
        {
-               RS_DEBUG->print("ActionDrawLine::mouseMoveEvent: update preview");
+               DEBUG->print("ActionDrawLine::mouseMoveEvent: update preview");
                // This is lame. Creating a new Line every time the endpoint moves.
                // Surely we can alter the line entity inside the preview, no?
 #if 0
                graphicView->preview.clear();                   // Remove entities from the container
-               RS_Line * line = new RS_Line(&(graphicView->preview), RS_LineData(data.startpoint, mouse));
+               Line * line = new Line(&(graphicView->preview), LineData(data.startpoint, mouse));
                graphicView->preview.addEntity(line);
 #else
                // We can assume there's only one line in there, can't we?
-               RS_Line * line = (RS_Line *)graphicView->preview.firstEntity(RS2::ResolveNone);
+               Line * line = (Line *)graphicView->preview.firstEntity(RS2::ResolveNone);
 
                if (line)
                {
@@ -119,7 +119,7 @@ void ActionDrawLine::mouseMoveEvent(QMouseEvent * e)
                }
                else
                {
-                       line = new RS_Line(&(graphicView->preview), RS_LineData(data.startpoint, mouse));
+                       line = new Line(&(graphicView->preview), LineData(data.startpoint, mouse));
                        graphicView->preview.addEntity(line);
                }
 #endif
@@ -127,7 +127,7 @@ void ActionDrawLine::mouseMoveEvent(QMouseEvent * e)
 
        //hm. [ok, this works. :-D]
        graphicView->redraw();
-       RS_DEBUG->print("ActionDrawLine::mouseMoveEvent end");
+       DEBUG->print("ActionDrawLine::mouseMoveEvent end");
 }
 
 void ActionDrawLine::mouseReleaseEvent(QMouseEvent * e)
@@ -155,11 +155,11 @@ void ActionDrawLine::mouseReleaseEvent(QMouseEvent * e)
 
 void ActionDrawLine::coordinateEvent(Vector * e)
 {
-       RS_DEBUG->print("ActionDrawLine::coordinateEvent");
+       DEBUG->print("ActionDrawLine::coordinateEvent");
 
        if (!e)
        {
-               RS_DEBUG->print("ActionDrawLine::coordinateEvent: event was NULL");
+               DEBUG->print("ActionDrawLine::coordinateEvent: event was NULL");
                return;
        }
 
@@ -189,12 +189,12 @@ void ActionDrawLine::coordinateEvent(Vector * e)
                break;
        }
 
-       RS_DEBUG->print("ActionDrawLine::coordinateEvent: OK");
+       DEBUG->print("ActionDrawLine::coordinateEvent: OK");
 }
 
-void ActionDrawLine::commandEvent(RS_CommandEvent * e)
+void ActionDrawLine::commandEvent(CommandEvent * e)
 {
-       RS_DEBUG->print("ActionDrawLine::commandEvent");
+       DEBUG->print("ActionDrawLine::commandEvent");
        QString c = e->getCommand().toLower();
 
        switch (getStatus())
@@ -203,7 +203,7 @@ void ActionDrawLine::commandEvent(RS_CommandEvent * e)
 
                if (checkCommand("help", c))
                {
-                       RS_DIALOGFACTORY->commandMessage(msgAvailableCommands()
+                       DIALOGFACTORY->commandMessage(msgAvailableCommands()
                                + getAvailableCommands().join(", "));
                        return;
                }
@@ -230,7 +230,7 @@ void ActionDrawLine::commandEvent(RS_CommandEvent * e)
                break;
        }
 
-       RS_DEBUG->print("ActionDrawLine::commandEvent: OK");
+       DEBUG->print("ActionDrawLine::commandEvent: OK");
 }
 
 QStringList ActionDrawLine::getAvailableCommands()
@@ -264,7 +264,7 @@ void ActionDrawLine::updateMouseButtonHints()
        switch (getStatus())
        {
        case SetStartpoint:
-               RS_DIALOGFACTORY->updateMouseWidget(tr("Specify first point"), tr("Cancel"));
+               DIALOGFACTORY->updateMouseWidget(tr("Specify first point"), tr("Cancel"));
                break;
 
        case SetEndpoint:
@@ -273,38 +273,38 @@ void ActionDrawLine::updateMouseButtonHints()
 
                if (history.count() >= 3)
                {
-                       msg += RS_COMMANDS->command("close");
+                       msg += COMMANDS->command("close");
                        msg += "/";
                }
 
                if (history.count() >= 2)
-                       msg += RS_COMMANDS->command("undo");
+                       msg += COMMANDS->command("undo");
 
                if (history.count() >= 2)
-                       RS_DIALOGFACTORY->updateMouseWidget(tr("Specify next point or [%1]").arg(msg), tr("Back"));
+                       DIALOGFACTORY->updateMouseWidget(tr("Specify next point or [%1]").arg(msg), tr("Back"));
                else
-                       RS_DIALOGFACTORY->updateMouseWidget(tr("Specify next point"), tr("Back"));
+                       DIALOGFACTORY->updateMouseWidget(tr("Specify next point"), tr("Back"));
        }
                break;
 
        default:
-               RS_DIALOGFACTORY->updateMouseWidget("", "");
+               DIALOGFACTORY->updateMouseWidget("", "");
                break;
        }
 }
 
 void ActionDrawLine::showOptions()
 {
-       RS_DEBUG->print("ActionDrawLine::showOptions");
+       DEBUG->print("ActionDrawLine::showOptions");
        ActionInterface::showOptions();
-       RS_DIALOGFACTORY->requestOptions(this, true);
-       RS_DEBUG->print("ActionDrawLine::showOptions: OK");
+       DIALOGFACTORY->requestOptions(this, true);
+       DEBUG->print("ActionDrawLine::showOptions: OK");
 }
 
 void ActionDrawLine::hideOptions()
 {
        ActionInterface::hideOptions();
-       RS_DIALOGFACTORY->requestOptions(this, false);
+       DIALOGFACTORY->requestOptions(this, false);
 }
 
 void ActionDrawLine::updateMouseCursor()
@@ -315,9 +315,9 @@ void ActionDrawLine::updateMouseCursor()
 void ActionDrawLine::updateToolBar()
 {
        if (!isFinished())
-               RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
+               DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
        else
-               RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarLines);
+               DIALOGFACTORY->requestToolBar(RS2::ToolBarLines);
 }
 
 void ActionDrawLine::close()
@@ -332,7 +332,7 @@ void ActionDrawLine::close()
                graphicView->moveRelativeZero(start);
        }
        else
-               RS_DIALOGFACTORY->commandMessage(tr("Cannot close sequence of lines: Not enough entities defined yet."));
+               DIALOGFACTORY->commandMessage(tr("Cannot close sequence of lines: Not enough entities defined yet."));
 }
 
 void ActionDrawLine::undo()
@@ -348,7 +348,7 @@ void ActionDrawLine::undo()
                graphicView->redraw();
        }
        else
-               RS_DIALOGFACTORY->commandMessage(tr("Cannot undo: Not enough entities defined yet."));
+               DIALOGFACTORY->commandMessage(tr("Cannot undo: Not enough entities defined yet."));
 }
 
 void ActionDrawLine::ClearHistory(void)
index 672405b369a28b8c777d06f9d33cbbb258ef595f..ce3582a5d167beabcddfafd864df9919e8c2f4f9 100644 (file)
@@ -25,7 +25,7 @@ class ActionDrawLine: public ActionInterface
                };
 
        public:
-               ActionDrawLine(RS_EntityContainer & container, GraphicView & graphicView);
+               ActionDrawLine(EntityContainer & container, GraphicView & graphicView);
                virtual ~ActionDrawLine();
 
                virtual RS2::ActionType rtti();
@@ -35,7 +35,7 @@ class ActionDrawLine: public ActionInterface
                virtual void mouseMoveEvent(QMouseEvent * e);
                virtual void mouseReleaseEvent(QMouseEvent * e);
                virtual void coordinateEvent(Vector * e);
-               virtual void commandEvent(RS_CommandEvent * e);
+               virtual void commandEvent(CommandEvent * e);
                virtual QStringList getAvailableCommands();
                virtual void showOptions();
                virtual void hideOptions();
@@ -52,7 +52,7 @@ class ActionDrawLine: public ActionInterface
                /**
                 * Line data defined so far.
                 */
-               RS_LineData data;
+               LineData data;
                /**
                 * Start point of the series of lines. Used for close function.
                 */
index 36441b72d6f2e9186e026f5ad6c60f253e91178b..aeff68adceb9969d1699c6f69060a271996a3cd5 100644 (file)
@@ -23,7 +23,7 @@
 #include "graphicview.h"
 #include "preview.h"
 
-ActionDrawLineAngle::ActionDrawLineAngle(RS_EntityContainer & container,
+ActionDrawLineAngle::ActionDrawLineAngle(EntityContainer & container,
        GraphicView & graphicView, double a, bool fa):
        ActionInterface("Draw lines with given angle", container, graphicView),
        pos(Vector(false)), angle(a), length(1.0), fixedAngle(fa), snpPoint(0)
@@ -47,7 +47,7 @@ ActionDrawLineAngle::~ActionDrawLineAngle()
 
 void ActionDrawLineAngle::reset()
 {
-       data = RS_LineData(Vector(false), Vector(false));
+       data = LineData(Vector(false), Vector(false));
 }
 
 void ActionDrawLineAngle::init(int status)
@@ -60,7 +60,7 @@ void ActionDrawLineAngle::trigger()
 {
        ActionInterface::trigger();
        preparePreview();
-       RS_Line * line = new RS_Line(container, data);
+       Line * line = new Line(container, data);
        line->setLayerToActive();
        line->setPenToActive();
        container->addEntity(line);
@@ -78,12 +78,12 @@ void ActionDrawLineAngle::trigger()
        graphicView->drawEntity(line);
        graphicView->moveRelativeZero(data.startpoint);
        graphicView->redraw();
-       RS_DEBUG->print("ActionDrawLineAngle::trigger(): line added: %d", line->getId());
+       DEBUG->print("ActionDrawLineAngle::trigger(): line added: %d", line->getId());
 }
 
 void ActionDrawLineAngle::mouseMoveEvent(QMouseEvent * e)
 {
-       RS_DEBUG->print("ActionDrawLineAngle::mouseMoveEvent begin");
+       DEBUG->print("ActionDrawLineAngle::mouseMoveEvent begin");
 
        if (getStatus() == SetPos)
        {
@@ -91,15 +91,15 @@ void ActionDrawLineAngle::mouseMoveEvent(QMouseEvent * e)
 //             deletePreview();
 //             clearPreview();
 //             preparePreview();
-//             preview->addEntity(new RS_Line(preview, data));
+//             preview->addEntity(new Line(preview, data));
 //             drawPreview();
                preparePreview();
                graphicView->preview.clear();
-               graphicView->preview.addEntity(new RS_Line(&(graphicView->preview), data));
+               graphicView->preview.addEntity(new Line(&(graphicView->preview), data));
        }
 
        graphicView->redraw();
-       RS_DEBUG->print("ActionDrawLineAngle::mouseMoveEvent end");
+       DEBUG->print("ActionDrawLineAngle::mouseMoveEvent end");
 }
 
 void ActionDrawLineAngle::mouseReleaseEvent(QMouseEvent * e)
@@ -141,7 +141,7 @@ void ActionDrawLineAngle::preparePreview()
                p1 = pos;
 
        p2 += p1;
-       data = RS_LineData(p1, p2);
+       data = LineData(p1, p2);
 }
 
 void ActionDrawLineAngle::coordinateEvent(Vector * e)
@@ -161,13 +161,13 @@ void ActionDrawLineAngle::coordinateEvent(Vector * e)
        }
 }
 
-void ActionDrawLineAngle::commandEvent(RS_CommandEvent * e)
+void ActionDrawLineAngle::commandEvent(CommandEvent * e)
 {
        QString c = e->getCommand().toLower();
 
        if (checkCommand("help", c))
        {
-               RS_DIALOGFACTORY->commandMessage(msgAvailableCommands()
+               DIALOGFACTORY->commandMessage(msgAvailableCommands()
                        + getAvailableCommands().join(", "));
                return;
        }
@@ -194,14 +194,14 @@ void ActionDrawLineAngle::commandEvent(RS_CommandEvent * e)
        case SetAngle:
        {
                bool ok;
-               double a = RS_Math::eval(c, &ok);
+               double a = Math::eval(c, &ok);
 
                if (ok)
-                       angle = RS_Math::deg2rad(a);
+                       angle = Math::deg2rad(a);
                else
-                       RS_DIALOGFACTORY->commandMessage(tr("Not a valid expression"));
+                       DIALOGFACTORY->commandMessage(tr("Not a valid expression"));
 
-               RS_DIALOGFACTORY->requestOptions(this, true, true);
+               DIALOGFACTORY->requestOptions(this, true, true);
                setStatus(SetPos);
        }
                break;
@@ -209,14 +209,14 @@ void ActionDrawLineAngle::commandEvent(RS_CommandEvent * e)
        case SetLength:
        {
                bool ok;
-               double l = RS_Math::eval(c, &ok);
+               double l = Math::eval(c, &ok);
 
                if (ok)
                        length = l;
                else
-                       RS_DIALOGFACTORY->commandMessage(tr("Not a valid expression"));
+                       DIALOGFACTORY->commandMessage(tr("Not a valid expression"));
 
-               RS_DIALOGFACTORY->requestOptions(this, true, true);
+               DIALOGFACTORY->requestOptions(this, true, true);
                setStatus(SetPos);
        }
                break;
@@ -251,15 +251,15 @@ void ActionDrawLineAngle::updateMouseButtonHints()
        switch (getStatus())
        {
        case SetPos:
-               RS_DIALOGFACTORY->updateMouseWidget(tr("Specify position"), tr("Cancel"));
+               DIALOGFACTORY->updateMouseWidget(tr("Specify position"), tr("Cancel"));
                break;
 
        case SetAngle:
-               RS_DIALOGFACTORY->updateMouseWidget(tr("Enter angle:"), tr("Back"));
+               DIALOGFACTORY->updateMouseWidget(tr("Enter angle:"), tr("Back"));
                break;
 
        case SetLength:
-               RS_DIALOGFACTORY->updateMouseWidget(tr("Enter length:"), tr("Back"));
+               DIALOGFACTORY->updateMouseWidget(tr("Enter length:"), tr("Back"));
                break;
 
        default:
@@ -270,13 +270,13 @@ void ActionDrawLineAngle::updateMouseButtonHints()
 void ActionDrawLineAngle::showOptions()
 {
        ActionInterface::showOptions();
-       RS_DIALOGFACTORY->requestOptions(this, true);
+       DIALOGFACTORY->requestOptions(this, true);
 }
 
 void ActionDrawLineAngle::hideOptions()
 {
        ActionInterface::hideOptions();
-       RS_DIALOGFACTORY->requestOptions(this, false);
+       DIALOGFACTORY->requestOptions(this, false);
 }
 
 void ActionDrawLineAngle::updateMouseCursor()
@@ -287,9 +287,9 @@ void ActionDrawLineAngle::updateMouseCursor()
 void ActionDrawLineAngle::updateToolBar()
 {
        if (!isFinished())
-               RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
+               DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
        else
-               RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarLines);
+               DIALOGFACTORY->requestToolBar(RS2::ToolBarLines);
 }
 
 void ActionDrawLineAngle::setSnapPoint(int sp)
index 2bc5a220d4d22374a9a05e2f478b0144bd3902ff..3b87567ed4ff2e53d8f3c5fce62427337a9b8a16 100644 (file)
@@ -24,7 +24,7 @@ class ActionDrawLineAngle: public ActionInterface
                        SetLength     /**< Setting length in the command line. */
                };
 
-               ActionDrawLineAngle(RS_EntityContainer & container, GraphicView & graphicView,
+               ActionDrawLineAngle(EntityContainer & container, GraphicView & graphicView,
                        double angle = 0.0, bool fixedAngle = false);
                ~ActionDrawLineAngle();
 
@@ -36,7 +36,7 @@ class ActionDrawLineAngle: public ActionInterface
                virtual void mouseReleaseEvent(QMouseEvent * e);
                void preparePreview();
                virtual void coordinateEvent(Vector * e);
-               virtual void commandEvent(RS_CommandEvent * e);
+               virtual void commandEvent(CommandEvent * e);
                virtual QStringList getAvailableCommands();
                virtual void hideOptions();
                virtual void showOptions();
@@ -53,7 +53,7 @@ class ActionDrawLineAngle: public ActionInterface
 
        protected:
                /** Line data defined so far. */
-               RS_LineData data;
+               LineData data;
                /** Position. */
                Vector pos;
                /** Line angle. */
index e4c8bdd94bf27d40c2f9e3d22f405567c6e40c86..eb7172715d8e1e1b793e434c8a42b8281bed76ea 100644 (file)
@@ -23,7 +23,7 @@
 #include "graphicview.h"
 #include "preview.h"
 
-ActionDrawLineBisector::ActionDrawLineBisector(RS_EntityContainer & container,
+ActionDrawLineBisector::ActionDrawLineBisector(EntityContainer & container,
        GraphicView & graphicView):
        ActionInterface("Draw Bisectors", container, graphicView),
        bisector(NULL), line1(NULL), line2(NULL), length(10.0), number(1),
@@ -44,14 +44,14 @@ ActionDrawLineBisector::~ActionDrawLineBisector()
 void ActionDrawLineBisector::trigger()
 {
        ActionInterface::trigger();
-       RS_Creation creation(container, graphicView);
+       Creation creation(container, graphicView);
        creation.createBisector(coord1, coord2, length, number, line1, line2);
        graphicView->redraw();
 }
 
 void ActionDrawLineBisector::mouseMoveEvent(QMouseEvent * e)
 {
-       RS_DEBUG->print("ActionDrawLineBisector::mouseMoveEvent begin");
+       DEBUG->print("ActionDrawLineBisector::mouseMoveEvent begin");
 
        Vector mouse = Vector(graphicView->toGraphX(e->x()),
                graphicView->toGraphY(e->y()));
@@ -64,13 +64,13 @@ void ActionDrawLineBisector::mouseMoveEvent(QMouseEvent * e)
        case SetLine2:
        {
                coord2 = mouse;
-               RS_Entity * en = catchEntity(e, RS2::ResolveAll);
+               Entity * en = catchEntity(e, RS2::ResolveAll);
 
                if (en && en->rtti() == RS2::EntityLine)
                {
-                       line2 = (RS_Line *)en;
+                       line2 = (Line *)en;
                        graphicView->preview.clear();
-                       RS_Creation creation(&(graphicView->preview), NULL, false);
+                       Creation creation(&(graphicView->preview), NULL, false);
                        creation.createBisector(coord1, coord2, length, number, line1, line2);
                }
        }
@@ -81,7 +81,7 @@ void ActionDrawLineBisector::mouseMoveEvent(QMouseEvent * e)
        }
 
        graphicView->redraw();
-       RS_DEBUG->print("ActionDrawLineBisector::mouseMoveEvent end");
+       DEBUG->print("ActionDrawLineBisector::mouseMoveEvent end");
 }
 
 void ActionDrawLineBisector::mouseReleaseEvent(QMouseEvent * e)
@@ -102,11 +102,11 @@ void ActionDrawLineBisector::mouseReleaseEvent(QMouseEvent * e)
                case SetLine1:
                {
                        coord1 = mouse;
-                       RS_Entity * en = catchEntity(e, RS2::ResolveAll);
+                       Entity * en = catchEntity(e, RS2::ResolveAll);
 
                        if (en && en->rtti() == RS2::EntityLine)
                        {
-                               line1 = (RS_Line *)en;
+                               line1 = (Line *)en;
                                setStatus(SetLine2);
                        }
                }
@@ -121,13 +121,13 @@ void ActionDrawLineBisector::mouseReleaseEvent(QMouseEvent * e)
        }
 }
 
-void ActionDrawLineBisector::commandEvent(RS_CommandEvent * e)
+void ActionDrawLineBisector::commandEvent(CommandEvent * e)
 {
        QString c = e->getCommand().toLower();
 
        if (checkCommand("help", c))
        {
-               RS_DIALOGFACTORY->commandMessage(msgAvailableCommands()
+               DIALOGFACTORY->commandMessage(msgAvailableCommands()
                        + getAvailableCommands().join(", "));
                return;
        }
@@ -158,14 +158,14 @@ void ActionDrawLineBisector::commandEvent(RS_CommandEvent * e)
        case SetLength:
        {
                bool ok;
-               double l = RS_Math::eval(c, &ok);
+               double l = Math::eval(c, &ok);
 
                if (ok)
                        length = l;
                else
-                       RS_DIALOGFACTORY->commandMessage(tr("Not a valid expression"));
+                       DIALOGFACTORY->commandMessage(tr("Not a valid expression"));
 
-               RS_DIALOGFACTORY->requestOptions(this, true, true);
+               DIALOGFACTORY->requestOptions(this, true, true);
                setStatus(lastStatus);
        }
                break;
@@ -173,14 +173,14 @@ void ActionDrawLineBisector::commandEvent(RS_CommandEvent * e)
        case SetNumber:
        {
                bool ok;
-               int n = (int)RS_Math::eval(c, &ok);
+               int n = (int)Math::eval(c, &ok);
 
                if (ok)
                        number = n;
                else
-                       RS_DIALOGFACTORY->commandMessage(tr("Not a valid expression"));
+                       DIALOGFACTORY->commandMessage(tr("Not a valid expression"));
 
-               RS_DIALOGFACTORY->requestOptions(this, true, true);
+               DIALOGFACTORY->requestOptions(this, true, true);
                setStatus(lastStatus);
        }
                break;
@@ -214,23 +214,23 @@ void ActionDrawLineBisector::updateMouseButtonHints()
        switch (getStatus())
        {
        case SetLine1:
-               RS_DIALOGFACTORY->updateMouseWidget(tr("Select first line"), tr("Cancel"));
+               DIALOGFACTORY->updateMouseWidget(tr("Select first line"), tr("Cancel"));
                break;
 
        case SetLine2:
-               RS_DIALOGFACTORY->updateMouseWidget(tr("Select second line"), tr("Back"));
+               DIALOGFACTORY->updateMouseWidget(tr("Select second line"), tr("Back"));
                break;
 
        case SetLength:
-               RS_DIALOGFACTORY->updateMouseWidget(tr("Enter bisector length:"), tr("Back"));
+               DIALOGFACTORY->updateMouseWidget(tr("Enter bisector length:"), tr("Back"));
                break;
 
        case SetNumber:
-               RS_DIALOGFACTORY->updateMouseWidget(tr("Enter number of bisectors:"), tr("Back"));
+               DIALOGFACTORY->updateMouseWidget(tr("Enter number of bisectors:"), tr("Back"));
                break;
 
        default:
-               RS_DIALOGFACTORY->updateMouseWidget("", "");
+               DIALOGFACTORY->updateMouseWidget("", "");
                break;
        }
 }
@@ -238,13 +238,13 @@ void ActionDrawLineBisector::updateMouseButtonHints()
 void ActionDrawLineBisector::showOptions()
 {
        ActionInterface::showOptions();
-       RS_DIALOGFACTORY->requestOptions(this, true);
+       DIALOGFACTORY->requestOptions(this, true);
 }
 
 void ActionDrawLineBisector::hideOptions()
 {
        ActionInterface::hideOptions();
-       RS_DIALOGFACTORY->requestOptions(this, false);
+       DIALOGFACTORY->requestOptions(this, false);
 }
 
 void ActionDrawLineBisector::updateMouseCursor()
@@ -254,7 +254,7 @@ void ActionDrawLineBisector::updateMouseCursor()
 
 void ActionDrawLineBisector::updateToolBar()
 {
-       RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarLines);
+       DIALOGFACTORY->requestToolBar(RS2::ToolBarLines);
 }
 
 void ActionDrawLineBisector::setLength(double l)
index 992ae0300aed910f903e85c46f01cb646751bb72..e1fc776b0b6b24dc9a2be0918ed4e1b0b2d339be 100644 (file)
@@ -5,7 +5,7 @@
 #include "actioninterface.h"
 #include "vector.h"
 
-class RS_Line;
+class Line;
 
 /**
  * This action class can handle user events to draw bisectors.
@@ -24,14 +24,14 @@ class ActionDrawLineBisector: public ActionInterface
                };
 
        public:
-               ActionDrawLineBisector(RS_EntityContainer & container, GraphicView & graphicView);
+               ActionDrawLineBisector(EntityContainer & container, GraphicView & graphicView);
                ~ActionDrawLineBisector();
 
                virtual RS2::ActionType rtti();
                virtual void trigger();
                virtual void mouseMoveEvent(QMouseEvent * e);
                virtual void mouseReleaseEvent(QMouseEvent * e);
-               virtual void commandEvent(RS_CommandEvent * e);
+               virtual void commandEvent(CommandEvent * e);
                virtual QStringList getAvailableCommands();
                virtual void hideOptions();
                virtual void showOptions();
@@ -45,13 +45,13 @@ class ActionDrawLineBisector: public ActionInterface
 
        private:
                /** Closest bisector. */
-               RS_Line * bisector;
+               Line * bisector;
                /** First chosen entity */
-               RS_Line * line1;
+               Line * line1;
                /** Second chosen entity */
-               RS_Line * line2;
+               Line * line2;
                /** Data of new bisector */
-               RS_LineData data;
+               LineData data;
                /** Length of the bisector. */
                double length;
                /** Number of bisectors to create. */
index 9537cbee9a0b3b67fada49e6c671731930c25315..13230804b0de17a73cca8e0c8035c268efd3b1b3 100644 (file)
@@ -21,7 +21,7 @@
 #include "graphicview.h"
 #include "polyline.h"
 
-ActionDrawLineFree::ActionDrawLineFree(RS_EntityContainer & container,
+ActionDrawLineFree::ActionDrawLineFree(EntityContainer & container,
        GraphicView & graphicView): ActionInterface("Draw freehand lines",
        container, graphicView)
 {
@@ -49,7 +49,7 @@ void ActionDrawLineFree::trigger()
                        document->endUndoCycle();
                }
 
-               RS_DEBUG->print("ActionDrawLineFree::trigger():"
+               DEBUG->print("ActionDrawLineFree::trigger():"
                        " polyline added: %d", polyline->getId());
                polyline = NULL;
        }
@@ -60,7 +60,7 @@ void ActionDrawLineFree::mouseMoveEvent(QMouseEvent * e)
        if (vertex.valid && polyline)
        {
                Vector v = snapPoint(e);
-               RS_Entity * ent = polyline->addVertex(v);
+               Entity * ent = polyline->addVertex(v);
                ent->setLayerToActive();
                ent->setPenToActive();
 
@@ -70,7 +70,7 @@ void ActionDrawLineFree::mouseMoveEvent(QMouseEvent * e)
 
                vertex = v;
 
-               RS_DEBUG->print("ActionDrawLineFree::mouseMoveEvent():"
+               DEBUG->print("ActionDrawLineFree::mouseMoveEvent():"
                        " line added: %d", ent->getId());
        }
 }
@@ -80,7 +80,7 @@ void ActionDrawLineFree::mousePressEvent(QMouseEvent * e)
        if (e->button() == Qt::LeftButton)
        {
                vertex = snapPoint(e);
-               polyline = new RS_Polyline(container, RS_PolylineData(vertex, vertex, 0));
+               polyline = new Polyline(container, PolylineData(vertex, vertex, 0));
                polyline->setLayerToActive();
                polyline->setPenToActive();
        }
@@ -111,11 +111,11 @@ void ActionDrawLineFree::updateMouseButtonHints()
        switch (getStatus())
        {
        case 0:
-               RS_DIALOGFACTORY->updateMouseWidget(tr("Click and drag to draw a line"), tr("Cancel"));
+               DIALOGFACTORY->updateMouseWidget(tr("Click and drag to draw a line"), tr("Cancel"));
                break;
 
        default:
-               RS_DIALOGFACTORY->updateMouseWidget("", "");
+               DIALOGFACTORY->updateMouseWidget("", "");
                break;
        }
 }
@@ -128,7 +128,7 @@ void ActionDrawLineFree::updateMouseCursor()
 void ActionDrawLineFree::updateToolBar()
 {
        if (!isFinished())
-               RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
+               DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
        else
-               RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarLines);
+               DIALOGFACTORY->requestToolBar(RS2::ToolBarLines);
 }
index 2aabde6422a3edeac750e856cbc0c0d8fa64f96f..e77c3a2247fdeb57a36490c4b1a5206e36847c36 100644 (file)
@@ -4,7 +4,7 @@
 #include "actioninterface.h"
 #include "vector.h"
 
-class RS_Polyline;
+class Polyline;
 
 /**
  * This action class can handle user events to draw freehand lines.
@@ -15,7 +15,7 @@ class RS_Polyline;
 class ActionDrawLineFree: public ActionInterface
 {
        public:
-               ActionDrawLineFree(RS_EntityContainer & container, GraphicView & graphicView);
+               ActionDrawLineFree(EntityContainer & container, GraphicView & graphicView);
                ~ActionDrawLineFree();
 
                virtual void trigger();
@@ -28,7 +28,7 @@ class ActionDrawLineFree: public ActionInterface
 
        protected:
                Vector vertex;
-               RS_Polyline * polyline;
+               Polyline * polyline;
 };
 
 #endif // __ACTIONDRAWLINEFREE_H__
index e8707a2be12aa1c6ce036a3380e7a6764e0e4c00..3d3f24bcbcc9fc0d81a511c7fd9a22cb4c30b2ed 100644 (file)
 #include "graphicview.h"
 #include "preview.h"
 
-ActionDrawLineHorVert::ActionDrawLineHorVert(RS_EntityContainer & container, GraphicView & graphicView): ActionInterface("Draw horizontal/vertical lines",
+ActionDrawLineHorVert::ActionDrawLineHorVert(EntityContainer & container, GraphicView & graphicView): ActionInterface("Draw horizontal/vertical lines",
                container, graphicView)
 {
        reset();
-       RS_DEBUG->print("ActionDrawLineHorVert::constructor");
+       DEBUG->print("ActionDrawLineHorVert::constructor");
 }
 
 ActionDrawLineHorVert::~ActionDrawLineHorVert()
@@ -34,21 +34,21 @@ ActionDrawLineHorVert::~ActionDrawLineHorVert()
 
 void ActionDrawLineHorVert::reset()
 {
-       data = RS_LineData(Vector(false), Vector(false));
+       data = LineData(Vector(false), Vector(false));
 }
 
 void ActionDrawLineHorVert::init(int status)
 {
        ActionInterface::init(status);
        reset();
-       RS_DEBUG->print("ActionDrawLineHorVert::init");
+       DEBUG->print("ActionDrawLineHorVert::init");
 }
 
 void ActionDrawLineHorVert::trigger()
 {
        ActionInterface::trigger();
 
-       RS_Line * line = new RS_Line(container, data);
+       Line * line = new Line(container, data);
        line->setLayerToActive();
        line->setPenToActive();
        container->addEntity(line);
@@ -65,13 +65,13 @@ void ActionDrawLineHorVert::trigger()
        graphicView->moveRelativeZero(Vector(0.0, 0.0));
        graphicView->drawEntity(line);
        graphicView->moveRelativeZero(line->getMiddlepoint());
-       RS_DEBUG->print("ActionDrawLineHorVert::trigger():"
+       DEBUG->print("ActionDrawLineHorVert::trigger():"
                " line added: %d", line->getId());
 }
 
 void ActionDrawLineHorVert::mouseMoveEvent(QMouseEvent * e)
 {
-       RS_DEBUG->print("ActionDrawLineHorVert::mouseMoveEvent begin");
+       DEBUG->print("ActionDrawLineHorVert::mouseMoveEvent begin");
 
        Vector mouse = snapPoint(e);
 
@@ -87,12 +87,12 @@ void ActionDrawLineHorVert::mouseMoveEvent(QMouseEvent * e)
 
                deletePreview();
                clearPreview();
-               data = RS_LineData(p1, p2);
-//             preview->addEntity(new RS_Line(preview, data));
+               data = LineData(p1, p2);
+//             preview->addEntity(new Line(preview, data));
                drawPreview();
        }
 
-       RS_DEBUG->print("ActionDrawLineHorVert::mouseMoveEvent end");
+       DEBUG->print("ActionDrawLineHorVert::mouseMoveEvent end");
 }
 
 void ActionDrawLineHorVert::mouseReleaseEvent(QMouseEvent * e)
@@ -131,15 +131,15 @@ void ActionDrawLineHorVert::updateMouseButtonHints()
        switch (getStatus())
        {
        case SetStartpoint:
-               RS_DIALOGFACTORY->updateMouseWidget(tr("Specify first point"), tr("Cancel"));
+               DIALOGFACTORY->updateMouseWidget(tr("Specify first point"), tr("Cancel"));
                break;
 
        case SetEndpoint:
-               RS_DIALOGFACTORY->updateMouseWidget(tr("Specify second point"), tr("Back"));
+               DIALOGFACTORY->updateMouseWidget(tr("Specify second point"), tr("Back"));
                break;
 
        default:
-               RS_DIALOGFACTORY->updateMouseWidget("", "");
+               DIALOGFACTORY->updateMouseWidget("", "");
                break;
        }
 }
@@ -152,7 +152,7 @@ void ActionDrawLineHorVert::updateMouseCursor()
 void ActionDrawLineHorVert::updateToolBar()
 {
        if (!isFinished())
-               RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
+               DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
        else
-               RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarLines);
+               DIALOGFACTORY->requestToolBar(RS2::ToolBarLines);
 }
index 41ae4b5791c9d4480c5d4e38f0b1bab295077a07..ca479fad75445cd7a3b6fbc35324af304d21d23a 100644 (file)
@@ -25,7 +25,7 @@ class ActionDrawLineHorVert: public ActionInterface
                };
 
        public:
-               ActionDrawLineHorVert(RS_EntityContainer & container, GraphicView & graphicView);
+               ActionDrawLineHorVert(EntityContainer & container, GraphicView & graphicView);
                ~ActionDrawLineHorVert();
 
                void reset();
@@ -41,7 +41,7 @@ class ActionDrawLineHorVert: public ActionInterface
                /**
                 * Line data.
                 */
-               RS_LineData data;
+               LineData data;
                /**
                 * 2 points
                 */
index 2ca3285e4318f9e3077e0891fa081ee7b6971194..f8a473af7c8645f4d98bdcf6552ca3fe0a4433ef 100644 (file)
@@ -26,7 +26,7 @@
 #include "graphicview.h"
 #include "preview.h"
 
-ActionDrawLineParallel::ActionDrawLineParallel(RS_EntityContainer & container,
+ActionDrawLineParallel::ActionDrawLineParallel(EntityContainer & container,
        GraphicView & graphicView):
        ActionInterface("Draw Parallels", container, graphicView),
        parallel(NULL), distance(1.0), number(1), coord(Vector(false)), entity(NULL)
@@ -46,11 +46,11 @@ ActionDrawLineParallel::~ActionDrawLineParallel()
 void ActionDrawLineParallel::trigger()
 {
        ActionInterface::trigger();
-       RS_Creation creation(container, graphicView);
-       RS_Entity * e = creation.createParallel(coord, distance, number, entity);
+       Creation creation(container, graphicView);
+       Entity * e = creation.createParallel(coord, distance, number, entity);
 
        if (!e)
-               RS_DEBUG->print("ActionDrawLineParallel::trigger: No parallels added\n");
+               DEBUG->print("ActionDrawLineParallel::trigger: No parallels added\n");
 
        graphicView->preview.clear();
        graphicView->redraw();
@@ -58,7 +58,7 @@ void ActionDrawLineParallel::trigger()
 
 void ActionDrawLineParallel::mouseMoveEvent(QMouseEvent * e)
 {
-       RS_DEBUG->print("ActionDrawLineParallel::mouseMoveEvent begin");
+       DEBUG->print("ActionDrawLineParallel::mouseMoveEvent begin");
        coord = Vector(graphicView->toGraphX(e->x()), graphicView->toGraphY(e->y()));
        entity = catchEntity(e, RS2::ResolveAll);
 
@@ -69,12 +69,12 @@ void ActionDrawLineParallel::mouseMoveEvent(QMouseEvent * e)
 #if 0
                deletePreview();
                clearPreview();
-               RS_Creation creation(preview, NULL, false);
+               Creation creation(preview, NULL, false);
                creation.createParallel(coord, distance, number, entity);
                drawPreview();
 #else
                graphicView->preview.clear();
-               RS_Creation creation(&(graphicView->preview), NULL, false);
+               Creation creation(&(graphicView->preview), NULL, false);
                creation.createParallel(coord, distance, number, entity);
                graphicView->redraw();
 #endif
@@ -85,7 +85,7 @@ void ActionDrawLineParallel::mouseMoveEvent(QMouseEvent * e)
                break;
        }
 
-       RS_DEBUG->print("ActionDrawLineParallel::mouseMoveEvent end");
+       DEBUG->print("ActionDrawLineParallel::mouseMoveEvent end");
 }
 
 void ActionDrawLineParallel::mouseReleaseEvent(QMouseEvent * e)
@@ -98,23 +98,23 @@ void ActionDrawLineParallel::mouseReleaseEvent(QMouseEvent * e)
 
 void ActionDrawLineParallel::updateMouseButtonHints()
 {
-       if (RS_DIALOGFACTORY)
+       if (DIALOGFACTORY)
        {
                switch (getStatus())
                {
                case SetEntity:
-                       RS_DIALOGFACTORY->updateMouseWidget(
+                       DIALOGFACTORY->updateMouseWidget(
                                tr("Specify Distance <%1> or select entity or [%2]")
-                               .arg(distance).arg(RS_COMMANDS->command("through")),
+                               .arg(distance).arg(COMMANDS->command("through")),
                                tr("Cancel"));
                        break;
 
                case SetNumber:
-                       RS_DIALOGFACTORY->updateMouseWidget(tr("Enter number:"), "");
+                       DIALOGFACTORY->updateMouseWidget(tr("Enter number:"), "");
                        break;
 
                default:
-                       RS_DIALOGFACTORY->updateMouseWidget("", "");
+                       DIALOGFACTORY->updateMouseWidget("", "");
                        break;
                }
        }
@@ -124,8 +124,8 @@ void ActionDrawLineParallel::showOptions()
 {
        ActionInterface::showOptions();
 
-       if (RS_DIALOGFACTORY)
-               RS_DIALOGFACTORY->requestOptions(this, true);
+       if (DIALOGFACTORY)
+               DIALOGFACTORY->requestOptions(this, true);
 
        updateMouseButtonHints();
 }
@@ -134,18 +134,18 @@ void ActionDrawLineParallel::hideOptions()
 {
        ActionInterface::hideOptions();
 
-       if (RS_DIALOGFACTORY)
-               RS_DIALOGFACTORY->requestOptions(this, false);
+       if (DIALOGFACTORY)
+               DIALOGFACTORY->requestOptions(this, false);
 }
 
-void ActionDrawLineParallel::commandEvent(RS_CommandEvent * e)
+void ActionDrawLineParallel::commandEvent(CommandEvent * e)
 {
        QString c = e->getCommand().toLower();
 
        if (checkCommand("help", c))
        {
-               if (RS_DIALOGFACTORY)
-                       RS_DIALOGFACTORY->commandMessage(msgAvailableCommands()
+               if (DIALOGFACTORY)
+                       DIALOGFACTORY->commandMessage(msgAvailableCommands()
                                + getAvailableCommands().join(", "));
 
                return;
@@ -170,16 +170,16 @@ void ActionDrawLineParallel::commandEvent(RS_CommandEvent * e)
                else
                {
                        bool ok;
-                       double d = RS_Math::eval(c, &ok);
+                       double d = Math::eval(c, &ok);
 
                        if (ok && d > 1.0e-10)
                                distance = d;
-                       else if (RS_DIALOGFACTORY)
-                               RS_DIALOGFACTORY->commandMessage(tr("Not a valid expression"));
+                       else if (DIALOGFACTORY)
+                               DIALOGFACTORY->commandMessage(tr("Not a valid expression"));
 
 
-                       if (RS_DIALOGFACTORY != NULL)
-                               RS_DIALOGFACTORY->requestOptions(this, true, true);
+                       if (DIALOGFACTORY != NULL)
+                               DIALOGFACTORY->requestOptions(this, true, true);
 
                        updateMouseButtonHints();
                        //setStatus(SetEntity);
@@ -196,14 +196,14 @@ void ActionDrawLineParallel::commandEvent(RS_CommandEvent * e)
                {
                        if (n > 0 && n < 100)
                                number = n;
-                       else if (RS_DIALOGFACTORY)
-                               RS_DIALOGFACTORY->commandMessage(tr("Not a valid number. Try 1..99"));
+                       else if (DIALOGFACTORY)
+                               DIALOGFACTORY->commandMessage(tr("Not a valid number. Try 1..99"));
                }
-               else if (RS_DIALOGFACTORY)
-                       RS_DIALOGFACTORY->commandMessage(tr("Not a valid expression"));
+               else if (DIALOGFACTORY)
+                       DIALOGFACTORY->commandMessage(tr("Not a valid expression"));
 
-               if (RS_DIALOGFACTORY)
-                       RS_DIALOGFACTORY->requestOptions(this, true, true);
+               if (DIALOGFACTORY)
+                       DIALOGFACTORY->requestOptions(this, true, true);
 
                setStatus(SetEntity);
        }
@@ -239,8 +239,8 @@ void ActionDrawLineParallel::updateMouseCursor()
 
 void ActionDrawLineParallel::updateToolBar()
 {
-       if (RS_DIALOGFACTORY)
-               RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarLines);
+       if (DIALOGFACTORY)
+               DIALOGFACTORY->requestToolBar(RS2::ToolBarLines);
 }
 
 double ActionDrawLineParallel::getDistance()
index a3252c36248bbcbdf1831ba6a52fd4b8cbe09063..fe63d890e2b33de71491cde81b874e9f6dd7d0b8 100644 (file)
@@ -5,7 +5,7 @@
 #include "actioninterface.h"
 #include "vector.h"
 
-class RS_Entity;
+class Entity;
 
 /**
  * This action class can handle user events to draw parallel lines, arcs and
@@ -25,7 +25,7 @@ class ActionDrawLineParallel: public ActionInterface
                };
 
        public:
-               ActionDrawLineParallel(RS_EntityContainer & container, GraphicView & graphicView);
+               ActionDrawLineParallel(EntityContainer & container, GraphicView & graphicView);
                ~ActionDrawLineParallel();
 
                virtual RS2::ActionType rtti();
@@ -33,7 +33,7 @@ class ActionDrawLineParallel: public ActionInterface
                virtual void mouseMoveEvent(QMouseEvent * e);
                virtual void mouseReleaseEvent(QMouseEvent * e);
                virtual void updateMouseButtonHints();
-               virtual void commandEvent(RS_CommandEvent * e);
+               virtual void commandEvent(CommandEvent * e);
                virtual QStringList getAvailableCommands();
                virtual void hideOptions();
                virtual void showOptions();
@@ -46,9 +46,9 @@ class ActionDrawLineParallel: public ActionInterface
 
        private:
                /** Closest parallel. */
-               RS_Entity * parallel;
+               Entity * parallel;
                /** Data of new line */
-               RS_LineData data;
+               LineData data;
                /** Distance of the parallel. */
                double distance;
                /** Number of parallels. */
@@ -56,7 +56,7 @@ class ActionDrawLineParallel: public ActionInterface
                /** Coordinate of the mouse. */
                Vector coord;
                /** Original entity. */
-               RS_Entity * entity;
+               Entity * entity;
 };
 
 #endif // __ACTIONDRAWLINEPARALLEL_H__
index 21cc7ebee1f058fccef387ee860d87970b89f9d2..f34f376186b1a7963ffefef78d07ff87b2da804a 100644 (file)
@@ -24,7 +24,7 @@
 #include "preview.h"
 
 ActionDrawLineParallelThrough::ActionDrawLineParallelThrough(
-       RS_EntityContainer & container, GraphicView & graphicView):
+       EntityContainer & container, GraphicView & graphicView):
        ActionInterface("Draw Parallels", container, graphicView)
 {
        parallel = NULL;
@@ -50,18 +50,18 @@ void ActionDrawLineParallelThrough::trigger()
 
        if (entity)
        {
-               RS_Creation creation(container, graphicView);
-               RS_Entity * e = creation.createParallelThrough(coord, number, entity);
+               Creation creation(container, graphicView);
+               Entity * e = creation.createParallelThrough(coord, number, entity);
 
                if (!e)
-                       RS_DEBUG->print("ActionDrawLineParallelThrough::trigger:"
+                       DEBUG->print("ActionDrawLineParallelThrough::trigger:"
                                " No parallels added\n");
        }
 }
 
 void ActionDrawLineParallelThrough::mouseMoveEvent(QMouseEvent * e)
 {
-       RS_DEBUG->print("ActionDrawLineParallelThrough::mouseMoveEvent begin");
+       DEBUG->print("ActionDrawLineParallelThrough::mouseMoveEvent begin");
 
        switch (getStatus())
        {
@@ -75,7 +75,7 @@ void ActionDrawLineParallelThrough::mouseMoveEvent(QMouseEvent * e)
                deletePreview();
                clearPreview();
 
-//             RS_Creation creation(preview, NULL, false);
+//             Creation creation(preview, NULL, false);
 //             creation.createParallelThrough(coord, number, entity);
 
                drawPreview();
@@ -86,7 +86,7 @@ void ActionDrawLineParallelThrough::mouseMoveEvent(QMouseEvent * e)
                break;
        }
 
-       RS_DEBUG->print("ActionDrawLineParallelThrough::mouseMoveEvent end");
+       DEBUG->print("ActionDrawLineParallelThrough::mouseMoveEvent end");
 }
 
 void ActionDrawLineParallelThrough::mouseReleaseEvent(QMouseEvent * e)
@@ -158,19 +158,19 @@ void ActionDrawLineParallelThrough::updateMouseButtonHints()
        switch (getStatus())
        {
        case SetEntity:
-               RS_DIALOGFACTORY->updateMouseWidget(tr("Select entity"), tr("Cancel"));
+               DIALOGFACTORY->updateMouseWidget(tr("Select entity"), tr("Cancel"));
                break;
 
        case SetPos:
-               RS_DIALOGFACTORY->updateMouseWidget(tr("Specify through point"), tr("Back"));
+               DIALOGFACTORY->updateMouseWidget(tr("Specify through point"), tr("Back"));
                break;
 
        case SetNumber:
-               RS_DIALOGFACTORY->updateMouseWidget(tr("Number:"), tr("Back"));
+               DIALOGFACTORY->updateMouseWidget(tr("Number:"), tr("Back"));
                break;
 
        default:
-               RS_DIALOGFACTORY->updateMouseWidget("", "");
+               DIALOGFACTORY->updateMouseWidget("", "");
                break;
        }
 }
@@ -178,23 +178,23 @@ void ActionDrawLineParallelThrough::updateMouseButtonHints()
 void ActionDrawLineParallelThrough::showOptions()
 {
        ActionInterface::showOptions();
-       RS_DIALOGFACTORY->requestOptions(this, true);
+       DIALOGFACTORY->requestOptions(this, true);
        updateMouseButtonHints();
 }
 
 void ActionDrawLineParallelThrough::hideOptions()
 {
        ActionInterface::hideOptions();
-       RS_DIALOGFACTORY->requestOptions(this, false);
+       DIALOGFACTORY->requestOptions(this, false);
 }
 
-void ActionDrawLineParallelThrough::commandEvent(RS_CommandEvent * e)
+void ActionDrawLineParallelThrough::commandEvent(CommandEvent * e)
 {
        QString c = e->getCommand().toLower();
 
        if (checkCommand("help", c))
        {
-               RS_DIALOGFACTORY->commandMessage(msgAvailableCommands()
+               DIALOGFACTORY->commandMessage(msgAvailableCommands()
                        + getAvailableCommands().join(", "));
                return;
        }
@@ -224,12 +224,12 @@ void ActionDrawLineParallelThrough::commandEvent(RS_CommandEvent * e)
                        if (n > 0 && n < 100)
                                number = n;
                        else
-                               RS_DIALOGFACTORY->commandMessage(tr("Not a valid number. "
+                               DIALOGFACTORY->commandMessage(tr("Not a valid number. "
                                                "Try 1..99"));
                }
                else
-                       RS_DIALOGFACTORY->commandMessage(tr("Not a valid expression"));
-               RS_DIALOGFACTORY->requestOptions(this, true, true);
+                       DIALOGFACTORY->commandMessage(tr("Not a valid expression"));
+               DIALOGFACTORY->requestOptions(this, true, true);
                setStatus(lastStatus);
        }
                break;
@@ -264,9 +264,9 @@ void ActionDrawLineParallelThrough::updateMouseCursor()
 void ActionDrawLineParallelThrough::updateToolBar()
 {
        if (getStatus() == SetPos && !isFinished())
-               RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
+               DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
        else
-               RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarLines);
+               DIALOGFACTORY->requestToolBar(RS2::ToolBarLines);
 }
 
 int ActionDrawLineParallelThrough::getNumber()
index a3205d711da0448c228d21191edb94d5277da5b4..80ac09cb38bd501e836dc6d935596cf9389009d6 100644 (file)
@@ -5,7 +5,7 @@
 #include "actioninterface.h"
 #include "vector.h"
 
-class RS_Entity;
+class Entity;
 
 /**
  * This action class can handle user events to draw parallel lines, arcs and
@@ -24,7 +24,7 @@ class ActionDrawLineParallelThrough: public ActionInterface
                };
 
        public:
-               ActionDrawLineParallelThrough(RS_EntityContainer & container, GraphicView & graphicView);
+               ActionDrawLineParallelThrough(EntityContainer & container, GraphicView & graphicView);
                ~ActionDrawLineParallelThrough();
 
                virtual RS2::ActionType rtti();
@@ -33,7 +33,7 @@ class ActionDrawLineParallelThrough: public ActionInterface
                virtual void mouseReleaseEvent(QMouseEvent * e);
                virtual void updateMouseButtonHints();
                virtual void coordinateEvent(Vector * e);
-               virtual void commandEvent(RS_CommandEvent * e);
+               virtual void commandEvent(CommandEvent * e);
                virtual QStringList getAvailableCommands();
                virtual void hideOptions();
                virtual void showOptions();
@@ -44,15 +44,15 @@ class ActionDrawLineParallelThrough: public ActionInterface
 
        private:
                /** Closest parallel. */
-               RS_Entity * parallel;
+               Entity * parallel;
                /** Data of new line */
-               RS_LineData data;
+               LineData data;
                /** Number of parallels. */
                int number;
                /** Coordinate of the mouse. */
                Vector coord;
                /** Original entity. */
-               RS_Entity * entity;
+               Entity * entity;
                /** Last status before entering length or number. */
                Status lastStatus;
 };
index ea57975f2539553fab891a053cfb065194734198..a260e441ece99ae8f4c8bca2b426cda93b3818bb 100644 (file)
@@ -23,7 +23,7 @@
 #include "graphicview.h"
 #include "preview.h"
 
-ActionDrawLinePolygon::ActionDrawLinePolygon(RS_EntityContainer & container,
+ActionDrawLinePolygon::ActionDrawLinePolygon(EntityContainer & container,
        GraphicView & graphicView): ActionInterface("Draw Polygons",
        container, graphicView)
 {
@@ -50,16 +50,16 @@ void ActionDrawLinePolygon::trigger()
 //     deletePreview();
 //     clearPreview();
 
-       RS_Creation creation(container, graphicView);
+       Creation creation(container, graphicView);
        bool ok = creation.createPolygon(center, corner, number);
 
        if (!ok)
-               RS_DEBUG->print("ActionDrawLinePolygon::trigger: No polygon added\n");
+               DEBUG->print("ActionDrawLinePolygon::trigger: No polygon added\n");
 }
 
 void ActionDrawLinePolygon::mouseMoveEvent(QMouseEvent * e)
 {
-       RS_DEBUG->print("ActionDrawLinePolygon::mouseMoveEvent begin");
+       DEBUG->print("ActionDrawLinePolygon::mouseMoveEvent begin");
 
        Vector mouse = snapPoint(e);
 
@@ -76,7 +76,7 @@ void ActionDrawLinePolygon::mouseMoveEvent(QMouseEvent * e)
                        deletePreview();
                        clearPreview();
 
-//                     RS_Creation creation(preview, NULL, false);
+//                     Creation creation(preview, NULL, false);
 //                     creation.createPolygon(center, corner, number);
 
                        drawPreview();
@@ -131,25 +131,25 @@ void ActionDrawLinePolygon::coordinateEvent(Vector * e)
 
 void ActionDrawLinePolygon::updateMouseButtonHints()
 {
-       if (RS_DIALOGFACTORY != NULL)
+       if (DIALOGFACTORY != NULL)
        {
                switch (getStatus())
                {
                case SetCenter:
-                       RS_DIALOGFACTORY->updateMouseWidget(tr("Specify center"),
+                       DIALOGFACTORY->updateMouseWidget(tr("Specify center"),
                                "");
                        break;
 
                case SetCorner:
-                       RS_DIALOGFACTORY->updateMouseWidget(tr("Specify a corner"), "");
+                       DIALOGFACTORY->updateMouseWidget(tr("Specify a corner"), "");
                        break;
 
                case SetNumber:
-                       RS_DIALOGFACTORY->updateMouseWidget(tr("Enter number:"), "");
+                       DIALOGFACTORY->updateMouseWidget(tr("Enter number:"), "");
                        break;
 
                default:
-                       RS_DIALOGFACTORY->updateMouseWidget("", "");
+                       DIALOGFACTORY->updateMouseWidget("", "");
                        break;
                }
        }
@@ -159,26 +159,26 @@ void ActionDrawLinePolygon::showOptions()
 {
        ActionInterface::showOptions();
 
-       if (RS_DIALOGFACTORY != NULL)
-               RS_DIALOGFACTORY->requestOptions(this, true);
+       if (DIALOGFACTORY != NULL)
+               DIALOGFACTORY->requestOptions(this, true);
 }
 
 void ActionDrawLinePolygon::hideOptions()
 {
        ActionInterface::hideOptions();
 
-       if (RS_DIALOGFACTORY != NULL)
-               RS_DIALOGFACTORY->requestOptions(this, false);
+       if (DIALOGFACTORY != NULL)
+               DIALOGFACTORY->requestOptions(this, false);
 }
 
-void ActionDrawLinePolygon::commandEvent(RS_CommandEvent * e)
+void ActionDrawLinePolygon::commandEvent(CommandEvent * e)
 {
        QString c = e->getCommand().toLower();
 
        if (checkCommand("help", c))
        {
-               if (RS_DIALOGFACTORY != NULL)
-                       RS_DIALOGFACTORY->commandMessage(msgAvailableCommands()
+               if (DIALOGFACTORY != NULL)
+                       DIALOGFACTORY->commandMessage(msgAvailableCommands()
                                + getAvailableCommands().join(", "));
                return;
        }
@@ -206,16 +206,16 @@ void ActionDrawLinePolygon::commandEvent(RS_CommandEvent * e)
                {
                        if (n > 0 && n < 10000)
                                number = n;
-                       else if (RS_DIALOGFACTORY != NULL)
-                               RS_DIALOGFACTORY->commandMessage(tr("Not a valid number. "
+                       else if (DIALOGFACTORY != NULL)
+                               DIALOGFACTORY->commandMessage(tr("Not a valid number. "
                                                "Try 1..9999"));
 
                }
-               else if (RS_DIALOGFACTORY != NULL)
-                       RS_DIALOGFACTORY->commandMessage(tr("Not a valid expression"));
+               else if (DIALOGFACTORY != NULL)
+                       DIALOGFACTORY->commandMessage(tr("Not a valid expression"));
 
-               if (RS_DIALOGFACTORY != NULL)
-                       RS_DIALOGFACTORY->requestOptions(this, true, true);
+               if (DIALOGFACTORY != NULL)
+                       DIALOGFACTORY->requestOptions(this, true, true);
                setStatus(lastStatus);
        }
        break;
@@ -250,12 +250,12 @@ void ActionDrawLinePolygon::updateMouseCursor()
 
 void ActionDrawLinePolygon::updateToolBar()
 {
-       if (RS_DIALOGFACTORY != NULL)
+       if (DIALOGFACTORY != NULL)
        {
                if (!isFinished())
-                       RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
+                       DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
                else
-                       RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarLines);
+                       DIALOGFACTORY->requestToolBar(RS2::ToolBarLines);
        }
 }
 
index 60150f4f8eac1c4732fe394177926869e4a774a7..f46ef9839bda20e59774a0a7eb4180bc5cf8c7d4 100644 (file)
@@ -20,7 +20,7 @@ class ActionDrawLinePolygon: public ActionInterface
                };
 
        public:
-               ActionDrawLinePolygon(RS_EntityContainer & container, GraphicView & graphicView);
+               ActionDrawLinePolygon(EntityContainer & container, GraphicView & graphicView);
                ~ActionDrawLinePolygon();
 
                virtual RS2::ActionType rtti();
@@ -29,7 +29,7 @@ class ActionDrawLinePolygon: public ActionInterface
                virtual void mouseReleaseEvent(QMouseEvent * e);
                virtual void updateMouseButtonHints();
                virtual void coordinateEvent(Vector * e);
-               virtual void commandEvent(RS_CommandEvent * e);
+               virtual void commandEvent(CommandEvent * e);
                virtual QStringList getAvailableCommands();
                virtual void hideOptions();
                virtual void showOptions();
index 3fb68be48fdcae4a2264264f34198ac2ca57a54d..f4e1fa16a589136af7cbfb080dd96bba14cad880 100644 (file)
@@ -23,7 +23,7 @@
 #include "graphicview.h"
 #include "preview.h"
 
-ActionDrawLinePolygon2::ActionDrawLinePolygon2(RS_EntityContainer & container, GraphicView & graphicView): ActionInterface("Draw Polygons",
+ActionDrawLinePolygon2::ActionDrawLinePolygon2(EntityContainer & container, GraphicView & graphicView): ActionInterface("Draw Polygons",
                container, graphicView)
 {
        corner1 = Vector(false);
@@ -49,16 +49,16 @@ void ActionDrawLinePolygon2::trigger()
        deletePreview();
        clearPreview();
 
-       RS_Creation creation(container, graphicView);
+       Creation creation(container, graphicView);
        bool ok = creation.createPolygon2(corner1, corner2, number);
 
        if (!ok)
-               RS_DEBUG->print("ActionDrawLinePolygon2::trigger: No polygon added\n");
+               DEBUG->print("ActionDrawLinePolygon2::trigger: No polygon added\n");
 }
 
 void ActionDrawLinePolygon2::mouseMoveEvent(QMouseEvent * e)
 {
-       RS_DEBUG->print("ActionDrawLinePolygon2::mouseMoveEvent begin");
+       DEBUG->print("ActionDrawLinePolygon2::mouseMoveEvent begin");
 
        Vector mouse = snapPoint(e);
 
@@ -75,7 +75,7 @@ void ActionDrawLinePolygon2::mouseMoveEvent(QMouseEvent * e)
                        deletePreview();
                        clearPreview();
 
-//                     RS_Creation creation(preview, NULL, false);
+//                     Creation creation(preview, NULL, false);
 //                     creation.createPolygon2(corner1, corner2, number);
 
                        drawPreview();
@@ -130,26 +130,26 @@ void ActionDrawLinePolygon2::coordinateEvent(Vector * e)
 
 void ActionDrawLinePolygon2::updateMouseButtonHints()
 {
-       if (RS_DIALOGFACTORY != NULL)
+       if (DIALOGFACTORY != NULL)
        {
                switch (getStatus())
                {
                case SetCorner1:
-                       RS_DIALOGFACTORY->updateMouseWidget(tr("Specify first corner"),
+                       DIALOGFACTORY->updateMouseWidget(tr("Specify first corner"),
                                tr("Cancel"));
                        break;
 
                case SetCorner2:
-                       RS_DIALOGFACTORY->updateMouseWidget(tr("Specify second corner"),
+                       DIALOGFACTORY->updateMouseWidget(tr("Specify second corner"),
                                tr("Back"));
                        break;
 
                case SetNumber:
-                       RS_DIALOGFACTORY->updateMouseWidget(tr("Number:"), tr("Back"));
+                       DIALOGFACTORY->updateMouseWidget(tr("Number:"), tr("Back"));
                        break;
 
                default:
-                       RS_DIALOGFACTORY->updateMouseWidget("", "");
+                       DIALOGFACTORY->updateMouseWidget("", "");
                        break;
                }
        }
@@ -159,26 +159,26 @@ void ActionDrawLinePolygon2::showOptions()
 {
        ActionInterface::showOptions();
 
-       if (RS_DIALOGFACTORY != NULL)
-               RS_DIALOGFACTORY->requestOptions(this, true);
+       if (DIALOGFACTORY != NULL)
+               DIALOGFACTORY->requestOptions(this, true);
 }
 
 void ActionDrawLinePolygon2::hideOptions()
 {
        ActionInterface::hideOptions();
 
-       if (RS_DIALOGFACTORY != NULL)
-               RS_DIALOGFACTORY->requestOptions(this, false);
+       if (DIALOGFACTORY != NULL)
+               DIALOGFACTORY->requestOptions(this, false);
 }
 
-void ActionDrawLinePolygon2::commandEvent(RS_CommandEvent * e)
+void ActionDrawLinePolygon2::commandEvent(CommandEvent * e)
 {
        QString c = e->getCommand().toLower();
 
        if (checkCommand("help", c))
        {
-               if (RS_DIALOGFACTORY != NULL)
-                       RS_DIALOGFACTORY->commandMessage(msgAvailableCommands()
+               if (DIALOGFACTORY != NULL)
+                       DIALOGFACTORY->commandMessage(msgAvailableCommands()
                                + getAvailableCommands().join(", "));
                return;
        }
@@ -206,16 +206,16 @@ void ActionDrawLinePolygon2::commandEvent(RS_CommandEvent * e)
                {
                        if (n > 0 && n < 10000)
                                number = n;
-                       else if (RS_DIALOGFACTORY != NULL)
-                               RS_DIALOGFACTORY->commandMessage(tr("Not a valid number. "
+                       else if (DIALOGFACTORY != NULL)
+                               DIALOGFACTORY->commandMessage(tr("Not a valid number. "
                                                "Try 1..9999"));
 
                }
-               else if (RS_DIALOGFACTORY != NULL)
-                       RS_DIALOGFACTORY->commandMessage(tr("Not a valid expression."));
+               else if (DIALOGFACTORY != NULL)
+                       DIALOGFACTORY->commandMessage(tr("Not a valid expression."));
 
-               if (RS_DIALOGFACTORY != NULL)
-                       RS_DIALOGFACTORY->requestOptions(this, true, true);
+               if (DIALOGFACTORY != NULL)
+                       DIALOGFACTORY->requestOptions(this, true, true);
                setStatus(lastStatus);
        }
        break;
@@ -250,12 +250,12 @@ void ActionDrawLinePolygon2::updateMouseCursor()
 
 void ActionDrawLinePolygon2::updateToolBar()
 {
-       if (RS_DIALOGFACTORY != NULL)
+       if (DIALOGFACTORY != NULL)
        {
                if (!isFinished())
-                       RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
+                       DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
                else
-                       RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarLines);
+                       DIALOGFACTORY->requestToolBar(RS2::ToolBarLines);
        }
 }
 
index 8355f1b43d239469c5c01282a1ca31281e7767ea..4dcdb89260f798f10b53072c661bf83f98f8548b 100644 (file)
@@ -20,7 +20,7 @@ class ActionDrawLinePolygon2: public ActionInterface
                };
 
        public:
-               ActionDrawLinePolygon2(RS_EntityContainer & container, GraphicView & graphicView);
+               ActionDrawLinePolygon2(EntityContainer & container, GraphicView & graphicView);
                ~ActionDrawLinePolygon2();
 
                virtual RS2::ActionType rtti();
@@ -29,7 +29,7 @@ class ActionDrawLinePolygon2: public ActionInterface
                virtual void mouseReleaseEvent(QMouseEvent * e);
                virtual void updateMouseButtonHints();
                virtual void coordinateEvent(Vector * e);
-               virtual void commandEvent(RS_CommandEvent * e);
+               virtual void commandEvent(CommandEvent * e);
                virtual QStringList getAvailableCommands();
                virtual void hideOptions();
                virtual void showOptions();
index 134a788091e3489adc96de931070266501c89edd..7b3d6a1d38c0c10461f5382e1c86bce2f8932e4c 100644 (file)
@@ -23,7 +23,7 @@
 #include "preview.h"
 
 ActionDrawLineRectangle::ActionDrawLineRectangle(
-       RS_EntityContainer & container, GraphicView & graphicView):
+       EntityContainer & container, GraphicView & graphicView):
        ActionInterface("Draw rectangles", container, graphicView)
 {
        reset();
@@ -36,7 +36,7 @@ ActionDrawLineRectangle::~ActionDrawLineRectangle()
 void ActionDrawLineRectangle::reset()
 {
        for(int i=0; i<4; i++)
-               data[i] = RS_LineData(Vector(false), Vector(false));
+               data[i] = LineData(Vector(false), Vector(false));
 }
 
 void ActionDrawLineRectangle::init(int status)
@@ -49,13 +49,13 @@ void ActionDrawLineRectangle::trigger()
 {
        ActionInterface::trigger();
 
-       RS_Line * line[4];
+       Line * line[4];
        preparePreview();
 
        // create and add rectangle:
        for(int i=0; i<4; i++)
        {
-               line[i] = new RS_Line(container, data[i]);
+               line[i] = new Line(container, data[i]);
                line[i]->setLayerToActive();
                line[i]->setPenToActive();
                container->addEntity(line[i]);
@@ -79,7 +79,7 @@ void ActionDrawLineRectangle::trigger()
        for(int i=0; i<4; i++)
        {
                graphicView->drawEntity(line[i]);
-               RS_DEBUG->print("ActionDrawLineRectangle::trigger(): line added: %d", line[i]->getId());
+               DEBUG->print("ActionDrawLineRectangle::trigger(): line added: %d", line[i]->getId());
        }
 
        graphicView->moveRelativeZero(corner2);
@@ -88,7 +88,7 @@ void ActionDrawLineRectangle::trigger()
 
 void ActionDrawLineRectangle::mouseMoveEvent(QMouseEvent * e)
 {
-       RS_DEBUG->print("ActionDrawLineRectangle::mouseMoveEvent begin");
+       DEBUG->print("ActionDrawLineRectangle::mouseMoveEvent begin");
 
        Vector mouse = snapPoint(e);
 
@@ -100,18 +100,18 @@ void ActionDrawLineRectangle::mouseMoveEvent(QMouseEvent * e)
 //             preparePreview();
 
 //             for(int i=0; i<4; i++)
-//                     preview->addEntity(new RS_Line(preview, data[i]));
+//                     preview->addEntity(new Line(preview, data[i]));
 
 //             drawPreview();
                preparePreview();
                graphicView->preview.clear();
 
                for(int i=0; i<4; i++)
-                       graphicView->preview.addEntity(new RS_Line(&(graphicView->preview), data[i]));
+                       graphicView->preview.addEntity(new Line(&(graphicView->preview), data[i]));
        }
 
        graphicView->redraw();
-       RS_DEBUG->print("ActionDrawLineRectangle::mouseMoveEvent end");
+       DEBUG->print("ActionDrawLineRectangle::mouseMoveEvent end");
 }
 
 void ActionDrawLineRectangle::mouseReleaseEvent(QMouseEvent * e)
@@ -135,10 +135,10 @@ void ActionDrawLineRectangle::mouseReleaseEvent(QMouseEvent * e)
 
 void ActionDrawLineRectangle::preparePreview()
 {
-       data[0] = RS_LineData(corner1, Vector(corner2.x, corner1.y));
-       data[1] = RS_LineData(Vector(corner2.x, corner1.y), corner2);
-       data[2] = RS_LineData(corner2, Vector(corner1.x, corner2.y));
-       data[3] = RS_LineData(Vector(corner1.x, corner2.y), corner1);
+       data[0] = LineData(corner1, Vector(corner2.x, corner1.y));
+       data[1] = LineData(Vector(corner2.x, corner1.y), corner2);
+       data[2] = LineData(corner2, Vector(corner1.x, corner2.y));
+       data[3] = LineData(Vector(corner1.x, corner2.y), corner1);
 }
 
 void ActionDrawLineRectangle::coordinateEvent(Vector * e)
@@ -167,14 +167,14 @@ void ActionDrawLineRectangle::coordinateEvent(Vector * e)
        }
 }
 
-void ActionDrawLineRectangle::commandEvent(RS_CommandEvent * e)
+void ActionDrawLineRectangle::commandEvent(CommandEvent * e)
 {
        QString c = e->getCommand().toLower();
 
        if (checkCommand("help", c))
        {
-               if (RS_DIALOGFACTORY)
-                       RS_DIALOGFACTORY->commandMessage(msgAvailableCommands()
+               if (DIALOGFACTORY)
+                       DIALOGFACTORY->commandMessage(msgAvailableCommands()
                                + getAvailableCommands().join(", "));
                return;
        }
@@ -188,20 +188,20 @@ QStringList ActionDrawLineRectangle::getAvailableCommands()
 
 void ActionDrawLineRectangle::updateMouseButtonHints()
 {
-       if (RS_DIALOGFACTORY)
+       if (DIALOGFACTORY)
        {
                switch (getStatus())
                {
                case SetCorner1:
-                       RS_DIALOGFACTORY->updateMouseWidget(tr("Specify first corner"), tr("Cancel"));
+                       DIALOGFACTORY->updateMouseWidget(tr("Specify first corner"), tr("Cancel"));
                        break;
 
                case SetCorner2:
-                       RS_DIALOGFACTORY->updateMouseWidget(tr("Specify second corner"), tr("Back"));
+                       DIALOGFACTORY->updateMouseWidget(tr("Specify second corner"), tr("Back"));
                        break;
 
                default:
-                       RS_DIALOGFACTORY->updateMouseWidget("", "");
+                       DIALOGFACTORY->updateMouseWidget("", "");
                        break;
                }
        }
@@ -214,11 +214,11 @@ void ActionDrawLineRectangle::updateMouseCursor()
 
 void ActionDrawLineRectangle::updateToolBar()
 {
-       if (RS_DIALOGFACTORY)
+       if (DIALOGFACTORY)
        {
                if (!isFinished())
-                       RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
+                       DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
                else
-                       RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarLines);
+                       DIALOGFACTORY->requestToolBar(RS2::ToolBarLines);
        }
 }
index 93eebd1c7e40fd928f9f037badc24e55d89337a6..ad687cc3711839f885ba13e41b3dbf92efc2bdae 100644 (file)
@@ -24,7 +24,7 @@ class ActionDrawLineRectangle: public ActionInterface
                };
 
        public:
-               ActionDrawLineRectangle(RS_EntityContainer & container, GraphicView & graphicView);
+               ActionDrawLineRectangle(EntityContainer & container, GraphicView & graphicView);
                ~ActionDrawLineRectangle();
 
                void reset();
@@ -34,7 +34,7 @@ class ActionDrawLineRectangle: public ActionInterface
                virtual void mouseReleaseEvent(QMouseEvent * e);
                void preparePreview();
                virtual void coordinateEvent(Vector * e);
-               virtual void commandEvent(RS_CommandEvent * e);
+               virtual void commandEvent(CommandEvent * e);
                virtual QStringList getAvailableCommands();
                virtual void updateMouseButtonHints();
                virtual void updateMouseCursor();
@@ -42,7 +42,7 @@ class ActionDrawLineRectangle: public ActionInterface
 
        protected:
                /** Line data for the 4 lines. */
-               RS_LineData data[4];
+               LineData data[4];
                /** 1st corner. */
                Vector corner1;
                /** 2nd corner. */
index 6d3c2f6ac58540727af909848f001865aff5a616..260adc374dc1b2312021b16ff6cc39f46fe9789f 100644 (file)
@@ -23,7 +23,7 @@
 #include "graphicview.h"
 #include "preview.h"
 
-ActionDrawLineRelAngle::ActionDrawLineRelAngle(RS_EntityContainer & container,
+ActionDrawLineRelAngle::ActionDrawLineRelAngle(EntityContainer & container,
        GraphicView & graphicView, double angle, bool fixedAngle):
        ActionInterface("Draw Lines with relative angles", container, graphicView)
 {
@@ -51,13 +51,13 @@ void ActionDrawLineRelAngle::trigger()
        deletePreview();
        clearPreview();
 
-       RS_Creation creation(container, graphicView);
+       Creation creation(container, graphicView);
        creation.createLineRelAngle(pos, entity, angle, length);
 }
 
 void ActionDrawLineRelAngle::mouseMoveEvent(QMouseEvent * e)
 {
-       RS_DEBUG->print("ActionDrawLineRelAngle::mouseMoveEvent begin");
+       DEBUG->print("ActionDrawLineRelAngle::mouseMoveEvent begin");
        Vector mouse(graphicView->toGraphX(e->x()), graphicView->toGraphY(e->y()));
 
        switch (getStatus())
@@ -73,7 +73,7 @@ void ActionDrawLineRelAngle::mouseMoveEvent(QMouseEvent * e)
                deletePreview();
                clearPreview();
 
-//             RS_Creation creation(preview, NULL, false);
+//             Creation creation(preview, NULL, false);
 //             creation.createLineRelAngle(pos, entity, angle, length);
 
                drawPreview();
@@ -84,7 +84,7 @@ void ActionDrawLineRelAngle::mouseMoveEvent(QMouseEvent * e)
                break;
        }
 
-       RS_DEBUG->print("ActionDrawLineRelAngle::mouseMoveEvent end");
+       DEBUG->print("ActionDrawLineRelAngle::mouseMoveEvent end");
 }
 
 void ActionDrawLineRelAngle::mouseReleaseEvent(QMouseEvent * e)
@@ -95,7 +95,7 @@ void ActionDrawLineRelAngle::mouseReleaseEvent(QMouseEvent * e)
                {
                case SetEntity:
                {
-                       RS_Entity * en = catchEntity(e, RS2::ResolveAll);
+                       Entity * en = catchEntity(e, RS2::ResolveAll);
 
                        if (en != NULL
                            && (en->rtti() == RS2::EntityLine
@@ -156,14 +156,14 @@ void ActionDrawLineRelAngle::coordinateEvent(Vector * e)
        }
 }
 
-void ActionDrawLineRelAngle::commandEvent(RS_CommandEvent * e)
+void ActionDrawLineRelAngle::commandEvent(CommandEvent * e)
 {
        QString c = e->getCommand().toLower();
 
        if (checkCommand("help", c))
        {
-               if (RS_DIALOGFACTORY != NULL)
-                       RS_DIALOGFACTORY->commandMessage(msgAvailableCommands()
+               if (DIALOGFACTORY != NULL)
+                       DIALOGFACTORY->commandMessage(msgAvailableCommands()
                                + getAvailableCommands().join(", "));
                return;
        }
@@ -191,15 +191,15 @@ void ActionDrawLineRelAngle::commandEvent(RS_CommandEvent * e)
        case SetAngle:
        {
                bool ok;
-               double a = RS_Math::eval(c, &ok);
+               double a = Math::eval(c, &ok);
 
                if (ok)
-                       angle = RS_Math::deg2rad(a);
-               else if (RS_DIALOGFACTORY)
-                       RS_DIALOGFACTORY->commandMessage(tr("Not a valid expression"));
+                       angle = Math::deg2rad(a);
+               else if (DIALOGFACTORY)
+                       DIALOGFACTORY->commandMessage(tr("Not a valid expression"));
 
-               if (RS_DIALOGFACTORY)
-                       RS_DIALOGFACTORY->requestOptions(this, true, true);
+               if (DIALOGFACTORY)
+                       DIALOGFACTORY->requestOptions(this, true, true);
 
                setStatus(SetPos);
        }
@@ -208,15 +208,15 @@ void ActionDrawLineRelAngle::commandEvent(RS_CommandEvent * e)
        case SetLength:
        {
                bool ok;
-               double l = RS_Math::eval(c, &ok);
+               double l = Math::eval(c, &ok);
 
                if (ok)
                        length = l;
-               else if (RS_DIALOGFACTORY)
-                       RS_DIALOGFACTORY->commandMessage(tr("Not a valid expression"));
+               else if (DIALOGFACTORY)
+                       DIALOGFACTORY->commandMessage(tr("Not a valid expression"));
 
-               if (RS_DIALOGFACTORY)
-                       RS_DIALOGFACTORY->requestOptions(this, true, true);
+               if (DIALOGFACTORY)
+                       DIALOGFACTORY->requestOptions(this, true, true);
 
                setStatus(SetPos);
        }
@@ -249,22 +249,22 @@ QStringList ActionDrawLineRelAngle::getAvailableCommands()
 
 void ActionDrawLineRelAngle::updateMouseButtonHints()
 {
-       if (RS_DIALOGFACTORY)
+       if (DIALOGFACTORY)
        {
                switch (getStatus())
                {
                case SetEntity:
-                       RS_DIALOGFACTORY->updateMouseWidget(tr("Select base entity"),
+                       DIALOGFACTORY->updateMouseWidget(tr("Select base entity"),
                                tr("Cancel"));
                        break;
 
                case SetPos:
-                       RS_DIALOGFACTORY->updateMouseWidget(tr("Specify position"),
+                       DIALOGFACTORY->updateMouseWidget(tr("Specify position"),
                                tr("Back"));
                        break;
 
                default:
-                       RS_DIALOGFACTORY->updateMouseWidget("", "");
+                       DIALOGFACTORY->updateMouseWidget("", "");
                        break;
                }
        }
@@ -274,16 +274,16 @@ void ActionDrawLineRelAngle::showOptions()
 {
        ActionInterface::showOptions();
 
-       if (RS_DIALOGFACTORY)
-               RS_DIALOGFACTORY->requestOptions(this, true);
+       if (DIALOGFACTORY)
+               DIALOGFACTORY->requestOptions(this, true);
 }
 
 void ActionDrawLineRelAngle::hideOptions()
 {
        ActionInterface::hideOptions();
 
-       if (RS_DIALOGFACTORY)
-               RS_DIALOGFACTORY->requestOptions(this, false);
+       if (DIALOGFACTORY)
+               DIALOGFACTORY->requestOptions(this, false);
 }
 
 void ActionDrawLineRelAngle::updateMouseCursor()
@@ -293,12 +293,12 @@ void ActionDrawLineRelAngle::updateMouseCursor()
 
 void ActionDrawLineRelAngle::updateToolBar()
 {
-       if (RS_DIALOGFACTORY)
+       if (DIALOGFACTORY)
        {
                if (!isFinished())
-                       RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
+                       DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
                else
-                       RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarLines);
+                       DIALOGFACTORY->requestToolBar(RS2::ToolBarLines);
        }
 }
 
index 8f8f27a72e634d1666f7adc7e7ee44d83e4440b9..3aed2bc3285099b98eadd715a3e60b42f5f461a3 100644 (file)
@@ -5,7 +5,7 @@
 #include "actioninterface.h"
 #include "vector.h"
 
-class RS_Entity;
+class Entity;
 
 /**
  * This action class can handle user events to draw lines with a given angle
@@ -25,7 +25,7 @@ class ActionDrawLineRelAngle: public ActionInterface
                };
 
        public:
-               ActionDrawLineRelAngle(RS_EntityContainer & container, GraphicView & graphicView, double angle = 0.0, bool fixedAngle = false);
+               ActionDrawLineRelAngle(EntityContainer & container, GraphicView & graphicView, double angle = 0.0, bool fixedAngle = false);
                ~ActionDrawLineRelAngle();
 
                virtual RS2::ActionType rtti();
@@ -33,7 +33,7 @@ class ActionDrawLineRelAngle: public ActionInterface
                virtual void mouseMoveEvent(QMouseEvent * e);
                virtual void mouseReleaseEvent(QMouseEvent * e);
                virtual void coordinateEvent(Vector * e);
-               virtual void commandEvent(RS_CommandEvent * e);
+               virtual void commandEvent(CommandEvent * e);
                virtual QStringList getAvailableCommands();
                virtual void hideOptions();
                virtual void showOptions();
@@ -48,11 +48,11 @@ class ActionDrawLineRelAngle: public ActionInterface
 
        private:
                /** Chosen entity */
-               RS_Entity * entity;
+               Entity * entity;
                /** Chosen position */
                Vector pos;
                /** Data of new line */
-               RS_LineData data;
+               LineData data;
                /**
                 * Line angle.
                 */
index 28c1ea1c68ee007681cc574564cedf0d729e2c94..045ae6de44c081794612a71a7af7c9938ba03ef9 100644 (file)
@@ -22,7 +22,7 @@
 #include "graphicview.h"
 #include "preview.h"
 
-ActionDrawLineTangent1::ActionDrawLineTangent1(RS_EntityContainer & container, GraphicView & graphicView): ActionInterface("Draw Tangents 1",
+ActionDrawLineTangent1::ActionDrawLineTangent1(EntityContainer & container, GraphicView & graphicView): ActionInterface("Draw Tangents 1",
                container, graphicView)
 {
        tangent = NULL;
@@ -40,8 +40,8 @@ void ActionDrawLineTangent1::trigger()
 
        if (tangent)
        {
-               RS_Entity * newEntity = NULL;
-               newEntity = new RS_Line(container, tangent->getData());
+               Entity * newEntity = NULL;
+               newEntity = new Line(container, tangent->getData());
 
                if (newEntity)
                {
@@ -67,13 +67,13 @@ void ActionDrawLineTangent1::trigger()
                tangent = NULL;
        }
        else
-               RS_DEBUG->print("ActionDrawLineTangent1::trigger:"
+               DEBUG->print("ActionDrawLineTangent1::trigger:"
                        " Entity is NULL\n");
 }
 
 void ActionDrawLineTangent1::mouseMoveEvent(QMouseEvent * e)
 {
-       RS_DEBUG->print("ActionDrawLineTangent1::mouseMoveEvent begin");
+       DEBUG->print("ActionDrawLineTangent1::mouseMoveEvent begin");
        Vector mouse(graphicView->toGraphX(e->x()), graphicView->toGraphY(e->y()));
 
        switch (getStatus())
@@ -84,22 +84,22 @@ void ActionDrawLineTangent1::mouseMoveEvent(QMouseEvent * e)
 
        case SetCircle:
        {
-               RS_Entity * en = catchEntity(e, RS2::ResolveAll);
+               Entity * en = catchEntity(e, RS2::ResolveAll);
 
                if (en && (en->rtti() == RS2::EntityCircle
                        || en->rtti() == RS2::EntityArc
                        || en->rtti() == RS2::EntityEllipse))
                {
                        circle = en;
-                       RS_Creation creation(NULL, NULL);
-                       RS_Line * t = creation.createTangent1(mouse, point, circle);
+                       Creation creation(NULL, NULL);
+                       Line * t = creation.createTangent1(mouse, point, circle);
 
                        if (t)
                        {
                                if (tangent)
                                        delete tangent;
 
-                               tangent = (RS_Line *)t->clone();
+                               tangent = (Line *)t->clone();
 
                                deletePreview();
                                clearPreview();
@@ -114,7 +114,7 @@ void ActionDrawLineTangent1::mouseMoveEvent(QMouseEvent * e)
                break;
        }
 
-       RS_DEBUG->print("ActionDrawLineTangent1::mouseMoveEvent end");
+       DEBUG->print("ActionDrawLineTangent1::mouseMoveEvent end");
 }
 
 void ActionDrawLineTangent1::mouseReleaseEvent(QMouseEvent * e)
@@ -165,21 +165,21 @@ void ActionDrawLineTangent1::coordinateEvent(Vector * e)
 
 void ActionDrawLineTangent1::updateMouseButtonHints()
 {
-       if (RS_DIALOGFACTORY != NULL)
+       if (DIALOGFACTORY != NULL)
        {
                switch (getStatus())
                {
                case SetPoint:
-                       RS_DIALOGFACTORY->updateMouseWidget(tr("Specify point"), tr("Cancel"));
+                       DIALOGFACTORY->updateMouseWidget(tr("Specify point"), tr("Cancel"));
                        break;
 
                case SetCircle:
-                       RS_DIALOGFACTORY->updateMouseWidget(tr("Select circle, arc or ellipse"),
+                       DIALOGFACTORY->updateMouseWidget(tr("Select circle, arc or ellipse"),
                                tr("Back"));
                        break;
 
                default:
-                       RS_DIALOGFACTORY->updateMouseWidget("", "");
+                       DIALOGFACTORY->updateMouseWidget("", "");
                        break;
                }
        }
@@ -192,11 +192,11 @@ void ActionDrawLineTangent1::updateMouseCursor()
 
 void ActionDrawLineTangent1::updateToolBar()
 {
-       if (RS_DIALOGFACTORY)
+       if (DIALOGFACTORY)
        {
                if (!isFinished())
-                       RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
+                       DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
                else
-                       RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarLines);
+                       DIALOGFACTORY->requestToolBar(RS2::ToolBarLines);
        }
 }
index 744291ff65c925fc2e61235cf8a51eeb0defde51..85f097dacd926cac9429d7e625a68017d15354df 100644 (file)
@@ -5,8 +5,8 @@
 #include "actioninterface.h"
 #include "vector.h"
 
-class RS_Line;
-class RS_Entity;
+class Line;
+class Entity;
 
 /**
  * This action class can handle user events to draw tangents from points
@@ -24,7 +24,7 @@ class ActionDrawLineTangent1: public ActionInterface
                };
 
        public:
-               ActionDrawLineTangent1(RS_EntityContainer & container, GraphicView & graphicView);
+               ActionDrawLineTangent1(EntityContainer & container, GraphicView & graphicView);
                ~ActionDrawLineTangent1();
 
                virtual void trigger();
@@ -37,13 +37,13 @@ class ActionDrawLineTangent1: public ActionInterface
 
        private:
                /** Closest tangent. */
-               RS_Line * tangent;
+               Line * tangent;
                /** Chosen startpoint */
                Vector point;
                /** Chosen entity */
-               RS_Entity * circle;
+               Entity * circle;
                /** Data of new tangent */
-               RS_LineData data;
+               LineData data;
 };
 
 #endif // __ACTIONDRAWLINETANGENT1_H__
index 7cf85862702f785e7d589054ded82a1f31aafdc3..4397560b1ac441e08ed17cacb897adad792573c7 100644 (file)
@@ -23,7 +23,7 @@
 #include "preview.h"
 
 ActionDrawLineTangent2::ActionDrawLineTangent2(
-       RS_EntityContainer & container, GraphicView & graphicView):
+       EntityContainer & container, GraphicView & graphicView):
        ActionInterface("Draw Tangents 2", container, graphicView)
 {
        tangent = NULL;
@@ -41,8 +41,8 @@ void ActionDrawLineTangent2::trigger()
 
        if (tangent != NULL)
        {
-               RS_Entity * newEntity = NULL;
-               newEntity = new RS_Line(container, tangent->getData());
+               Entity * newEntity = NULL;
+               newEntity = new Line(container, tangent->getData());
 
                if (newEntity != NULL)
                {
@@ -65,20 +65,20 @@ void ActionDrawLineTangent2::trigger()
                tangent = NULL;
        }
        else
-               RS_DEBUG->print("ActionDrawLineTangent2::trigger:"
+               DEBUG->print("ActionDrawLineTangent2::trigger:"
                        " Entity is NULL\n");
 }
 
 void ActionDrawLineTangent2::mouseMoveEvent(QMouseEvent * e)
 {
-       RS_DEBUG->print("ActionDrawLineTangent2::mouseMoveEvent begin");
+       DEBUG->print("ActionDrawLineTangent2::mouseMoveEvent begin");
 
        Vector mouse(graphicView->toGraphX(e->x()), graphicView->toGraphY(e->y()));
 
        switch (getStatus())
        {
        case SetCircle1: {
-               RS_Entity * en = catchEntity(e, RS2::ResolveAll);
+               Entity * en = catchEntity(e, RS2::ResolveAll);
 
                if (en != NULL && (en->rtti() == RS2::EntityCircle
                                   || en->rtti() == RS2::EntityArc))
@@ -88,21 +88,21 @@ void ActionDrawLineTangent2::mouseMoveEvent(QMouseEvent * e)
 
        case SetCircle2:
        {
-               RS_Entity * en = catchEntity(e, RS2::ResolveAll);
+               Entity * en = catchEntity(e, RS2::ResolveAll);
 
                if (en && (en->rtti() == RS2::EntityCircle
                        || en->rtti() == RS2::EntityArc))
                {
                        circle2 = en;
-                       RS_Creation creation(NULL, NULL);
-                       RS_Line * t = creation.createTangent2(mouse, circle1, circle2);
+                       Creation creation(NULL, NULL);
+                       Line * t = creation.createTangent2(mouse, circle1, circle2);
 
                        if (t)
                        {
                                if (tangent)
                                        delete tangent;
 
-                               tangent = (RS_Line *)t->clone();
+                               tangent = (Line *)t->clone();
 
                                deletePreview();
                                clearPreview();
@@ -117,7 +117,7 @@ void ActionDrawLineTangent2::mouseMoveEvent(QMouseEvent * e)
                break;
        }
 
-       RS_DEBUG->print("ActionDrawLineTangent2::mouseMoveEvent end");
+       DEBUG->print("ActionDrawLineTangent2::mouseMoveEvent end");
 }
 
 void ActionDrawLineTangent2::mouseReleaseEvent(QMouseEvent * e)
@@ -145,22 +145,22 @@ void ActionDrawLineTangent2::mouseReleaseEvent(QMouseEvent * e)
 
 void ActionDrawLineTangent2::updateMouseButtonHints()
 {
-       if (RS_DIALOGFACTORY != NULL)
+       if (DIALOGFACTORY != NULL)
        {
                switch (getStatus())
                {
                case SetCircle1:
-                       RS_DIALOGFACTORY->updateMouseWidget(tr("Select first circle or arc"),
+                       DIALOGFACTORY->updateMouseWidget(tr("Select first circle or arc"),
                                tr("Cancel"));
                        break;
 
                case SetCircle2:
-                       RS_DIALOGFACTORY->updateMouseWidget(tr("Select second circle or arc"),
+                       DIALOGFACTORY->updateMouseWidget(tr("Select second circle or arc"),
                                tr("Back"));
                        break;
 
                default:
-                       RS_DIALOGFACTORY->updateMouseWidget("", "");
+                       DIALOGFACTORY->updateMouseWidget("", "");
                        break;
                }
        }
@@ -173,6 +173,6 @@ void ActionDrawLineTangent2::updateMouseCursor()
 
 void ActionDrawLineTangent2::updateToolBar()
 {
-       if (RS_DIALOGFACTORY != NULL)
-               RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarLines);
+       if (DIALOGFACTORY != NULL)
+               DIALOGFACTORY->requestToolBar(RS2::ToolBarLines);
 }
index 7e048916115fc3c6aa56edb93999b43f42a36b5c..4346d69d9b6a7ad1ead594936f68cd517158a2c5 100644 (file)
@@ -4,7 +4,7 @@
 #include "line.h"
 #include "actioninterface.h"
 
-class RS_Entity;
+class Entity;
 /**
  * This action class can handle user events to draw tangents from circle to
  * circle.
@@ -21,7 +21,7 @@ class ActionDrawLineTangent2: public ActionInterface
                };
 
        public:
-               ActionDrawLineTangent2(RS_EntityContainer & container, GraphicView & graphicView);
+               ActionDrawLineTangent2(EntityContainer & container, GraphicView & graphicView);
                ~ActionDrawLineTangent2();
 
                virtual void trigger();
@@ -35,13 +35,13 @@ class ActionDrawLineTangent2: public ActionInterface
 
        private:
                /** Closest tangent. */
-               RS_Line * tangent;
+               Line * tangent;
                /** 1st chosen entity */
-               RS_Entity * circle1;
+               Entity * circle1;
                /** 2nd chosen entity */
-               RS_Entity * circle2;
+               Entity * circle2;
                /** Data of new tangent */
-               RS_LineData data;
+               LineData data;
 };
 
 #endif // __ACTIONDRAWLINETANGENT2_H__
index f1ac97864570782df04234899cbf822a263da61a..891990def138b2f47c98e9f46be0e8ece433330b 100644 (file)
@@ -21,7 +21,7 @@
 #include "graphicview.h"
 #include "preview.h"
 
-ActionDrawPoint::ActionDrawPoint(RS_EntityContainer & container, GraphicView & graphicView):
+ActionDrawPoint::ActionDrawPoint(EntityContainer & container, GraphicView & graphicView):
        ActionInterface("Draw Points", container, graphicView)
 {
 }
@@ -34,7 +34,7 @@ void ActionDrawPoint::trigger()
 {
        if (pt.valid)
        {
-               RS_Point * point = new RS_Point(container, RS_PointData(pt));
+               Point * point = new Point(container, PointData(pt));
                container->addEntity(point);
 
                if (document)
@@ -82,14 +82,14 @@ void ActionDrawPoint::coordinateEvent(Vector * e)
        trigger();
 }
 
-void ActionDrawPoint::commandEvent(RS_CommandEvent * e)
+void ActionDrawPoint::commandEvent(CommandEvent * e)
 {
        QString c = e->getCommand().toLower();
 
        if (checkCommand("help", c))
        {
-               if (RS_DIALOGFACTORY != NULL)
-                       RS_DIALOGFACTORY->commandMessage(msgAvailableCommands()
+               if (DIALOGFACTORY != NULL)
+                       DIALOGFACTORY->commandMessage(msgAvailableCommands()
                                + getAvailableCommands().join(", "));
 
                return;
@@ -104,16 +104,16 @@ QStringList ActionDrawPoint::getAvailableCommands()
 
 void ActionDrawPoint::updateMouseButtonHints()
 {
-       if (RS_DIALOGFACTORY != NULL)
+       if (DIALOGFACTORY != NULL)
        {
                switch (getStatus())
                {
                case 0:
-                       RS_DIALOGFACTORY->updateMouseWidget(tr("Specify location"), tr("Cancel"));
+                       DIALOGFACTORY->updateMouseWidget(tr("Specify location"), tr("Cancel"));
                        break;
 
                default:
-                       RS_DIALOGFACTORY->updateMouseWidget("", "");
+                       DIALOGFACTORY->updateMouseWidget("", "");
                        break;
                }
        }
@@ -126,11 +126,11 @@ void ActionDrawPoint::updateMouseCursor()
 
 void ActionDrawPoint::updateToolBar()
 {
-       if (RS_DIALOGFACTORY != NULL)
+       if (DIALOGFACTORY != NULL)
        {
                if (!isFinished())
-                       RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
+                       DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
                else
-                       RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarPoints);
+                       DIALOGFACTORY->requestToolBar(RS2::ToolBarPoints);
        }
 }
index 7e2aa59b857d0186603177f070fbd0746e27cec1..45637c006ccdd6bae76b7f69bfa3c07aac8658c7 100644 (file)
 class ActionDrawPoint: public ActionInterface
 {
        public:
-               ActionDrawPoint(RS_EntityContainer & container, GraphicView & graphicView);
+               ActionDrawPoint(EntityContainer & container, GraphicView & graphicView);
                ~ActionDrawPoint();
 
                virtual void trigger();
                virtual void mouseMoveEvent(QMouseEvent * e);
                virtual void mouseReleaseEvent(QMouseEvent * e);
                virtual void coordinateEvent(Vector * e);
-               virtual void commandEvent(RS_CommandEvent * e);
+               virtual void commandEvent(CommandEvent * e);
                virtual QStringList getAvailableCommands();
                virtual void updateMouseButtonHints();
                virtual void updateMouseCursor();
index 3ef5a1851821c1bbf90fecfef8e9f9db26e153ee..befd888db1b0bb3f93a620b46c75e4a4b9214763 100644 (file)
 #include "graphicview.h"
 #include "preview.h"
 
-ActionDrawSpline::ActionDrawSpline(RS_EntityContainer & container, GraphicView & graphicView):
+ActionDrawSpline::ActionDrawSpline(EntityContainer & container, GraphicView & graphicView):
        ActionInterface("Draw splines", container, graphicView)
 {
        reset();
 #warning "!!! Need to port setAutoDelete() behaviour from Qt3 to Qt4 !!!"
 //     history.setAutoDelete(true);
-       data = RS_SplineData(3, false);
+       data = SplineData(3, false);
        //bHistory.setAutoDelete(true);
 }
 
@@ -85,7 +85,7 @@ void ActionDrawSpline::trigger()
        graphicView->drawEntity(spline);
        graphicView->moveRelativeZero(r);
        drawSnapper();
-       RS_DEBUG->print("ActionDrawSpline::trigger(): spline added: %d", spline->getId());
+       DEBUG->print("ActionDrawSpline::trigger(): spline added: %d", spline->getId());
 
        spline = NULL;
        //history.clear();
@@ -93,7 +93,7 @@ void ActionDrawSpline::trigger()
 
 void ActionDrawSpline::mouseMoveEvent(QMouseEvent * e)
 {
-       RS_DEBUG->print("ActionDrawSpline::mouseMoveEvent begin");
+       DEBUG->print("ActionDrawSpline::mouseMoveEvent begin");
 
        Vector mouse = snapPoint(e);
 
@@ -102,7 +102,7 @@ void ActionDrawSpline::mouseMoveEvent(QMouseEvent * e)
                deletePreview();
                clearPreview();
 
-               RS_Spline * tmpSpline = (RS_Spline *)spline->clone();
+               Spline * tmpSpline = (Spline *)spline->clone();
                tmpSpline->addControlPoint(mouse);
                tmpSpline->update();
 //             preview->addEntity(tmpSpline);
@@ -111,12 +111,12 @@ void ActionDrawSpline::mouseMoveEvent(QMouseEvent * e)
                QList<Vector>::iterator it;
 
 //             for(it=cpts.begin(); it!=cpts.end(); it+)
-//                     preview->addEntity(new RS_Point(preview, RS_PointData(*it)));
+//                     preview->addEntity(new Point(preview, PointData(*it)));
 
                drawPreview();
        }
 
-       RS_DEBUG->print("ActionDrawSpline::mouseMoveEvent end");
+       DEBUG->print("ActionDrawSpline::mouseMoveEvent end");
 }
 
 void ActionDrawSpline::mouseReleaseEvent(QMouseEvent * e)
@@ -153,7 +153,7 @@ void ActionDrawSpline::coordinateEvent(Vector * e)
 
                if (!spline)
                {
-                       spline = new RS_Spline(container, data);
+                       spline = new Spline(container, data);
                        spline->addControlPoint(mouse);
                }
 
@@ -183,7 +183,7 @@ void ActionDrawSpline::coordinateEvent(Vector * e)
        }
 }
 
-void ActionDrawSpline::commandEvent(RS_CommandEvent * e)
+void ActionDrawSpline::commandEvent(CommandEvent * e)
 {
        QString c = e->getCommand().toLower();
 
@@ -192,7 +192,7 @@ void ActionDrawSpline::commandEvent(RS_CommandEvent * e)
        case SetStartpoint:
                if (checkCommand("help", c))
                {
-                       RS_DIALOGFACTORY->commandMessage(msgAvailableCommands()
+                       DIALOGFACTORY->commandMessage(msgAvailableCommands()
                                + getAvailableCommands().join(", "));
                        return;
                }
@@ -244,7 +244,7 @@ void ActionDrawSpline::updateMouseButtonHints()
        switch (getStatus())
        {
        case SetStartpoint:
-               RS_DIALOGFACTORY->updateMouseWidget(tr("Specify first control point"),
+               DIALOGFACTORY->updateMouseWidget(tr("Specify first control point"),
                        tr("Cancel"));
                break;
 
@@ -254,26 +254,26 @@ void ActionDrawSpline::updateMouseButtonHints()
 
                if (history.count() >= 3)
                {
-                       msg += RS_COMMANDS->command("close");
+                       msg += COMMANDS->command("close");
                        msg += "/";
                }
 
                if (history.count() >= 2)
-                       msg += RS_COMMANDS->command("undo");
+                       msg += COMMANDS->command("undo");
 
                if (history.count() >= 2)
-                       RS_DIALOGFACTORY->updateMouseWidget(
+                       DIALOGFACTORY->updateMouseWidget(
                                tr("Specify next control point or [%1]").arg(msg),
                                tr("Back"));
                else
-                       RS_DIALOGFACTORY->updateMouseWidget(
+                       DIALOGFACTORY->updateMouseWidget(
                                tr("Specify next control point"),
                                tr("Back"));
        }
                break;
 
        default:
-               RS_DIALOGFACTORY->updateMouseWidget("", "");
+               DIALOGFACTORY->updateMouseWidget("", "");
                break;
        }
 }
@@ -281,13 +281,13 @@ void ActionDrawSpline::updateMouseButtonHints()
 void ActionDrawSpline::showOptions()
 {
        ActionInterface::showOptions();
-       RS_DIALOGFACTORY->requestOptions(this, true);
+       DIALOGFACTORY->requestOptions(this, true);
 }
 
 void ActionDrawSpline::hideOptions()
 {
        ActionInterface::hideOptions();
-       RS_DIALOGFACTORY->requestOptions(this, false);
+       DIALOGFACTORY->requestOptions(this, false);
 }
 
 void ActionDrawSpline::updateMouseCursor()
@@ -298,9 +298,9 @@ void ActionDrawSpline::updateMouseCursor()
 void ActionDrawSpline::updateToolBar()
 {
        if (!isFinished())
-               RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
+               DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
        else
-               RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarMain);
+               DIALOGFACTORY->requestToolBar(RS2::ToolBarMain);
 }
 
 void ActionDrawSpline::undo()
@@ -328,7 +328,7 @@ void ActionDrawSpline::undo()
                }
        }
        else
-               RS_DIALOGFACTORY->commandMessage(
+               DIALOGFACTORY->commandMessage(
                        tr("Cannot undo: Not enough entities defined yet."));
 }
 
index 30b794374e2d6f3e1fdf92ff56afc435d537afa8..a0140893633f66008bd7cf4d2526c414eb6ab8f0 100644 (file)
@@ -23,7 +23,7 @@ class ActionDrawSpline: public ActionInterface
                };
 
        public:
-               ActionDrawSpline(RS_EntityContainer & container, GraphicView & graphicView);
+               ActionDrawSpline(EntityContainer & container, GraphicView & graphicView);
                virtual ~ActionDrawSpline();
 
                virtual RS2::ActionType rtti();
@@ -33,7 +33,7 @@ class ActionDrawSpline: public ActionInterface
                virtual void mouseMoveEvent(QMouseEvent * e);
                virtual void mouseReleaseEvent(QMouseEvent * e);
                virtual void coordinateEvent(Vector * e);
-               virtual void commandEvent(RS_CommandEvent * e);
+               virtual void commandEvent(CommandEvent * e);
                virtual QStringList getAvailableCommands();
                virtual void showOptions();
                virtual void hideOptions();
@@ -51,12 +51,12 @@ class ActionDrawSpline: public ActionInterface
                /**
                 * Spline data defined so far.
                 */
-               RS_SplineData data;
+               SplineData data;
 
                /**
                 * Polyline entity we're working on.
                 */
-               RS_Spline * spline;
+               Spline * spline;
 
                /**
                 * Point history (for undo)
index 7e3d2337e4f3b1e44c9bba998af6e07f598f9963..e3b370b019dece892bc67a84294a560206f15834 100644 (file)
@@ -24,7 +24,7 @@
 #include "graphicview.h"
 #include "preview.h"
 
-ActionDrawText::ActionDrawText(RS_EntityContainer & container, GraphicView & graphicView): ActionInterface("Draw Text", container, graphicView)
+ActionDrawText::ActionDrawText(EntityContainer & container, GraphicView & graphicView): ActionInterface("Draw Text", container, graphicView)
 {
        pos = Vector(false);
        textChanged = true;
@@ -43,7 +43,7 @@ void ActionDrawText::init(int status)
 {
        ActionInterface::init(status);
 
-       if (RS_DIALOGFACTORY == NULL)
+       if (DIALOGFACTORY == NULL)
                return;
 
        switch (status)
@@ -53,9 +53,9 @@ void ActionDrawText::init(int status)
                clearPreview();
                reset();
 
-               RS_Text tmp(NULL, data);
+               Text tmp(NULL, data);
 
-               if (RS_DIALOGFACTORY->requestTextDialog(&tmp))
+               if (DIALOGFACTORY->requestTextDialog(&tmp))
                {
                        data = tmp.getData();
                        preparePreview();
@@ -75,7 +75,7 @@ void ActionDrawText::init(int status)
        break;
 
        case SetPos:
-               RS_DIALOGFACTORY->requestOptions(this, true, true);
+               DIALOGFACTORY->requestOptions(this, true, true);
                break;
 
        default:
@@ -85,14 +85,14 @@ void ActionDrawText::init(int status)
 
 void ActionDrawText::reset()
 {
-       data = RS_TextData(Vector(0.0, 0.0), 1.0, 100.0, RS2::VAlignTop,
+       data = TextData(Vector(0.0, 0.0), 1.0, 100.0, RS2::VAlignTop,
                RS2::HAlignLeft, RS2::LeftToRight, RS2::Exact, 1.0, data.text,
                "standard", 0.0, RS2::Update);
 }
 
 void ActionDrawText::trigger()
 {
-       RS_DEBUG->print("ActionDrawText::trigger()");
+       DEBUG->print("ActionDrawText::trigger()");
 
        if (pos.valid)
        {
@@ -101,7 +101,7 @@ void ActionDrawText::trigger()
                clearPreview();
                deleteSnapper();
 
-               RS_Text * text = new RS_Text(container, data);
+               Text * text = new Text(container, data);
                text->update();
                container->addEntity(text);
 
@@ -124,7 +124,7 @@ void ActionDrawText::preparePreview()
 {
 /*     clearPreview();
        data.insertionPoint = Vector(0.0, 0.0);
-       RS_Text * text = new RS_Text(preview, data);
+       Text * text = new Text(preview, data);
        text->update();
        preview->addEntity(text);
        textChanged = false;*/
@@ -132,7 +132,7 @@ void ActionDrawText::preparePreview()
 
 void ActionDrawText::mouseMoveEvent(QMouseEvent * e)
 {
-       RS_DEBUG->print("ActionDrawText::mouseMoveEvent begin");
+       DEBUG->print("ActionDrawText::mouseMoveEvent begin");
 
        if (getStatus() == SetPos)
        {
@@ -154,7 +154,7 @@ void ActionDrawText::mouseMoveEvent(QMouseEvent * e)
                drawPreview();
        }
 
-       RS_DEBUG->print("ActionDrawText::mouseMoveEvent end");
+       DEBUG->print("ActionDrawText::mouseMoveEvent end");
 }
 
 void ActionDrawText::mouseReleaseEvent(QMouseEvent * e)
@@ -201,14 +201,14 @@ void ActionDrawText::coordinateEvent(Vector * e)
        }
 }
 
-void ActionDrawText::commandEvent(RS_CommandEvent * e)
+void ActionDrawText::commandEvent(CommandEvent * e)
 {
        QString c = e->getCommand().toLower();
 
        if (checkCommand("help", c))
        {
-               if (RS_DIALOGFACTORY != NULL)
-                       RS_DIALOGFACTORY->commandMessage(msgAvailableCommands()
+               if (DIALOGFACTORY != NULL)
+                       DIALOGFACTORY->commandMessage(msgAvailableCommands()
                                + getAvailableCommands().join(", "));
                return;
        }
@@ -231,8 +231,8 @@ void ActionDrawText::commandEvent(RS_CommandEvent * e)
        case SetText:
                setText(e->getCommand());
 
-               if (RS_DIALOGFACTORY)
-                       RS_DIALOGFACTORY->requestOptions(this, true, true);
+               if (DIALOGFACTORY)
+                       DIALOGFACTORY->requestOptions(this, true, true);
 
                graphicView->enableCoordinateInput();
                setStatus(SetPos);
@@ -257,35 +257,35 @@ void ActionDrawText::showOptions()
 {
        ActionInterface::showOptions();
 
-       if (RS_DIALOGFACTORY)
-               RS_DIALOGFACTORY->requestOptions(this, true, true);
+       if (DIALOGFACTORY)
+               DIALOGFACTORY->requestOptions(this, true, true);
 }
 
 void ActionDrawText::hideOptions()
 {
        ActionInterface::hideOptions();
 
-       if (RS_DIALOGFACTORY)
-               RS_DIALOGFACTORY->requestOptions(this, false);
+       if (DIALOGFACTORY)
+               DIALOGFACTORY->requestOptions(this, false);
 }
 
 void ActionDrawText::updateMouseButtonHints()
 {
-       if (!RS_DIALOGFACTORY)
+       if (!DIALOGFACTORY)
                return;
 
        switch (getStatus())
        {
        case SetPos:
-               RS_DIALOGFACTORY->updateMouseWidget(tr("Specify insertion point"), tr("Cancel"));
+               DIALOGFACTORY->updateMouseWidget(tr("Specify insertion point"), tr("Cancel"));
                break;
 
        case SetText:
-               RS_DIALOGFACTORY->updateMouseWidget(tr("Enter text:"), tr("Back"));
+               DIALOGFACTORY->updateMouseWidget(tr("Enter text:"), tr("Back"));
                break;
 
        default:
-               RS_DIALOGFACTORY->updateMouseWidget("", "");
+               DIALOGFACTORY->updateMouseWidget("", "");
                break;
        }
 }
@@ -297,17 +297,17 @@ void ActionDrawText::updateMouseCursor()
 
 void ActionDrawText::updateToolBar()
 {
-       if (!RS_DIALOGFACTORY)
+       if (!DIALOGFACTORY)
                return;
 
        switch (getStatus())
        {
        case SetPos:
-               RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
+               DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
                break;
 
        default:
-               RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarMain);
+               DIALOGFACTORY->requestToolBar(RS2::ToolBarMain);
                break;
        }
 }
index eaad7c0e946ab6116974453e1301d7992b964a13..cae4c38d52651e65adc5368704ca2d38ba28803d 100644 (file)
@@ -23,7 +23,7 @@ class ActionDrawText: public ActionInterface
                };
 
        public:
-               ActionDrawText(RS_EntityContainer & container, GraphicView & graphicView);
+               ActionDrawText(EntityContainer & container, GraphicView & graphicView);
                ~ActionDrawText();
 
                virtual RS2::ActionType rtti();
@@ -34,7 +34,7 @@ class ActionDrawText: public ActionInterface
                virtual void mouseMoveEvent(QMouseEvent * e);
                virtual void mouseReleaseEvent(QMouseEvent * e);
                virtual void coordinateEvent(Vector * e);
-               virtual void commandEvent(RS_CommandEvent * e);
+               virtual void commandEvent(CommandEvent * e);
                virtual QStringList getAvailableCommands();
                virtual void hideOptions();
                virtual void showOptions();
@@ -47,7 +47,7 @@ class ActionDrawText: public ActionInterface
                double getAngle();
 
        private:
-               RS_TextData data;
+               TextData data;
                Vector pos;
                bool textChanged;
 };
index 47103541318f6b3abe763d34b41a47e960672c91..93d6d8be5122d13ee54145d8e98ff8b4d00d0b4b 100644 (file)
@@ -24,7 +24,7 @@
  *
  * @param undo true for undo and false for redo.
  */
-ActionEditCopy::ActionEditCopy(bool copy, RS_EntityContainer & container, GraphicView & graphicView):
+ActionEditCopy::ActionEditCopy(bool copy, EntityContainer & container, GraphicView & graphicView):
        ActionInterface("Edit Copy", container, graphicView)
 {
        this->copy = copy;
@@ -43,12 +43,12 @@ void ActionEditCopy::trigger()
 {
        deleteSnapper();
 
-       RS_Modification m(*container, graphicView);
+       Modification m(*container, graphicView);
        m.copy(referencePoint, !copy);
 
        finish();
        graphicView->killSelectActions();
-       RS_DIALOGFACTORY->updateSelectionWidget(container->countSelected());
+       DIALOGFACTORY->updateSelectionWidget(container->countSelected());
 }
 
 void ActionEditCopy::mouseMoveEvent(QMouseEvent * e)
@@ -84,12 +84,12 @@ void ActionEditCopy::updateMouseButtonHints()
        switch (getStatus())
        {
        case SetReferencePoint:
-               RS_DIALOGFACTORY->updateMouseWidget(tr("Specify reference point"),
+               DIALOGFACTORY->updateMouseWidget(tr("Specify reference point"),
                        tr("Cancel"));
                break;
 
        default:
-               RS_DIALOGFACTORY->updateMouseWidget("", "");
+               DIALOGFACTORY->updateMouseWidget("", "");
                break;
        }
 }
@@ -102,7 +102,7 @@ void ActionEditCopy::updateMouseCursor()
 void ActionEditCopy::updateToolBar()
 {
        if (!isFinished())
-               RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
+               DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
        else
-               RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarMain);
+               DIALOGFACTORY->requestToolBar(RS2::ToolBarMain);
 }
index 265077ccf10e1aafbc5744cc2b1bec1005f6af9f..882a260c6ead3c85df0039a8720f2731a23a2ada 100644 (file)
@@ -22,7 +22,7 @@ class ActionEditCopy: public ActionInterface
                };
 
        public:
-               ActionEditCopy(bool copy, RS_EntityContainer & container, GraphicView & graphicView);
+               ActionEditCopy(bool copy, EntityContainer & container, GraphicView & graphicView);
                ~ActionEditCopy();
 
                virtual void init(int status = 0);
index 5bc21fb4cb3c14ed08538f2625b1e22e7a00eae2..28b80a588d69a626b654a3ab0e0546a75993c556 100644 (file)
@@ -27,7 +27,7 @@
  *
  * @param undo true for undo and false for redo.
  */
-ActionEditPaste::ActionEditPaste(RS_EntityContainer & container, GraphicView & graphicView): ActionInterface("Edit Paste",
+ActionEditPaste::ActionEditPaste(EntityContainer & container, GraphicView & graphicView): ActionInterface("Edit Paste",
                container, graphicView)
 {
 }
@@ -48,8 +48,8 @@ void ActionEditPaste::trigger()
        deletePreview();
        clearPreview();
 
-       RS_Modification m(*container, graphicView);
-       m.paste(RS_PasteData(targetPoint, 1.0, 0.0, false, ""));
+       Modification m(*container, graphicView);
+       m.paste(PasteData(targetPoint, 1.0, 0.0, false, ""));
 
        graphicView->redraw();
        finish();
@@ -64,14 +64,14 @@ void ActionEditPaste::mouseMoveEvent(QMouseEvent * e)
 
                deletePreview();
                clearPreview();
-//             preview->addAllFrom(*RS_CLIPBOARD->getGraphic());
+//             preview->addAllFrom(*CLIPBOARD->getGraphic());
 //             preview->move(targetPoint);
 
                if (graphic)
                {
-                       RS2::Unit sourceUnit = RS_CLIPBOARD->getGraphic()->getUnit();
+                       RS2::Unit sourceUnit = CLIPBOARD->getGraphic()->getUnit();
                        RS2::Unit targetUnit = graphic->getUnit();
-                       double f = RS_Units::convert(1.0, sourceUnit, targetUnit);
+                       double f = Units::convert(1.0, sourceUnit, targetUnit);
 //                     preview->scale(targetPoint, Vector(f, f));
                }
 
@@ -111,12 +111,12 @@ void ActionEditPaste::updateMouseButtonHints()
        switch (getStatus())
        {
        case SetTargetPoint:
-               RS_DIALOGFACTORY->updateMouseWidget(tr("Set reference point"),
+               DIALOGFACTORY->updateMouseWidget(tr("Set reference point"),
                        tr("Cancel"));
                break;
 
        default:
-               RS_DIALOGFACTORY->updateMouseWidget("", "");
+               DIALOGFACTORY->updateMouseWidget("", "");
                break;
        }
 }
@@ -129,7 +129,7 @@ void ActionEditPaste::updateMouseCursor()
 void ActionEditPaste::updateToolBar()
 {
        if (!isFinished())
-               RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
+               DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
        else
-               RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarMain);
+               DIALOGFACTORY->requestToolBar(RS2::ToolBarMain);
 }
index dd7f3e9848ce93236c1ba7529cae6a7e5b93944a..ec8208f889ddb9cf2a1a24ca5ec6604f8fa0ca58 100644 (file)
@@ -22,7 +22,7 @@ class ActionEditPaste: public ActionInterface
                };
 
        public:
-               ActionEditPaste(RS_EntityContainer & container, GraphicView & graphicView);
+               ActionEditPaste(EntityContainer & container, GraphicView & graphicView);
                ~ActionEditPaste();
 
                virtual void init(int status = 0);
index 98e7a212723e784b1a832d54204961d70a9c2a9d..11ed2fc2e4eb1e2c017b34764ee522c17151fa4a 100644 (file)
@@ -24,7 +24,7 @@
  *
  * @param undo true for undo and false for redo.
  */
-ActionEditUndo::ActionEditUndo(bool undo, RS_EntityContainer & container, GraphicView & graphicView): ActionInterface("Edit Undo", container, graphicView)
+ActionEditUndo::ActionEditUndo(bool undo, EntityContainer & container, GraphicView & graphicView): ActionInterface("Edit Undo", container, graphicView)
 {
        this->undo = undo;
 }
@@ -51,5 +51,5 @@ void ActionEditUndo::trigger()
        graphicView->redraw();
 
        finish();
-       RS_DIALOGFACTORY->updateSelectionWidget(container->countSelected());
+       DIALOGFACTORY->updateSelectionWidget(container->countSelected());
 }
index 69633ecc5bce1136a84b7d6d18c8608cdbae1904..e8d3847256d5f50fc12788a4326a8b6011b0445b 100644 (file)
@@ -12,7 +12,7 @@
 class ActionEditUndo: public ActionInterface
 {
        public:
-               ActionEditUndo(bool undo, RS_EntityContainer & container, GraphicView & graphicView);
+               ActionEditUndo(bool undo, EntityContainer & container, GraphicView & graphicView);
                ~ActionEditUndo();
 
                virtual void init(int status = 0);
index a7fd4abe602d92df996ababe11c71c2d76f4e842..e582eb55dfcacc9d92c5ae753e828db530dbf715 100644 (file)
@@ -18,7 +18,7 @@
 
 //#include "drawing.h"
 
-ActionFileNew::ActionFileNew(RS_EntityContainer & container, GraphicView & graphicView):
+ActionFileNew::ActionFileNew(EntityContainer & container, GraphicView & graphicView):
        ActionInterface("File New", container, graphicView)
 {
 }
@@ -31,9 +31,9 @@ void ActionFileNew::trigger()
 {
        /*
           // Not supported currently
-          RS_DEBUG->print("ActionFileNew::trigger");
+          DEBUG->print("ActionFileNew::trigger");
 
-          QString fileName; //= RS_DIALOGFACTORY->requestFileNewDialog();
+          QString fileName; //= DIALOGFACTORY->requestFileNewDialog();
           if (graphic!=NULL && !fileName.isEmpty()) {
                graphic->open(fileName, );
           }
index a77e0c52e95c2dfed75013acf58cfc13ad71c959..f3f5eb62bd756e761f4fb4a71d4bacba03a01341 100644 (file)
@@ -12,7 +12,7 @@
 class ActionFileNew: public ActionInterface
 {
        public:
-               ActionFileNew(RS_EntityContainer & container, GraphicView & graphicView);
+               ActionFileNew(EntityContainer & container, GraphicView & graphicView);
                ~ActionFileNew();
 
                virtual void init(int status = 0);
index 2d956b2b09115ab91c5c1c0a3c8434cd3b13aebd..caed4a5b20304aed6e1b59f24e2c0c067c251a37 100644 (file)
@@ -18,7 +18,7 @@
 
 //#include "drawing.h"
 
-ActionFileOpen::ActionFileOpen(RS_EntityContainer & container, GraphicView & graphicView):
+ActionFileOpen::ActionFileOpen(EntityContainer & container, GraphicView & graphicView):
        ActionInterface("File Open", container, graphicView)
 {
 }
@@ -31,9 +31,9 @@ void ActionFileOpen::trigger()
 {
        /*
           // Not supported currently
-          RS_DEBUG->print("ActionFileOpen::trigger");
+          DEBUG->print("ActionFileOpen::trigger");
 
-          QString fileName; //= RS_DIALOGFACTORY->requestFileOpenDialog();
+          QString fileName; //= DIALOGFACTORY->requestFileOpenDialog();
           if (graphic!=NULL && !fileName.isEmpty()) {
                graphic->open(fileName, );
           }
index 8fb26e1adfc04704cc2ebf07ef9ef78a1972fade..b5a241c08d3fabb437d670c9126f4ee3032d4e3e 100644 (file)
@@ -12,7 +12,7 @@
 class ActionFileOpen: public ActionInterface
 {
        public:
-               ActionFileOpen(RS_EntityContainer & container, GraphicView & graphicView);
+               ActionFileOpen(EntityContainer & container, GraphicView & graphicView);
                ~ActionFileOpen();
 
                virtual void init(int status = 0);
index fe5394899f3fd0cf0a4eb3e8b57035f7f34566dd..6324e23b7f8e897d17e63f0af9c40fe4dd7ec48d 100644 (file)
@@ -18,7 +18,7 @@
 
 #include "drawing.h"
 
-ActionFileSave::ActionFileSave(RS_EntityContainer & container, GraphicView & graphicView):
+ActionFileSave::ActionFileSave(EntityContainer & container, GraphicView & graphicView):
        ActionInterface("File Save", container, graphicView)
 {
 }
@@ -29,7 +29,7 @@ ActionFileSave::~ActionFileSave()
 
 void ActionFileSave::trigger()
 {
-       RS_DEBUG->print("ActionFileSave::trigger");
+       DEBUG->print("ActionFileSave::trigger");
 
        if (graphic != NULL)
                graphic->save();
index 5587486e17eb8a8fd5172fc9bd4bdc8a55a61d08..a60ebf2544a0f1953c121893f4e85e901503de7d 100644 (file)
@@ -12,7 +12,7 @@
 class ActionFileSave: public ActionInterface
 {
        public:
-               ActionFileSave(RS_EntityContainer & container, GraphicView & graphicView);
+               ActionFileSave(EntityContainer & container, GraphicView & graphicView);
                ~ActionFileSave();
 
                virtual void init(int status = 0);
index 7864cb30bde64fc2f074a8b9a950e32c40e821b0..f1e8a3b7af60321a68ab5e8011585328a3f3cba2 100644 (file)
@@ -18,7 +18,7 @@
 
 #include "drawing.h"
 
-ActionFileSaveAs::ActionFileSaveAs(RS_EntityContainer & container, GraphicView & graphicView):
+ActionFileSaveAs::ActionFileSaveAs(EntityContainer & container, GraphicView & graphicView):
        ActionInterface("Add Layer", container, graphicView)
 {
 }
@@ -29,8 +29,8 @@ ActionFileSaveAs::~ActionFileSaveAs()
 
 void ActionFileSaveAs::trigger()
 {
-       RS_DEBUG->print("ActionFileSaveAs::trigger");
-       QString fileName; // = RS_DIALOGFACTORY->requestFileSaveAsDialog();
+       DEBUG->print("ActionFileSaveAs::trigger");
+       QString fileName; // = DIALOGFACTORY->requestFileSaveAsDialog();
 
        if (graphic != NULL && !fileName.isEmpty())
                graphic->saveAs(fileName, RS2::FormatUnknown);
index 3915cbb4b6f25ade2944d709b7e501f0eb60ccaa..426c2dbc68b51815d89a24c83e6091aa190253b0 100644 (file)
@@ -12,7 +12,7 @@
 class ActionFileSaveAs: public ActionInterface
 {
        public:
-               ActionFileSaveAs(RS_EntityContainer & container, GraphicView & graphicView);
+               ActionFileSaveAs(EntityContainer & container, GraphicView & graphicView);
                ~ActionFileSaveAs();
 
                virtual void init(int status = 0);
index 34ad19acd45ae8f899337681ed0dd8b8b6370c61..d7b69a0c1a28005499ced40192af052d010ceffb 100644 (file)
@@ -21,7 +21,7 @@
 #include "graphicview.h"
 #include "information.h"
 
-ActionInfoAngle::ActionInfoAngle(RS_EntityContainer & container, GraphicView & graphicView): ActionInterface("Info Angle",
+ActionInfoAngle::ActionInfoAngle(EntityContainer & container, GraphicView & graphicView): ActionInterface("Info Angle",
                container, graphicView)
 {
 }
@@ -37,12 +37,12 @@ void ActionInfoAngle::init(int status)
 
 void ActionInfoAngle::trigger()
 {
-       RS_DEBUG->print("ActionInfoAngle::trigger()");
+       DEBUG->print("ActionInfoAngle::trigger()");
        deleteSnapper();
 
        if (entity1 != NULL && entity2 != NULL)
        {
-               VectorSolutions sol = RS_Information::getIntersection(entity1, entity2, false);
+               VectorSolutions sol = Information::getIntersection(entity1, entity2, false);
 
                if (sol.hasValid())
                {
@@ -55,18 +55,18 @@ void ActionInfoAngle::trigger()
                                double angle = fabs(angle2 - angle1);
 
                                QString str;
-                               str.sprintf("%.6f", RS_Math::rad2deg(angle));
-                               RS_DIALOGFACTORY->commandMessage(tr("Angle: %1%2").arg(str).arg(QChar(0xB0)));
+                               str.sprintf("%.6f", Math::rad2deg(angle));
+                               DIALOGFACTORY->commandMessage(tr("Angle: %1%2").arg(str).arg(QChar(0xB0)));
                        }
                }
                else
-                       RS_DIALOGFACTORY->commandMessage(tr("Lines are parallel"));
+                       DIALOGFACTORY->commandMessage(tr("Lines are parallel"));
        }
 }
 
 void ActionInfoAngle::mouseMoveEvent(QMouseEvent * /*e*/)
 {
-       RS_DEBUG->print("ActionInfoAngle::mouseMoveEvent begin");
+       DEBUG->print("ActionInfoAngle::mouseMoveEvent begin");
 
        switch (getStatus())
        {
@@ -80,7 +80,7 @@ void ActionInfoAngle::mouseMoveEvent(QMouseEvent * /*e*/)
                break;
        }
 
-       RS_DEBUG->print("ActionInfoAngle::mouseMoveEvent end");
+       DEBUG->print("ActionInfoAngle::mouseMoveEvent end");
 }
 
 void ActionInfoAngle::mouseReleaseEvent(QMouseEvent * e)
@@ -131,17 +131,17 @@ void ActionInfoAngle::updateMouseButtonHints()
        switch (getStatus())
        {
        case SetEntity1:
-               RS_DIALOGFACTORY->updateMouseWidget(
+               DIALOGFACTORY->updateMouseWidget(
                        tr("Specify first line"), tr("Cancel"));
                break;
 
        case SetEntity2:
-               RS_DIALOGFACTORY->updateMouseWidget(
+               DIALOGFACTORY->updateMouseWidget(
                        tr("Specify second line"), tr("Back"));
                break;
 
        default:
-               RS_DIALOGFACTORY->updateMouseWidget("", "");
+               DIALOGFACTORY->updateMouseWidget("", "");
                break;
        }
 }
@@ -157,11 +157,11 @@ void ActionInfoAngle::updateToolBar()
        {
        case SetEntity1:
        case SetEntity2:
-               RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
+               DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
                break;
 
        default:
-               RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarInfo);
+               DIALOGFACTORY->requestToolBar(RS2::ToolBarInfo);
                break;
        }
 }
index 8c878c7bdefe2c035c9a652be88d19661cc3c240..fc7f230d70dde7217557b2414eb89fc0181fc9af 100644 (file)
@@ -4,7 +4,7 @@
 #include "actioninterface.h"
 #include "vector.h"
 
-class RS_Entity;
+class Entity;
 
 /**
  * This action class can handle user events to measure angles.
@@ -24,7 +24,7 @@ class ActionInfoAngle: public ActionInterface
                };
 
        public:
-               ActionInfoAngle(RS_EntityContainer & container, GraphicView & graphicView);
+               ActionInfoAngle(EntityContainer & container, GraphicView & graphicView);
                ~ActionInfoAngle();
 
                virtual void init(int status = 0);
@@ -36,10 +36,10 @@ class ActionInfoAngle: public ActionInterface
                virtual void updateToolBar();
 
        private:
-               RS_Entity * entity1;
+               Entity * entity1;
                Vector point1;
 
-               RS_Entity * entity2;
+               Entity * entity2;
                Vector point2;
 
                Vector intersection;
index ba3b6f355bebaeeba00e0424fbdaac5d368f704d..7c9ca32cb8ea180cafc718c8dab5f9fc2ae08fce 100644 (file)
@@ -21,7 +21,7 @@
 #include "graphicview.h"
 #include "preview.h"
 
-ActionInfoArea::ActionInfoArea(RS_EntityContainer & container, GraphicView & graphicView): ActionInterface("Info Area",
+ActionInfoArea::ActionInfoArea(EntityContainer & container, GraphicView & graphicView): ActionInterface("Info Area",
                container, graphicView)
 {
 }
@@ -42,7 +42,7 @@ void ActionInfoArea::init(int status)
 
 void ActionInfoArea::trigger()
 {
-       RS_DEBUG->print("ActionInfoArea::trigger()");
+       DEBUG->print("ActionInfoArea::trigger()");
 
        if (ia.isValid())
        {
@@ -51,9 +51,9 @@ void ActionInfoArea::trigger()
                double area = ia.getArea();
                double circ = ia.getCircumference();
 
-               RS_DEBUG->print("ActionInfoArea::trigger: area: %f", area);
-               RS_DIALOGFACTORY->commandMessage(tr("Area: %1").arg(area));
-               RS_DIALOGFACTORY->commandMessage(tr("Circumference: %1").arg(circ));
+               DEBUG->print("ActionInfoArea::trigger: area: %f", area);
+               DIALOGFACTORY->commandMessage(tr("Area: %1").arg(area));
+               DIALOGFACTORY->commandMessage(tr("Circumference: %1").arg(circ));
        }
 
        ia.reset();
@@ -63,14 +63,14 @@ void ActionInfoArea::trigger()
            double dist = point1.distanceTo(point2);
            QString str;
            str.sprintf("%.6f", dist);
-           RS_DIALOGFACTORY->commandMessage(tr("Distance: %1").arg(str));
+           DIALOGFACTORY->commandMessage(tr("Distance: %1").arg(str));
           }
         */
 }
 
 void ActionInfoArea::mouseMoveEvent(QMouseEvent * e)
 {
-       //RS_DEBUG->print("ActionInfoArea::mouseMoveEvent begin");
+       //DEBUG->print("ActionInfoArea::mouseMoveEvent begin");
 
        if (getStatus() == SetFirstPoint
            || getStatus() == SetNextPoint)
@@ -100,12 +100,12 @@ void ActionInfoArea::mouseMoveEvent(QMouseEvent * e)
                                        closingLine = NULL;
                                }
 
-//                             currentLine = new RS_Line(preview, RS_LineData(prev, mouse));
+//                             currentLine = new Line(preview, LineData(prev, mouse));
 //                             preview->addEntity(currentLine);
 
 //                             if (preview->count() > 1)
 //                             {
-//                                     closingLine = new RS_Line(preview, RS_LineData(mouse, point1));
+//                                     closingLine = new Line(preview, LineData(mouse, point1));
 //                                     preview->addEntity(closingLine);
 //                             }
 
@@ -145,7 +145,7 @@ void ActionInfoArea::mouseReleaseEvent(QMouseEvent * e)
                                closingLine = NULL;
                        }
 
-//                     currentLine = new RS_Line(preview, RS_LineData(prev, point1));
+//                     currentLine = new Line(preview, LineData(prev, point1));
 //                     preview->addEntity(currentLine);
                        drawPreview();
                }
@@ -172,7 +172,7 @@ void ActionInfoArea::coordinateEvent(Vector * e)
                clearPreview();
 
                ia.addPoint(mouse);
-               RS_DIALOGFACTORY->commandMessage(tr("Point: %1/%2").arg(mouse.x).arg(mouse.y));
+               DIALOGFACTORY->commandMessage(tr("Point: %1/%2").arg(mouse.x).arg(mouse.y));
 
                graphicView->moveRelativeZero(point1);
                prev = mouse;
@@ -185,7 +185,7 @@ void ActionInfoArea::coordinateEvent(Vector * e)
                if (point1.valid)
                {
                        ia.addPoint(mouse);
-                       RS_DIALOGFACTORY->commandMessage(tr("Point: %1/%2").arg(mouse.x).arg(mouse.y));
+                       DIALOGFACTORY->commandMessage(tr("Point: %1/%2").arg(mouse.x).arg(mouse.y));
 
                        currentLine = NULL;
 
@@ -211,19 +211,19 @@ void ActionInfoArea::updateMouseButtonHints()
        switch (getStatus())
        {
        case SetFirstPoint:
-               RS_DIALOGFACTORY->updateMouseWidget(
+               DIALOGFACTORY->updateMouseWidget(
                        tr("Specify first point of polygon"),
                        tr("Cancel"));
                break;
 
        case SetNextPoint:
-               RS_DIALOGFACTORY->updateMouseWidget(
+               DIALOGFACTORY->updateMouseWidget(
                        tr("Specify next point of polygon"),
                        tr("Terminate"));
                break;
 
        default:
-               RS_DIALOGFACTORY->updateMouseWidget("", "");
+               DIALOGFACTORY->updateMouseWidget("", "");
                break;
        }
 }
@@ -239,11 +239,11 @@ void ActionInfoArea::updateToolBar()
        {
        case SetFirstPoint:
        case SetNextPoint:
-               RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
+               DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
                break;
 
        default:
-               RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarInfo);
+               DIALOGFACTORY->requestToolBar(RS2::ToolBarInfo);
                break;
        }
 }
index 9ba718da8a5b89f3cde3a5bdf007bcbe43e5fe29..e9674e5019c02e09373ad374160e7399fccbe009 100644 (file)
@@ -5,7 +5,7 @@
 #include "actioninterface.h"
 #include "vector.h"
 
-class RS_Entity;
+class Entity;
 
 /**
  * This action class can handle user events to measure distances between
@@ -26,7 +26,7 @@ class ActionInfoArea: public ActionInterface
                };
 
        public:
-               ActionInfoArea(RS_EntityContainer & container, GraphicView & graphicView);
+               ActionInfoArea(EntityContainer & container, GraphicView & graphicView);
                ~ActionInfoArea();
 
                virtual void init(int status = 0);
@@ -41,9 +41,9 @@ class ActionInfoArea: public ActionInterface
        private:
                Vector point1;
                Vector prev;
-               RS_Entity * currentLine;
-               RS_Entity * closingLine;
-               RS_InfoArea ia;
+               Entity * currentLine;
+               Entity * closingLine;
+               InfoArea ia;
 };
 
 #endif // __ACTIONINFOAREA_H__
index 9cc40fa2a61b1eea905ddce10f6a4be79232652c..02067915bf54ae09dc17c3174cf91aedbeae761b 100644 (file)
@@ -21,7 +21,7 @@
 #include "graphicview.h"
 #include "preview.h"
 
-ActionInfoDist::ActionInfoDist(RS_EntityContainer & container, GraphicView & graphicView): ActionInterface("Info Dist",
+ActionInfoDist::ActionInfoDist(EntityContainer & container, GraphicView & graphicView): ActionInterface("Info Dist",
                container, graphicView)
 {
 }
@@ -37,20 +37,20 @@ void ActionInfoDist::init(int status)
 
 void ActionInfoDist::trigger()
 {
-       RS_DEBUG->print("ActionInfoDist::trigger()");
+       DEBUG->print("ActionInfoDist::trigger()");
 
        if (point1.valid && point2.valid)
        {
                double dist = point1.distanceTo(point2);
                QString str;
                str.sprintf("%.6f", dist);
-               RS_DIALOGFACTORY->commandMessage(tr("Distance: %1").arg(str));
+               DIALOGFACTORY->commandMessage(tr("Distance: %1").arg(str));
        }
 }
 
 void ActionInfoDist::mouseMoveEvent(QMouseEvent * e)
 {
-       RS_DEBUG->print("ActionInfoDist::mouseMoveEvent begin");
+       DEBUG->print("ActionInfoDist::mouseMoveEvent begin");
 
        if (getStatus() == SetPoint1
            || getStatus() == SetPoint2)
@@ -70,7 +70,7 @@ void ActionInfoDist::mouseMoveEvent(QMouseEvent * e)
 
                                deletePreview();
                                clearPreview();
-//                             preview->addEntity(new RS_Line(preview, RS_LineData(point1, point2)));
+//                             preview->addEntity(new Line(preview, LineData(point1, point2)));
                                drawPreview();
                        }
                        break;
@@ -80,7 +80,7 @@ void ActionInfoDist::mouseMoveEvent(QMouseEvent * e)
                }
        }
 
-       RS_DEBUG->print("ActionInfoDist::mouseMoveEvent end");
+       DEBUG->print("ActionInfoDist::mouseMoveEvent end");
 }
 
 void ActionInfoDist::mouseReleaseEvent(QMouseEvent * e)
@@ -136,19 +136,19 @@ void ActionInfoDist::updateMouseButtonHints()
        switch (getStatus())
        {
        case SetPoint1:
-               RS_DIALOGFACTORY->updateMouseWidget(
+               DIALOGFACTORY->updateMouseWidget(
                        tr("Specify first point of distance"),
                        tr("Cancel"));
                break;
 
        case SetPoint2:
-               RS_DIALOGFACTORY->updateMouseWidget(
+               DIALOGFACTORY->updateMouseWidget(
                        tr("Specify second point of distance"),
                        tr("Back"));
                break;
 
        default:
-               RS_DIALOGFACTORY->updateMouseWidget("", "");
+               DIALOGFACTORY->updateMouseWidget("", "");
                break;
        }
 }
@@ -164,11 +164,11 @@ void ActionInfoDist::updateToolBar()
        {
        case SetPoint1:
        case SetPoint2:
-               RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
+               DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
                break;
 
        default:
-               RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarInfo);
+               DIALOGFACTORY->requestToolBar(RS2::ToolBarInfo);
                break;
        }
 }
index 1d3d01ec433584465d51f8376e960b324e81a3dd..fffa8af5c639a83999acc4d6b40f3fab31a0c144 100644 (file)
@@ -23,7 +23,7 @@ class ActionInfoDist: public ActionInterface
                };
 
        public:
-               ActionInfoDist(RS_EntityContainer & container, GraphicView & graphicView);
+               ActionInfoDist(EntityContainer & container, GraphicView & graphicView);
                ~ActionInfoDist();
 
                virtual void init(int status = 0);
index c215e3183ccfa770f7388af0a0a4d25b3aa586ac..a3402f25a5997361ef4e25c7835b09279bd09943 100644 (file)
@@ -21,7 +21,7 @@
 #include "graphicview.h"
 #include "preview.h"
 
-ActionInfoDist2::ActionInfoDist2(RS_EntityContainer & container, GraphicView & graphicView):
+ActionInfoDist2::ActionInfoDist2(EntityContainer & container, GraphicView & graphicView):
        ActionInterface("Info Dist2", container, graphicView)
 {
 }
@@ -37,7 +37,7 @@ void ActionInfoDist2::init(int status)
 
 void ActionInfoDist2::trigger()
 {
-       RS_DEBUG->print("ActionInfoDist2::trigger()");
+       DEBUG->print("ActionInfoDist2::trigger()");
        deleteSnapper();
 
        if (point.valid && entity != NULL)
@@ -45,13 +45,13 @@ void ActionInfoDist2::trigger()
                double dist = entity->getDistanceToPoint(point);
                QString str;
                str.sprintf("%.6f", dist);
-               RS_DIALOGFACTORY->commandMessage(tr("Distance: %1").arg(str));
+               DIALOGFACTORY->commandMessage(tr("Distance: %1").arg(str));
        }
 }
 
 void ActionInfoDist2::mouseMoveEvent(QMouseEvent * e)
 {
-       RS_DEBUG->print("ActionInfoDist2::mouseMoveEvent begin");
+       DEBUG->print("ActionInfoDist2::mouseMoveEvent begin");
 
        switch (getStatus())
        {
@@ -69,7 +69,7 @@ void ActionInfoDist2::mouseMoveEvent(QMouseEvent * e)
                break;
        }
 
-       RS_DEBUG->print("ActionInfoDist2::mouseMoveEvent end");
+       DEBUG->print("ActionInfoDist2::mouseMoveEvent end");
 }
 
 void ActionInfoDist2::mouseReleaseEvent(QMouseEvent * e)
@@ -123,15 +123,15 @@ void ActionInfoDist2::updateMouseButtonHints()
        switch (getStatus())
        {
        case SetEntity:
-               RS_DIALOGFACTORY->updateMouseWidget(tr("Specify entity"), tr("Cancel"));
+               DIALOGFACTORY->updateMouseWidget(tr("Specify entity"), tr("Cancel"));
                break;
 
        case SetPoint:
-               RS_DIALOGFACTORY->updateMouseWidget(tr("Specify point"), tr("Back"));
+               DIALOGFACTORY->updateMouseWidget(tr("Specify point"), tr("Back"));
                break;
 
        default:
-               RS_DIALOGFACTORY->updateMouseWidget("", "");
+               DIALOGFACTORY->updateMouseWidget("", "");
                break;
        }
 }
@@ -147,11 +147,11 @@ void ActionInfoDist2::updateToolBar()
        {
        case SetPoint:
        case SetEntity:
-               RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
+               DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
                break;
 
        default:
-               RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarInfo);
+               DIALOGFACTORY->requestToolBar(RS2::ToolBarInfo);
                break;
        }
 }
index 4af31e44ac5e02157a3e7bd683d87f9fd5d8ee6b..f4bbbec7c608e4f0aac8277978811e4d1a580874 100644 (file)
@@ -4,7 +4,7 @@
 #include "actioninterface.h"
 #include "vector.h"
 
-class RS_Entity;
+class Entity;
 
 /**
  * This action class can handle user events to measure distances between
@@ -25,7 +25,7 @@ class ActionInfoDist2: public ActionInterface
                };
 
        public:
-               ActionInfoDist2(RS_EntityContainer & container, GraphicView & graphicView);
+               ActionInfoDist2(EntityContainer & container, GraphicView & graphicView);
                ~ActionInfoDist2();
 
                virtual void init(int status = 0);
@@ -38,7 +38,7 @@ class ActionInfoDist2: public ActionInterface
                virtual void updateToolBar();
 
        private:
-               RS_Entity * entity;
+               Entity * entity;
                Vector point;
 };
 
index b31958d63756c6cb84ab75d6a6b15f756adba625..7d7c734d921fdc8b349710e3e88f564b5e9ba154 100644 (file)
 #include "graphicview.h"
 #include "information.h"
 
-ActionInfoInside::ActionInfoInside(RS_EntityContainer & container, GraphicView & graphicView):
+ActionInfoInside::ActionInfoInside(EntityContainer & container, GraphicView & graphicView):
        ActionInterface("Info Inside", container, graphicView)
 {
-       contour = new RS_EntityContainer(NULL, false);
+       contour = new EntityContainer(NULL, false);
 
-       for (RS_Entity * e = container.firstEntity(); e != NULL; e = container.nextEntity())
+       for (Entity * e = container.firstEntity(); e != NULL; e = container.nextEntity())
                if (e->isSelected())
                        contour->addEntity(e);
 }
@@ -40,10 +40,10 @@ void ActionInfoInside::trigger()
        deleteSnapper();
        bool onContour = false;
 
-       if (RS_Information::isPointInsideContour(pt, contour, &onContour))
-               RS_DIALOGFACTORY->commandMessage(tr("Point is inside selected contour."));
+       if (Information::isPointInsideContour(pt, contour, &onContour))
+               DIALOGFACTORY->commandMessage(tr("Point is inside selected contour."));
        else
-               RS_DIALOGFACTORY->commandMessage(tr("Point is outside selected contour."));
+               DIALOGFACTORY->commandMessage(tr("Point is outside selected contour."));
 
        finish();
 }
@@ -71,11 +71,11 @@ void ActionInfoInside::updateMouseButtonHints()
        switch (getStatus())
        {
        case 0:
-               RS_DIALOGFACTORY->updateMouseWidget(tr("Specify point"), tr("Cancel"));
+               DIALOGFACTORY->updateMouseWidget(tr("Specify point"), tr("Cancel"));
                break;
 
        default:
-               RS_DIALOGFACTORY->updateMouseWidget("", "");
+               DIALOGFACTORY->updateMouseWidget("", "");
                break;
        }
 }
@@ -88,7 +88,7 @@ void ActionInfoInside::updateMouseCursor()
 void ActionInfoInside::updateToolBar()
 {
        if (!isFinished())
-               RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
+               DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
        else
-               RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarInfo);
+               DIALOGFACTORY->requestToolBar(RS2::ToolBarInfo);
 }
index e660683049c8eb9eb59b6be20e35d9041e2c5e77..3a4de23cf8c738a55c6df8b7cbe079b66389cfe6 100644 (file)
@@ -14,7 +14,7 @@
 class ActionInfoInside: public ActionInterface
 {
        public:
-               ActionInfoInside(RS_EntityContainer & container, GraphicView & graphicView);
+               ActionInfoInside(EntityContainer & container, GraphicView & graphicView);
                ~ActionInfoInside();
 
                virtual void trigger();
@@ -26,7 +26,7 @@ class ActionInfoInside: public ActionInterface
 
        private:
                Vector pt;
-               RS_EntityContainer * contour;
+               EntityContainer * contour;
 };
 
 #endif // __ACTIONINFOINSIDE_H__
index 5abe6445652778ee4e4935571bd49e671703c577..05a03c7d1aad052f3fe9c3667aac192b9e1c839f 100644 (file)
@@ -19,7 +19,7 @@
 #include "debug.h"
 #include "dialogfactory.h"
 
-ActionInfoTotalLength::ActionInfoTotalLength(RS_EntityContainer & container, GraphicView & graphicView): ActionInterface("Info Total Length",
+ActionInfoTotalLength::ActionInfoTotalLength(EntityContainer & container, GraphicView & graphicView): ActionInterface("Info Total Length",
                container, graphicView)
 {
 }
@@ -36,11 +36,11 @@ void ActionInfoTotalLength::init(int status)
 
 void ActionInfoTotalLength::trigger()
 {
-       RS_DEBUG->print("ActionInfoTotalLength::trigger()");
+       DEBUG->print("ActionInfoTotalLength::trigger()");
 
        double len = 0.0;
 
-       for(RS_Entity * e=container->firstEntity(RS2::ResolveNone); e!=NULL;
+       for(Entity * e=container->firstEntity(RS2::ResolveNone); e!=NULL;
                e=container->nextEntity(RS2::ResolveNone))
        {
                if (e->isVisible() && e->isSelected())
@@ -58,10 +58,10 @@ void ActionInfoTotalLength::trigger()
        }
 
        if (len > 0.0)
-               RS_DIALOGFACTORY->commandMessage(
+               DIALOGFACTORY->commandMessage(
                        tr("Total Length of selected entities: %1").arg(len));
        else
-               RS_DIALOGFACTORY->commandMessage(tr("At least one of the selected "
+               DIALOGFACTORY->commandMessage(tr("At least one of the selected "
                                "entities cannot be measured."));
 
        finish();
@@ -69,11 +69,11 @@ void ActionInfoTotalLength::trigger()
 
 void ActionInfoTotalLength::updateToolBar()
 {
-       if (RS_DIALOGFACTORY != NULL)
+       if (DIALOGFACTORY != NULL)
        {
                if (!isFinished())
-                       RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarInfo);
+                       DIALOGFACTORY->requestToolBar(RS2::ToolBarInfo);
                else
-                       RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarMain);
+                       DIALOGFACTORY->requestToolBar(RS2::ToolBarMain);
        }
 }
index c6ed62147c6fa52cef881670b89a156d39766e07..86f6fbcfe3a3e9550960a3d2cbf33fda7c8188e0 100644 (file)
@@ -20,7 +20,7 @@ class ActionInfoTotalLength: public ActionInterface
                };
 
        public:
-               ActionInfoTotalLength(RS_EntityContainer & container, GraphicView & graphicView);
+               ActionInfoTotalLength(EntityContainer & container, GraphicView & graphicView);
                ~ActionInfoTotalLength();
 
                virtual void init(int status = 0);
index 199b844ccfba3404ed62ae061962006489580c98..ba156aedceaa8290893cc48cbd70857ffded7d68 100644 (file)
@@ -19,7 +19,7 @@
 #include "dialogfactory.h"
 #include "drawing.h"
 
-ActionLayersAdd::ActionLayersAdd(RS_EntityContainer & container, GraphicView & graphicView):
+ActionLayersAdd::ActionLayersAdd(EntityContainer & container, GraphicView & graphicView):
        ActionInterface("Add Layer", container, graphicView)
 {
 }
@@ -30,11 +30,11 @@ ActionLayersAdd::~ActionLayersAdd()
 
 void ActionLayersAdd::trigger()
 {
-       RS_DEBUG->print("add layer");
+       DEBUG->print("add layer");
 
-       if (RS_DIALOGFACTORY && graphic)
+       if (DIALOGFACTORY && graphic)
        {
-               RS_Layer * layer = RS_DIALOGFACTORY->requestNewLayerDialog(graphic->getLayerList());
+               Layer * layer = DIALOGFACTORY->requestNewLayerDialog(graphic->getLayerList());
 
                if (layer)
                        graphic->addLayer(layer);
index b5791c6cd5e40c83497429d141aba193d09b178c..badc18e811546a2421914467d1e471ddf898ca5e 100644 (file)
@@ -12,7 +12,7 @@
 class ActionLayersAdd: public ActionInterface
 {
        public:
-               ActionLayersAdd(RS_EntityContainer & container, GraphicView & graphicView);
+               ActionLayersAdd(EntityContainer & container, GraphicView & graphicView);
                ~ActionLayersAdd();
 
                virtual void init(int status = 0);
index c4a46b9b23e3a48cfbacf1cbbb04a8efd01504e1..21bffbe55a8279901580f3077d84e1e1c5bb3a70 100644 (file)
@@ -20,7 +20,7 @@
 #include "graphicview.h"
 #include "drawing.h"
 
-ActionLayersEdit::ActionLayersEdit(RS_EntityContainer & container, GraphicView & graphicView):
+ActionLayersEdit::ActionLayersEdit(EntityContainer & container, GraphicView & graphicView):
        ActionInterface("Edit Layer", container, graphicView)
 {
 }
@@ -31,22 +31,22 @@ ActionLayersEdit::~ActionLayersEdit()
 
 void ActionLayersEdit::trigger()
 {
-       RS_DEBUG->print("ActionLayersEdit::trigger");
-       RS_Layer * layer = NULL;
+       DEBUG->print("ActionLayersEdit::trigger");
+       Layer * layer = NULL;
 
        if (graphic)
        {
-               layer = RS_DIALOGFACTORY->requestEditLayerDialog(graphic->getLayerList());
+               layer = DIALOGFACTORY->requestEditLayerDialog(graphic->getLayerList());
 
                if (layer)
                {
                        graphic->editLayer(graphic->getActiveLayer(), *layer);
 
                        // Update updatable entities on the layer that has changed
-                       for(RS_Entity * e=graphic->firstEntity(RS2::ResolveNone);
+                       for(Entity * e=graphic->firstEntity(RS2::ResolveNone);
                                e!=NULL; e=graphic->nextEntity(RS2::ResolveNone))
                        {
-                               RS_Layer * l = e->getLayer();
+                               Layer * l = e->getLayer();
 
                                if (l && l->getName() == layer->getName())
                                        e->update();
index ccf6c24cb988cc4dd88ad3b657592803cc6df82e..afa03ed28956db0d93cf1eee84e84f47aae57efb 100644 (file)
@@ -12,7 +12,7 @@
 class ActionLayersEdit: public ActionInterface
 {
        public:
-               ActionLayersEdit(RS_EntityContainer & container, GraphicView & graphicView);
+               ActionLayersEdit(EntityContainer & container, GraphicView & graphicView);
                ~ActionLayersEdit();
 
                virtual void init(int status = 0);
index a53ef915e7a8139a1eb8331b2d87043e2dbba567..15b067d5e411bc0452d121e9e5dbedff3941895d 100644 (file)
@@ -19,7 +19,7 @@
 #include "drawing.h"
 
 ActionLayersFreezeAll::ActionLayersFreezeAll(bool freeze,
-       RS_EntityContainer & container, GraphicView & graphicView):
+       EntityContainer & container, GraphicView & graphicView):
        ActionInterface("Freeze all Layers", container, graphicView)
 {
        this->freeze = freeze;
@@ -31,7 +31,7 @@ ActionLayersFreezeAll::~ActionLayersFreezeAll()
 
 void ActionLayersFreezeAll::trigger()
 {
-       RS_DEBUG->print("ActionLayersFreezeAll::trigger");
+       DEBUG->print("ActionLayersFreezeAll::trigger");
 
        if (graphic)
                graphic->freezeAllLayers(freeze);
index cad0b41ac93890579a0680c245b58c6349c9adc8..8d4e3e79fda6ef20d5da2b633d34db299b9a6ec6 100644 (file)
@@ -12,7 +12,7 @@
 class ActionLayersFreezeAll: public ActionInterface
 {
        public:
-               ActionLayersFreezeAll(bool freeze, RS_EntityContainer & container, GraphicView & graphicView);
+               ActionLayersFreezeAll(bool freeze, EntityContainer & container, GraphicView & graphicView);
                ~ActionLayersFreezeAll();
 
                virtual void init(int status = 0);
index ef2c870760d10d7f0d56ac53b0325c638731782d..47b738715547a1fff4d6a2c8df461d9657e147ed 100644 (file)
@@ -19,7 +19,7 @@
 #include "dialogfactory.h"
 #include "drawing.h"
 
-ActionLayersRemove::ActionLayersRemove(RS_EntityContainer & container,
+ActionLayersRemove::ActionLayersRemove(EntityContainer & container,
        GraphicView & graphicView):
        ActionInterface("Remove Layer", container, graphicView)
 {
@@ -31,19 +31,19 @@ ActionLayersRemove::~ActionLayersRemove()
 
 void ActionLayersRemove::trigger()
 {
-       RS_DEBUG->print("ActionLayersRemove::trigger");
+       DEBUG->print("ActionLayersRemove::trigger");
 
        if (graphic)
        {
-               RS_Layer * layer =
-                       RS_DIALOGFACTORY->requestLayerRemovalDialog(graphic->getLayerList());
+               Layer * layer =
+                       DIALOGFACTORY->requestLayerRemovalDialog(graphic->getLayerList());
 
                // Now remove the layer from the layer list:
                graphic->removeLayer(layer);
        }
 
        finish();
-       RS_DIALOGFACTORY->updateSelectionWidget(container->countSelected());
+       DIALOGFACTORY->updateSelectionWidget(container->countSelected());
 }
 
 void ActionLayersRemove::init(int status)
index b48779aeed9c7e73c7f3ca9be4b95959e64ad49b..ffad4f4226ab16d805100f47d62a7632e00f190d 100644 (file)
@@ -12,7 +12,7 @@
 class ActionLayersRemove: public ActionInterface
 {
        public:
-               ActionLayersRemove(RS_EntityContainer & container, GraphicView & graphicView);
+               ActionLayersRemove(EntityContainer & container, GraphicView & graphicView);
                ~ActionLayersRemove();
 
                virtual void init(int status = 0);
index 84aa552356a782c12b40ea06b02d75088e61e097..6ea9e2088e810a8abc4b5d953d297ca876f9b2d1 100644 (file)
@@ -19,7 +19,7 @@
 #include "graphicview.h"
 #include "drawing.h"
 
-ActionLayersToggleLock::ActionLayersToggleLock(RS_EntityContainer & container, GraphicView & graphicView): ActionInterface("Toggle Layer Visibility",
+ActionLayersToggleLock::ActionLayersToggleLock(EntityContainer & container, GraphicView & graphicView): ActionInterface("Toggle Layer Visibility",
                container, graphicView)
 {
 }
@@ -30,11 +30,11 @@ ActionLayersToggleLock::~ActionLayersToggleLock()
 
 void ActionLayersToggleLock::trigger()
 {
-       RS_DEBUG->print("toggle layer");
+       DEBUG->print("toggle layer");
 
        if (graphic)
        {
-               RS_Layer * layer = graphic->getActiveLayer();
+               Layer * layer = graphic->getActiveLayer();
 
                if (layer)
                {
@@ -43,7 +43,7 @@ void ActionLayersToggleLock::trigger()
                        // deselect entities on locked layer:
                        if (layer->isLocked())
                        {
-                               for(RS_Entity * e=container->firstEntity(); e!=NULL;
+                               for(Entity * e=container->firstEntity(); e!=NULL;
                                        e=container->nextEntity())
                                {
                                        if (e != NULL && e->isVisible() && e->getLayer() == layer)
index a0cfafa1f0f252730e31447a15d6b846db47a39f..fb3511f0e3661eb1f31660328a911c8eb3fe6461 100644 (file)
@@ -12,7 +12,7 @@
 class ActionLayersToggleLock: public ActionInterface
 {
        public:
-               ActionLayersToggleLock(RS_EntityContainer & container, GraphicView & graphicView);
+               ActionLayersToggleLock(EntityContainer & container, GraphicView & graphicView);
                ~ActionLayersToggleLock();
 
                virtual void init(int status = 0);
index 6f3bd2063712822cad138d6fecece3d9a0b5d89f..e75647f55eab11e675fb955f1b478ae265c43d11 100644 (file)
@@ -18,7 +18,7 @@
 
 #include "drawing.h"
 
-ActionLayersToggleView::ActionLayersToggleView(RS_EntityContainer & container, GraphicView & graphicView): ActionInterface("Toggle Layer Visibility",
+ActionLayersToggleView::ActionLayersToggleView(EntityContainer & container, GraphicView & graphicView): ActionInterface("Toggle Layer Visibility",
                container, graphicView)
 {
 }
@@ -29,11 +29,11 @@ ActionLayersToggleView::~ActionLayersToggleView()
 
 void ActionLayersToggleView::trigger()
 {
-       RS_DEBUG->print("toggle layer");
+       DEBUG->print("toggle layer");
 
        if (graphic != NULL)
        {
-               RS_Layer * layer = graphic->getActiveLayer();
+               Layer * layer = graphic->getActiveLayer();
                graphic->toggleLayer(layer);
        }
 
index b28301818856480085805b9a758d9bf877028858..c3459e3f8a576c8e7c2f24b3739cbe32c0113d45 100644 (file)
@@ -12,7 +12,7 @@
 class ActionLayersToggleView: public ActionInterface
 {
        public:
-               ActionLayersToggleView(RS_EntityContainer & container, GraphicView & graphicView);
+               ActionLayersToggleView(EntityContainer & container, GraphicView & graphicView);
                ~ActionLayersToggleView();
 
                virtual void init(int status = 0);
index eee135be6e380b617b5de509949db94828bace48..3a433dfabbf7ba6c4103e13f58c43620bbcf0d60 100644 (file)
@@ -25,7 +25,7 @@
 /**
  * Constructor.
  */
-ActionLibraryInsert::ActionLibraryInsert(RS_EntityContainer & container, GraphicView & graphicView):
+ActionLibraryInsert::ActionLibraryInsert(EntityContainer & container, GraphicView & graphicView):
        ActionInterface("Library Insert", container, graphicView)
 {
 }
@@ -59,12 +59,12 @@ void ActionLibraryInsert::setFile(const QString & file)
        data.file = file;
 
        if (!prev.open(file, RS2::FormatUnknown))
-               RS_DIALOGFACTORY->commandMessage(tr("Cannot open file '%1'").arg(file));
+               DIALOGFACTORY->commandMessage(tr("Cannot open file '%1'").arg(file));
 }
 
 void ActionLibraryInsert::reset()
 {
-       /*data = RS_InsertData("",
+       /*data = InsertData("",
                             Vector(0.0,0.0),
                             Vector(1.0,1.0),
                             0.0,
@@ -84,7 +84,7 @@ void ActionLibraryInsert::trigger()
        deletePreview();
        clearPreview();
 
-       RS_Creation creation(container, graphicView);
+       Creation creation(container, graphicView);
        creation.createLibraryInsert(data);
 
        graphicView->redraw();
@@ -106,7 +106,7 @@ void ActionLibraryInsert::mouseMoveEvent(QMouseEvent * e)
                // unit conversion:
                if (graphic)
                {
-                       double uf = RS_Units::convert(1.0, prev.getUnit(), graphic->getUnit());
+                       double uf = Units::convert(1.0, prev.getUnit(), graphic->getUnit());
 //                     preview->scale(data.insertionPoint, Vector(uf, uf));
                }
 
@@ -142,13 +142,13 @@ void ActionLibraryInsert::coordinateEvent(Vector * e)
        trigger();
 }
 
-void ActionLibraryInsert::commandEvent(RS_CommandEvent * e)
+void ActionLibraryInsert::commandEvent(CommandEvent * e)
 {
        QString c = e->getCommand().toLower();
 
        if (checkCommand("help", c))
        {
-               RS_DIALOGFACTORY->commandMessage(msgAvailableCommands() + getAvailableCommands().join(", "));
+               DIALOGFACTORY->commandMessage(msgAvailableCommands() + getAvailableCommands().join(", "));
                return;
        }
 
@@ -177,14 +177,14 @@ void ActionLibraryInsert::commandEvent(RS_CommandEvent * e)
        case SetAngle:
        {
                bool ok;
-               double a = RS_Math::eval(c, &ok);
+               double a = Math::eval(c, &ok);
 
                if (ok == true)
-                       data.angle = RS_Math::deg2rad(a);
+                       data.angle = Math::deg2rad(a);
                else
-                       RS_DIALOGFACTORY->commandMessage(tr("Not a valid expression"));
+                       DIALOGFACTORY->commandMessage(tr("Not a valid expression"));
 
-               RS_DIALOGFACTORY->requestOptions(this, true, true);
+               DIALOGFACTORY->requestOptions(this, true, true);
                setStatus(lastStatus);
        }
        break;
@@ -192,14 +192,14 @@ void ActionLibraryInsert::commandEvent(RS_CommandEvent * e)
        case SetFactor:
        {
                bool ok;
-               double f = RS_Math::eval(c, &ok);
+               double f = Math::eval(c, &ok);
 
                if (ok == true)
                        setFactor(f);
                else
-                       RS_DIALOGFACTORY->commandMessage(tr("Not a valid expression"));
+                       DIALOGFACTORY->commandMessage(tr("Not a valid expression"));
 
-               RS_DIALOGFACTORY->requestOptions(this, true, true);
+               DIALOGFACTORY->requestOptions(this, true, true);
                setStatus(lastStatus);
        }
        break;
@@ -231,14 +231,14 @@ void ActionLibraryInsert::showOptions()
 {
        ActionInterface::showOptions();
 
-       RS_DIALOGFACTORY->requestOptions(this, true);
+       DIALOGFACTORY->requestOptions(this, true);
 }
 
 void ActionLibraryInsert::hideOptions()
 {
        ActionInterface::hideOptions();
 
-       RS_DIALOGFACTORY->requestOptions(this, false);
+       DIALOGFACTORY->requestOptions(this, false);
 }
 
 void ActionLibraryInsert::updateMouseButtonHints()
@@ -246,19 +246,19 @@ void ActionLibraryInsert::updateMouseButtonHints()
        switch (getStatus())
        {
        case SetTargetPoint:
-               RS_DIALOGFACTORY->updateMouseWidget(tr("Specify reference point"), tr("Cancel"));
+               DIALOGFACTORY->updateMouseWidget(tr("Specify reference point"), tr("Cancel"));
                break;
 
        case SetAngle:
-               RS_DIALOGFACTORY->updateMouseWidget(tr("Enter angle:"), "");
+               DIALOGFACTORY->updateMouseWidget(tr("Enter angle:"), "");
                break;
 
        case SetFactor:
-               RS_DIALOGFACTORY->updateMouseWidget(tr("Enter factor:"), "");
+               DIALOGFACTORY->updateMouseWidget(tr("Enter factor:"), "");
                break;
 
        default:
-               RS_DIALOGFACTORY->updateMouseWidget("", "");
+               DIALOGFACTORY->updateMouseWidget("", "");
                break;
        }
 }
@@ -271,9 +271,9 @@ void ActionLibraryInsert::updateMouseCursor()
 void ActionLibraryInsert::updateToolBar()
 {
        if (!isFinished())
-               RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
+               DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
        else
-               RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarMain);
+               DIALOGFACTORY->requestToolBar(RS2::ToolBarMain);
 }
 
 double ActionLibraryInsert::getAngle()
index 1b0b72fb4abc7b7d23da7c3055b940a777e56564..34f4286fe15fcf095a23f990b9371426949b22a8 100644 (file)
@@ -29,7 +29,7 @@ class ActionLibraryInsert: public ActionInterface
                };
 
        public:
-               ActionLibraryInsert(RS_EntityContainer & container, GraphicView & graphicView);
+               ActionLibraryInsert(EntityContainer & container, GraphicView & graphicView);
                virtual ~ActionLibraryInsert();
 
                virtual RS2::ActionType rtti();
@@ -39,7 +39,7 @@ class ActionLibraryInsert: public ActionInterface
                virtual void mouseMoveEvent(QMouseEvent * e);
                virtual void mouseReleaseEvent(QMouseEvent * e);
                virtual void coordinateEvent(Vector * e);
-               virtual void commandEvent(RS_CommandEvent * e);
+               virtual void commandEvent(CommandEvent * e);
                virtual QStringList getAvailableCommands();
                virtual void showOptions();
                virtual void hideOptions();
@@ -54,7 +54,7 @@ class ActionLibraryInsert: public ActionInterface
 
        protected:
                Drawing prev;
-               RS_LibraryInsertData data;
+               LibraryInsertData data;
 
                /** Last status before entering option. */
                Status lastStatus;
index 46f915e273c42c649314a5893278a00080df3eb0..e804909da1bb206fd791a9d4be85c0d29e1e09ca 100644 (file)
@@ -19,7 +19,7 @@
 #include "graphicview.h"
 
 ActionLockRelativeZero::ActionLockRelativeZero(
-       RS_EntityContainer & container, GraphicView & graphicView, bool on):
+       EntityContainer & container, GraphicView & graphicView, bool on):
        ActionInterface("(Un-)lock the relative Zero", container, graphicView)
 {
        this->on = on;
index 59e1d0899872fb8c690fdcbcab09c3686fb10f26..cbea0d53d6d1f9d888e3b29c2b775a3fb90ca00b 100644 (file)
@@ -14,7 +14,7 @@
 class ActionLockRelativeZero: public ActionInterface
 {
        public:
-               ActionLockRelativeZero(RS_EntityContainer & container, GraphicView & graphicView, bool on);
+               ActionLockRelativeZero(EntityContainer & container, GraphicView & graphicView, bool on);
                ~ActionLockRelativeZero();
 
                virtual void init(int status = 0);
index dbc64519adcfc54c7e614fb78a0d62743da5da87..fcbe0f52c247fc6238b9b4dd945f08ca04a3734a 100644 (file)
@@ -22,7 +22,7 @@
 #include "modification.h"
 
 ActionModifyAttributes::ActionModifyAttributes(
-       RS_EntityContainer & container, GraphicView & graphicView):
+       EntityContainer & container, GraphicView & graphicView):
        ActionInterface("Change Attributes", container, graphicView)
 {
 }
@@ -39,10 +39,10 @@ void ActionModifyAttributes::init(int status)
 
 void ActionModifyAttributes::trigger()
 {
-       RS_DEBUG->print("ActionModifyAttributes::trigger()");
+       DEBUG->print("ActionModifyAttributes::trigger()");
 
-       RS_AttributesData data;
-       data.pen = RS_Pen();
+       AttributesData data;
+       data.pen = Pen();
        data.layer = "0";
        data.changeColor = false;
        data.changeLineType = false;
@@ -51,10 +51,10 @@ void ActionModifyAttributes::trigger()
 
        if (graphic)
        {
-               if (RS_DIALOGFACTORY->requestAttributesDialog(data,
+               if (DIALOGFACTORY->requestAttributesDialog(data,
                    *graphic->getLayerList()))
                {
-                       RS_Modification m(*container, graphicView);
+                       Modification m(*container, graphicView);
                        m.changeAttributes(data);
                }
        }
@@ -62,7 +62,7 @@ void ActionModifyAttributes::trigger()
        finish();
        graphicView->killSelectActions();
 
-       RS_DIALOGFACTORY->updateSelectionWidget(container->countSelected());
+       DIALOGFACTORY->updateSelectionWidget(container->countSelected());
 }
 
 void ActionModifyAttributes::updateMouseButtonHints()
@@ -70,10 +70,10 @@ void ActionModifyAttributes::updateMouseButtonHints()
        switch (getStatus())
        {
        //case Acknowledge:
-       //RS_DIALOGFACTORY->updateMouseWidget(tr("Acknowledge"), tr("Cancel"));
+       //DIALOGFACTORY->updateMouseWidget(tr("Acknowledge"), tr("Cancel"));
        //break;
        default:
-               RS_DIALOGFACTORY->updateMouseWidget("", "");
+               DIALOGFACTORY->updateMouseWidget("", "");
                break;
        }
 }
@@ -86,7 +86,7 @@ void ActionModifyAttributes::updateMouseCursor()
 void ActionModifyAttributes::updateToolBar()
 {
        if (!isFinished())
-               RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarModify);
+               DIALOGFACTORY->requestToolBar(RS2::ToolBarModify);
        else
-               RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarMain);
+               DIALOGFACTORY->requestToolBar(RS2::ToolBarMain);
 }
index 58423fd88284bbe9e715c3aebf6ea63e2b29e296..2e4a74b22c157f549f294cc1827758bd134a188e 100644 (file)
@@ -21,7 +21,7 @@ class ActionModifyAttributes: public ActionInterface
                };
 
        public:
-               ActionModifyAttributes(RS_EntityContainer & container, GraphicView & graphicView);
+               ActionModifyAttributes(EntityContainer & container, GraphicView & graphicView);
                ~ActionModifyAttributes();
 
                virtual void init(int status = 0);
index 92042729df01492a7112a7c089952883e31d01fb..5615cf1e31edd8be336ea08e8ad2c3e048ab22fe 100644 (file)
@@ -21,7 +21,7 @@
 #include "dialogfactory.h"
 #include "information.h"
 
-ActionModifyBevel::ActionModifyBevel(RS_EntityContainer & container, GraphicView & graphicView): ActionInterface("Bevel Entities",
+ActionModifyBevel::ActionModifyBevel(EntityContainer & container, GraphicView & graphicView): ActionInterface("Bevel Entities",
                container, graphicView)
 {
        entity1 = NULL;
@@ -49,28 +49,28 @@ void ActionModifyBevel::init(int status)
 
 void ActionModifyBevel::trigger()
 {
-       RS_DEBUG->print("ActionModifyBevel::trigger()");
+       DEBUG->print("ActionModifyBevel::trigger()");
 
        if (entity1 && entity1->isAtomic()
            && entity2 && entity2->isAtomic())
        {
-               RS_Modification m(*container, graphicView);
-               m.bevel(coord1, (RS_AtomicEntity *)entity1, coord2, (RS_AtomicEntity *)entity2, data);
+               Modification m(*container, graphicView);
+               m.bevel(coord1, (AtomicEntity *)entity1, coord2, (AtomicEntity *)entity2, data);
 
                entity1 = NULL;
                entity2 = NULL;
                setStatus(SetEntity1);
 
-               RS_DIALOGFACTORY->updateSelectionWidget(container->countSelected());
+               DIALOGFACTORY->updateSelectionWidget(container->countSelected());
        }
 }
 
 void ActionModifyBevel::mouseMoveEvent(QMouseEvent * e)
 {
-       RS_DEBUG->print("ActionModifyBevel::mouseMoveEvent begin");
+       DEBUG->print("ActionModifyBevel::mouseMoveEvent begin");
 
        Vector mouse = graphicView->toGraph(e->x(), e->y());
-       RS_Entity * se = catchEntity(e, RS2::ResolveAll);
+       Entity * se = catchEntity(e, RS2::ResolveAll);
 
        switch (getStatus())
        {
@@ -81,7 +81,7 @@ void ActionModifyBevel::mouseMoveEvent(QMouseEvent * e)
 
        case SetEntity2:
 
-               if (entity1 != NULL && RS_Information::isTrimmable(entity1))
+               if (entity1 != NULL && Information::isTrimmable(entity1))
                {
                        coord2 = mouse;
                        entity2 = se;
@@ -92,7 +92,7 @@ void ActionModifyBevel::mouseMoveEvent(QMouseEvent * e)
                break;
        }
 
-       RS_DEBUG->print("ActionModifyBevel::mouseMoveEvent end");
+       DEBUG->print("ActionModifyBevel::mouseMoveEvent end");
 }
 
 void ActionModifyBevel::mouseReleaseEvent(QMouseEvent * e)
@@ -110,7 +110,7 @@ void ActionModifyBevel::mouseReleaseEvent(QMouseEvent * e)
                case SetEntity2:
 
                        if (entity2 != NULL && entity2->isAtomic()
-                           && RS_Information::isTrimmable(entity1, entity2))
+                           && Information::isTrimmable(entity1, entity2))
                                trigger();
                        break;
 
@@ -126,13 +126,13 @@ void ActionModifyBevel::mouseReleaseEvent(QMouseEvent * e)
        }
 }
 
-void ActionModifyBevel::commandEvent(RS_CommandEvent * e)
+void ActionModifyBevel::commandEvent(CommandEvent * e)
 {
        QString c = e->getCommand().toLower();
 
        if (checkCommand("help", c))
        {
-               RS_DIALOGFACTORY->commandMessage(msgAvailableCommands()
+               DIALOGFACTORY->commandMessage(msgAvailableCommands()
                        + getAvailableCommands().join(", "));
                return;
        }
@@ -166,32 +166,32 @@ void ActionModifyBevel::commandEvent(RS_CommandEvent * e)
                        //lastStatus = (Status)getStatus();
                        //setStatus(SetTrim);
                        data.trim = !data.trim;
-                       RS_DIALOGFACTORY->requestOptions(this, true, true);
+                       DIALOGFACTORY->requestOptions(this, true, true);
                }
                break;
 
        case SetLength1: {
                bool ok;
-               double l = RS_Math::eval(c, &ok);
+               double l = Math::eval(c, &ok);
 
                if (ok == true)
                        data.length1 = l;
                else
-                       RS_DIALOGFACTORY->commandMessage(tr("Not a valid expression"));
-               RS_DIALOGFACTORY->requestOptions(this, true, true);
+                       DIALOGFACTORY->commandMessage(tr("Not a valid expression"));
+               DIALOGFACTORY->requestOptions(this, true, true);
                setStatus(lastStatus);
        }
        break;
 
        case SetLength2: {
                bool ok;
-               double l = RS_Math::eval(c, &ok);
+               double l = Math::eval(c, &ok);
 
                if (ok == true)
                        data.length2 = l;
                else
-                       RS_DIALOGFACTORY->commandMessage(tr("Not a valid expression"));
-               RS_DIALOGFACTORY->requestOptions(this, true, true);
+                       DIALOGFACTORY->commandMessage(tr("Not a valid expression"));
+               DIALOGFACTORY->requestOptions(this, true, true);
                setStatus(lastStatus);
        }
        break;
@@ -202,10 +202,10 @@ void ActionModifyBevel::commandEvent(RS_CommandEvent * e)
           } else if (c==cmdNo.toLower() || c==cmdNo2) {
           data.trim = false;
                } else {
-                   RS_DIALOGFACTORY->commandMessage(tr("Please enter 'Yes' "
+                   DIALOGFACTORY->commandMessage(tr("Please enter 'Yes' "
               "or 'No'"));
                }
-               RS_DIALOGFACTORY->requestOptions(this, true, true);
+               DIALOGFACTORY->requestOptions(this, true, true);
                setStatus(lastStatus);
            }
            break;*/
@@ -238,14 +238,14 @@ void ActionModifyBevel::showOptions()
 {
        ActionInterface::showOptions();
 
-       RS_DIALOGFACTORY->requestOptions(this, true);
+       DIALOGFACTORY->requestOptions(this, true);
 }
 
 void ActionModifyBevel::hideOptions()
 {
        ActionInterface::hideOptions();
 
-       RS_DIALOGFACTORY->requestOptions(this, false);
+       DIALOGFACTORY->requestOptions(this, false);
 }
 
 void ActionModifyBevel::updateMouseButtonHints()
@@ -253,31 +253,31 @@ void ActionModifyBevel::updateMouseButtonHints()
        switch (getStatus())
        {
        case SetEntity1:
-               RS_DIALOGFACTORY->updateMouseWidget(tr("Select first entity"),
+               DIALOGFACTORY->updateMouseWidget(tr("Select first entity"),
                        tr("Cancel"));
                break;
 
        case SetEntity2:
-               RS_DIALOGFACTORY->updateMouseWidget(tr("Select second entity"),
+               DIALOGFACTORY->updateMouseWidget(tr("Select second entity"),
                        tr("Back"));
                break;
 
        case SetLength1:
-               RS_DIALOGFACTORY->updateMouseWidget(tr("Enter length 1:"),
+               DIALOGFACTORY->updateMouseWidget(tr("Enter length 1:"),
                        tr("Back"));
                break;
 
        case SetLength2:
-               RS_DIALOGFACTORY->updateMouseWidget(tr("Enter length 2:"),
+               DIALOGFACTORY->updateMouseWidget(tr("Enter length 2:"),
                        tr("Back"));
                break;
 
        /*case SetTrim:
-           RS_DIALOGFACTORY->updateMouseWidget(tr("Trim on? (yes/no):"),
+           DIALOGFACTORY->updateMouseWidget(tr("Trim on? (yes/no):"),
                                                "");
            break;*/
        default:
-               RS_DIALOGFACTORY->updateMouseWidget("", "");
+               DIALOGFACTORY->updateMouseWidget("", "");
                break;
        }
 }
@@ -289,7 +289,7 @@ void ActionModifyBevel::updateMouseCursor()
 
 void ActionModifyBevel::updateToolBar()
 {
-       RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarModify);
+       DIALOGFACTORY->requestToolBar(RS2::ToolBarModify);
 }
 
 void ActionModifyBevel::setLength1(double l1)
index d30a33ebf7ebaa6f63b84008424616a3a4ace485..02f68d87a82654be8fd7d07f39aa49b329b4fb08 100644 (file)
@@ -25,7 +25,7 @@ class ActionModifyBevel: public ActionInterface
                };
 
        public:
-               ActionModifyBevel(RS_EntityContainer & container, GraphicView & graphicView);
+               ActionModifyBevel(EntityContainer & container, GraphicView & graphicView);
                ~ActionModifyBevel();
 
                virtual RS2::ActionType rtti();
@@ -33,7 +33,7 @@ class ActionModifyBevel: public ActionInterface
                virtual void trigger();
                virtual void mouseMoveEvent(QMouseEvent * e);
                virtual void mouseReleaseEvent(QMouseEvent * e);
-               virtual void commandEvent(RS_CommandEvent * e);
+               virtual void commandEvent(CommandEvent * e);
                virtual QStringList getAvailableCommands();
                virtual void hideOptions();
                virtual void showOptions();
@@ -48,11 +48,11 @@ class ActionModifyBevel: public ActionInterface
                bool isTrimOn();
 
        private:
-               RS_Entity * entity1;
+               Entity * entity1;
                Vector coord1;
-               RS_Entity * entity2;
+               Entity * entity2;
                Vector coord2;
-               RS_BevelData data;
+               BevelData data;
                /** Last status before entering angle. */
                Status lastStatus;
 };
index b5ff8ceec2650901d5141320cdc31b95107af06e..228c3c75e137244022b2fa861c8f29c67084b341 100644 (file)
@@ -21,7 +21,7 @@
 #include "graphicview.h"
 #include "modification.h"
 
-ActionModifyCut::ActionModifyCut(RS_EntityContainer & container,
+ActionModifyCut::ActionModifyCut(EntityContainer & container,
        GraphicView & graphicView): ActionInterface("Cut Entity",
                container, graphicView)
 {
@@ -40,7 +40,7 @@ void ActionModifyCut::init(int status)
 
 void ActionModifyCut::trigger()
 {
-       RS_DEBUG->print("ActionModifyCut::trigger()");
+       DEBUG->print("ActionModifyCut::trigger()");
 
        if (cutEntity != NULL && cutEntity->isAtomic() && cutCoord.valid
            && cutEntity->isPointOnEntity(cutCoord))
@@ -48,20 +48,20 @@ void ActionModifyCut::trigger()
                cutEntity->setHighlighted(false);
                graphicView->drawEntity(cutEntity);
 
-               RS_Modification m(*container, graphicView);
-               m.cut(cutCoord, (RS_AtomicEntity *)cutEntity);
+               Modification m(*container, graphicView);
+               m.cut(cutCoord, (AtomicEntity *)cutEntity);
 
                cutEntity = NULL;
                cutCoord = Vector(false);
                setStatus(ChooseCutEntity);
 
-               RS_DIALOGFACTORY->updateSelectionWidget(container->countSelected());
+               DIALOGFACTORY->updateSelectionWidget(container->countSelected());
        }
 }
 
 void ActionModifyCut::mouseMoveEvent(QMouseEvent * e)
 {
-       RS_DEBUG->print("ActionModifyCut::mouseMoveEvent begin");
+       DEBUG->print("ActionModifyCut::mouseMoveEvent begin");
 
        switch (getStatus())
        {
@@ -76,7 +76,7 @@ void ActionModifyCut::mouseMoveEvent(QMouseEvent * e)
                break;
        }
 
-       RS_DEBUG->print("ActionModifyTrim::mouseMoveEvent end");
+       DEBUG->print("ActionModifyTrim::mouseMoveEvent end");
 }
 
 void ActionModifyCut::mouseReleaseEvent(QMouseEvent * e)
@@ -89,13 +89,13 @@ void ActionModifyCut::mouseReleaseEvent(QMouseEvent * e)
                        cutEntity = catchEntity(e);
 
                        if (cutEntity == NULL)
-                               RS_DIALOGFACTORY->commandMessage(tr("No Entity found."));
+                               DIALOGFACTORY->commandMessage(tr("No Entity found."));
                        else if (cutEntity->rtti() != RS2::EntityLine
                                && cutEntity->rtti() != RS2::EntityArc
                                && cutEntity->rtti() != RS2::EntityCircle
                                && cutEntity->rtti() != RS2::EntityEllipse)
 
-                               RS_DIALOGFACTORY->commandMessage(
+                               DIALOGFACTORY->commandMessage(
                                        tr("Entity must be a line, arc, circle or ellipse."));
                        else
                        {
@@ -109,11 +109,11 @@ void ActionModifyCut::mouseReleaseEvent(QMouseEvent * e)
                        cutCoord = snapPoint(e);
 
                        if (cutEntity == NULL)
-                               RS_DIALOGFACTORY->commandMessage(tr("No Entity found."));
+                               DIALOGFACTORY->commandMessage(tr("No Entity found."));
                        else if (!cutCoord.valid)
-                               RS_DIALOGFACTORY->commandMessage(tr("Cutting point is invalid."));
+                               DIALOGFACTORY->commandMessage(tr("Cutting point is invalid."));
                        else if (!cutEntity->isPointOnEntity(cutCoord))
-                               RS_DIALOGFACTORY->commandMessage(
+                               DIALOGFACTORY->commandMessage(
                                        tr("Cutting point is not on entity."));
                        else
                        {
@@ -144,17 +144,17 @@ void ActionModifyCut::updateMouseButtonHints()
        switch (getStatus())
        {
        case ChooseCutEntity:
-               RS_DIALOGFACTORY->updateMouseWidget(tr("Specify entity to cut"),
+               DIALOGFACTORY->updateMouseWidget(tr("Specify entity to cut"),
                        tr("Cancel"));
                break;
 
        case SetCutCoord:
-               RS_DIALOGFACTORY->updateMouseWidget(tr("Specify cutting point"),
+               DIALOGFACTORY->updateMouseWidget(tr("Specify cutting point"),
                        tr("Back"));
                break;
 
        default:
-               RS_DIALOGFACTORY->updateMouseWidget("", "");
+               DIALOGFACTORY->updateMouseWidget("", "");
                break;
        }
 }
@@ -169,12 +169,12 @@ void ActionModifyCut::updateToolBar()
        switch (getStatus())
        {
        case SetCutCoord:
-               RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
+               DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
                break;
 
        case ChooseCutEntity:
        default:
-               RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarModify);
+               DIALOGFACTORY->requestToolBar(RS2::ToolBarModify);
                break;
        }
 }
index e38ada26b40f9b6592ecaf241691de9c792c98cd..156675abc7218b62d707c668521520a3bf022900 100644 (file)
@@ -4,7 +4,7 @@
 #include "actioninterface.h"
 #include "vector.h"
 
-class RS_Entity;
+class Entity;
 
 /**
  * This action class can handle user events to divide entities.
@@ -24,7 +24,7 @@ class ActionModifyCut: public ActionInterface
                };
 
        public:
-               ActionModifyCut(RS_EntityContainer & container, GraphicView & graphicView);
+               ActionModifyCut(EntityContainer & container, GraphicView & graphicView);
                ~ActionModifyCut();
 
                virtual void init(int status = 0);
@@ -36,7 +36,7 @@ class ActionModifyCut: public ActionInterface
                virtual void updateToolBar();
 
        private:
-               RS_Entity * cutEntity;
+               Entity * cutEntity;
                Vector cutCoord;
 };
 
index 94ea10bc63d21e49753d2de7a5c9e0fa7a662b79..9e9ee6dc277a90757b2a4d902730c19f576c02e2 100644 (file)
@@ -21,7 +21,7 @@
 #include "graphicview.h"
 #include "modification.h"
 
-ActionModifyDelete::ActionModifyDelete(RS_EntityContainer & container,
+ActionModifyDelete::ActionModifyDelete(EntityContainer & container,
        GraphicView & graphicView): ActionInterface("Delete Entities",
                container, graphicView)
 {
@@ -39,27 +39,27 @@ void ActionModifyDelete::init(int status)
 
 void ActionModifyDelete::trigger()
 {
-       RS_DEBUG->print("ActionModifyDelete::trigger()");
-       RS_Modification m(*container, graphicView);
+       DEBUG->print("ActionModifyDelete::trigger()");
+       Modification m(*container, graphicView);
        m.remove();
        finish();
 
-       if (RS_DIALOGFACTORY != NULL)
-               RS_DIALOGFACTORY->updateSelectionWidget(container->countSelected());
+       if (DIALOGFACTORY != NULL)
+               DIALOGFACTORY->updateSelectionWidget(container->countSelected());
 }
 
 void ActionModifyDelete::updateMouseButtonHints()
 {
-       if (RS_DIALOGFACTORY != NULL)
+       if (DIALOGFACTORY != NULL)
        {
                switch (getStatus())
                {
                //case Acknowledge:
-               //    RS_DIALOGFACTORY->updateMouseWidget(tr("Acknowledge"),
+               //    DIALOGFACTORY->updateMouseWidget(tr("Acknowledge"),
                //      tr("Cancel"));
                //    break;
                default:
-                       RS_DIALOGFACTORY->updateMouseWidget("", "");
+                       DIALOGFACTORY->updateMouseWidget("", "");
                        break;
                }
        }
@@ -72,11 +72,11 @@ void ActionModifyDelete::updateMouseCursor()
 
 void ActionModifyDelete::updateToolBar()
 {
-       if (RS_DIALOGFACTORY != NULL)
+       if (DIALOGFACTORY != NULL)
        {
                if (!isFinished())
-                       RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarModify);
+                       DIALOGFACTORY->requestToolBar(RS2::ToolBarModify);
                else
-                       RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarMain);
+                       DIALOGFACTORY->requestToolBar(RS2::ToolBarMain);
        }
 }
index 9c51dd1fcfae39326e9b6b1e564bcef140e7eddb..6b873fcef23e48162b26b94b4a3fb715ce5005c6 100644 (file)
@@ -20,7 +20,7 @@ class ActionModifyDelete: public ActionInterface
                };
 
        public:
-               ActionModifyDelete(RS_EntityContainer & container, GraphicView & graphicView);
+               ActionModifyDelete(EntityContainer & container, GraphicView & graphicView);
                ~ActionModifyDelete();
 
                virtual void init(int status = 0);
index c37207851132fa63010a6eede442e877df872630..8a8c19690b2e03084366162507104d9c3f389352 100644 (file)
@@ -22,7 +22,7 @@
 #include "polyline.h"
 #include "undo.h"
 
-ActionModifyDeleteFree::ActionModifyDeleteFree(RS_EntityContainer & container,
+ActionModifyDeleteFree::ActionModifyDeleteFree(EntityContainer & container,
        GraphicView & graphicView):
        ActionInterface("Delete Entities Freehand", container, graphicView)
 {
@@ -45,7 +45,7 @@ void ActionModifyDeleteFree::trigger()
 {
        if (e1 && e2)
        {
-               RS_EntityContainer * parent = e2->getParent();
+               EntityContainer * parent = e2->getParent();
 
                if (parent)
                {
@@ -56,13 +56,13 @@ void ActionModifyDeleteFree::trigger()
 #warning "!!! Old rendering path need upgrade !!!"
 #if 0
                                        // deletes whole polyline on screen:
-                                       graphicView->deleteEntity((RS_Entity *)polyline);
+                                       graphicView->deleteEntity((Entity *)polyline);
 #endif
 
                                        // splits up the polyline in the container:
-                                       RS_Polyline * pl1;
-                                       RS_Polyline * pl2;
-                                       RS_Modification m(*container);
+                                       Polyline * pl1;
+                                       Polyline * pl2;
+                                       Modification m(*container);
                                        m.splitPolyline(*polyline, *e1, v1, *e2, v2, &pl1, &pl2);
 
                                        if (document)
@@ -75,25 +75,25 @@ void ActionModifyDeleteFree::trigger()
                                        }
 
                                        // draws the new polylines on the screen:
-                                       graphicView->drawEntity((RS_Entity *)pl1);
-                                       graphicView->drawEntity((RS_Entity *)pl2);
+                                       graphicView->drawEntity((Entity *)pl1);
+                                       graphicView->drawEntity((Entity *)pl2);
 
                                        init();
 
-                                       RS_DIALOGFACTORY->updateSelectionWidget(
+                                       DIALOGFACTORY->updateSelectionWidget(
                                                container->countSelected());
                                }
                                else
-                                       RS_DIALOGFACTORY->commandMessage(tr("Entities not in the same polyline."));
+                                       DIALOGFACTORY->commandMessage(tr("Entities not in the same polyline."));
                        }
                        else
-                               RS_DIALOGFACTORY->commandMessage(tr("Parent of second entity is not a polyline"));
+                               DIALOGFACTORY->commandMessage(tr("Parent of second entity is not a polyline"));
                }
                else
-                       RS_DIALOGFACTORY->commandMessage(tr("Parent of second entity is NULL"));
+                       DIALOGFACTORY->commandMessage(tr("Parent of second entity is NULL"));
        }
        else
-               RS_DIALOGFACTORY->commandMessage(tr("One of the chosen entities is NULL"));
+               DIALOGFACTORY->commandMessage(tr("One of the chosen entities is NULL"));
 }
 
 void ActionModifyDeleteFree::mouseReleaseEvent(QMouseEvent * e)
@@ -111,25 +111,25 @@ void ActionModifyDeleteFree::mouseReleaseEvent(QMouseEvent * e)
 
                        if (e1)
                        {
-                               RS_EntityContainer * parent = e1->getParent();
+                               EntityContainer * parent = e1->getParent();
 
                                if (parent)
                                {
                                        if (parent->rtti() == RS2::EntityPolyline)
                                        {
-                                               polyline = (RS_Polyline *)parent;
+                                               polyline = (Polyline *)parent;
                                                setStatus(1);
                                        }
                                        else
-                                               RS_DIALOGFACTORY->commandMessage(
+                                               DIALOGFACTORY->commandMessage(
                                                        tr("Parent of first entity is not a polyline"));
                                }
                                else
-                                       RS_DIALOGFACTORY->commandMessage(
+                                       DIALOGFACTORY->commandMessage(
                                                tr("Parent of first entity is NULL"));
                        }
                        else
-                               RS_DIALOGFACTORY->commandMessage(
+                               DIALOGFACTORY->commandMessage(
                                        tr("First entity is NULL"));
 
                        break;
@@ -142,7 +142,7 @@ void ActionModifyDeleteFree::mouseReleaseEvent(QMouseEvent * e)
                        if (e2)
                                trigger();
                        else
-                               RS_DIALOGFACTORY->commandMessage(tr("Second entity is NULL"));
+                               DIALOGFACTORY->commandMessage(tr("Second entity is NULL"));
 
                        break;
                }
@@ -154,17 +154,17 @@ void ActionModifyDeleteFree::updateMouseButtonHints()
        switch (getStatus())
        {
        case 0:
-               RS_DIALOGFACTORY->updateMouseWidget(tr("Specify first break point "
+               DIALOGFACTORY->updateMouseWidget(tr("Specify first break point "
                        "on a polyline"), tr("Cancel"));
                break;
 
        case 1:
-               RS_DIALOGFACTORY->updateMouseWidget(tr("Specify second break point "
+               DIALOGFACTORY->updateMouseWidget(tr("Specify second break point "
                        "on the same polyline"), tr("Back"));
                break;
 
        default:
-               RS_DIALOGFACTORY->updateMouseWidget("", "");
+               DIALOGFACTORY->updateMouseWidget("", "");
                break;
        }
 }
index 694639d5e5d5760a6c239808ad2e8c9301ae2045..94630c3e133591d6fc26cdcf3a863212ffc90254 100644 (file)
@@ -4,8 +4,8 @@
 #include "actioninterface.h"
 #include "vector.h"
 
-class RS_Entity;
-class RS_Polyline;
+class Entity;
+class Polyline;
 
 /**
  * This action class can handle user events to delete entities.
@@ -16,7 +16,7 @@ class RS_Polyline;
 class ActionModifyDeleteFree: public ActionInterface
 {
        public:
-               ActionModifyDeleteFree(RS_EntityContainer & container, GraphicView & graphicView);
+               ActionModifyDeleteFree(EntityContainer & container, GraphicView & graphicView);
                ~ActionModifyDeleteFree();
 
                virtual void init(int status = 0);
@@ -25,10 +25,10 @@ class ActionModifyDeleteFree: public ActionInterface
                virtual void updateMouseButtonHints();
 
        private:
-               RS_Polyline * polyline;
-               RS_Entity * e1;
+               Polyline * polyline;
+               Entity * e1;
                Vector v1;
-               RS_Entity * e2;
+               Entity * e2;
                Vector v2;
 };
 
index 5aa67c3e7992e41fa9842119a8d0aa055e312708..2be4009512c22af71c11c0002f978357239a0dbe 100644 (file)
@@ -21,7 +21,7 @@
 #include "graphicview.h"
 
 ActionModifyDeleteQuick::ActionModifyDeleteQuick(
-       RS_EntityContainer & container, GraphicView & graphicView):
+       EntityContainer & container, GraphicView & graphicView):
        ActionInterface("Quick Delete Entities", container, graphicView)
 {
        en = NULL;
@@ -36,12 +36,12 @@ ActionModifyDeleteQuick::~ActionModifyDeleteQuick()
  */
 void ActionModifyDeleteQuick::trigger()
 {
-       RS_DEBUG->print("ActionModifyDeleteQuick::trigger()");
+       DEBUG->print("ActionModifyDeleteQuick::trigger()");
 
        if (en)
        {
-               RS_DEBUG->print("Entity found");
-               RS_EntityContainer * parent = en->getParent();
+               DEBUG->print("Entity found");
+               EntityContainer * parent = en->getParent();
 
                if (parent)
                {
@@ -60,10 +60,10 @@ void ActionModifyDeleteQuick::trigger()
                        }
                }
 
-               RS_DIALOGFACTORY->updateSelectionWidget(container->countSelected());
+               DIALOGFACTORY->updateSelectionWidget(container->countSelected());
        }
        else
-               RS_DEBUG->print("ActionModifyDeleteQuick::mousePressEvent:"
+               DEBUG->print("ActionModifyDeleteQuick::mousePressEvent:"
                        " Entity is NULL\n");
 }
 
@@ -83,12 +83,12 @@ void ActionModifyDeleteQuick::updateMouseButtonHints()
        switch (getStatus())
        {
        case 0:
-               RS_DIALOGFACTORY->updateMouseWidget(tr("Pick entity to delete"),
+               DIALOGFACTORY->updateMouseWidget(tr("Pick entity to delete"),
                        tr("Cancel"));
                break;
 
        default:
-               RS_DIALOGFACTORY->updateMouseWidget("", "");
+               DIALOGFACTORY->updateMouseWidget("", "");
                break;
        }
 }
index 981b54a811538b92494ababb7ec0a3c0ef9f349f..b70d33a4b2f35b1cd012fcf308780ecaf2d6b935 100644 (file)
@@ -3,7 +3,7 @@
 
 #include "actioninterface.h"
 
-class RS_Entity;
+class Entity;
 
 /**
  * This action class can handle user events to delete entities
@@ -15,7 +15,7 @@ class RS_Entity;
 class ActionModifyDeleteQuick: public ActionInterface
 {
        public:
-               ActionModifyDeleteQuick(RS_EntityContainer & container, GraphicView & graphicView);
+               ActionModifyDeleteQuick(EntityContainer & container, GraphicView & graphicView);
                ~ActionModifyDeleteQuick();
 
                virtual void trigger();
@@ -24,7 +24,7 @@ class ActionModifyDeleteQuick: public ActionInterface
                virtual void updateMouseCursor();
 
        private:
-               RS_Entity * en;
+               Entity * en;
 };
 
 #endif // __ACTIONMODIFYDELETEQUICK_H__
index e4ca1bc3ad1b0d62b3d891e4f0ae53fb3e124a6e..167cb6a1158b60f5bd8e3abda5da712ba061743c 100644 (file)
 
 /*
 Program received signal SIGSEGV, Segmentation fault.
-0x080d0fd1 in PaintInterface::fillRect(int, int, int, int, RS_Color const&) ()
+0x080d0fd1 in PaintInterface::fillRect(int, int, int, int, Color const&) ()
 (gdb) bt
-#0  0x080d0fd1 in PaintInterface::fillRect(int, int, int, int, RS_Color const&)
+#0  0x080d0fd1 in PaintInterface::fillRect(int, int, int, int, Color const&)
     ()
-#1  0x080cf523 in PaintInterface::drawHandle(Vector const&, RS_Color const&, int) ()
-#2  0x0822d7e0 in GraphicView::drawEntity(RS_Entity*, double, bool) ()
-#3  0x0822d9a0 in GraphicView::deleteEntity(RS_Entity*) ()
+#1  0x080cf523 in PaintInterface::drawHandle(Vector const&, Color const&, int) ()
+#2  0x0822d7e0 in GraphicView::drawEntity(Entity*, double, bool) ()
+#3  0x0822d9a0 in GraphicView::deleteEntity(Entity*) ()
 #4  0x081334dc in ActionModifyEntity::trigger() ()
 #5  0x081336ef in ActionModifyEntity::mouseReleaseEvent(QMouseEvent*) ()
-#6  0x08089d2a in RS_EventHandler::mouseReleaseEvent(QMouseEvent*) ()
+#6  0x08089d2a in EventHandler::mouseReleaseEvent(QMouseEvent*) ()
 #7  0x0822a482 in GraphicView::mouseReleaseEvent(QMouseEvent*) ()
 #8  0x081eb00a in QG_GraphicView::mouseReleaseEvent(QMouseEvent*) ()
 #9  0xb77063c1 in QWidget::event(QEvent*) () from /usr/lib/qt4/libQtGui.so.4
@@ -60,7 +60,7 @@ Program received signal SIGSEGV, Segmentation fault.
 #include "dialogfactory.h"
 #include "graphicview.h"
 
-ActionModifyEntity::ActionModifyEntity(RS_EntityContainer & container,
+ActionModifyEntity::ActionModifyEntity(EntityContainer & container,
        GraphicView & graphicView):
        ActionInterface("Modify Entity", container, graphicView), en(NULL)
 {
@@ -75,13 +75,13 @@ void ActionModifyEntity::trigger()
 {
        if (!en)
        {
-               RS_DEBUG->print("ActionModifyEntity::trigger: Entity is NULL\n");
+               DEBUG->print("ActionModifyEntity::trigger: Entity is NULL\n");
                return;
        }
 
-       RS_Entity * clone = en->clone();
+       Entity * clone = en->clone();
 
-       if (RS_DIALOGFACTORY->requestModifyEntityDialog(clone))
+       if (DIALOGFACTORY->requestModifyEntityDialog(clone))
        {
                container->addEntity(clone);
 #warning "!!! Old rendering path need upgrade !!!"
@@ -102,7 +102,7 @@ void ActionModifyEntity::trigger()
                        document->endUndoCycle();
                }
 
-               RS_DIALOGFACTORY->updateSelectionWidget(container->countSelected());
+               DIALOGFACTORY->updateSelectionWidget(container->countSelected());
        }
        else
                delete clone;
index 991730cdb79572cb1f9ff9ed70c78f96e60ae09c..1431123c53ce3d95ac2cc14eb5adf89111d962fc 100644 (file)
@@ -3,7 +3,7 @@
 
 #include "actioninterface.h"
 
-class RS_Entity;
+class Entity;
 
 /**
  * This action class can handle user events to select entities.
@@ -14,7 +14,7 @@ class RS_Entity;
 class ActionModifyEntity: public ActionInterface
 {
        public:
-               ActionModifyEntity(RS_EntityContainer & container, GraphicView & graphicView);
+               ActionModifyEntity(EntityContainer & container, GraphicView & graphicView);
                ~ActionModifyEntity();
 
                virtual void trigger();
@@ -22,7 +22,7 @@ class ActionModifyEntity: public ActionInterface
                virtual void updateMouseCursor();
 
        private:
-               RS_Entity * en;
+               Entity * en;
 };
 
 #endif // __ACTIONMODIFYENTITY_H__
index bddf01859aeaf134bbca192515139c53205c66f9..85bc2a4115c1fe098e33b45c0c6dd435957fbeab 100644 (file)
@@ -21,7 +21,7 @@
 /**
  * Constructor.
  */
-ActionModifyExplodeText::ActionModifyExplodeText(RS_EntityContainer & container,
+ActionModifyExplodeText::ActionModifyExplodeText(EntityContainer & container,
        GraphicView & graphicView): ActionInterface("Blocks Explode",
                container, graphicView)
 {
@@ -46,6 +46,6 @@ void ActionModifyExplodeText::init(int status)
 
 void ActionModifyExplodeText::trigger()
 {
-       RS_Modification m(*container, graphicView);
+       Modification m(*container, graphicView);
        m.explodeTextIntoLetters();
 }
index ee496edec1f94fe45d6e5a06d30454691b2cec5f..bf4531df12e591358e6ba9df9cf1cdd3c9b36aa6 100644 (file)
@@ -13,7 +13,7 @@
 class ActionModifyExplodeText: public ActionInterface
 {
        public:
-               ActionModifyExplodeText(RS_EntityContainer & container, GraphicView & graphicView);
+               ActionModifyExplodeText(EntityContainer & container, GraphicView & graphicView);
                ~ActionModifyExplodeText();
 
                virtual RS2::ActionType rtti();
index 7c07178035361f12ebdfe4089ad6b6c2c58ce538..786aeeb1704c52afea9b56e8968e04be98572a47 100644 (file)
@@ -20,7 +20,7 @@
 #include "dialogfactory.h"
 #include "preview.h"
 
-ActionModifyMirror::ActionModifyMirror(RS_EntityContainer & container, GraphicView & graphicView):
+ActionModifyMirror::ActionModifyMirror(EntityContainer & container, GraphicView & graphicView):
        ActionInterface("Mirror Entities", container, graphicView)
 {
 }
@@ -36,18 +36,18 @@ void ActionModifyMirror::init(int status)
 
 void ActionModifyMirror::trigger()
 {
-       RS_DEBUG->print("ActionModifyMirror::trigger()");
+       DEBUG->print("ActionModifyMirror::trigger()");
 
-       RS_Modification m(*container, graphicView);
+       Modification m(*container, graphicView);
        m.mirror(data);
 
-       if (RS_DIALOGFACTORY)
-               RS_DIALOGFACTORY->updateSelectionWidget(container->countSelected());
+       if (DIALOGFACTORY)
+               DIALOGFACTORY->updateSelectionWidget(container->countSelected());
 }
 
 void ActionModifyMirror::mouseMoveEvent(QMouseEvent * e)
 {
-       RS_DEBUG->print("ActionModifyMirror::mouseMoveEvent begin");
+       DEBUG->print("ActionModifyMirror::mouseMoveEvent begin");
 
        if (getStatus() == SetAxisPoint1 || getStatus() == SetAxisPoint2)
        {
@@ -69,7 +69,7 @@ void ActionModifyMirror::mouseMoveEvent(QMouseEvent * e)
                                clearPreview();
 /*                             preview->addSelectionFrom(*container);
                                preview->mirror(axisPoint1, axisPoint2);
-                               preview->addEntity(new RS_Line(preview,RS_LineData(axisPoint1, axisPoint2)));*/
+                               preview->addEntity(new Line(preview,LineData(axisPoint1, axisPoint2)));*/
                                drawPreview();
                        }
                        break;
@@ -79,7 +79,7 @@ void ActionModifyMirror::mouseMoveEvent(QMouseEvent * e)
                }
        }
 
-       RS_DEBUG->print("ActionModifyMirror::mouseMoveEvent end");
+       DEBUG->print("ActionModifyMirror::mouseMoveEvent end");
 }
 
 void ActionModifyMirror::mouseReleaseEvent(QMouseEvent * e)
@@ -117,9 +117,9 @@ void ActionModifyMirror::coordinateEvent(Vector * e)
                setStatus(ShowDialog);
                graphicView->moveRelativeZero(mouse);
 
-               if (RS_DIALOGFACTORY)
+               if (DIALOGFACTORY)
                {
-                       if (RS_DIALOGFACTORY->requestMirrorDialog(data))
+                       if (DIALOGFACTORY->requestMirrorDialog(data))
                        {
                                data.axisPoint1 = axisPoint1;
                                data.axisPoint2 = axisPoint2;
@@ -138,28 +138,28 @@ void ActionModifyMirror::coordinateEvent(Vector * e)
 
 void ActionModifyMirror::updateMouseButtonHints()
 {
-       if (RS_DIALOGFACTORY)
+       if (DIALOGFACTORY)
        {
                switch (getStatus())
                {
                /*case Select:
-                   RS_DIALOGFACTORY->updateMouseWidget(tr("Pick entities to move"),
+                   DIALOGFACTORY->updateMouseWidget(tr("Pick entities to move"),
                                                   tr("Cancel"));
                    break;*/
                case SetAxisPoint1:
-                       RS_DIALOGFACTORY->updateMouseWidget(
+                       DIALOGFACTORY->updateMouseWidget(
                                tr("Specify first point of mirror line"),
                                tr("Cancel"));
                        break;
 
                case SetAxisPoint2:
-                       RS_DIALOGFACTORY->updateMouseWidget(
+                       DIALOGFACTORY->updateMouseWidget(
                                tr("Specify second point of mirror line"),
                                tr("Back"));
                        break;
 
                default:
-                       RS_DIALOGFACTORY->updateMouseWidget("", "");
+                       DIALOGFACTORY->updateMouseWidget("", "");
                        break;
                }
        }
@@ -172,17 +172,17 @@ void ActionModifyMirror::updateMouseCursor()
 
 void ActionModifyMirror::updateToolBar()
 {
-       if (RS_DIALOGFACTORY != NULL)
+       if (DIALOGFACTORY != NULL)
        {
                switch (getStatus())
                {
                case SetAxisPoint1:
                case SetAxisPoint2:
-                       RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
+                       DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
                        break;
 
                default:
-                       RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarModify);
+                       DIALOGFACTORY->requestToolBar(RS2::ToolBarModify);
                        break;
                }
        }
index 12c11b4ba96fa1acfd928dc1d35e99b80dfdbc15..d5441df2b0bd72119ab9db91330f562d62a8d242 100644 (file)
@@ -24,7 +24,7 @@ class ActionModifyMirror: public ActionInterface
                };
 
        public:
-               ActionModifyMirror(RS_EntityContainer & container, GraphicView & graphicView);
+               ActionModifyMirror(EntityContainer & container, GraphicView & graphicView);
                ~ActionModifyMirror();
 
                virtual void init(int status = 0);
@@ -37,7 +37,7 @@ class ActionModifyMirror: public ActionInterface
                virtual void updateToolBar();
 
        private:
-               RS_MirrorData data;
+               MirrorData data;
                Vector axisPoint1;
                Vector axisPoint2;
 };
index 9943bcfcae8d97fb89d8f4a72d2dc3e1c35aa081..9801c799106910bf32e1f379a3bf2058cecccbc0 100644 (file)
@@ -20,7 +20,7 @@
 #include "dialogfactory.h"
 #include "preview.h"
 
-ActionModifyMove::ActionModifyMove(RS_EntityContainer & container,
+ActionModifyMove::ActionModifyMove(EntityContainer & container,
        GraphicView & graphicView):
        ActionInterface("Move Entities", container, graphicView)
 {
@@ -37,17 +37,17 @@ void ActionModifyMove::init(int status)
 
 void ActionModifyMove::trigger()
 {
-       RS_DEBUG->print("ActionModifyMove::trigger()");
+       DEBUG->print("ActionModifyMove::trigger()");
 
-       RS_Modification m(*container, graphicView);
+       Modification m(*container, graphicView);
        m.move(data);
 
-       RS_DIALOGFACTORY->updateSelectionWidget(container->countSelected());
+       DIALOGFACTORY->updateSelectionWidget(container->countSelected());
 }
 
 void ActionModifyMove::mouseMoveEvent(QMouseEvent * e)
 {
-       RS_DEBUG->print("ActionModifyMove::mouseMoveEvent begin");
+       DEBUG->print("ActionModifyMove::mouseMoveEvent begin");
 
        if (getStatus() == SetReferencePoint
            || getStatus() == SetTargetPoint)
@@ -79,7 +79,7 @@ void ActionModifyMove::mouseMoveEvent(QMouseEvent * e)
                }
        }
 
-       RS_DEBUG->print("ActionModifyMove::mouseMoveEvent end");
+       DEBUG->print("ActionModifyMove::mouseMoveEvent end");
 }
 
 void ActionModifyMove::mouseReleaseEvent(QMouseEvent * e)
@@ -117,7 +117,7 @@ void ActionModifyMove::coordinateEvent(Vector * e)
                graphicView->moveRelativeZero(targetPoint);
                setStatus(ShowDialog);
 
-               if (RS_DIALOGFACTORY->requestMoveDialog(data))
+               if (DIALOGFACTORY->requestMoveDialog(data))
                {
                        data.offset = targetPoint - referencePoint;
                        trigger();
@@ -135,21 +135,21 @@ void ActionModifyMove::updateMouseButtonHints()
        switch (getStatus())
        {
        /*case Select:
-           RS_DIALOGFACTORY->updateMouseWidget(tr("Pick entities to move"),
+           DIALOGFACTORY->updateMouseWidget(tr("Pick entities to move"),
                                           tr("Cancel"));
            break;*/
        case SetReferencePoint:
-               RS_DIALOGFACTORY->updateMouseWidget(tr("Specify reference point"),
+               DIALOGFACTORY->updateMouseWidget(tr("Specify reference point"),
                        tr("Cancel"));
                break;
 
        case SetTargetPoint:
-               RS_DIALOGFACTORY->updateMouseWidget(tr("Specify target point"),
+               DIALOGFACTORY->updateMouseWidget(tr("Specify target point"),
                        tr("Back"));
                break;
 
        default:
-               RS_DIALOGFACTORY->updateMouseWidget("", "");
+               DIALOGFACTORY->updateMouseWidget("", "");
                break;
        }
 }
@@ -164,15 +164,15 @@ void ActionModifyMove::updateToolBar()
        switch (getStatus())
        {
        /*case Select:
-           RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarSelect);
+           DIALOGFACTORY->requestToolBar(RS2::ToolBarSelect);
            break;*/
        case SetReferencePoint:
        case SetTargetPoint:
-               RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
+               DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
                break;
 
        default:
-               RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarModify);
+               DIALOGFACTORY->requestToolBar(RS2::ToolBarModify);
                break;
        }
 }
index 87396bfdfff4d316607be135fb23542f90e05329..eb1dbc3b7e03f340889c40b3cca677ab22cf000e 100644 (file)
@@ -24,7 +24,7 @@ class ActionModifyMove: public ActionInterface
                };
 
        public:
-               ActionModifyMove(RS_EntityContainer & container, GraphicView & graphicView);
+               ActionModifyMove(EntityContainer & container, GraphicView & graphicView);
                ~ActionModifyMove();
 
                virtual void init(int status = 0);
@@ -37,7 +37,7 @@ class ActionModifyMove: public ActionInterface
                virtual void updateToolBar();
 
        private:
-               RS_MoveData data;
+               MoveData data;
                Vector referencePoint;
                Vector targetPoint;
 };
index b8dce06fce4541c4c6b5f53186df0aa45ac5e696..9185d6c4597b1483bea01246e22393ca6adcee83 100644 (file)
@@ -22,7 +22,7 @@
 #include "preview.h"
 
 ActionModifyMoveRotate::ActionModifyMoveRotate(
-       RS_EntityContainer & container, GraphicView & graphicView):
+       EntityContainer & container, GraphicView & graphicView):
        ActionInterface("Move and Rotate Entities", container, graphicView)
 {
 }
@@ -43,19 +43,19 @@ void ActionModifyMoveRotate::init(int status)
 
 void ActionModifyMoveRotate::trigger()
 {
-       RS_DEBUG->print("ActionModifyMoveRotate::trigger()");
+       DEBUG->print("ActionModifyMoveRotate::trigger()");
 
-       RS_Modification m(*container, graphicView);
+       Modification m(*container, graphicView);
        m.moveRotate(data);
 
        finish();
 
-       RS_DIALOGFACTORY->updateSelectionWidget(container->countSelected());
+       DIALOGFACTORY->updateSelectionWidget(container->countSelected());
 }
 
 void ActionModifyMoveRotate::mouseMoveEvent(QMouseEvent * e)
 {
-       RS_DEBUG->print("ActionModifyMoveRotate::mouseMoveEvent begin");
+       DEBUG->print("ActionModifyMoveRotate::mouseMoveEvent begin");
 
        if (getStatus() == SetReferencePoint || getStatus() == SetTargetPoint)
        {
@@ -88,7 +88,7 @@ void ActionModifyMoveRotate::mouseMoveEvent(QMouseEvent * e)
                }
        }
 
-       RS_DEBUG->print("ActionModifyMoveRotate::mouseMoveEvent end");
+       DEBUG->print("ActionModifyMoveRotate::mouseMoveEvent end");
 }
 
 void ActionModifyMoveRotate::mouseReleaseEvent(QMouseEvent * e)
@@ -126,7 +126,7 @@ void ActionModifyMoveRotate::coordinateEvent(Vector * e)
                setStatus(ShowDialog);
                data.offset = targetPoint - data.referencePoint;
 
-               if (RS_DIALOGFACTORY->requestMoveRotateDialog(data))
+               if (DIALOGFACTORY->requestMoveRotateDialog(data))
                        trigger();
                        //finish();
                break;
@@ -136,13 +136,13 @@ void ActionModifyMoveRotate::coordinateEvent(Vector * e)
        }
 }
 
-void ActionModifyMoveRotate::commandEvent(RS_CommandEvent * e)
+void ActionModifyMoveRotate::commandEvent(CommandEvent * e)
 {
        QString c = e->getCommand().toLower();
 
        if (checkCommand("help", c))
        {
-               RS_DIALOGFACTORY->commandMessage(msgAvailableCommands() + getAvailableCommands().join(", "));
+               DIALOGFACTORY->commandMessage(msgAvailableCommands() + getAvailableCommands().join(", "));
                return;
        }
 
@@ -166,14 +166,14 @@ void ActionModifyMoveRotate::commandEvent(RS_CommandEvent * e)
        case SetAngle:
        {
                bool ok;
-               double a = RS_Math::eval(c, &ok);
+               double a = Math::eval(c, &ok);
 
                if (ok)
-                       data.angle = RS_Math::deg2rad(a);
+                       data.angle = Math::deg2rad(a);
                else
-                       RS_DIALOGFACTORY->commandMessage(tr("Not a valid expression"));
+                       DIALOGFACTORY->commandMessage(tr("Not a valid expression"));
 
-               RS_DIALOGFACTORY->requestOptions(this, true, true);
+               DIALOGFACTORY->requestOptions(this, true, true);
                setStatus(lastStatus);
        }
        break;
@@ -204,7 +204,7 @@ void ActionModifyMoveRotate::showOptions()
 
        ActionInterface::showOptions();
 
-       RS_DIALOGFACTORY->requestOptions(this, true);
+       DIALOGFACTORY->requestOptions(this, true);
 }
 
 void ActionModifyMoveRotate::hideOptions()
@@ -213,7 +213,7 @@ void ActionModifyMoveRotate::hideOptions()
 
        ActionInterface::hideOptions();
 
-       RS_DIALOGFACTORY->requestOptions(this, false);
+       DIALOGFACTORY->requestOptions(this, false);
 }
 
 void ActionModifyMoveRotate::updateMouseButtonHints()
@@ -221,19 +221,19 @@ void ActionModifyMoveRotate::updateMouseButtonHints()
        switch (getStatus())
        {
        case SetReferencePoint:
-               RS_DIALOGFACTORY->updateMouseWidget(tr("Specify reference point"), tr("Cancel"));
+               DIALOGFACTORY->updateMouseWidget(tr("Specify reference point"), tr("Cancel"));
                break;
 
        case SetTargetPoint:
-               RS_DIALOGFACTORY->updateMouseWidget(tr("Specify target point"), tr("Back"));
+               DIALOGFACTORY->updateMouseWidget(tr("Specify target point"), tr("Back"));
                break;
 
        case SetAngle:
-               RS_DIALOGFACTORY->updateMouseWidget(tr("Enter rotation angle:"), tr("Back"));
+               DIALOGFACTORY->updateMouseWidget(tr("Enter rotation angle:"), tr("Back"));
                break;
 
        default:
-               RS_DIALOGFACTORY->updateMouseWidget("", "");
+               DIALOGFACTORY->updateMouseWidget("", "");
                break;
        }
 }
@@ -249,11 +249,11 @@ void ActionModifyMoveRotate::updateToolBar()
        {
        case SetReferencePoint:
        case SetTargetPoint:
-               RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
+               DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
                break;
 
        default:
-               RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarModify);
+               DIALOGFACTORY->requestToolBar(RS2::ToolBarModify);
                break;
        }
 }
index 2fc2c9d1aa098637882805da328f6194c1581615..7d24bbbd81c339a337665e92e12c7d40f7624558 100644 (file)
@@ -26,7 +26,7 @@ class ActionModifyMoveRotate: public ActionInterface
                };
 
        public:
-               ActionModifyMoveRotate(RS_EntityContainer & container, GraphicView & graphicView);
+               ActionModifyMoveRotate(EntityContainer & container, GraphicView & graphicView);
                ~ActionModifyMoveRotate();
 
                virtual RS2::ActionType rtti();
@@ -35,7 +35,7 @@ class ActionModifyMoveRotate: public ActionInterface
                virtual void mouseMoveEvent(QMouseEvent * e);
                virtual void mouseReleaseEvent(QMouseEvent * e);
                virtual void coordinateEvent(Vector * e);
-               virtual void commandEvent(RS_CommandEvent * e);
+               virtual void commandEvent(CommandEvent * e);
                virtual QStringList getAvailableCommands();
                virtual void hideOptions();
                virtual void showOptions();
@@ -46,7 +46,7 @@ class ActionModifyMoveRotate: public ActionInterface
                double getAngle();
 
        private:
-               RS_MoveRotateData data;
+               MoveRotateData data;
                Vector targetPoint;
 
                /** Last status before entering angle. */
index d784c2b635984b2745023c9f65b004c9b9edde68..5f616f5c0d8e5865b807f22db1ff7db16c2fc0f8 100644 (file)
@@ -19,7 +19,7 @@
 #include "debug.h"
 #include "dialogfactory.h"
 
-ActionModifyRotate::ActionModifyRotate(RS_EntityContainer & container, GraphicView & graphicView):
+ActionModifyRotate::ActionModifyRotate(EntityContainer & container, GraphicView & graphicView):
        ActionInterface("Rotate Entities",
                container, graphicView)
 {
@@ -36,17 +36,17 @@ void ActionModifyRotate::init(int status)
 
 void ActionModifyRotate::trigger()
 {
-       RS_DEBUG->print("ActionModifyRotate::trigger()");
+       DEBUG->print("ActionModifyRotate::trigger()");
 
-       RS_Modification m(*container, graphicView);
+       Modification m(*container, graphicView);
        m.rotate(data);
 
-       RS_DIALOGFACTORY->updateSelectionWidget(container->countSelected());
+       DIALOGFACTORY->updateSelectionWidget(container->countSelected());
 }
 
 void ActionModifyRotate::mouseMoveEvent(QMouseEvent * e)
 {
-       RS_DEBUG->print("ActionModifyRotate::mouseMoveEvent begin");
+       DEBUG->print("ActionModifyRotate::mouseMoveEvent begin");
 
        if (getStatus() == SetReferencePoint)
        {
@@ -63,7 +63,7 @@ void ActionModifyRotate::mouseMoveEvent(QMouseEvent * e)
                }
        }
 
-       RS_DEBUG->print("ActionModifyRotate::mouseMoveEvent end");
+       DEBUG->print("ActionModifyRotate::mouseMoveEvent end");
 }
 
 void ActionModifyRotate::mouseReleaseEvent(QMouseEvent * e)
@@ -94,7 +94,7 @@ void ActionModifyRotate::coordinateEvent(Vector * e)
                referencePoint = pos;
                setStatus(ShowDialog);
 
-               if (RS_DIALOGFACTORY->requestRotateDialog(data))
+               if (DIALOGFACTORY->requestRotateDialog(data))
                {
                        data.center = referencePoint;
                        trigger();
@@ -112,12 +112,12 @@ void ActionModifyRotate::updateMouseButtonHints()
        switch (getStatus())
        {
        case SetReferencePoint:
-               RS_DIALOGFACTORY->updateMouseWidget(tr("Specify reference point"),
+               DIALOGFACTORY->updateMouseWidget(tr("Specify reference point"),
                        tr("Back"));
                break;
 
        default:
-               RS_DIALOGFACTORY->updateMouseWidget("", "");
+               DIALOGFACTORY->updateMouseWidget("", "");
                break;
        }
 }
@@ -132,11 +132,11 @@ void ActionModifyRotate::updateToolBar()
        switch (getStatus())
        {
        case SetReferencePoint:
-               RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
+               DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
                break;
 
        default:
-               RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarModify);
+               DIALOGFACTORY->requestToolBar(RS2::ToolBarModify);
                break;
        }
 }
index a3e2a2198fdf5c9761fec0bbb264a13e52dc7569..e713b0dedaf9ffaaae6ede15b50262171e6d10d1 100644 (file)
@@ -23,7 +23,7 @@ class ActionModifyRotate: public ActionInterface
                };
 
        public:
-               ActionModifyRotate(RS_EntityContainer & container, GraphicView & graphicView);
+               ActionModifyRotate(EntityContainer & container, GraphicView & graphicView);
                ~ActionModifyRotate();
 
                virtual void init(int status = 0);
@@ -36,7 +36,7 @@ class ActionModifyRotate: public ActionInterface
                virtual void updateToolBar();
 
        private:
-               RS_RotateData data;
+               RotateData data;
                Vector referencePoint;
                Vector targetPoint;
 };
index 892aa2354b9d16c8b498d12c23941660357ace60..d12293c35c11dc6b805f9871795e3c568ca71c24 100644 (file)
@@ -20,7 +20,7 @@
 #include "dialogfactory.h"
 
 ActionModifyRotate2::ActionModifyRotate2(
-       RS_EntityContainer & container, GraphicView & graphicView):
+       EntityContainer & container, GraphicView & graphicView):
        ActionInterface("Rotate Entities around two centers", container, graphicView)
 {
 }
@@ -36,19 +36,19 @@ void ActionModifyRotate2::init(int status)
 
 void ActionModifyRotate2::trigger()
 {
-       RS_DEBUG->print("ActionModifyRotate2::trigger()");
+       DEBUG->print("ActionModifyRotate2::trigger()");
 
-       RS_Modification m(*container, graphicView);
+       Modification m(*container, graphicView);
        m.rotate2(data);
 
        finish();
 
-       RS_DIALOGFACTORY->updateSelectionWidget(container->countSelected());
+       DIALOGFACTORY->updateSelectionWidget(container->countSelected());
 }
 
 void ActionModifyRotate2::mouseMoveEvent(QMouseEvent * e)
 {
-       RS_DEBUG->print("ActionModifyRotate2::mouseMoveEvent begin");
+       DEBUG->print("ActionModifyRotate2::mouseMoveEvent begin");
 
        if (getStatus() == SetReferencePoint1 || getStatus() == SetReferencePoint2)
        {
@@ -72,7 +72,7 @@ void ActionModifyRotate2::mouseMoveEvent(QMouseEvent * e)
                }
        }
 
-       RS_DEBUG->print("ActionModifyRotate2::mouseMoveEvent end");
+       DEBUG->print("ActionModifyRotate2::mouseMoveEvent end");
 }
 
 void ActionModifyRotate2::mouseReleaseEvent(QMouseEvent * e)
@@ -108,7 +108,7 @@ void ActionModifyRotate2::coordinateEvent(Vector * e)
                data.center2 = pos;
                setStatus(ShowDialog);
 
-               if (RS_DIALOGFACTORY->requestRotate2Dialog(data))
+               if (DIALOGFACTORY->requestRotate2Dialog(data))
                        trigger();
                        //finish();
                break;
@@ -118,7 +118,7 @@ void ActionModifyRotate2::coordinateEvent(Vector * e)
        }
 }
 
-void ActionModifyRotate2::commandEvent(RS_CommandEvent * /*e*/)
+void ActionModifyRotate2::commandEvent(CommandEvent * /*e*/)
 {
 }
 
@@ -133,17 +133,17 @@ void ActionModifyRotate2::updateMouseButtonHints()
        switch (getStatus())
        {
        case SetReferencePoint1:
-               RS_DIALOGFACTORY->updateMouseWidget(tr("Specify absolute reference point"),
+               DIALOGFACTORY->updateMouseWidget(tr("Specify absolute reference point"),
                        tr("Cancel"));
                break;
 
        case SetReferencePoint2:
-               RS_DIALOGFACTORY->updateMouseWidget(tr("Specify relative reference point"),
+               DIALOGFACTORY->updateMouseWidget(tr("Specify relative reference point"),
                        tr("Back"));
                break;
 
        default:
-               RS_DIALOGFACTORY->updateMouseWidget("", "");
+               DIALOGFACTORY->updateMouseWidget("", "");
                break;
        }
 }
@@ -159,11 +159,11 @@ void ActionModifyRotate2::updateToolBar()
        {
        case SetReferencePoint1:
        case SetReferencePoint2:
-               RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
+               DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
                break;
 
        default:
-               RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarModify);
+               DIALOGFACTORY->requestToolBar(RS2::ToolBarModify);
                break;
        }
 }
index 94306af63141775a326b9693a11197e276a5d2a8..dfaa82493ed169e76207e6cf6451ded2728810cf 100644 (file)
@@ -24,7 +24,7 @@ class ActionModifyRotate2: public ActionInterface
                };
 
        public:
-               ActionModifyRotate2(RS_EntityContainer & container, GraphicView & graphicView);
+               ActionModifyRotate2(EntityContainer & container, GraphicView & graphicView);
                ~ActionModifyRotate2();
 
                virtual void init(int status = 0);
@@ -32,14 +32,14 @@ class ActionModifyRotate2: public ActionInterface
                virtual void mouseMoveEvent(QMouseEvent * e);
                virtual void mouseReleaseEvent(QMouseEvent * e);
                virtual void coordinateEvent(Vector * e);
-               virtual void commandEvent(RS_CommandEvent * e);
+               virtual void commandEvent(CommandEvent * e);
                virtual QStringList getAvailableCommands();
                virtual void updateMouseButtonHints();
                virtual void updateMouseCursor();
                virtual void updateToolBar();
 
        private:
-               RS_Rotate2Data data;
+               Rotate2Data data;
 };
 
 #endif // __ACTIONMODIFYROTATE2_H__
index 1ed1a79d90a299a15a0b96eb4b3d4e12d0f88fa6..38fd7c0dece20f981e3a66ae4ba3f0b1b17c7290 100644 (file)
@@ -22,7 +22,7 @@
 #include "information.h"
 #include "preview.h"
 
-ActionModifyRound::ActionModifyRound(RS_EntityContainer & container, GraphicView & graphicView):
+ActionModifyRound::ActionModifyRound(EntityContainer & container, GraphicView & graphicView):
        ActionInterface("Round Entities", container, graphicView)
 {
        entity1 = NULL;
@@ -50,16 +50,16 @@ void ActionModifyRound::init(int status)
 
 void ActionModifyRound::trigger()
 {
-       RS_DEBUG->print("ActionModifyRound::trigger()");
+       DEBUG->print("ActionModifyRound::trigger()");
 
        if (entity1 != NULL && entity1->isAtomic()
            && entity2 != NULL && entity2->isAtomic())
        {
                deletePreview();
 
-               RS_Modification m(*container, graphicView);
-               m.round(coord2, coord1, (RS_AtomicEntity *)entity1, coord2,
-                       (RS_AtomicEntity *)entity2, data);
+               Modification m(*container, graphicView);
+               m.round(coord2, coord1, (AtomicEntity *)entity1, coord2,
+                       (AtomicEntity *)entity2, data);
 
                coord1 = Vector(false);
                entity1 = NULL;
@@ -69,17 +69,17 @@ void ActionModifyRound::trigger()
 
                clearPreview();
 
-               if (RS_DIALOGFACTORY != NULL)
-                       RS_DIALOGFACTORY->updateSelectionWidget(container->countSelected());
+               if (DIALOGFACTORY != NULL)
+                       DIALOGFACTORY->updateSelectionWidget(container->countSelected());
        }
 }
 
 void ActionModifyRound::mouseMoveEvent(QMouseEvent * e)
 {
-       RS_DEBUG->print("ActionModifyRound::mouseMoveEvent begin");
+       DEBUG->print("ActionModifyRound::mouseMoveEvent begin");
 
        Vector mouse = graphicView->toGraph(e->x(), e->y());
-       RS_Entity * se = catchEntity(e, RS2::ResolveAll);
+       Entity * se = catchEntity(e, RS2::ResolveAll);
 
        switch (getStatus())
        {
@@ -93,12 +93,12 @@ void ActionModifyRound::mouseMoveEvent(QMouseEvent * e)
                coord2 = mouse;
 
                if (entity1 != NULL && entity2 != NULL && entity2->isAtomic()
-                   && RS_Information::isTrimmable(entity1, entity2))
+                   && Information::isTrimmable(entity1, entity2))
                {
                        deletePreview();
                        clearPreview();
-/*                     RS_Entity * tmp1 = entity1->clone();
-                       RS_Entity * tmp2 = entity2->clone();*/
+/*                     Entity * tmp1 = entity1->clone();
+                       Entity * tmp2 = entity2->clone();*/
 //                     tmp1->reparent(preview);
 //                     tmp2->reparent(preview);
 //                     preview->addEntity(tmp1);
@@ -106,9 +106,9 @@ void ActionModifyRound::mouseMoveEvent(QMouseEvent * e)
 
 /*                     bool trim = data.trim;
                        data.trim = false;
-                       RS_Modification m(*preview, NULL, false);
-                       m.round(coord2, coord1, (RS_AtomicEntity *)tmp1, coord2,
-                               (RS_AtomicEntity *)tmp2, data);
+                       Modification m(*preview, NULL, false);
+                       m.round(coord2, coord1, (AtomicEntity *)tmp1, coord2,
+                               (AtomicEntity *)tmp2, data);
                        data.trim = trim;
 
                        preview->removeEntity(tmp1);
@@ -121,13 +121,13 @@ void ActionModifyRound::mouseMoveEvent(QMouseEvent * e)
                break;
        }
 
-       RS_DEBUG->print("ActionModifyRound::mouseMoveEvent end");
+       DEBUG->print("ActionModifyRound::mouseMoveEvent end");
 }
 
 void ActionModifyRound::mouseReleaseEvent(QMouseEvent * e)
 {
        Vector mouse = graphicView->toGraph(e->x(), e->y());
-       RS_Entity * se = catchEntity(e, RS2::ResolveAll);
+       Entity * se = catchEntity(e, RS2::ResolveAll);
 
        if (e->button() == Qt::LeftButton)
        {
@@ -138,7 +138,7 @@ void ActionModifyRound::mouseReleaseEvent(QMouseEvent * e)
                        coord1 = mouse;
 
                        if (entity1 != NULL && entity1->isAtomic()
-                           && RS_Information::isTrimmable(entity1))
+                           && Information::isTrimmable(entity1))
                                setStatus(SetEntity2);
                        break;
 
@@ -147,7 +147,7 @@ void ActionModifyRound::mouseReleaseEvent(QMouseEvent * e)
                        coord2 = mouse;
 
                        if (entity2 != NULL && entity2->isAtomic()
-                           && RS_Information::isTrimmable(entity1, entity2))
+                           && Information::isTrimmable(entity1, entity2))
                                //setStatus(ChooseRounding);
                                trigger();
                        break;
@@ -164,14 +164,14 @@ void ActionModifyRound::mouseReleaseEvent(QMouseEvent * e)
        }
 }
 
-void ActionModifyRound::commandEvent(RS_CommandEvent * e)
+void ActionModifyRound::commandEvent(CommandEvent * e)
 {
        QString c = e->getCommand().toLower();
 
        if (checkCommand("help", c))
        {
-               if (RS_DIALOGFACTORY != NULL)
-                       RS_DIALOGFACTORY->commandMessage(msgAvailableCommands()
+               if (DIALOGFACTORY != NULL)
+                       DIALOGFACTORY->commandMessage(msgAvailableCommands()
                                + getAvailableCommands().join(", "));
                return;
        }
@@ -199,22 +199,22 @@ void ActionModifyRound::commandEvent(RS_CommandEvent * e)
                         */
                        data.trim = !data.trim;
 
-                       if (RS_DIALOGFACTORY != NULL)
-                               RS_DIALOGFACTORY->requestOptions(this, true, true);
+                       if (DIALOGFACTORY != NULL)
+                               DIALOGFACTORY->requestOptions(this, true, true);
                }
                break;
 
        case SetRadius: {
                bool ok;
-               double r = RS_Math::eval(c, &ok);
+               double r = Math::eval(c, &ok);
 
                if (ok == true)
                        data.radius = r;
-               else if (RS_DIALOGFACTORY != NULL)
-                       RS_DIALOGFACTORY->commandMessage(tr("Not a valid expression"));
+               else if (DIALOGFACTORY != NULL)
+                       DIALOGFACTORY->commandMessage(tr("Not a valid expression"));
 
-               if (RS_DIALOGFACTORY != NULL)
-                       RS_DIALOGFACTORY->requestOptions(this, true, true);
+               if (DIALOGFACTORY != NULL)
+                       DIALOGFACTORY->requestOptions(this, true, true);
                setStatus(lastStatus);
        }
        break;
@@ -225,10 +225,10 @@ void ActionModifyRound::commandEvent(RS_CommandEvent * e)
           } else if (c==cmdNo.toLower() || c==cmdNo2) {
           data.trim = false;
                } else {
-                   RS_DIALOGFACTORY->commandMessage(tr("Please enter 'Yes' "
+                   DIALOGFACTORY->commandMessage(tr("Please enter 'Yes' "
               "or 'No'"));
                }
-               RS_DIALOGFACTORY->requestOptions(this, true, true);
+               DIALOGFACTORY->requestOptions(this, true, true);
                setStatus(lastStatus);
            }
            break;*/
@@ -260,45 +260,45 @@ void ActionModifyRound::showOptions()
 {
        ActionInterface::showOptions();
 
-       if (RS_DIALOGFACTORY != NULL)
-               RS_DIALOGFACTORY->requestOptions(this, true);
+       if (DIALOGFACTORY != NULL)
+               DIALOGFACTORY->requestOptions(this, true);
 }
 
 void ActionModifyRound::hideOptions()
 {
        ActionInterface::hideOptions();
 
-       if (RS_DIALOGFACTORY != NULL)
-               RS_DIALOGFACTORY->requestOptions(this, false);
+       if (DIALOGFACTORY != NULL)
+               DIALOGFACTORY->requestOptions(this, false);
 }
 
 void ActionModifyRound::updateMouseButtonHints()
 {
-       if (RS_DIALOGFACTORY != NULL)
+       if (DIALOGFACTORY != NULL)
        {
                switch (getStatus())
                {
                case SetEntity1:
-                       RS_DIALOGFACTORY->updateMouseWidget(tr("Specify first entity"),
+                       DIALOGFACTORY->updateMouseWidget(tr("Specify first entity"),
                                tr("Back"));
                        break;
 
                case SetEntity2:
-                       RS_DIALOGFACTORY->updateMouseWidget(tr("Specify second entity"),
+                       DIALOGFACTORY->updateMouseWidget(tr("Specify second entity"),
                                tr("Back"));
                        break;
 
                case SetRadius:
-                       RS_DIALOGFACTORY->updateMouseWidget(tr("Enter radius:"),
+                       DIALOGFACTORY->updateMouseWidget(tr("Enter radius:"),
                                tr("Cancel"));
                        break;
 
                /*case SetTrim:
-                   RS_DIALOGFACTORY->updateMouseWidget(tr("Trim on? (yes/no):"),
+                   DIALOGFACTORY->updateMouseWidget(tr("Trim on? (yes/no):"),
                                                        "");
                    break;*/
                default:
-                       RS_DIALOGFACTORY->updateMouseWidget("", "");
+                       DIALOGFACTORY->updateMouseWidget("", "");
                        break;
                }
        }
@@ -311,8 +311,8 @@ void ActionModifyRound::updateMouseCursor()
 
 void ActionModifyRound::updateToolBar()
 {
-       if (RS_DIALOGFACTORY != NULL)
-               RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarModify);
+       if (DIALOGFACTORY != NULL)
+               DIALOGFACTORY->requestToolBar(RS2::ToolBarModify);
 }
 
 void ActionModifyRound::setRadius(double r)
index 1c954829b92bf1bea2909e6fc7c246fc61c115a5..b7603ab89b8accb9ccb133a03045a7adf814a28e 100644 (file)
@@ -5,7 +5,7 @@
 #include "actioninterface.h"
 #include "vector.h"
 
-class RS_Entity;
+class Entity;
 
 /**
  * This action class can handle user events to round corners.
@@ -27,7 +27,7 @@ class ActionModifyRound: public ActionInterface
                };
 
        public:
-               ActionModifyRound(RS_EntityContainer & container, GraphicView & graphicView);
+               ActionModifyRound(EntityContainer & container, GraphicView & graphicView);
                ~ActionModifyRound();
 
                virtual RS2::ActionType rtti();
@@ -35,7 +35,7 @@ class ActionModifyRound: public ActionInterface
                virtual void trigger();
                virtual void mouseMoveEvent(QMouseEvent * e);
                virtual void mouseReleaseEvent(QMouseEvent * e);
-               virtual void commandEvent(RS_CommandEvent * e);
+               virtual void commandEvent(CommandEvent * e);
                virtual QStringList getAvailableCommands();
                virtual void hideOptions();
                virtual void showOptions();
@@ -49,10 +49,10 @@ class ActionModifyRound: public ActionInterface
 
        private:
                Vector coord1;
-               RS_Entity * entity1;
+               Entity * entity1;
                Vector coord2;
-               RS_Entity * entity2;
-               RS_RoundData data;
+               Entity * entity2;
+               RoundData data;
                /** Last status before entering angle. */
                Status lastStatus;
 };
index 8f04c5a10756905cfe98d1ce7044af8a73afb7e5..d1aadc90fb26b76487bcf9d195fff00e2ef128af 100644 (file)
@@ -19,7 +19,7 @@
 #include "debug.h"
 #include "dialogfactory.h"
 
-ActionModifyScale::ActionModifyScale(RS_EntityContainer & container, GraphicView & graphicView):
+ActionModifyScale::ActionModifyScale(EntityContainer & container, GraphicView & graphicView):
        ActionInterface("Scale Entities", container, graphicView)
 {
 }
@@ -35,17 +35,17 @@ void ActionModifyScale::init(int status)
 
 void ActionModifyScale::trigger()
 {
-       RS_DEBUG->print("ActionModifyScale::trigger()");
+       DEBUG->print("ActionModifyScale::trigger()");
 
-       RS_Modification m(*container, graphicView);
+       Modification m(*container, graphicView);
        m.scale(data);
 
-       RS_DIALOGFACTORY->updateSelectionWidget(container->countSelected());
+       DIALOGFACTORY->updateSelectionWidget(container->countSelected());
 }
 
 void ActionModifyScale::mouseMoveEvent(QMouseEvent * e)
 {
-       RS_DEBUG->print("ActionModifyScale::mouseMoveEvent begin");
+       DEBUG->print("ActionModifyScale::mouseMoveEvent begin");
 
        if (getStatus() == SetReferencePoint)
        {
@@ -62,7 +62,7 @@ void ActionModifyScale::mouseMoveEvent(QMouseEvent * e)
                }
        }
 
-       RS_DEBUG->print("ActionModifyScale::mouseMoveEvent end");
+       DEBUG->print("ActionModifyScale::mouseMoveEvent end");
 }
 
 void ActionModifyScale::mouseReleaseEvent(QMouseEvent * e)
@@ -76,7 +76,7 @@ void ActionModifyScale::mouseReleaseEvent(QMouseEvent * e)
                case SetReferencePoint:
                        setStatus(ShowDialog);
 
-                       if (RS_DIALOGFACTORY->requestScaleDialog(data))
+                       if (DIALOGFACTORY->requestScaleDialog(data))
                        {
                                data.referencePoint = referencePoint;
                                trigger();
@@ -101,11 +101,11 @@ void ActionModifyScale::updateMouseButtonHints()
        switch (getStatus())
        {
        case SetReferencePoint:
-               RS_DIALOGFACTORY->updateMouseWidget(tr("Specify reference point"), tr("Cancel"));
+               DIALOGFACTORY->updateMouseWidget(tr("Specify reference point"), tr("Cancel"));
                break;
 
        default:
-               RS_DIALOGFACTORY->updateMouseWidget("", "");
+               DIALOGFACTORY->updateMouseWidget("", "");
                break;
        }
 }
@@ -120,11 +120,11 @@ void ActionModifyScale::updateToolBar()
        switch (getStatus())
        {
        case SetReferencePoint:
-               RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
+               DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
                break;
 
        default:
-               RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarModify);
+               DIALOGFACTORY->requestToolBar(RS2::ToolBarModify);
                break;
        }
 }
index 0241abffdcacca5bf826065ead4e2e9d67d04ae2..fcac54a774413a994b7e40d7d914468f502da93a 100644 (file)
@@ -23,7 +23,7 @@ class ActionModifyScale: public ActionInterface
                };
 
        public:
-               ActionModifyScale(RS_EntityContainer & container, GraphicView & graphicView);
+               ActionModifyScale(EntityContainer & container, GraphicView & graphicView);
                ~ActionModifyScale();
 
                virtual void init(int status = 0);
@@ -35,7 +35,7 @@ class ActionModifyScale: public ActionInterface
                virtual void updateToolBar();
 
        private:
-               RS_ScaleData data;
+               ScaleData data;
                Vector referencePoint;
                Vector targetPoint;
 };
index 3dff16aa85a8f7b397e6d9fb017433e1efede87d..e1465a7404317efe4eb895ba3d07c595cb9d6001 100644 (file)
@@ -21,7 +21,7 @@
 #include "modification.h"
 #include "preview.h"
 
-ActionModifyStretch::ActionModifyStretch(RS_EntityContainer & container,
+ActionModifyStretch::ActionModifyStretch(EntityContainer & container,
        GraphicView & graphicView): ActionInterface("Stretch Entities",
                container, graphicView)
 {
@@ -42,26 +42,26 @@ void ActionModifyStretch::init(int status)
 
 void ActionModifyStretch::trigger()
 {
-       RS_DEBUG->print("ActionModifyStretch::trigger()");
+       DEBUG->print("ActionModifyStretch::trigger()");
 
        deletePreview();
        clearPreview();
 
        deleteSnapper();
 
-       RS_Modification m(*container, graphicView);
+       Modification m(*container, graphicView);
        m.stretch(firstCorner, secondCorner, targetPoint - referencePoint);
 
        drawSnapper();
 
        setStatus(SetFirstCorner);
 
-       RS_DIALOGFACTORY->updateSelectionWidget(container->countSelected());
+       DIALOGFACTORY->updateSelectionWidget(container->countSelected());
 }
 
 void ActionModifyStretch::mouseMoveEvent(QMouseEvent * e)
 {
-       RS_DEBUG->print("ActionModifyStretch::mouseMoveEvent begin");
+       DEBUG->print("ActionModifyStretch::mouseMoveEvent begin");
 
        Vector mouse = snapPoint(e);
 
@@ -77,16 +77,16 @@ void ActionModifyStretch::mouseMoveEvent(QMouseEvent * e)
                        deletePreview();
                        clearPreview();
 /*                     preview->addEntity(
-                               new RS_Line(preview, RS_LineData(Vector(firstCorner.x, firstCorner.y),
+                               new Line(preview, LineData(Vector(firstCorner.x, firstCorner.y),
                                        Vector(secondCorner.x, firstCorner.y))));
                        preview->addEntity(
-                               new RS_Line(preview, RS_LineData(Vector(secondCorner.x, firstCorner.y),
+                               new Line(preview, LineData(Vector(secondCorner.x, firstCorner.y),
                                                Vector(secondCorner.x, secondCorner.y))));
                        preview->addEntity(
-                               new RS_Line(preview, RS_LineData(Vector(secondCorner.x, secondCorner.y),
+                               new Line(preview, LineData(Vector(secondCorner.x, secondCorner.y),
                                                Vector(firstCorner.x, secondCorner.y))));
                        preview->addEntity(
-                               new RS_Line(preview, RS_LineData(Vector(firstCorner.x, secondCorner.y),
+                               new Line(preview, LineData(Vector(firstCorner.x, secondCorner.y),
                                                Vector(firstCorner.x, firstCorner.y))));*/
                        drawPreview();
                }
@@ -114,7 +114,7 @@ void ActionModifyStretch::mouseMoveEvent(QMouseEvent * e)
                break;
        }
 
-       RS_DEBUG->print("ActionModifyStretch::mouseMoveEvent end");
+       DEBUG->print("ActionModifyStretch::mouseMoveEvent end");
 }
 
 void ActionModifyStretch::mouseReleaseEvent(QMouseEvent * e)
@@ -176,27 +176,27 @@ void ActionModifyStretch::updateMouseButtonHints()
        switch (getStatus())
        {
        case SetFirstCorner:
-               RS_DIALOGFACTORY->updateMouseWidget(tr("Specify first corner"),
+               DIALOGFACTORY->updateMouseWidget(tr("Specify first corner"),
                        tr("Cancel"));
                break;
 
        case SetSecondCorner:
-               RS_DIALOGFACTORY->updateMouseWidget(tr("Specify second corner"),
+               DIALOGFACTORY->updateMouseWidget(tr("Specify second corner"),
                        tr("Back"));
                break;
 
        case SetReferencePoint:
-               RS_DIALOGFACTORY->updateMouseWidget(tr("Specify reference point"),
+               DIALOGFACTORY->updateMouseWidget(tr("Specify reference point"),
                        tr("Back"));
                break;
 
        case SetTargetPoint:
-               RS_DIALOGFACTORY->updateMouseWidget(tr("Specify target point"),
+               DIALOGFACTORY->updateMouseWidget(tr("Specify target point"),
                        tr("Back"));
                break;
 
        default:
-               RS_DIALOGFACTORY->updateMouseWidget("", "");
+               DIALOGFACTORY->updateMouseWidget("", "");
                break;
        }
 }
@@ -209,9 +209,9 @@ void ActionModifyStretch::updateMouseCursor()
 void ActionModifyStretch::updateToolBar()
 {
        if (!isFinished())
-               RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
+               DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
        else
-               RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarModify);
+               DIALOGFACTORY->requestToolBar(RS2::ToolBarModify);
 }
 
 
index 6b96d2852b4ecb56a0be85e9c8423a486c85603a..f5d953bcf4e1eeb55e24faf728a6a5094bc66681 100644 (file)
@@ -24,7 +24,7 @@ class ActionModifyStretch: public ActionInterface
                };
 
        public:
-               ActionModifyStretch(RS_EntityContainer & container, GraphicView & graphicView);
+               ActionModifyStretch(EntityContainer & container, GraphicView & graphicView);
                ~ActionModifyStretch();
 
                virtual void init(int status = 0);
index 0e66a71fc4aae072cf0b2481522065464472ce2e..efbc6a06289c850c69f0ece612983ac57040672b 100644 (file)
@@ -23,7 +23,7 @@
 /**
  * @param both Trim both entities.
  */
-ActionModifyTrim::ActionModifyTrim(RS_EntityContainer & container,
+ActionModifyTrim::ActionModifyTrim(EntityContainer & container,
        GraphicView & graphicView, bool both): ActionInterface("Trim Entity",
                container, graphicView)
 {
@@ -48,12 +48,12 @@ void ActionModifyTrim::init(int status)
 
 void ActionModifyTrim::trigger()
 {
-       RS_DEBUG->print("ActionModifyTrim::trigger()");
+       DEBUG->print("ActionModifyTrim::trigger()");
 
        if (trimEntity && trimEntity->isAtomic() && limitEntity)
        {
-               RS_Modification m(*container, graphicView);
-               m.trim(trimCoord, (RS_AtomicEntity *)trimEntity,
+               Modification m(*container, graphicView);
+               m.trim(trimCoord, (AtomicEntity *)trimEntity,
                        limitCoord, limitEntity, both);
 
                trimEntity = NULL;
@@ -67,16 +67,16 @@ void ActionModifyTrim::trigger()
                else
                        setStatus(ChooseTrimEntity);
 
-               RS_DIALOGFACTORY->updateSelectionWidget(container->countSelected());
+               DIALOGFACTORY->updateSelectionWidget(container->countSelected());
        }
 }
 
 void ActionModifyTrim::mouseMoveEvent(QMouseEvent * e)
 {
-       RS_DEBUG->print("ActionModifyTrim::mouseMoveEvent begin");
+       DEBUG->print("ActionModifyTrim::mouseMoveEvent begin");
 
        Vector mouse = graphicView->toGraph(e->x(), e->y());
-       RS_Entity * se = catchEntity(e);
+       Entity * se = catchEntity(e);
 
        switch (getStatus())
        {
@@ -94,7 +94,7 @@ void ActionModifyTrim::mouseMoveEvent(QMouseEvent * e)
                break;
        }
 
-       RS_DEBUG->print("ActionModifyTrim::mouseMoveEvent end");
+       DEBUG->print("ActionModifyTrim::mouseMoveEvent end");
 }
 
 void ActionModifyTrim::mouseReleaseEvent(QMouseEvent * e)
@@ -102,7 +102,7 @@ void ActionModifyTrim::mouseReleaseEvent(QMouseEvent * e)
        if (e->button() == Qt::LeftButton)
        {
                Vector mouse = graphicView->toGraph(e->x(), e->y());
-               RS_Entity * se = catchEntity(e);
+               Entity * se = catchEntity(e);
 
                switch (getStatus())
                {
@@ -151,25 +151,25 @@ void ActionModifyTrim::updateMouseButtonHints()
        case ChooseLimitEntity:
 
                if (both)
-                       RS_DIALOGFACTORY->updateMouseWidget(tr("Select first trim entity"),
+                       DIALOGFACTORY->updateMouseWidget(tr("Select first trim entity"),
                                tr("Cancel"));
                else
-                       RS_DIALOGFACTORY->updateMouseWidget(tr("Select limiting entity"),
+                       DIALOGFACTORY->updateMouseWidget(tr("Select limiting entity"),
                                tr("Back"));
                break;
 
        case ChooseTrimEntity:
 
                if (both)
-                       RS_DIALOGFACTORY->updateMouseWidget(tr("Select second trim entity"),
+                       DIALOGFACTORY->updateMouseWidget(tr("Select second trim entity"),
                                tr("Cancel"));
                else
-                       RS_DIALOGFACTORY->updateMouseWidget(tr("Select entity to trim"),
+                       DIALOGFACTORY->updateMouseWidget(tr("Select entity to trim"),
                                tr("Back"));
                break;
 
        default:
-               RS_DIALOGFACTORY->updateMouseWidget("", "");
+               DIALOGFACTORY->updateMouseWidget("", "");
                break;
        }
 }
@@ -181,6 +181,6 @@ void ActionModifyTrim::updateMouseCursor()
 
 void ActionModifyTrim::updateToolBar()
 {
-       RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarModify);
+       DIALOGFACTORY->requestToolBar(RS2::ToolBarModify);
 }
 
index e91af171e39702ec32cf2f52e7616c25bd693159..292d339cb276aa67bd1250f12aa744636b0c466d 100644 (file)
@@ -4,7 +4,7 @@
 #include "actioninterface.h"
 #include "vector.h"
 
-class RS_Entity;
+class Entity;
 
 /**
  * This action class can handle user events to trim entities.
@@ -24,7 +24,7 @@ class ActionModifyTrim: public ActionInterface
                };
 
        public:
-               ActionModifyTrim(RS_EntityContainer & container, GraphicView & graphicView, bool both = false);
+               ActionModifyTrim(EntityContainer & container, GraphicView & graphicView, bool both = false);
                ~ActionModifyTrim();
 
                virtual void init(int status = 0);
@@ -36,9 +36,9 @@ class ActionModifyTrim: public ActionInterface
                virtual void updateToolBar();
 
        private:
-               RS_Entity * limitEntity;
+               Entity * limitEntity;
                Vector limitCoord;
-               RS_Entity * trimEntity;
+               Entity * trimEntity;
                Vector trimCoord;
                bool both;
 };
index a34367825c287993e8a70a5e5dc86c626adf6eec..83fbbe0da6747bd9e2b46bfa3f25ce92c0095aab 100644 (file)
@@ -22,7 +22,7 @@
 #include "modification.h"
 
 ActionModifyTrimAmount::ActionModifyTrimAmount(
-       RS_EntityContainer & container, GraphicView & graphicView):
+       EntityContainer & container, GraphicView & graphicView):
        ActionInterface("Trim Entity by a given amount",
                container, graphicView)
 {
@@ -50,17 +50,17 @@ void ActionModifyTrimAmount::init(int status)
 
 void ActionModifyTrimAmount::trigger()
 {
-       RS_DEBUG->print("ActionModifyTrimAmount::trigger()");
+       DEBUG->print("ActionModifyTrimAmount::trigger()");
 
        if (trimEntity != NULL && trimEntity->isAtomic())
        {
-               RS_Modification m(*container, graphicView);
-               m.trimAmount(trimCoord, (RS_AtomicEntity *)trimEntity, distance);
+               Modification m(*container, graphicView);
+               m.trimAmount(trimCoord, (AtomicEntity *)trimEntity, distance);
 
                trimEntity = NULL;
                setStatus(ChooseTrimEntity);
 
-               RS_DIALOGFACTORY->updateSelectionWidget(container->countSelected());
+               DIALOGFACTORY->updateSelectionWidget(container->countSelected());
        }
 }
 
@@ -80,14 +80,14 @@ void ActionModifyTrimAmount::mouseReleaseEvent(QMouseEvent * e)
                        else
                        {
                                if (trimEntity == NULL)
-                                       RS_DIALOGFACTORY->commandMessage(
+                                       DIALOGFACTORY->commandMessage(
                                                tr("No entity found. "));
                                else if (trimEntity->rtti() == RS2::EntityInsert)
-                                       RS_DIALOGFACTORY->commandMessage(
+                                       DIALOGFACTORY->commandMessage(
                                                tr("The chosen Entity is in a block. "
                                                        "Please edit the block."));
                                else
-                                       RS_DIALOGFACTORY->commandMessage(
+                                       DIALOGFACTORY->commandMessage(
                                                tr("The chosen Entity is not an atomic entity "
                                                        "or cannot be trimmed."));
                        }
@@ -104,13 +104,13 @@ void ActionModifyTrimAmount::mouseReleaseEvent(QMouseEvent * e)
        }
 }
 
-void ActionModifyTrimAmount::commandEvent(RS_CommandEvent * e)
+void ActionModifyTrimAmount::commandEvent(CommandEvent * e)
 {
        QString c = e->getCommand().toLower();
 
        if (checkCommand("help", c))
        {
-               RS_DIALOGFACTORY->commandMessage(msgAvailableCommands()
+               DIALOGFACTORY->commandMessage(msgAvailableCommands()
                        + getAvailableCommands().join(", "));
                return;
        }
@@ -119,13 +119,13 @@ void ActionModifyTrimAmount::commandEvent(RS_CommandEvent * e)
        {
        case ChooseTrimEntity: {
                bool ok;
-               double d = RS_Math::eval(c, &ok);
+               double d = Math::eval(c, &ok);
 
                if (ok == true)
                        distance = d;
                else
-                       RS_DIALOGFACTORY->commandMessage(tr("Not a valid expression"));
-               RS_DIALOGFACTORY->requestOptions(this, true, true);
+                       DIALOGFACTORY->commandMessage(tr("Not a valid expression"));
+               DIALOGFACTORY->requestOptions(this, true, true);
                setStatus(ChooseTrimEntity);
        }
        break;
@@ -155,14 +155,14 @@ void ActionModifyTrimAmount::showOptions()
 {
        ActionInterface::showOptions();
 
-       RS_DIALOGFACTORY->requestOptions(this, true);
+       DIALOGFACTORY->requestOptions(this, true);
 }
 
 void ActionModifyTrimAmount::hideOptions()
 {
        ActionInterface::hideOptions();
 
-       RS_DIALOGFACTORY->requestOptions(this, false);
+       DIALOGFACTORY->requestOptions(this, false);
 }
 
 void ActionModifyTrimAmount::updateMouseButtonHints()
@@ -170,12 +170,12 @@ void ActionModifyTrimAmount::updateMouseButtonHints()
        switch (getStatus())
        {
        case ChooseTrimEntity:
-               RS_DIALOGFACTORY->updateMouseWidget(
+               DIALOGFACTORY->updateMouseWidget(
                        tr("Select entity to trim or enter distance:"), tr("Back"));
                break;
 
        default:
-               RS_DIALOGFACTORY->updateMouseWidget("", "");
+               DIALOGFACTORY->updateMouseWidget("", "");
                break;
        }
 }
@@ -187,7 +187,7 @@ void ActionModifyTrimAmount::updateMouseCursor()
 
 void ActionModifyTrimAmount::updateToolBar()
 {
-       RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarModify);
+       DIALOGFACTORY->requestToolBar(RS2::ToolBarModify);
 }
 
 double ActionModifyTrimAmount::getDistance()
index 0f3db59d74d424db177404d0c58fbce885a1ef4a..93c45a7de2db6cb436e6774d42031f548ae088e7 100644 (file)
@@ -4,7 +4,7 @@
 #include "actioninterface.h"
 #include "vector.h"
 
-class RS_Entity;
+class Entity;
 
 /**
  * This action class can handle user events to trim entities by a given
@@ -24,7 +24,7 @@ class ActionModifyTrimAmount: public ActionInterface
                };
 
        public:
-               ActionModifyTrimAmount(RS_EntityContainer & container, GraphicView & graphicView);
+               ActionModifyTrimAmount(EntityContainer & container, GraphicView & graphicView);
                ~ActionModifyTrimAmount();
 
                virtual RS2::ActionType rtti();
@@ -32,7 +32,7 @@ class ActionModifyTrimAmount: public ActionInterface
                virtual void trigger();
                //virtual void mouseMoveEvent(QMouseEvent* e);
                virtual void mouseReleaseEvent(QMouseEvent * e);
-               virtual void commandEvent(RS_CommandEvent * e);
+               virtual void commandEvent(CommandEvent * e);
                virtual QStringList getAvailableCommands();
                virtual void hideOptions();
                virtual void showOptions();
@@ -43,7 +43,7 @@ class ActionModifyTrimAmount: public ActionInterface
                void setDistance(double d);
 
        private:
-               RS_Entity * trimEntity;
+               Entity * trimEntity;
                Vector trimCoord;
                double distance;
 };
index ec39d03f2c8fd49d8d6aa940b2e5730643cb926e..da298ba2907851a2269bd6851ff0f6366adce8c4 100644 (file)
@@ -19,7 +19,7 @@
 #include "dialogfactory.h"
 #include "graphicview.h"
 
-ActionOptionsDrawing::ActionOptionsDrawing(RS_EntityContainer & container, GraphicView & graphicView):
+ActionOptionsDrawing::ActionOptionsDrawing(EntityContainer & container, GraphicView & graphicView):
        ActionInterface("Drawing Options", container, graphicView)
 {
 }
@@ -43,8 +43,8 @@ void ActionOptionsDrawing::trigger()
 {
        if (graphic)
        {
-               RS_DIALOGFACTORY->requestOptionsDrawingDialog(*graphic);
-               RS_DIALOGFACTORY->updateCoordinateWidget(Vector(0.0, 0.0), Vector(0.0, 0.0), true);
+               DIALOGFACTORY->requestOptionsDrawingDialog(*graphic);
+               DIALOGFACTORY->updateCoordinateWidget(Vector(0.0, 0.0), Vector(0.0, 0.0), true);
                graphicView->updateGrid();
                graphicView->redraw();
        }
index f068db307b2199076efed5ee3383ce740a59c810..6860204afb66000434da666af5f1ad4f4568b0d5 100644 (file)
@@ -13,7 +13,7 @@
 class ActionOptionsDrawing: public ActionInterface
 {
        public:
-               ActionOptionsDrawing(RS_EntityContainer & container, GraphicView & graphicView);
+               ActionOptionsDrawing(EntityContainer & container, GraphicView & graphicView);
                ~ActionOptionsDrawing();
 
                virtual RS2::ActionType rtti();
index d43e891e9786b1bfb2b12b7fc511c81422d4bc3b..ada1c137de9d5c995991337f47124d0807b71be8 100644 (file)
@@ -23,7 +23,7 @@
 /**
  * Constructor.
  */
-ActionPrintPreview::ActionPrintPreview(RS_EntityContainer & container, GraphicView & graphicView):
+ActionPrintPreview::ActionPrintPreview(EntityContainer & container, GraphicView & graphicView):
        ActionInterface("Print Preview", container, graphicView)
 {
        showOptions();
@@ -97,7 +97,7 @@ void ActionPrintPreview::mouseReleaseEvent(QMouseEvent * e)
                break;
 
        default:
-               RS_DIALOGFACTORY->requestPreviousMenu();
+               DIALOGFACTORY->requestPreviousMenu();
                e->accept();
                break;
        }
@@ -107,7 +107,7 @@ void ActionPrintPreview::coordinateEvent(Vector *)
 {
 }
 
-void ActionPrintPreview::commandEvent(RS_CommandEvent *)
+void ActionPrintPreview::commandEvent(CommandEvent *)
 {
 }
 
@@ -121,14 +121,14 @@ void ActionPrintPreview::showOptions()
 {
        ActionInterface::showOptions();
 
-       RS_DIALOGFACTORY->requestOptions(this, true);
+       DIALOGFACTORY->requestOptions(this, true);
 }
 
 void ActionPrintPreview::hideOptions()
 {
        ActionInterface::hideOptions();
 
-       RS_DIALOGFACTORY->requestOptions(this, false);
+       DIALOGFACTORY->requestOptions(this, false);
 }
 
 void ActionPrintPreview::updateMouseButtonHints()
index 435e84990c34f0cfd4585f1650cb0f7901123e9f..e6171d12d8ec57590d45a238e291c103844a2a56 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef __ACTIONPRINTPREVIEW_H__
 #define __ACTIONPRINTPREVIEW_H__
 
-#include "rs.h"
+#include "enums.h"
 #include "actioninterface.h"
 #include "vector.h"
 
@@ -23,7 +23,7 @@ class ActionPrintPreview: public ActionInterface
                };
 
        public:
-               ActionPrintPreview(RS_EntityContainer & container, GraphicView & graphicView);
+               ActionPrintPreview(EntityContainer & container, GraphicView & graphicView);
                ~ActionPrintPreview();
 
                virtual RS2::ActionType rtti();
@@ -33,7 +33,7 @@ class ActionPrintPreview: public ActionInterface
                virtual void mousePressEvent(QMouseEvent * e);
                virtual void mouseReleaseEvent(QMouseEvent * e);
                virtual void coordinateEvent(Vector * e);
-               virtual void commandEvent(RS_CommandEvent * e);
+               virtual void commandEvent(CommandEvent * e);
                virtual QStringList getAvailableCommands();
                virtual void showOptions();
                virtual void hideOptions();
index bd96b43ef83d32d92acd89fba8d63a12821a23ac..e09cf28c2f92a40e0d8bacc7e3950c2ffae668a9 100644 (file)
@@ -20,7 +20,7 @@
 #include "dialogfactory.h"
 #include "graphicview.h"
 
-ActionSelect::ActionSelect(RS_EntityContainer & container, GraphicView & graphicView,
+ActionSelect::ActionSelect(EntityContainer & container, GraphicView & graphicView,
        RS2::ActionType nextAction):
        ActionInterface("Select Entities", container, graphicView)
 {
@@ -45,11 +45,11 @@ void ActionSelect::mouseReleaseEvent(QMouseEvent * e)
 
 void ActionSelect::updateToolBar()
 {
-       if (RS_DIALOGFACTORY)
+       if (DIALOGFACTORY)
        {
                if (!isFinished())
-                       RS_DIALOGFACTORY->requestToolBarSelect(this, nextAction);
+                       DIALOGFACTORY->requestToolBarSelect(this, nextAction);
                else
-                       RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarMain);
+                       DIALOGFACTORY->requestToolBar(RS2::ToolBarMain);
        }
 }
index f90b26146e0d12efae0d7370989123ccad6c97fa..5da758a1df1ca780d80bc558c8d780efd0916e3b 100644 (file)
@@ -12,7 +12,7 @@
 class ActionSelect: public ActionInterface
 {
        public:
-               ActionSelect(RS_EntityContainer & container, GraphicView & graphicView, RS2::ActionType nextAction);
+               ActionSelect(EntityContainer & container, GraphicView & graphicView, RS2::ActionType nextAction);
                ~ActionSelect();
 
                void init(int status);
index a54df0bfa01339aae0bcdb79c3c9ad2eabf86403..6cf276825c5db0e6049f72644d63e0004cde0812 100644 (file)
@@ -19,7 +19,7 @@
 #include "dialogfactory.h"
 #include "selection.h"
 
-ActionSelectAll::ActionSelectAll(RS_EntityContainer & container,
+ActionSelectAll::ActionSelectAll(EntityContainer & container,
        GraphicView & graphicView, bool select):
        ActionInterface("Select All Entities", container, graphicView)
 {
@@ -44,8 +44,8 @@ void ActionSelectAll::init(int status)
 
 void ActionSelectAll::trigger()
 {
-       RS_Selection s(*container, graphicView);
+       Selection s(*container, graphicView);
        s.selectAll(select);
 
-       RS_DIALOGFACTORY->updateSelectionWidget(container->countSelected());
+       DIALOGFACTORY->updateSelectionWidget(container->countSelected());
 }
index 8cce0c3d1a11db8d6a7dc10b6af2915b8173c0c3..a67a1bb13a3ba93ec91f6f110c2c2bf33af68e38 100644 (file)
@@ -12,7 +12,7 @@
 class ActionSelectAll: public ActionInterface
 {
        public:
-               ActionSelectAll(RS_EntityContainer & container, GraphicView & graphicView, bool select);
+               ActionSelectAll(EntityContainer & container, GraphicView & graphicView, bool select);
                ~ActionSelectAll();
 
                virtual RS2::ActionType rtti();
index f3aba42f1ba42af26a2f9e0ce0dd4970246707f0..d27b0edb3f4ae258936da92a17b57b9374dfb953 100644 (file)
@@ -19,7 +19,7 @@
 #include "graphicview.h"
 
 ActionSelectBase::ActionSelectBase(const char * name,
-       RS_EntityContainer & container, GraphicView & graphicView):
+       EntityContainer & container, GraphicView & graphicView):
        ActionInterface(name, container, graphicView)
 {
 }
index 374ec71d2d8fac21b35fa1704a3e4c921694c62b..385af9e750774f43141f47ded4f774c9fee01920 100644 (file)
@@ -12,7 +12,7 @@
 class ActionSelectBase: public ActionInterface
 {
        public:
-               ActionSelectBase(const char * name, RS_EntityContainer & container, GraphicView & graphicView);
+               ActionSelectBase(const char * name, EntityContainer & container, GraphicView & graphicView);
                ~ActionSelectBase();
 
                virtual void keyReleaseEvent(QKeyEvent * e);
index 648a1f2a418c9d42fdcdc2f34776bc877d2ce77a..66d6a7c19241509a0e6ef8d41439a03dfb3ba430 100644 (file)
@@ -21,7 +21,7 @@
 #include "graphicview.h"
 #include "selection.h"
 
-ActionSelectContour::ActionSelectContour(RS_EntityContainer & container,
+ActionSelectContour::ActionSelectContour(EntityContainer & container,
        GraphicView & graphicView):
        ActionInterface("Select Contours", container, graphicView)
 {
@@ -43,17 +43,17 @@ void ActionSelectContour::trigger()
        {
                if (en->isAtomic())
                {
-                       RS_Selection s(*container, graphicView);
+                       Selection s(*container, graphicView);
                        s.selectContour(en);
 
-                       if (RS_DIALOGFACTORY)
-                               RS_DIALOGFACTORY->updateSelectionWidget(container->countSelected());
+                       if (DIALOGFACTORY)
+                               DIALOGFACTORY->updateSelectionWidget(container->countSelected());
                }
-               else if (RS_DIALOGFACTORY)
-                       RS_DIALOGFACTORY->commandMessage(tr("Entity must be an Atomic Entity."));
+               else if (DIALOGFACTORY)
+                       DIALOGFACTORY->commandMessage(tr("Entity must be an Atomic Entity."));
        }
        else
-               RS_DEBUG->print("ActionSelectContour::trigger: Entity is NULL\n");
+               DEBUG->print("ActionSelectContour::trigger: Entity is NULL\n");
 }
 
 void ActionSelectContour::mouseReleaseEvent(QMouseEvent * e)
index 309b81ba539a2b347d936ce5cdcfb200f50766e4..3fc47ddf20926a13c7d3378be84da0248f23f660 100644 (file)
@@ -3,7 +3,7 @@
 
 #include "actioninterface.h"
 
-class RS_Entity;
+class Entity;
 
 /**
  * This action class can handle user events to select contours.
@@ -14,7 +14,7 @@ class RS_Entity;
 class ActionSelectContour: public ActionInterface
 {
        public:
-               ActionSelectContour(RS_EntityContainer & container, GraphicView & graphicView);
+               ActionSelectContour(EntityContainer & container, GraphicView & graphicView);
                ~ActionSelectContour();
 
                virtual RS2::ActionType rtti();
@@ -23,7 +23,7 @@ class ActionSelectContour: public ActionInterface
                virtual void updateMouseCursor();
 
        private:
-               RS_Entity * en;
+               Entity * en;
 };
 
 #endif // __ACTIONSELECTCONTOURS_H__
index 122f1f007f727200056758fee74db5ea3a8982e0..fd18464c79c56e9e17d6d6bff09c05643ac9a962 100644 (file)
@@ -28,7 +28,7 @@
  * @param select true: select window. false: deselect window
  */
 ActionSelectIntersected::ActionSelectIntersected(
-       RS_EntityContainer & container, GraphicView & graphicView, bool select):
+       EntityContainer & container, GraphicView & graphicView, bool select):
        ActionInterface("Select Intersected", container, graphicView)
 {
        this->select = select;
@@ -60,11 +60,11 @@ void ActionSelectIntersected::trigger()
                if (graphicView->toGuiDX(v1.distanceTo(v2)) > 10)
                {
                        deleteSnapper();
-                       RS_Selection s(*container, graphicView);
+                       Selection s(*container, graphicView);
                        s.selectIntersected(v1, v2, select);
 
-                       if (RS_DIALOGFACTORY)
-                               RS_DIALOGFACTORY->updateSelectionWidget(container->countSelected());
+                       if (DIALOGFACTORY)
+                               DIALOGFACTORY->updateSelectionWidget(container->countSelected());
 
                        init();
                }
@@ -78,7 +78,7 @@ void ActionSelectIntersected::mouseMoveEvent(QMouseEvent * e)
                v2 = snapPoint(e);
                deletePreview();
                clearPreview();
-//             preview->addEntity(new RS_Line(preview, RS_LineData(Vector(v1.x, v1.y), Vector(v2.x, v2.y))));
+//             preview->addEntity(new Line(preview, LineData(Vector(v1.x, v1.y), Vector(v2.x, v2.y))));
                drawPreview();
        }
 }
@@ -99,13 +99,13 @@ void ActionSelectIntersected::mousePressEvent(QMouseEvent * e)
                }
        }
 
-       RS_DEBUG->print("ActionSelectIntersected::mousePressEvent(): %f %f",
+       DEBUG->print("ActionSelectIntersected::mousePressEvent(): %f %f",
                v1.x, v1.y);
 }
 
 void ActionSelectIntersected::mouseReleaseEvent(QMouseEvent * e)
 {
-       RS_DEBUG->print("ActionSelectIntersected::mouseReleaseEvent()");
+       DEBUG->print("ActionSelectIntersected::mouseReleaseEvent()");
 
        if (e->button() == Qt::RightButton)
        {
@@ -127,20 +127,20 @@ void ActionSelectIntersected::mouseReleaseEvent(QMouseEvent * e)
 
 void ActionSelectIntersected::updateMouseButtonHints()
 {
-       if (RS_DIALOGFACTORY != NULL)
+       if (DIALOGFACTORY != NULL)
        {
                switch (getStatus())
                {
                case SetPoint1:
-                       RS_DIALOGFACTORY->updateMouseWidget(tr("Choose first point of intersection line"), tr("Cancel"));
+                       DIALOGFACTORY->updateMouseWidget(tr("Choose first point of intersection line"), tr("Cancel"));
                        break;
 
                case SetPoint2:
-                       RS_DIALOGFACTORY->updateMouseWidget(tr("Choose second point of intersection line"), tr("Back"));
+                       DIALOGFACTORY->updateMouseWidget(tr("Choose second point of intersection line"), tr("Back"));
                        break;
 
                default:
-                       RS_DIALOGFACTORY->updateMouseWidget("", "");
+                       DIALOGFACTORY->updateMouseWidget("", "");
                        break;
                }
        }
@@ -153,12 +153,12 @@ void ActionSelectIntersected::updateMouseCursor()
 
 void ActionSelectIntersected::updateToolBar()
 {
-       if (RS_DIALOGFACTORY != NULL)
+       if (DIALOGFACTORY != NULL)
        {
                if (!isFinished())
-                       RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarSelect);
+                       DIALOGFACTORY->requestToolBar(RS2::ToolBarSelect);
                else
-                       RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarSelect);
+                       DIALOGFACTORY->requestToolBar(RS2::ToolBarSelect);
        }
 }
 
index 2487afcada6d3aabf6daee71748563cfd8a5ce03..decdd3ae281514f0bac805e04003c24f464ba5ab 100644 (file)
@@ -22,7 +22,7 @@ class ActionSelectIntersected: public ActionInterface
                };
 
        public:
-               ActionSelectIntersected(RS_EntityContainer & container, GraphicView & graphicView, bool select);
+               ActionSelectIntersected(EntityContainer & container, GraphicView & graphicView, bool select);
                ~ActionSelectIntersected();
 
                virtual RS2::ActionType rtti();
index eac8098172b588c2601771dc26986d270bdaedae..ecd20f9daba0462042c6898c6f05aca7e62e6fd1 100644 (file)
@@ -19,7 +19,7 @@
 #include "dialogfactory.h"
 #include "selection.h"
 
-ActionSelectInvert::ActionSelectInvert(RS_EntityContainer & container,
+ActionSelectInvert::ActionSelectInvert(EntityContainer & container,
        GraphicView & graphicView): ActionInterface("Invert Selection",
                container, graphicView)
 {
@@ -43,8 +43,8 @@ void ActionSelectInvert::init(int status)
 
 void ActionSelectInvert::trigger()
 {
-       RS_Selection s(*container, graphicView);
+       Selection s(*container, graphicView);
        s.invertSelection();
 
-       RS_DIALOGFACTORY->updateSelectionWidget(container->countSelected());
+       DIALOGFACTORY->updateSelectionWidget(container->countSelected());
 }
index 27269759c511915f88c14b2078864a3b3820192b..8ebd1f951b7a8e8a0722cbde13ae2816e7ed7905 100644 (file)
@@ -12,7 +12,7 @@
 class ActionSelectInvert: public ActionInterface
 {
        public:
-               ActionSelectInvert(RS_EntityContainer & container, GraphicView & graphicView);
+               ActionSelectInvert(EntityContainer & container, GraphicView & graphicView);
                ~ActionSelectInvert();
 
                virtual RS2::ActionType rtti();
index e89f0bdcab14fb9aab9438793ec4898fc115404b..2f6baf3fcc83c97220de97a8bc1dbd5505786fa3 100644 (file)
@@ -21,7 +21,7 @@
 #include "graphicview.h"
 #include "selection.h"
 
-ActionSelectLayer::ActionSelectLayer(RS_EntityContainer & container, GraphicView & graphicView):
+ActionSelectLayer::ActionSelectLayer(EntityContainer & container, GraphicView & graphicView):
        ActionInterface("Select Layers", container, graphicView)
 {
        en = NULL;
@@ -40,14 +40,14 @@ void ActionSelectLayer::trigger()
 {
        if (en)
        {
-               RS_Selection s(*container, graphicView);
+               Selection s(*container, graphicView);
                s.selectLayer(en);
 
-               if (RS_DIALOGFACTORY)
-                       RS_DIALOGFACTORY->updateSelectionWidget(container->countSelected());
+               if (DIALOGFACTORY)
+                       DIALOGFACTORY->updateSelectionWidget(container->countSelected());
        }
        else
-               RS_DEBUG->print("ActionSelectLayer::trigger: Entity is NULL\n");
+               DEBUG->print("ActionSelectLayer::trigger: Entity is NULL\n");
 }
 
 void ActionSelectLayer::mouseReleaseEvent(QMouseEvent * e)
index f3bccc6ff11ac331c8e549c1bc4ce1d636ff4027..9ac3493ff8f5ce5c01284e6d3e31842ec6bfa843 100644 (file)
@@ -3,7 +3,7 @@
 
 #include "actioninterface.h"
 
-class RS_Entity;
+class Entity;
 
 /**
  * This action class can handle user events to select contours.
@@ -14,7 +14,7 @@ class RS_Entity;
 class ActionSelectLayer: public ActionInterface
 {
        public:
-               ActionSelectLayer(RS_EntityContainer & container, GraphicView & graphicView);
+               ActionSelectLayer(EntityContainer & container, GraphicView & graphicView);
                ~ActionSelectLayer();
 
                virtual RS2::ActionType rtti();
@@ -23,7 +23,7 @@ class ActionSelectLayer: public ActionInterface
                virtual void updateMouseCursor();
 
        private:
-               RS_Entity * en;
+               Entity * en;
 };
 
 #endif // __ACTIONSELECTLAYER_H__
index f994d5d30b2922593f9f537101fa4279c4b7214d..468e721bd288f5b1a4b9837c4abfb8882fbaab83 100644 (file)
@@ -21,7 +21,7 @@
 #include "graphicview.h"
 #include "selection.h"
 
-ActionSelectSingle::ActionSelectSingle(RS_EntityContainer & container, GraphicView & graphicView):
+ActionSelectSingle::ActionSelectSingle(EntityContainer & container, GraphicView & graphicView):
        ActionInterface("Select Entities", container, graphicView)
 {
        en = NULL;
@@ -40,13 +40,13 @@ void ActionSelectSingle::trigger()
 {
        if (en != NULL)
        {
-               RS_Selection s(*container, graphicView);
+               Selection s(*container, graphicView);
                s.selectSingle(en);
 
-               RS_DIALOGFACTORY->updateSelectionWidget(container->countSelected());
+               DIALOGFACTORY->updateSelectionWidget(container->countSelected());
        }
        else
-               RS_DEBUG->print("ActionSelectSingle::trigger: Entity is NULL\n");
+               DEBUG->print("ActionSelectSingle::trigger: Entity is NULL\n");
 }
 
 void ActionSelectSingle::keyPressEvent(QKeyEvent * e)
index 20d0c95d20da6f2d4abd3a76d1d4f3e9f4fa01d1..015817a01d419e55b5a71e859703392634362a65 100644 (file)
@@ -3,7 +3,7 @@
 
 #include "actioninterface.h"
 
-class RS_Entity;
+class Entity;
 
 /**
  * This action class can handle user events to select entities.
@@ -14,7 +14,7 @@ class RS_Entity;
 class ActionSelectSingle: public ActionInterface
 {
        public:
-               ActionSelectSingle(RS_EntityContainer & container, GraphicView & graphicView);
+               ActionSelectSingle(EntityContainer & container, GraphicView & graphicView);
                ~ActionSelectSingle();
 
                virtual RS2::ActionType rtti();
@@ -24,7 +24,7 @@ class ActionSelectSingle: public ActionInterface
                virtual void updateMouseCursor();
 
        private:
-               RS_Entity * en;
+               Entity * en;
 };
 
 #endif // __ACTIONSELECTSINGLE_H__
index 513369314ff22917436d7480ed46c8463e921009..e47cd9405ecd75a98c549a68f2000c4d31541b9c 100644 (file)
@@ -27,7 +27,7 @@
  *
  * @param select true: select window. false: deselect window
  */
-ActionSelectWindow::ActionSelectWindow(RS_EntityContainer & container,
+ActionSelectWindow::ActionSelectWindow(EntityContainer & container,
        GraphicView & graphicView, bool select):
        ActionInterface("Select Window", container, graphicView)
 {
@@ -61,9 +61,9 @@ void ActionSelectWindow::trigger()
                {
                        deleteSnapper();
                        bool cross = (v2.y > v1.y);
-                       RS_Selection s(*container, graphicView);
+                       Selection s(*container, graphicView);
                        s.selectWindow(v1, v2, select, cross);
-                       RS_DIALOGFACTORY->updateSelectionWidget(container->countSelected());
+                       DIALOGFACTORY->updateSelectionWidget(container->countSelected());
                        init();
                }
        }
@@ -76,14 +76,14 @@ void ActionSelectWindow::mouseMoveEvent(QMouseEvent * e)
                v2 = snapPoint(e);
                deletePreview();
                clearPreview();
-/*             preview->addEntity(new RS_Line(preview,
-                               RS_LineData(Vector(v1.x, v1.y), Vector(v2.x, v1.y))));
-               preview->addEntity(new RS_Line(preview,
-                               RS_LineData(Vector(v2.x, v1.y), Vector(v2.x, v2.y))));
-               preview->addEntity(new RS_Line(preview,
-                               RS_LineData(Vector(v2.x, v2.y), Vector(v1.x, v2.y))));
-               preview->addEntity(new RS_Line(preview,
-                               RS_LineData(Vector(v1.x, v2.y), Vector(v1.x, v1.y))));*/
+/*             preview->addEntity(new Line(preview,
+                               LineData(Vector(v1.x, v1.y), Vector(v2.x, v1.y))));
+               preview->addEntity(new Line(preview,
+                               LineData(Vector(v2.x, v1.y), Vector(v2.x, v2.y))));
+               preview->addEntity(new Line(preview,
+                               LineData(Vector(v2.x, v2.y), Vector(v1.x, v2.y))));
+               preview->addEntity(new Line(preview,
+                               LineData(Vector(v1.x, v2.y), Vector(v1.x, v1.y))));*/
                drawPreview();
        }
 }
@@ -104,13 +104,13 @@ void ActionSelectWindow::mousePressEvent(QMouseEvent * e)
                }
        }
 
-       RS_DEBUG->print("ActionSelectWindow::mousePressEvent(): %f %f",
+       DEBUG->print("ActionSelectWindow::mousePressEvent(): %f %f",
                v1.x, v1.y);
 }
 
 void ActionSelectWindow::mouseReleaseEvent(QMouseEvent * e)
 {
-       RS_DEBUG->print("ActionSelectWindow::mouseReleaseEvent()");
+       DEBUG->print("ActionSelectWindow::mouseReleaseEvent()");
 
        if (e->button() == Qt::LeftButton)
        {
@@ -135,15 +135,15 @@ void ActionSelectWindow::updateMouseButtonHints()
        switch (getStatus())
        {
        case SetCorner1:
-               RS_DIALOGFACTORY->updateMouseWidget(tr("Choose first edge"), tr("Cancel"));
+               DIALOGFACTORY->updateMouseWidget(tr("Choose first edge"), tr("Cancel"));
                break;
 
        case SetCorner2:
-               RS_DIALOGFACTORY->updateMouseWidget(tr("Choose second edge"), tr("Back"));
+               DIALOGFACTORY->updateMouseWidget(tr("Choose second edge"), tr("Back"));
                break;
 
        default:
-               RS_DIALOGFACTORY->updateMouseWidget("", "");
+               DIALOGFACTORY->updateMouseWidget("", "");
                break;
        }
 }
@@ -156,7 +156,7 @@ void ActionSelectWindow::updateMouseCursor()
 void ActionSelectWindow::updateToolBar()
 {
        if (!isFinished())
-               RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarSelect);
+               DIALOGFACTORY->requestToolBar(RS2::ToolBarSelect);
        else
-               RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarSelect);
+               DIALOGFACTORY->requestToolBar(RS2::ToolBarSelect);
 }
index f96bbffbf0645abbf5aac9b46cff8f36f6e5cdfc..eb7647ee7c84b0ef6392c5f2265bb08be2b06594 100644 (file)
@@ -22,7 +22,7 @@ class ActionSelectWindow: public ActionInterface
                };
 
        public:
-               ActionSelectWindow(RS_EntityContainer & container, GraphicView & graphicView, bool select);
+               ActionSelectWindow(EntityContainer & container, GraphicView & graphicView, bool select);
                ~ActionSelectWindow();
 
                virtual RS2::ActionType rtti();
index 5e1fc09161e403151685981d5d550651c6d5d8e0..98297a1b37960853c2c5425fdda1c590902fb259 100644 (file)
@@ -19,7 +19,7 @@
 #include "dialogfactory.h"
 #include "graphicview.h"
 
-ActionSetRelativeZero::ActionSetRelativeZero(RS_EntityContainer & container,
+ActionSetRelativeZero::ActionSetRelativeZero(EntityContainer & container,
        GraphicView & graphicView): ActionInterface("Set the relative Zero",
                container, graphicView)
 {
@@ -80,11 +80,11 @@ void ActionSetRelativeZero::updateMouseButtonHints()
        switch (getStatus())
        {
        case 0:
-               RS_DIALOGFACTORY->updateMouseWidget(tr("Set relative Zero"), tr("Cancel"));
+               DIALOGFACTORY->updateMouseWidget(tr("Set relative Zero"), tr("Cancel"));
                break;
 
        default:
-               RS_DIALOGFACTORY->updateMouseWidget("", "");
+               DIALOGFACTORY->updateMouseWidget("", "");
                break;
        }
 }
@@ -97,9 +97,9 @@ void ActionSetRelativeZero::updateMouseCursor()
 void ActionSetRelativeZero::updateToolBar()
 {
        if (!isFinished())
-               RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
+               DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
        else
-               RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
+               DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
 }
 
 
index a199f2cbb43fdd632f57947f5c1cf0ab6328613d..7ec811c9f00f2a64fddc2b967265c44255e07938 100644 (file)
@@ -14,7 +14,7 @@
 class ActionSetRelativeZero: public ActionInterface
 {
        public:
-               ActionSetRelativeZero(RS_EntityContainer & container, GraphicView & graphicView);
+               ActionSetRelativeZero(EntityContainer & container, GraphicView & graphicView);
                ~ActionSetRelativeZero();
 
                virtual RS2::ActionType rtti();
index 18b6a8dc4ec26f36917edb6182c641cd3c249e5d..0e8d3c732e61ebdcbb2ec00a3750efa7dc458c01 100644 (file)
@@ -23,7 +23,7 @@
  *
  * @param snapMode The new snap mode used from now on.
  */
-ActionSetSnapMode::ActionSetSnapMode(RS_EntityContainer & container, GraphicView & graphicView, RS2::SnapMode snapMode):
+ActionSetSnapMode::ActionSetSnapMode(EntityContainer & container, GraphicView & graphicView, RS2::SnapMode snapMode):
        ActionInterface("Set Snap Mode", container, graphicView)
 {
        this->snapMode = snapMode;
index 713d4f691576042f3fbe4bfbe622e0a687cc269b..d353c1141c6eec4a44e66df25d977c65964a8e5e 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef __ACTIONSETSNAPMODE_H__
 #define __ACTIONSETSNAPMODE_H__
 
-#include "rs.h"
+#include "enums.h"
 #include "actioninterface.h"
 
 /**
@@ -13,7 +13,7 @@
 class ActionSetSnapMode: public ActionInterface
 {
        public:
-               ActionSetSnapMode(RS_EntityContainer & container, GraphicView & graphicView, RS2::SnapMode snapMode);
+               ActionSetSnapMode(EntityContainer & container, GraphicView & graphicView, RS2::SnapMode snapMode);
                ~ActionSetSnapMode();
 
                virtual void init(int status = 0);
index b235172b5d14f51b2dd2250a545962a060739f33..10d92ef8f64112797b8cd8d510aa4c26f2f65c8f 100644 (file)
@@ -25,7 +25,7 @@
  * @param set true: set additional snap mode / false: unset
  */
 ActionSetSnapRestriction::ActionSetSnapRestriction(
-       RS_EntityContainer & container, GraphicView & graphicView, RS2::SnapRestriction snapRes):
+       EntityContainer & container, GraphicView & graphicView, RS2::SnapRestriction snapRes):
        ActionInterface("Set Additional Snap Mode", container, graphicView)
 {
        this->snapRes = snapRes;
index 8bbca94dfbed24f32522658ddb220b1b2ed61053..d386e5534ba48c67b56a0abaf85d9670c7141d67 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef __ACTIONSETSNAPRESTRICTION_H__
 #define __ACTIONSETSNAPRESTRICTION_H__
 
-#include "rs.h"
+#include "enums.h"
 #include "actioninterface.h"
 
 /**
@@ -13,7 +13,7 @@
 class ActionSetSnapRestriction: public ActionInterface
 {
        public:
-               ActionSetSnapRestriction(RS_EntityContainer & container, GraphicView & graphicView, RS2::SnapRestriction snapRes);
+               ActionSetSnapRestriction(EntityContainer & container, GraphicView & graphicView, RS2::SnapRestriction snapRes);
                ~ActionSetSnapRestriction();
 
                virtual void init(int status = 0);
index 72b65f415bd89467db917904df692e958fc9ffd6..fca53c468769bd8e819b5fe025f7f08c844ff94b 100644 (file)
@@ -26,7 +26,7 @@
  * @param both Trim both entities.
  */
 ActionSnapIntersectionManual::ActionSnapIntersectionManual(
-       RS_EntityContainer & container, GraphicView & graphicView):
+       EntityContainer & container, GraphicView & graphicView):
        ActionInterface("Trim Entity", container, graphicView)
 {
        entity2 = NULL;
@@ -48,12 +48,12 @@ void ActionSnapIntersectionManual::init(int status)
 
 void ActionSnapIntersectionManual::trigger()
 {
-       RS_DEBUG->print("ActionSnapIntersectionManual::trigger()");
+       DEBUG->print("ActionSnapIntersectionManual::trigger()");
 
        if (entity2 != NULL && entity2->isAtomic()
            && entity1 != NULL && entity1->isAtomic())
        {
-               VectorSolutions sol = RS_Information::getIntersection(entity1, entity2, false);
+               VectorSolutions sol = Information::getIntersection(entity1, entity2, false);
 
                entity2 = NULL;
                entity1 = NULL;
@@ -74,9 +74,9 @@ void ActionSnapIntersectionManual::trigger()
 
 void ActionSnapIntersectionManual::mouseMoveEvent(QMouseEvent * e)
 {
-       RS_DEBUG->print("ActionSnapIntersectionManual::mouseMoveEvent begin");
+       DEBUG->print("ActionSnapIntersectionManual::mouseMoveEvent begin");
 
-       RS_Entity * se = catchEntity(e);
+       Entity * se = catchEntity(e);
        Vector mouse = graphicView->toGraph(e->x(), e->y());
 
        switch (getStatus())
@@ -90,17 +90,17 @@ void ActionSnapIntersectionManual::mouseMoveEvent(QMouseEvent * e)
                entity2 = se;
                coord = mouse;
 
-               VectorSolutions sol = RS_Information::getIntersection(entity1, entity2, false);
+               VectorSolutions sol = Information::getIntersection(entity1, entity2, false);
                Vector ip = sol.getClosest(coord);
 
                if (ip.valid)
                {
                        deletePreview();
                        clearPreview();
-//                     preview->addEntity(new RS_Circle(preview, RS_CircleData(ip, graphicView->toGraphDX(4))));
+//                     preview->addEntity(new Circle(preview, CircleData(ip, graphicView->toGraphDX(4))));
                        drawPreview();
 
-                       RS_DIALOGFACTORY->updateCoordinateWidget(ip, ip - graphicView->getRelativeZero());
+                       DIALOGFACTORY->updateCoordinateWidget(ip, ip - graphicView->getRelativeZero());
                }
        }
                break;
@@ -109,7 +109,7 @@ void ActionSnapIntersectionManual::mouseMoveEvent(QMouseEvent * e)
                break;
        }
 
-       RS_DEBUG->print("ActionSnapIntersectionManual::mouseMoveEvent end");
+       DEBUG->print("ActionSnapIntersectionManual::mouseMoveEvent end");
 }
 
 void ActionSnapIntersectionManual::mouseReleaseEvent(QMouseEvent * e)
@@ -117,7 +117,7 @@ void ActionSnapIntersectionManual::mouseReleaseEvent(QMouseEvent * e)
        if (e->button() == Qt::LeftButton)
        {
                Vector mouse = graphicView->toGraph(e->x(), e->y());
-               RS_Entity * se = catchEntity(e);
+               Entity * se = catchEntity(e);
 
                switch (getStatus())
                {
@@ -154,17 +154,17 @@ void ActionSnapIntersectionManual::updateMouseButtonHints()
        switch (getStatus())
        {
        case ChooseEntity1:
-               RS_DIALOGFACTORY->updateMouseWidget(tr("Select first entity"),
+               DIALOGFACTORY->updateMouseWidget(tr("Select first entity"),
                        tr("Back"));
                break;
 
        case ChooseEntity2:
-               RS_DIALOGFACTORY->updateMouseWidget(tr("Select second entity"),
+               DIALOGFACTORY->updateMouseWidget(tr("Select second entity"),
                        tr("Back"));
                break;
 
        default:
-               RS_DIALOGFACTORY->updateMouseWidget("", "");
+               DIALOGFACTORY->updateMouseWidget("", "");
                break;
        }
 }
@@ -176,7 +176,7 @@ void ActionSnapIntersectionManual::updateMouseCursor()
 
 void ActionSnapIntersectionManual::updateToolBar()
 {
-       RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
+       DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
 }
 
 
index b119c50614604e67085590938cbdc4cef475a3e1..e804b4a00ce001376fc1accb6c43d5f6082eee21 100644 (file)
@@ -4,7 +4,7 @@
 #include "actioninterface.h"
 #include "vector.h"
 
-class RS_Entity;
+class Entity;
 
 /**
  * This action class can handle user events to trim entities.
@@ -24,7 +24,7 @@ class ActionSnapIntersectionManual: public ActionInterface
                };
 
        public:
-               ActionSnapIntersectionManual(RS_EntityContainer & container, GraphicView & graphicView);
+               ActionSnapIntersectionManual(EntityContainer & container, GraphicView & graphicView);
                ~ActionSnapIntersectionManual();
 
                virtual void init(int status = 0);
@@ -36,8 +36,8 @@ class ActionSnapIntersectionManual: public ActionInterface
                virtual void updateToolBar();
 
        private:
-               RS_Entity * entity1;
-               RS_Entity * entity2;
+               Entity * entity1;
+               Entity * entity2;
                Vector coord;
 };
 
index 17214c46dfaf9ba5d389364ddbb68b2e1160db65..1726ed424dbe0eeaabd6eca32ac28c8401e0264b 100644 (file)
@@ -24,7 +24,7 @@
  * @param keepAspectRatio true: keep same zoom value for x/y.
  *                        false: adjust both x and y individually
  */
-ActionZoomAuto::ActionZoomAuto(RS_EntityContainer & container,
+ActionZoomAuto::ActionZoomAuto(EntityContainer & container,
        GraphicView & graphicView, bool keepAspectRatio):
        ActionInterface("Auto zoom", container, graphicView)
 {
index d9c7cba09b48cb2a286cd7c15dfc56a0c51fe24a..22f6c9d920bc042439dbce23f966c2e5cf1b500f 100644 (file)
@@ -12,7 +12,7 @@
 class ActionZoomAuto: public ActionInterface
 {
        public:
-               ActionZoomAuto(RS_EntityContainer & container, GraphicView & graphicView, bool keepAspectRatio = true);
+               ActionZoomAuto(EntityContainer & container, GraphicView & graphicView, bool keepAspectRatio = true);
                ~ActionZoomAuto();
 
                virtual void init(int status = 0);
index 894bc4762c6e9c730e9f10047e033c979f108062..52d2f49e97e3d4843e03bb30495a64097fb9dbae 100644 (file)
@@ -18,7 +18,7 @@
 
 #include "graphicview.h"
 
-ActionZoomAutoY::ActionZoomAutoY(RS_EntityContainer & container, GraphicView & graphicView):
+ActionZoomAutoY::ActionZoomAutoY(EntityContainer & container, GraphicView & graphicView):
        ActionInterface("Auto zoom Y", container, graphicView)
 {
 }
index 2857670bfc673c89f2d62fdd28fb4343cc5fc97a..691ae9ec6964510868352976cf5674e8389daa1b 100644 (file)
@@ -12,7 +12,7 @@
 class ActionZoomAutoY: public ActionInterface
 {
        public:
-               ActionZoomAutoY(RS_EntityContainer & container, GraphicView & graphicView);
+               ActionZoomAutoY(EntityContainer & container, GraphicView & graphicView);
                ~ActionZoomAutoY();
 
                virtual void init(int status = 0);
index d51879d3e9217fee77585f1b16015c74b025d63a..fe5d776756178fc062d59e50118d3149d3f1a86f 100644 (file)
@@ -24,7 +24,7 @@
  * @param direction In for zooming in, Out for zooming out.
  * @param axis Axis that are affected by the zoom (OnlyX, OnlyY or Both)
  */
-ActionZoomIn::ActionZoomIn(RS_EntityContainer & container, GraphicView & graphicView, RS2::ZoomDirection direction, RS2::Axis axis, const Vector & center):
+ActionZoomIn::ActionZoomIn(EntityContainer & container, GraphicView & graphicView, RS2::ZoomDirection direction, RS2::Axis axis, const Vector & center):
        ActionInterface("Zoom in", container, graphicView)
 {
        this->direction = direction;
index 23de8d72948e45d5a1de9e9701f1d98234ee1d97..1837fa8ca5d6ac39efce2b6f00c818127f1da79e 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef __ACTIONZOOMIN_H__
 #define __ACTIONZOOMIN_H__
 
-#include "rs.h"
+#include "enums.h"
 #include "actioninterface.h"
 #include "vector.h"
 
@@ -14,7 +14,7 @@
 class ActionZoomIn: public ActionInterface
 {
        public:
-               ActionZoomIn(RS_EntityContainer & container, GraphicView & graphicView, RS2::ZoomDirection direction = RS2::In, RS2::Axis axis = RS2::Both, const Vector & center = Vector(false));
+               ActionZoomIn(EntityContainer & container, GraphicView & graphicView, RS2::ZoomDirection direction = RS2::In, RS2::Axis axis = RS2::Both, const Vector & center = Vector(false));
                ~ActionZoomIn();
 
                virtual void init(int status = 0);
index 7aa3a42a6903067d8a4d72c70a1a48f0b561b017..74b3d824b4d0036f2fa044c76361858f5e796626 100644 (file)
@@ -18,7 +18,7 @@
 
 #include "graphicview.h"
 
-ActionZoomPan::ActionZoomPan(RS_EntityContainer & container, GraphicView & graphicView):
+ActionZoomPan::ActionZoomPan(EntityContainer & container, GraphicView & graphicView):
        ActionInterface("Zoom Pan", container, graphicView)
 {
        graphicView.snapper.SetVisible(false);
index 526ab56ee6d30e6dcf921c9479cee78adbc7c08f..62452b360997178c7d7555da0f4339fd47fed886 100644 (file)
@@ -12,7 +12,7 @@
 class ActionZoomPan: public ActionInterface
 {
        public:
-               ActionZoomPan(RS_EntityContainer & container, GraphicView & graphicView);
+               ActionZoomPan(EntityContainer & container, GraphicView & graphicView);
                ~ActionZoomPan();
 
                virtual void init(int status = 0);
index 616bbb62906b914c174dff9ec27584226fd12751..8b57d8b9137f912618cd652454c8ff7b13e5f336 100644 (file)
@@ -21,7 +21,7 @@
 /**
  * Constructor.
  */
-ActionZoomPrevious::ActionZoomPrevious(RS_EntityContainer & container, GraphicView & graphicView):
+ActionZoomPrevious::ActionZoomPrevious(EntityContainer & container, GraphicView & graphicView):
        ActionInterface("Previous zoom", container, graphicView)
 {
 }
index 9604664ef638b76edcedd5cd4d8d3587eee2e732..cfd38c5fecac9e7309f2c98fd959e45286823925 100644 (file)
@@ -12,7 +12,7 @@
 class ActionZoomPrevious: public ActionInterface
 {
        public:
-               ActionZoomPrevious(RS_EntityContainer & container, GraphicView & graphicView);
+               ActionZoomPrevious(EntityContainer & container, GraphicView & graphicView);
                ~ActionZoomPrevious();
 
                virtual void init(int status = 0);
index f086d9d53cb151f5c855eb2ca5e4876fc76671a7..0b5742440ec2358e6ae58536158b67a019667578 100644 (file)
@@ -24,7 +24,7 @@
  * @param keepAspectRatio true: keep same zoom value for x/y.
  *                        false: adjust both x and y individually
  */
-ActionZoomRedraw::ActionZoomRedraw(RS_EntityContainer & container, GraphicView & graphicView):
+ActionZoomRedraw::ActionZoomRedraw(EntityContainer & container, GraphicView & graphicView):
        ActionInterface("Redraw", container, graphicView)
 {
 }
index 4cdf6e525bd1327db3b8c86550da8498dda7ff3e..328ca5c429c2d0dc0b4523004ebd206379ae69a8 100644 (file)
@@ -12,7 +12,7 @@
 class ActionZoomRedraw: public ActionInterface
 {
        public:
-               ActionZoomRedraw(RS_EntityContainer & container, GraphicView & graphicView);
+               ActionZoomRedraw(EntityContainer & container, GraphicView & graphicView);
                ~ActionZoomRedraw();
 
                virtual void init(int status = 0);
index 2a7613a0a39317a72fd7793db9221eac6bee7135..88f09852640ecfd5d01dbea9e284460d233ff9a6 100644 (file)
@@ -18,7 +18,7 @@
 
 #include "graphicview.h"
 
-ActionZoomScroll::ActionZoomScroll(RS2::Direction direction, RS_EntityContainer & container, GraphicView & graphicView):
+ActionZoomScroll::ActionZoomScroll(RS2::Direction direction, EntityContainer & container, GraphicView & graphicView):
        ActionInterface("Zoom scroll", container, graphicView)
 {
        this->direction = direction;
index cbe683adaedb52b2f6bc83a7d3bcf100810f7c29..50323d5b534bb82ee134c02b9c6ef06b1f4da121 100644 (file)
@@ -12,7 +12,7 @@
 class ActionZoomScroll: public ActionInterface
 {
        public:
-               ActionZoomScroll(RS2::Direction direction, RS_EntityContainer & container, GraphicView & graphicView);
+               ActionZoomScroll(RS2::Direction direction, EntityContainer & container, GraphicView & graphicView);
                ~ActionZoomScroll();
 
                virtual void init(int status = 0);
index 4913c31efedfdd7e20cd68f09b91296eb9c16efe..fab8e1b29cad38f2c87a43dc5fbf35e7288015a6 100644 (file)
@@ -28,7 +28,7 @@
  *          in x and y will stay the same. false Exactly the chosen
  *          area will be fit to the viewport.
  */
-ActionZoomWindow::ActionZoomWindow(RS_EntityContainer & container,
+ActionZoomWindow::ActionZoomWindow(EntityContainer & container,
        GraphicView & graphicView, bool keepAspectRatio):
        ActionInterface("Zoom Window", container, graphicView)
 {
@@ -41,7 +41,7 @@ ActionZoomWindow::~ActionZoomWindow()
 
 void ActionZoomWindow::init(int status)
 {
-       RS_DEBUG->print("ActionZoomWindow::init()");
+       DEBUG->print("ActionZoomWindow::init()");
        ActionInterface::init(status);
        v1 = v2 = Vector(false);
 /*     snapMode = RS2::SnapFree;
@@ -50,7 +50,7 @@ void ActionZoomWindow::init(int status)
 
 void ActionZoomWindow::trigger()
 {
-       RS_DEBUG->print("ActionZoomWindow::trigger()");
+       DEBUG->print("ActionZoomWindow::trigger()");
 
        ActionInterface::trigger();
 
@@ -74,14 +74,14 @@ void ActionZoomWindow::mouseMoveEvent(QMouseEvent * e)
                v2 = snapPoint(e);
                deletePreview();
                clearPreview();
-/*             preview->addEntity(new RS_Line(preview,
-                               RS_LineData(Vector(v1.x, v1.y), Vector(v2.x, v1.y))));
-               preview->addEntity(new RS_Line(preview,
-                               RS_LineData(Vector(v2.x, v1.y), Vector(v2.x, v2.y))));
-               preview->addEntity(new RS_Line(preview,
-                               RS_LineData(Vector(v2.x, v2.y), Vector(v1.x, v2.y))));
-               preview->addEntity(new RS_Line(preview,
-                               RS_LineData(Vector(v1.x, v2.y), Vector(v1.x, v1.y))));*/
+/*             preview->addEntity(new Line(preview,
+                               LineData(Vector(v1.x, v1.y), Vector(v2.x, v1.y))));
+               preview->addEntity(new Line(preview,
+                               LineData(Vector(v2.x, v1.y), Vector(v2.x, v2.y))));
+               preview->addEntity(new Line(preview,
+                               LineData(Vector(v2.x, v2.y), Vector(v1.x, v2.y))));
+               preview->addEntity(new Line(preview,
+                               LineData(Vector(v1.x, v2.y), Vector(v1.x, v1.y))));*/
                drawPreview();
        }
 }
@@ -102,12 +102,12 @@ void ActionZoomWindow::mousePressEvent(QMouseEvent * e)
                }
        }
 
-       RS_DEBUG->print("ActionZoomWindow::mousePressEvent(): %f %f", v1.x, v1.y);
+       DEBUG->print("ActionZoomWindow::mousePressEvent(): %f %f", v1.x, v1.y);
 }
 
 void ActionZoomWindow::mouseReleaseEvent(QMouseEvent * e)
 {
-       RS_DEBUG->print("ActionZoomWindow::mouseReleaseEvent()");
+       DEBUG->print("ActionZoomWindow::mouseReleaseEvent()");
 
        if (e->button() == Qt::RightButton)
        {
@@ -126,20 +126,20 @@ void ActionZoomWindow::mouseReleaseEvent(QMouseEvent * e)
 
 void ActionZoomWindow::updateMouseButtonHints()
 {
-       RS_DEBUG->print("ActionZoomWindow::updateMouseButtonHints()");
+       DEBUG->print("ActionZoomWindow::updateMouseButtonHints()");
 
        switch (getStatus())
        {
        case 0:
-               RS_DIALOGFACTORY->updateMouseWidget(tr("Specify first edge"), tr("Cancel"));
+               DIALOGFACTORY->updateMouseWidget(tr("Specify first edge"), tr("Cancel"));
                break;
 
        case 1:
-               RS_DIALOGFACTORY->updateMouseWidget(tr("Specify second edge"), tr("Back"));
+               DIALOGFACTORY->updateMouseWidget(tr("Specify second edge"), tr("Back"));
                break;
 
        default:
-               RS_DIALOGFACTORY->updateMouseWidget("", "");
+               DIALOGFACTORY->updateMouseWidget("", "");
                break;
        }
 }
index 628da6fefd4b90a1dc98eb30d556edb9f9bfdf23..b0568e20ae881f41889187c4bc4a870c23e3c29f 100644 (file)
@@ -13,7 +13,7 @@
 class ActionZoomWindow: public ActionInterface
 {
        public:
-               ActionZoomWindow(RS_EntityContainer & container, GraphicView & graphicView, bool keepAspectRatio = true);
+               ActionZoomWindow(EntityContainer & container, GraphicView & graphicView, bool keepAspectRatio = true);
                ~ActionZoomWindow();
 
                virtual void init(int status = 0);
index f4265e7393e90faff9b0825ca5bcab95053f821d..92b77452451cdb88ea7e26184701cced317fa340 100644 (file)
  * @param graphicView Graphic view instance this action operates on. Please
  *                    note that an action belongs to this view.
  */
-ActionInterface::ActionInterface(const char * name, RS_EntityContainer & ec,
+ActionInterface::ActionInterface(const char * name, EntityContainer & ec,
        GraphicView & gv): graphicView(&gv), container(&ec)
 {
-       RS_DEBUG->print("ActionInterface::ActionInterface: Setting up action: \"%s\"", name);
+       DEBUG->print("ActionInterface::ActionInterface: Setting up action: \"%s\"", name);
 
        this->name = name;
        status = 0;
@@ -60,7 +60,7 @@ ActionInterface::ActionInterface(const char * name, RS_EntityContainer & ec,
        graphicView->snapper.SetVisible();
        graphicView->preview.SetVisible();
 
-       RS_DEBUG->print("ActionInterface::ActionInterface: Setting up action: \"%s\": OK", name);
+       DEBUG->print("ActionInterface::ActionInterface: Setting up action: \"%s\": OK", name);
 }
 
 /**
@@ -100,7 +100,7 @@ QString ActionInterface::getName()
  */
 void ActionInterface::init(int status/*= 0*/)
 {
-//     RS_Snapper::init();
+//     Snapper::init();
        setStatus(status);
 
        if (status >= 0)
@@ -182,7 +182,7 @@ void ActionInterface::coordinateEvent(Vector *)
  * This function can be overwritten by the implementing action.
  * The default implementation does nothing.
  */
-void ActionInterface::commandEvent(RS_CommandEvent *)
+void ActionInterface::commandEvent(CommandEvent *)
 {
 }
 
@@ -283,7 +283,7 @@ void ActionInterface::setFinished()
  */
 void ActionInterface::finish()
 {
-       RS_DEBUG->print("ActionInterface::finish");
+       DEBUG->print("ActionInterface::finish");
        status = -1;
 //     graphicView->setMouseCursor(RS2::ArrowCursor);
        //graphicView->requestToolBar(RS2::ToolBarMain);
@@ -292,10 +292,10 @@ void ActionInterface::finish()
 //jlh: deleteSnapper();
        hideOptions();
        finished = true;
-//     RS_Snapper::finish();           // Sets RS_Snapper::finished = true
+//     Snapper::finish();              // Sets Snapper::finished = true
        // I think this is where we want to update the screen...
 //     graphicView->redraw();
-       RS_DEBUG->print("ActionInterface::finish: OK");
+       DEBUG->print("ActionInterface::finish: OK");
 }
 
 /**
@@ -315,7 +315,7 @@ void ActionInterface::suspend()
        // Maybe this is where we need to save the state of the snapper
        // & preview objects???
 //     graphicView->setMouseCursor(RS2::ArrowCursor);
-//     RS_Snapper::suspend();
+//     Snapper::suspend();
 }
 
 /**
@@ -325,7 +325,7 @@ void ActionInterface::resume()
 {
        updateMouseCursor();
        updateToolBar();
-//     RS_Snapper::resume();
+//     Snapper::resume();
 }
 
 /**
@@ -333,7 +333,7 @@ void ActionInterface::resume()
  */
 void ActionInterface::hideOptions()
 {
-//     RS_Snapper::hideOptions();
+//     Snapper::hideOptions();
 }
 
 /**
@@ -341,32 +341,32 @@ void ActionInterface::hideOptions()
  */
 void ActionInterface::showOptions()
 {
-//     RS_Snapper::showOptions();
+//     Snapper::showOptions();
 }
 
 /**
- * Calls checkCommand() from the RS_COMMANDS module.
+ * Calls checkCommand() from the COMMANDS module.
  */
 bool ActionInterface::checkCommand(const QString & cmd, const QString & str,
        RS2::ActionType action)
 {
-       return RS_COMMANDS->checkCommand(cmd, str, action);
+       return COMMANDS->checkCommand(cmd, str, action);
 }
 
 /**
- * Calls command() from the RS_COMMANDS module.
+ * Calls command() from the COMMANDS module.
  */
 QString ActionInterface::command(const QString & cmd)
 {
-       return RS_COMMANDS->command(cmd);
+       return COMMANDS->command(cmd);
 }
 
 /**
- * Calls msgAvailableCommands() from the RS_COMMANDS module.
+ * Calls msgAvailableCommands() from the COMMANDS module.
  */
 QString ActionInterface::msgAvailableCommands()
 {
-       return RS_COMMANDS->msgAvailableCommands();
+       return COMMANDS->msgAvailableCommands();
 }
 
 // This is here to save some typing in all the action* classes derived from
@@ -376,12 +376,12 @@ Vector ActionInterface::snapPoint(QMouseEvent * e)
        return graphicView->snapper.snapPoint(e);
 }
 
-RS_Entity * ActionInterface::catchEntity(QMouseEvent * e, RS2::ResolveLevel level/*= RS2::ResolveNone*/)
+Entity * ActionInterface::catchEntity(QMouseEvent * e, RS2::ResolveLevel level/*= RS2::ResolveNone*/)
 {
        return graphicView->snapper.catchEntity(e, level);
 }
 
-RS_Entity * ActionInterface::catchEntity(Vector v, RS2::ResolveLevel level/*= RS2::ResolveNone*/)
+Entity * ActionInterface::catchEntity(Vector v, RS2::ResolveLevel level/*= RS2::ResolveNone*/)
 {
        return graphicView->snapper.catchEntity(v, level);
 }
index 7647b20438c9c1fe1fab76ce2c5eb2fcf9330d9d..a88ee89fa1855d7a7ec6043f0404ac0475b7115b 100644 (file)
@@ -2,13 +2,13 @@
 #define __ACTIONINTERFACE_H__
 
 #include <QtGui>
-#include "rs.h"
+#include "enums.h"
 
-class RS_CommandEvent;
-class RS_Document;
+class CommandEvent;
+class Document;
 class Drawing;
-class RS_Entity;
-class RS_EntityContainer;
+class Entity;
+class EntityContainer;
 class GraphicView;
 class Vector;
 
@@ -28,7 +28,7 @@ class ActionInterface: public QObject
 //mebbe... Well, that's what he says above. Though it would be just as easy to
 //prefix a QObject::tr in front of translated strings...
        public:
-               ActionInterface(const char * name, RS_EntityContainer &,
+               ActionInterface(const char * name, EntityContainer &,
                        GraphicView &);
                virtual ~ActionInterface();
 
@@ -41,7 +41,7 @@ class ActionInterface: public QObject
                virtual void keyPressEvent(QKeyEvent * e);
                virtual void keyReleaseEvent(QKeyEvent * e);
                virtual void coordinateEvent(Vector *);
-               virtual void commandEvent(RS_CommandEvent *);
+               virtual void commandEvent(CommandEvent *);
                virtual QStringList getAvailableCommands();
                virtual void setStatus(int status);
                virtual int getStatus();
@@ -63,8 +63,8 @@ class ActionInterface: public QObject
                QString msgAvailableCommands();
                //built-in for now, we'll see how it goes...
                Vector snapPoint(QMouseEvent *);
-               RS_Entity * catchEntity(QMouseEvent *, RS2::ResolveLevel level = RS2::ResolveNone);
-               RS_Entity * catchEntity(Vector, RS2::ResolveLevel level = RS2::ResolveNone);
+               Entity * catchEntity(QMouseEvent *, RS2::ResolveLevel level = RS2::ResolveNone);
+               Entity * catchEntity(Vector, RS2::ResolveLevel level = RS2::ResolveNone);
 #warning "!!! The following functions are DEPRECATED and only in place to help with porting.. !!!"
                void drawSnapper(void);
                void deleteSnapper(void);
@@ -99,7 +99,7 @@ class ActionInterface: public QObject
                /**
                 * Pointer to the document (graphic or block) or NULL.
                 */
-               RS_Document * document;
+               Document * document;
 
                /**
                 * Predecessor of this action or NULL.
@@ -107,7 +107,7 @@ class ActionInterface: public QObject
                ActionInterface * predecessor;
 
                GraphicView * graphicView;
-               RS_EntityContainer * container;
+               EntityContainer * container;
 };
 
 #endif // __ACTIONINTERFACE_H__
index e21a998eeee7bb365420609f22616e398097bac5..1a62eba9e81c8f7096e6082d56d5215e5cd0013e 100644 (file)
 /**
  * Default constructor.
  */
-RS_Arc::RS_Arc(RS_EntityContainer * parent, const RS_ArcData & d):
-       RS_AtomicEntity(parent), data(d)
+Arc::Arc(EntityContainer * parent, const ArcData & d):
+       AtomicEntity(parent), data(d)
 {
        calculateEndpoints();
        calculateBorders();
 }
 
-/*virtual*/ RS_Arc::~RS_Arc()
+/*virtual*/ Arc::~Arc()
 {
 }
 
-/*virtual*/ RS_Entity * RS_Arc::clone()
+/*virtual*/ Entity * Arc::clone()
 {
-       RS_Arc * a = new RS_Arc(*this);
+       Arc * a = new Arc(*this);
        a->initId();
        return a;
 }
 
 /**    @return RS2::EntityArc */
-/*virtual*/ RS2::EntityType RS_Arc::rtti() const
+/*virtual*/ RS2::EntityType Arc::rtti() const
 {
        return RS2::EntityArc;
 }
 
 /** @return true */
-/*virtual*/ bool RS_Arc::isEdge() const
+/*virtual*/ bool Arc::isEdge() const
 {
        return true;
 }
 
 /** @return Copy of data that defines the arc. **/
-RS_ArcData RS_Arc::getData() const
+ArcData Arc::getData() const
 {
        return data;
 }
 
-/*virtual*/ VectorSolutions RS_Arc::getRefPoints()
+/*virtual*/ VectorSolutions Arc::getRefPoints()
 {
        VectorSolutions ret(startpoint, endpoint, data.center);
        return ret;
 }
 
 /** Sets new arc parameters. **/
-void RS_Arc::setData(RS_ArcData d)
+void Arc::setData(ArcData d)
 {
        data = d;
 }
 
 /** @return The center point (x) of this arc */
-Vector RS_Arc::getCenter() const
+Vector Arc::getCenter() const
 {
        return data.center;
 }
 
 /** Sets new center. */
-void RS_Arc::setCenter(const Vector & c)
+void Arc::setCenter(const Vector & c)
 {
        data.center = c;
 }
 
 /** @return The radius of this arc */
-double RS_Arc::getRadius() const
+double Arc::getRadius() const
 {
        return data.radius;
 }
 
 /** Sets new radius. */
-void RS_Arc::setRadius(double r)
+void Arc::setRadius(double r)
 {
        data.radius = r;
 }
 
 /** @return The start angle of this arc */
-double RS_Arc::getAngle1() const
+double Arc::getAngle1() const
 {
        return data.angle1;
 }
 
 /** Sets new start angle. */
-void RS_Arc::setAngle1(double a1)
+void Arc::setAngle1(double a1)
 {
        data.angle1 = a1;
 }
 
 /** @return The end angle of this arc */
-double RS_Arc::getAngle2() const
+double Arc::getAngle2() const
 {
        return data.angle2;
 }
 
 /** Sets new end angle. */
-void RS_Arc::setAngle2(double a2)
+void Arc::setAngle2(double a2)
 {
        data.angle2 = a2;
 }
@@ -128,49 +128,49 @@ void RS_Arc::setAngle2(double a2)
  * @return Direction 1. The angle at which the arc starts at
  * the startpoint.
  */
-double RS_Arc::getDirection1() const
+double Arc::getDirection1() const
 {
        if (!data.reversed)
-               return RS_Math::correctAngle(data.angle1 + M_PI / 2.0);
+               return Math::correctAngle(data.angle1 + M_PI / 2.0);
 
-       return RS_Math::correctAngle(data.angle1 - M_PI / 2.0);
+       return Math::correctAngle(data.angle1 - M_PI / 2.0);
 }
 
 /**
  * @return Direction 2. The angle at which the arc starts at
  * the endpoint.
  */
-double RS_Arc::getDirection2() const
+double Arc::getDirection2() const
 {
        if (!data.reversed)
-               return RS_Math::correctAngle(data.angle2 - M_PI / 2.0);
+               return Math::correctAngle(data.angle2 - M_PI / 2.0);
 
-       return RS_Math::correctAngle(data.angle2 + M_PI / 2.0);
+       return Math::correctAngle(data.angle2 + M_PI / 2.0);
 }
 
 /**
  * @retval true if the arc is reversed (clockwise),
  * @retval false otherwise
  */
-bool RS_Arc::isReversed() const
+bool Arc::isReversed() const
 {
        return data.reversed;
 }
 
 /** sets the reversed status. */
-void RS_Arc::setReversed(bool r)
+void Arc::setReversed(bool r)
 {
        data.reversed = r;
 }
 
 /** @return Start point of the entity. */
-/*virtual*/ Vector RS_Arc::getStartpoint() const
+/*virtual*/ Vector Arc::getStartpoint() const
 {
        return startpoint;
 }
 
 /** @return End point of the entity. */
-/*virtual*/ Vector RS_Arc::getEndpoint() const
+/*virtual*/ Vector Arc::getEndpoint() const
 {
        return endpoint;
 }
@@ -182,7 +182,7 @@ void RS_Arc::setReversed(bool r)
  * @param p2 2nd point.
  * @param p3 3rd point.
  */
-bool RS_Arc::createFrom3P(const Vector & p1, const Vector & p2, const Vector & p3)
+bool Arc::createFrom3P(const Vector & p1, const Vector & p2, const Vector & p3)
 {
        if (p1.distanceTo(p2) > RS_TOLERANCE
            && p2.distanceTo(p3) > RS_TOLERANCE
@@ -201,19 +201,19 @@ bool RS_Arc::createFrom3P(const Vector & p1, const Vector & p2, const Vector & p
                a2 = p2.angleTo(p3) + M_PI / 2.0;
                dir2.setPolar(100.0, a2);
 
-               RS_ConstructionLineData d1(mp1, mp1 + dir1);
-               RS_ConstructionLineData d2(mp2, mp2 + dir2);
-               RS_ConstructionLine midLine1(NULL, d1);
-               RS_ConstructionLine midLine2(NULL, d2);
+               ConstructionLineData d1(mp1, mp1 + dir1);
+               ConstructionLineData d2(mp2, mp2 + dir2);
+               ConstructionLine midLine1(NULL, d1);
+               ConstructionLine midLine2(NULL, d2);
 
                VectorSolutions sol =
-                       RS_Information::getIntersection(&midLine1, &midLine2);
+                       Information::getIntersection(&midLine1, &midLine2);
 
                data.center = sol.get(0);
                data.radius = data.center.distanceTo(p3);
                data.angle1 = data.center.angleTo(p1);
                data.angle2 = data.center.angleTo(p3);
-               data.reversed = RS_Math::isAngleBetween(data.center.angleTo(p2),
+               data.reversed = Math::isAngleBetween(data.center.angleTo(p2),
                                data.angle1, data.angle2, true);
 
                if (sol.get(0).valid && data.radius < 1.0e14
@@ -225,14 +225,14 @@ bool RS_Arc::createFrom3P(const Vector & p1, const Vector & p2, const Vector & p
                }
                else
                {
-                       RS_DEBUG->print("RS_Arc::createFrom3P(): "
+                       DEBUG->print("Arc::createFrom3P(): "
                                "Cannot create an arc with inf radius.");
                        return false;
                }
        }
        else
        {
-               RS_DEBUG->print("RS_Arc::createFrom3P(): "
+               DEBUG->print("Arc::createFrom3P(): "
                        "Cannot create an arc with radius 0.0.");
                return false;
        }
@@ -245,7 +245,7 @@ bool RS_Arc::createFrom3P(const Vector & p1, const Vector & p2, const Vector & p
  * @retval true Successfully created arc
  * @retval false Cannot creats arc (radius to small or endpoint to far away)
  */
-bool RS_Arc::createFrom2PDirectionRadius(const Vector & startPoint, const Vector & endPoint, double direction1, double radius)
+bool Arc::createFrom2PDirectionRadius(const Vector & startPoint, const Vector & endPoint, double direction1, double radius)
 {
        Vector ortho;
        ortho.setPolar(radius, direction1 + M_PI / 2.0);
@@ -262,7 +262,7 @@ bool RS_Arc::createFrom2PDirectionRadius(const Vector & startPoint, const Vector
        data.angle2 = data.center.angleTo(endPoint);
        data.reversed = false;
 
-       double diff = RS_Math::correctAngle(getDirection1() - direction1);
+       double diff = Math::correctAngle(getDirection1() - direction1);
 
        if (fabs(diff - M_PI) < 1.0e-1)
                data.reversed = true;
@@ -276,7 +276,7 @@ bool RS_Arc::createFrom2PDirectionRadius(const Vector & startPoint, const Vector
 /**
  * Creates an arc from its startpoint, endpoint and bulge.
  */
-bool RS_Arc::createFrom2PBulge(const Vector & startPoint, const Vector & endPoint, double bulge)
+bool Arc::createFrom2PBulge(const Vector & startPoint, const Vector & endPoint, double bulge)
 {
        data.reversed = (bulge < 0.0);
        double alpha = atan(bulge) * 4.0;
@@ -287,7 +287,7 @@ bool RS_Arc::createFrom2PBulge(const Vector & startPoint, const Vector & endPoin
        // alpha can't be 0.0 at this point
        data.radius = fabs(dist / sin(alpha / 2.0));
 
-       double wu = fabs(RS_Math::pow(data.radius, 2.0) - RS_Math::pow(dist, 2.0));
+       double wu = fabs(Math::pow(data.radius, 2.0) - Math::pow(dist, 2.0));
        double h = sqrt(wu);
        double angle = startPoint.angleTo(endPoint);
 
@@ -313,7 +313,7 @@ bool RS_Arc::createFrom2PBulge(const Vector & startPoint, const Vector & endPoin
 /**
  * Recalculates the endpoints using the angles and the radius.
  */
-void RS_Arc::calculateEndpoints()
+void Arc::calculateEndpoints()
 {
        startpoint.set(data.center.x + cos(data.angle1) * data.radius,
                data.center.y + sin(data.angle1) * data.radius);
@@ -321,7 +321,7 @@ void RS_Arc::calculateEndpoints()
                data.center.y + sin(data.angle2) * data.radius);
 }
 
-void RS_Arc::calculateBorders()
+void Arc::calculateBorders()
 {
        double minX = std::min(startpoint.x, endpoint.x);
        double minY = std::min(startpoint.y, endpoint.y);
@@ -360,7 +360,7 @@ void RS_Arc::calculateBorders()
        maxV.set(maxX, maxY);
 }
 
-Vector RS_Arc::getNearestEndpoint(const Vector & coord, double * dist)
+Vector Arc::getNearestEndpoint(const Vector & coord, double * dist)
 {
        double dist1, dist2;
        Vector * nearerPoint;
@@ -384,7 +384,7 @@ Vector RS_Arc::getNearestEndpoint(const Vector & coord, double * dist)
        return *nearerPoint;
 }
 
-Vector RS_Arc::getNearestPointOnEntity(const Vector & coord, bool onEntity, double * dist, RS_Entity * * entity)
+Vector Arc::getNearestPointOnEntity(const Vector & coord, bool onEntity, double * dist, Entity * * entity)
 {
        Vector vec(false);
 
@@ -393,7 +393,7 @@ Vector RS_Arc::getNearestPointOnEntity(const Vector & coord, bool onEntity, doub
 
        double angle = (coord - data.center).angle();
 
-       if (onEntity == false || RS_Math::isAngleBetween(angle,
+       if (onEntity == false || Math::isAngleBetween(angle,
                    data.angle1, data.angle2, isReversed()))
        {
                vec.setPolar(data.radius, angle);
@@ -406,14 +406,14 @@ Vector RS_Arc::getNearestPointOnEntity(const Vector & coord, bool onEntity, doub
        return vec;
 }
 
-Vector RS_Arc::getNearestCenter(const Vector & coord, double * dist)
+Vector Arc::getNearestCenter(const Vector & coord, double * dist)
 {
        if (dist != NULL)
                *dist = coord.distanceTo(data.center);
        return data.center;
 }
 
-Vector RS_Arc::getNearestMiddle(const Vector & coord, double * dist)
+Vector Arc::getNearestMiddle(const Vector & coord, double * dist)
 {
        Vector ret = getMiddlepoint();
 
@@ -422,7 +422,7 @@ Vector RS_Arc::getNearestMiddle(const Vector & coord, double * dist)
        return ret;
 }
 
-Vector RS_Arc::getNearestDist(double distance, const Vector & coord, double * dist)
+Vector Arc::getNearestDist(double distance, const Vector & coord, double * dist)
 {
        if (data.radius < 1.0e-6)
        {
@@ -473,7 +473,7 @@ Vector RS_Arc::getNearestDist(double distance, const Vector & coord, double * di
        return *nearerPoint;
 }
 
-Vector RS_Arc::getNearestDist(double distance, bool startp)
+Vector Arc::getNearestDist(double distance, bool startp)
 {
        if (data.radius < 1.0e-6)
                return Vector(false);
@@ -503,7 +503,7 @@ Vector RS_Arc::getNearestDist(double distance, bool startp)
        return p;
 }
 
-double RS_Arc::getDistanceToPoint(const Vector & coord, RS_Entity * * entity, RS2::ResolveLevel, double)
+double Arc::getDistanceToPoint(const Vector & coord, Entity * * entity, RS2::ResolveLevel, double)
 {
        if (entity != NULL)
                *entity = this;
@@ -518,7 +518,7 @@ double RS_Arc::getDistanceToPoint(const Vector & coord, RS_Entity * * entity, RS
        if (dist < 1.0e-4)
                return dist;
 
-       if (RS_Math::isAngleBetween(data.center.angleTo(coord),
+       if (Math::isAngleBetween(data.center.angleTo(coord),
                    data.angle1, data.angle2,
                    isReversed()))
 
@@ -527,7 +527,7 @@ double RS_Arc::getDistanceToPoint(const Vector & coord, RS_Entity * * entity, RS
                return RS_MAXDOUBLE;
 }
 
-void RS_Arc::moveStartpoint(const Vector & pos)
+void Arc::moveStartpoint(const Vector & pos)
 {
        // polyline arcs: move point not angle:
        //if (parent!=NULL && parent->rtti()==RS2::EntityPolyline) {
@@ -543,7 +543,7 @@ void RS_Arc::moveStartpoint(const Vector & pos)
           }*/
 }
 
-void RS_Arc::moveEndpoint(const Vector & pos)
+void Arc::moveEndpoint(const Vector & pos)
 {
        // polyline arcs: move point not angle:
        //if (parent!=NULL && parent->rtti()==RS2::EntityPolyline) {
@@ -559,26 +559,26 @@ void RS_Arc::moveEndpoint(const Vector & pos)
           }*/
 }
 
-void RS_Arc::trimStartpoint(const Vector & pos)
+void Arc::trimStartpoint(const Vector & pos)
 {
        data.angle1 = data.center.angleTo(pos);
        calculateEndpoints();
        calculateBorders();
 }
 
-void RS_Arc::trimEndpoint(const Vector & pos)
+void Arc::trimEndpoint(const Vector & pos)
 {
        data.angle2 = data.center.angleTo(pos);
        calculateEndpoints();
        calculateBorders();
 }
 
-RS2::Ending RS_Arc::getTrimPoint(const Vector & coord, const Vector & trimPoint)
+RS2::Ending Arc::getTrimPoint(const Vector & coord, const Vector & trimPoint)
 {
        double angEl = data.center.angleTo(trimPoint);
        double angM = data.center.angleTo(coord);
 
-       if (RS_Math::getAngleDifference(angM, angEl) > M_PI)
+       if (Math::getAngleDifference(angM, angEl) > M_PI)
        {
                if (data.reversed)
                        return RS2::EndingEnd;
@@ -594,7 +594,7 @@ RS2::Ending RS_Arc::getTrimPoint(const Vector & coord, const Vector & trimPoint)
        }
 }
 
-void RS_Arc::reverse()
+void Arc::reverse()
 {
        double a = data.angle1;
        data.angle1 = data.angle2;
@@ -604,25 +604,25 @@ void RS_Arc::reverse()
        calculateBorders();
 }
 
-void RS_Arc::move(Vector offset)
+void Arc::move(Vector offset)
 {
        data.center.move(offset);
        calculateEndpoints();
        calculateBorders();
 }
 
-void RS_Arc::rotate(Vector center, double angle)
+void Arc::rotate(Vector center, double angle)
 {
-       RS_DEBUG->print("RS_Arc::rotate");
+       DEBUG->print("Arc::rotate");
        data.center.rotate(center, angle);
-       data.angle1 = RS_Math::correctAngle(data.angle1 + angle);
-       data.angle2 = RS_Math::correctAngle(data.angle2 + angle);
+       data.angle1 = Math::correctAngle(data.angle1 + angle);
+       data.angle2 = Math::correctAngle(data.angle2 + angle);
        calculateEndpoints();
        calculateBorders();
-       RS_DEBUG->print("RS_Arc::rotate: OK");
+       DEBUG->print("Arc::rotate: OK");
 }
 
-void RS_Arc::scale(Vector center, Vector factor)
+void Arc::scale(Vector center, Vector factor)
 {
        // negative scaling: mirroring
        if (factor.x < 0.0)
@@ -643,7 +643,7 @@ void RS_Arc::scale(Vector center, Vector factor)
        calculateBorders();
 }
 
-void RS_Arc::mirror(Vector axisPoint1, Vector axisPoint2)
+void Arc::mirror(Vector axisPoint1, Vector axisPoint2)
 {
        data.center.mirror(axisPoint1, axisPoint2);
        data.reversed = (!data.reversed);
@@ -668,7 +668,7 @@ void RS_Arc::mirror(Vector axisPoint1, Vector axisPoint2)
        calculateBorders();
 }
 
-void RS_Arc::moveRef(const Vector & ref, const Vector & offset)
+void Arc::moveRef(const Vector & ref, const Vector & offset)
 {
        if (ref.distanceTo(startpoint) < 1.0e-4)
                moveStartpoint(startpoint + offset);
@@ -678,7 +678,7 @@ void RS_Arc::moveRef(const Vector & ref, const Vector & offset)
                moveEndpoint(endpoint + offset);
 }
 
-void RS_Arc::stretch(Vector firstCorner, Vector secondCorner, Vector offset)
+void Arc::stretch(Vector firstCorner, Vector secondCorner, Vector offset)
 {
        if (getMin().isInWindow(firstCorner, secondCorner)
            && getMax().isInWindow(firstCorner, secondCorner))
@@ -697,7 +697,7 @@ void RS_Arc::stretch(Vector firstCorner, Vector secondCorner, Vector offset)
        }
 }
 
-void RS_Arc::draw(PaintInterface * painter, GraphicView * view, double /*patternOffset*/)
+void Arc::draw(PaintInterface * painter, GraphicView * view, double /*patternOffset*/)
 {
        if (painter == NULL || view == NULL)
                return;
@@ -727,7 +727,7 @@ void RS_Arc::draw(PaintInterface * painter, GraphicView * view, double /*pattern
                }
 
                // Pattern:
-               RS_LineTypePattern * pat;
+               LineTypePattern * pat;
 
                if (isSelected())
                        pat = &patternSelected;
@@ -741,7 +741,7 @@ void RS_Arc::draw(PaintInterface * painter, GraphicView * view, double /*pattern
                        return;
 
                // Pen to draw pattern is always solid:
-               RS_Pen pen = painter->getPen();
+               Pen pen = painter->getPen();
                pen.setLineType(RS2::SolidLine);
                painter->setPen(pen);
 
@@ -812,7 +812,7 @@ void RS_Arc::draw(PaintInterface * painter, GraphicView * view, double /*pattern
 /**
  * @return Middle point of the entity.
  */
-Vector RS_Arc::getMiddlepoint() const
+Vector Arc::getMiddlepoint() const
 {
        double a;
        Vector ret;
@@ -830,7 +830,7 @@ Vector RS_Arc::getMiddlepoint() const
 /**
  * @return Angle length in rad.
  */
-double RS_Arc::getAngleLength() const
+double Arc::getAngleLength() const
 {
        double ret = 0.0;
 
@@ -859,7 +859,7 @@ double RS_Arc::getAngleLength() const
 /**
  * @return Length of the arc.
  */
-double RS_Arc::getLength()
+double Arc::getLength()
 {
        return getAngleLength() * data.radius;
 }
@@ -867,7 +867,7 @@ double RS_Arc::getLength()
 /**
  * Gets the arc's bulge (tangens of angle length divided by 4).
  */
-double RS_Arc::getBulge() const
+double Arc::getBulge() const
 {
        double bulge = tan(fabs(getAngleLength()) / 4.0);
 
@@ -879,7 +879,7 @@ double RS_Arc::getBulge() const
 /**
  * Dumps the point's data to stdout.
  */
-std::ostream & operator<<(std::ostream & os, const RS_Arc & a)
+std::ostream & operator<<(std::ostream & os, const Arc & a)
 {
        os << " Arc: " << a.data << "\n";
        return os;
index 1db003a4ebfc2c3d030e5f275add24a453dd0570..2c785c68556a5e5ed938f707f5dbce97853dd5fb 100644 (file)
@@ -9,14 +9,14 @@ class GraphicView;
 /**
  * Holds the data that defines an arc.
  */
-class RS_ArcData
+class ArcData
 {
        public:
-               RS_ArcData()
+               ArcData()
                {
                }
 
-               RS_ArcData(const Vector & center, double radius, double angle1, double angle2, bool reversed)
+               ArcData(const Vector & center, double radius, double angle1, double angle2, bool reversed)
                {
                        this->center = center;
                        this->radius = radius;
@@ -40,7 +40,7 @@ class RS_ArcData
                                && fabs(angle1 - angle2) > RS_TOLERANCE_ANGLE);
                }
 
-               friend std::ostream & operator<<(std::ostream & os, const RS_ArcData & ad)
+               friend std::ostream & operator<<(std::ostream & os, const ArcData & ad)
                {
                        os << "(" << ad.center
                        << "/" << ad.radius
@@ -63,18 +63,18 @@ class RS_ArcData
  *
  * @author Andrew Mustun
  */
-class RS_Arc: public RS_AtomicEntity
+class Arc: public AtomicEntity
 {
        public:
-               RS_Arc(RS_EntityContainer * parent, const RS_ArcData & d);
-               virtual ~RS_Arc();
+               Arc(EntityContainer * parent, const ArcData & d);
+               virtual ~Arc();
 
-               virtual RS_Entity * clone();
+               virtual Entity * clone();
                virtual RS2::EntityType rtti() const;
                virtual bool isEdge() const;
-               RS_ArcData getData() const;
+               ArcData getData() const;
                virtual VectorSolutions getRefPoints();
-               void setData(RS_ArcData d);
+               void setData(ArcData d);
                Vector getCenter() const;
                void setCenter(const Vector & c);
                double getRadius() const;
@@ -105,13 +105,13 @@ class RS_Arc: public RS_AtomicEntity
                bool createFrom2PBulge(const Vector & startPoint, const Vector & endPoint, double bulge);
 
                virtual Vector getNearestEndpoint(const Vector & coord, double * dist = NULL);
-               virtual Vector getNearestPointOnEntity(const Vector & coord, bool onEntity = true, double * dist = NULL, RS_Entity ** entity = NULL);
+               virtual Vector getNearestPointOnEntity(const Vector & coord, bool onEntity = true, double * dist = NULL, Entity ** entity = NULL);
                virtual Vector getNearestCenter(const Vector & coord, double * dist = NULL);
                virtual Vector getNearestMiddle(const Vector & coord, double * dist = NULL);
                virtual Vector getNearestDist(double distance, const Vector & coord, double * dist = NULL);
                virtual Vector getNearestDist(double distance, bool startp);
 
-               virtual double getDistanceToPoint(const Vector & coord, RS_Entity * * entity = NULL, RS2::ResolveLevel level = RS2::ResolveNone, double solidDist = RS_MAXDOUBLE);
+               virtual double getDistanceToPoint(const Vector & coord, Entity * * entity = NULL, RS2::ResolveLevel level = RS2::ResolveNone, double solidDist = RS_MAXDOUBLE);
                virtual void move(Vector offset);
                virtual void rotate(Vector center, double angle);
                virtual void scale(Vector center, Vector factor);
@@ -121,13 +121,13 @@ class RS_Arc: public RS_AtomicEntity
 
                virtual void draw(PaintInterface * painter, GraphicView * view, double patternOffset = 0.0);
 
-               friend std::ostream & operator<<(std::ostream & os, const RS_Arc & a);
+               friend std::ostream & operator<<(std::ostream & os, const Arc & a);
 
                virtual void calculateEndpoints();
                virtual void calculateBorders();
 
        protected:
-               RS_ArcData data;
+               ArcData data;
 
                /**
                 * Startpoint. This is redundant but stored for performance
index 7e215d20408ad53a519916315757806940e60c7a..ee164c0ee135c89d4141186adf5d84ccfd7f87d0 100644 (file)
 /**
  * Construtor.
  */
-RS_AtomicEntity::RS_AtomicEntity(RS_EntityContainer * parent/*= NULL*/): RS_Entity(parent)
+AtomicEntity::AtomicEntity(EntityContainer * parent/*= NULL*/): Entity(parent)
 {
 }
 
 /**
  * Destrutor.
  */
-/*virtual*/ RS_AtomicEntity::~RS_AtomicEntity()
+/*virtual*/ AtomicEntity::~AtomicEntity()
 {
 }
 
@@ -34,7 +34,7 @@ RS_AtomicEntity::RS_AtomicEntity(RS_EntityContainer * parent/*= NULL*/): RS_Enti
  * @return false because entities made from subclasses are
  *  atomic entities.
  */
-/*virtual*/ bool RS_AtomicEntity::isContainer() const
+/*virtual*/ bool AtomicEntity::isContainer() const
 {
        return false;
 }
@@ -43,7 +43,7 @@ RS_AtomicEntity::RS_AtomicEntity(RS_EntityContainer * parent/*= NULL*/): RS_Enti
  * @return true because entities made from subclasses are
  *  atomic entities.
  */
-/*virtual*/ bool RS_AtomicEntity::isAtomic() const
+/*virtual*/ bool AtomicEntity::isAtomic() const
 {
        return true;
 }
@@ -51,7 +51,7 @@ RS_AtomicEntity::RS_AtomicEntity(RS_EntityContainer * parent/*= NULL*/): RS_Enti
 /**
  * @return Always 1 for atomic entities.
  */
-/*virtual*/ unsigned long int RS_AtomicEntity::count()
+/*virtual*/ unsigned long int AtomicEntity::count()
 {
        return 1;
 }
@@ -59,7 +59,7 @@ RS_AtomicEntity::RS_AtomicEntity(RS_EntityContainer * parent/*= NULL*/): RS_Enti
 /**
  * @return Always 1 for atomic entities.
  */
-/*virtual*/ unsigned long int RS_AtomicEntity::countDeep()
+/*virtual*/ unsigned long int AtomicEntity::countDeep()
 {
        return 1;
 }
@@ -68,7 +68,7 @@ RS_AtomicEntity::RS_AtomicEntity(RS_EntityContainer * parent/*= NULL*/): RS_Enti
  * Implementation must return the endpoint of the entity or
  * an invalid vector if the entity has no endpoint.
  */
-/*virtual*/ Vector RS_AtomicEntity::getEndpoint() const
+/*virtual*/ Vector AtomicEntity::getEndpoint() const
 {
        return Vector(false);
 }
@@ -77,7 +77,7 @@ RS_AtomicEntity::RS_AtomicEntity(RS_EntityContainer * parent/*= NULL*/): RS_Enti
  * Implementation must return the startpoint of the entity or
  * an invalid vector if the entity has no startpoint.
  */
-/*virtual*/ Vector RS_AtomicEntity::getStartpoint() const
+/*virtual*/ Vector AtomicEntity::getStartpoint() const
 {
        return Vector(false);
 }
@@ -85,7 +85,7 @@ RS_AtomicEntity::RS_AtomicEntity(RS_EntityContainer * parent/*= NULL*/): RS_Enti
 /**
  * Implementation must return the angle in which direction the entity starts.
  */
-/*virtual*/ double RS_AtomicEntity::getDirection1() const
+/*virtual*/ double AtomicEntity::getDirection1() const
 {
        return 0.0;
 }
@@ -93,7 +93,7 @@ RS_AtomicEntity::RS_AtomicEntity(RS_EntityContainer * parent/*= NULL*/): RS_Enti
 /**
  * Implementation must return the angle in which direction the entity starts the opposite way.
  */
-/*virtual*/ double RS_AtomicEntity::getDirection2() const
+/*virtual*/ double AtomicEntity::getDirection2() const
 {
        return 0.0;
 }
@@ -101,7 +101,7 @@ RS_AtomicEntity::RS_AtomicEntity(RS_EntityContainer * parent/*= NULL*/): RS_Enti
 /**
  * (De-)selects startpoint.
  */
-/*virtual*/ void RS_AtomicEntity::setStartpointSelected(bool select)
+/*virtual*/ void AtomicEntity::setStartpointSelected(bool select)
 {
        if (select)
                setFlag(RS2::FlagSelected1);
@@ -112,7 +112,7 @@ RS_AtomicEntity::RS_AtomicEntity(RS_EntityContainer * parent/*= NULL*/): RS_Enti
 /**
  * (De-)selects endpoint.
  */
-/*virtual*/ void RS_AtomicEntity::setEndpointSelected(bool select)
+/*virtual*/ void AtomicEntity::setEndpointSelected(bool select)
 {
        if (select)
                setFlag(RS2::FlagSelected2);
@@ -123,7 +123,7 @@ RS_AtomicEntity::RS_AtomicEntity(RS_EntityContainer * parent/*= NULL*/): RS_Enti
 /**
  * @return True if the entities startpoint is selected.
  */
-bool RS_AtomicEntity::isStartpointSelected() const
+bool AtomicEntity::isStartpointSelected() const
 {
        return getFlag(RS2::FlagSelected1);
 }
@@ -131,7 +131,7 @@ bool RS_AtomicEntity::isStartpointSelected() const
 /**
  * @return True if the entities endpoint is selected.
  */
-bool RS_AtomicEntity::isEndpointSelected() const
+bool AtomicEntity::isEndpointSelected() const
 {
        return getFlag(RS2::FlagSelected2);
 }
@@ -140,7 +140,7 @@ bool RS_AtomicEntity::isEndpointSelected() const
  * Implementation must move the startpoint of the entity to
  * the given position.
  */
-/*virtual*/ void RS_AtomicEntity::moveStartpoint(const Vector & /*pos*/)
+/*virtual*/ void AtomicEntity::moveStartpoint(const Vector & /*pos*/)
 {
 }
 
@@ -148,7 +148,7 @@ bool RS_AtomicEntity::isEndpointSelected() const
  * Implementation must move the endpoint of the entity to
  * the given position.
  */
-/*virtual*/ void RS_AtomicEntity::moveEndpoint(const Vector & /*pos*/)
+/*virtual*/ void AtomicEntity::moveEndpoint(const Vector & /*pos*/)
 {
 }
 
@@ -156,7 +156,7 @@ bool RS_AtomicEntity::isEndpointSelected() const
  * Implementation must trim the startpoint of the entity to
  * the given position.
  */
-/*virtual*/ void RS_AtomicEntity::trimStartpoint(const Vector & pos)
+/*virtual*/ void AtomicEntity::trimStartpoint(const Vector & pos)
 {
        moveStartpoint(pos);
 }
@@ -165,7 +165,7 @@ bool RS_AtomicEntity::isEndpointSelected() const
 * Implementation must trim the endpoint of the entity to
 * the given position.
 */
-/*virtual*/ void RS_AtomicEntity::trimEndpoint(const Vector & pos)
+/*virtual*/ void AtomicEntity::trimEndpoint(const Vector & pos)
 {
        moveEndpoint(pos);
 }
@@ -176,16 +176,16 @@ bool RS_AtomicEntity::isEndpointSelected() const
 * trim entity and 'trimPoint' is the point to which the entity will
 * be trimmed.
 */
-/*virtual*/ RS2::Ending RS_AtomicEntity::getTrimPoint(const Vector & /*coord*/, const Vector & /*trimPoint*/)
+/*virtual*/ RS2::Ending AtomicEntity::getTrimPoint(const Vector & /*coord*/, const Vector & /*trimPoint*/)
 {
        return RS2::EndingNone;
 }
 
-/*virtual*/ void RS_AtomicEntity::reverse()
+/*virtual*/ void AtomicEntity::reverse()
 {
 }
 
-/*virtual*/ void RS_AtomicEntity::moveSelectedRef(const Vector & ref, const Vector & offset)
+/*virtual*/ void AtomicEntity::moveSelectedRef(const Vector & ref, const Vector & offset)
 {
        if (isSelected())
                moveRef(ref, offset);
index fb5000a2edf93a4a35a54aa1ac20230cf9e4a3fe..368987a1aa622d3fb79fbe733831c2589b505a97 100644 (file)
@@ -9,11 +9,11 @@
  *
  * @author Andrew Mustun
  */
-class RS_AtomicEntity: public RS_Entity
+class AtomicEntity: public Entity
 {
        public:
-               RS_AtomicEntity(RS_EntityContainer * parent = NULL);
-               virtual ~RS_AtomicEntity();
+               AtomicEntity(EntityContainer * parent = NULL);
+               virtual ~AtomicEntity();
                virtual bool isContainer() const;
                virtual bool isAtomic() const;
                virtual unsigned long int count();
index 9d520fbe85af132138babc7967878901e17aa17e..967e7e52883e44eed8d8c5a72df4ecc58fa04c9b 100644 (file)
  * @param name The name of the block used as an identifier.
  * @param basePoint Base point (offset) of the block.
  */
-RS_Block::RS_Block(RS_EntityContainer * parent, const RS_BlockData & d):
-       RS_Document(parent), data(d)
+Block::Block(EntityContainer * parent, const BlockData & d):
+       Document(parent), data(d)
 {
-       pen = RS_Pen(RS_Color(128, 128, 128), RS2::Width01, RS2::SolidLine);
+       pen = Pen(Color(128, 128, 128), RS2::Width01, RS2::SolidLine);
 }
 
-RS_Block::~RS_Block()
+Block::~Block()
 {
 }
 
-RS_Entity * RS_Block::clone()
+Entity * Block::clone()
 {
-       RS_Block * blk = new RS_Block(*this);
+       Block * blk = new Block(*this);
 #warning "!!! Need to port setAutoDelete() behaviour from Qt3 to Qt4 !!!"
 //     blk->entities.setAutoDelete(entities.autoDelete());
        blk->detach();
@@ -44,41 +44,41 @@ RS_Entity * RS_Block::clone()
        return blk;
 }
 
-RS_LayerList * RS_Block::getLayerList()
+LayerList * Block::getLayerList()
 {
        Drawing * g = getGraphic();
 
-       if (g != NULL)
+       if (g)
                return g->getLayerList();
 
        return NULL;
 }
 
-RS_BlockList * RS_Block::getBlockList()
+BlockList * Block::getBlockList()
 {
        Drawing * g = getGraphic();
 
-       if (g != NULL)
+       if (g)
                return g->getBlockList();
 
        return NULL;
 }
 
-bool RS_Block::save()
+bool Block::save()
 {
        Drawing * g = getGraphic();
 
-       if (g != NULL)
+       if (g)
                return g->save();
 
        return false;
 }
 
-bool RS_Block::saveAs(const QString & filename, RS2::FormatType type)
+bool Block::saveAs(const QString & filename, RS2::FormatType type)
 {
        Drawing * g = getGraphic();
 
-       if (g != NULL)
+       if (g)
                return g->saveAs(filename, type);
 
        return false;
@@ -87,7 +87,7 @@ bool RS_Block::saveAs(const QString & filename, RS2::FormatType type)
 /**
  * Sets the parent documents modified status to 'm'.
  */
-void RS_Block::setModified(bool m)
+void Block::setModified(bool m)
 {
        Drawing * p = getGraphic();
 
@@ -98,7 +98,7 @@ void RS_Block::setModified(bool m)
 }
 
 /** @return RS2::EntityBlock */
-/*virtual*/ RS2::EntityType RS_Block::rtti() const
+/*virtual*/ RS2::EntityType Block::rtti() const
 {
        return RS2::EntityBlock;
 }
@@ -106,7 +106,7 @@ void RS_Block::setModified(bool m)
 /**
  * @return Name of this block (the name is an Id for this block).
  */
-QString RS_Block::getName() const
+QString Block::getName() const
 {
        return data.name;
 }
@@ -114,32 +114,32 @@ QString RS_Block::getName() const
 /**
  * @return base point of this block.
  */
-Vector RS_Block::getBasePoint() const
+Vector Block::getBasePoint() const
 {
        return data.basePoint;
 }
 
 /**
- * Reimplementation from RS_Document. Does nothing.
+ * Reimplementation from Document. Does nothing.
  */
-/*virtual*/ void RS_Block::newDoc()
+/*virtual*/ void Block::newDoc()
 {
        // do nothing
 }
 
 /**
- * Reimplementation from RS_Document. Does nothing.
+ * Reimplementation from Document. Does nothing.
  */
-/*virtual*/ bool RS_Block::open(const QString &, RS2::FormatType)
+/*virtual*/ bool Block::open(const QString &, RS2::FormatType)
 {
        // do nothing
        return false;
 }
 
-/*friend*/ std::ostream & operator<<(std::ostream & os, const RS_Block & b)
+/*friend*/ std::ostream & operator<<(std::ostream & os, const Block & b)
 {
        os << " name: " << b.getName().toLatin1().data() << std::endl;
-       os << " entities: " << (RS_EntityContainer &)b << std::endl;
+       os << " entities: " << (EntityContainer &)b << std::endl;
        return os;
 }
 
@@ -147,7 +147,7 @@ Vector RS_Block::getBasePoint() const
  * sets a new name for the block. Only called by blocklist to
  * assure that block names stay unique.
  */
-void RS_Block::setName(const QString & n)
+void Block::setName(const QString & n)
 {
        data.name = n;
 }
@@ -156,7 +156,7 @@ void RS_Block::setName(const QString & n)
  * @retval true if this block is frozen (invisible)
  * @retval false if this block isn't frozen (visible)
  */
-bool RS_Block::isFrozen() const
+bool Block::isFrozen() const
 {
        return data.frozen;
 }
@@ -165,7 +165,7 @@ bool RS_Block::isFrozen() const
  * Toggles the visibility of this block.
  * Freezes the block if it's not frozen, thaws the block otherwise
  */
-void RS_Block::toggle()
+void Block::toggle()
 {
        data.frozen = !data.frozen;
 }
@@ -175,7 +175,7 @@ void RS_Block::toggle()
  *
  * @param freeze true: freeze, false: defreeze
  */
-void RS_Block::freeze(bool freeze)
+void Block::freeze(bool freeze)
 {
        data.frozen = freeze;
 }
index ceed4435203612d98791013ebd0c71c350b1e180..c016d0ee1116504b2a381da78daf1ee613d769f0 100644 (file)
@@ -7,12 +7,12 @@
 /**
  * Holds the data that defines a block.
  */
-class RS_BlockData
+class BlockData
 {
        public:
-               RS_BlockData() {}
+               BlockData() {}
 
-               RS_BlockData(const QString & name1, const Vector & basePoint1, bool frozen1):
+               BlockData(const QString & name1, const Vector & basePoint1, bool frozen1):
                        name(name1), basePoint(basePoint1), frozen(frozen1) {}
 
                bool isValid()
@@ -40,32 +40,32 @@ class RS_BlockData
  * block. Note that although technically possible, a block should
  * never be part of the entity tree of a graphic. Blocks are
  * stored in a seperate list inside the graphic document (a block list).
- * The graphic can contain RS_Insert entities that refer to such
+ * The graphic can contain Insert entities that refer to such
  * blocks.
  *
  * blocks are documents and can therefore be handled by graphic views.
  *
  * @author Andrew Mustun
  */
-class RS_Block: public RS_Document
+class Block: public Document
 {
-               friend class RS_BlockList;
+               friend class BlockList;
 
        public:
-               RS_Block(RS_EntityContainer * parent, const RS_BlockData & d);
-               virtual ~RS_Block();
+               Block(EntityContainer * parent, const BlockData & d);
+               virtual ~Block();
 
-               virtual RS_Entity * clone();
+               virtual Entity * clone();
                virtual RS2::EntityType rtti() const;
                QString getName() const;
                Vector getBasePoint() const;
-               virtual RS_LayerList * getLayerList();
-               virtual RS_BlockList * getBlockList();
+               virtual LayerList * getLayerList();
+               virtual BlockList * getBlockList();
                virtual void newDoc();
                virtual bool save();
                virtual bool saveAs(const QString & filename, RS2::FormatType type);
                virtual bool open(const QString &, RS2::FormatType);
-               friend std::ostream & operator<<(std::ostream & os, const RS_Block & b);
+               friend std::ostream & operator<<(std::ostream & os, const Block & b);
                void setName(const QString & n);
                bool isFrozen() const;
                void toggle();
@@ -83,7 +83,7 @@ class RS_Block: public RS_Document
                */
                //QString name;
                //! Block data
-               RS_BlockData data;
+               BlockData data;
 };
 
 #endif
index 98045470d4d5e8d3b27b425a8fbec70cfe6217a2..31d8601a4a8689e8ca975452c6ab59927e114de0 100644 (file)
@@ -25,7 +25,7 @@
  *              If so, the blocks will be deleted when the block
  *              list is deleted.
  */
-RS_BlockList::RS_BlockList(bool owner)
+BlockList::BlockList(bool owner)
 {
        this->owner = owner;
        //blocks.setAutoDelete(owner);
@@ -36,14 +36,14 @@ RS_BlockList::RS_BlockList(bool owner)
        setModified(false);
 }
 
-/*virtual*/ RS_BlockList::~RS_BlockList()
+/*virtual*/ BlockList::~BlockList()
 {
 }
 
 /**
  * Removes all blocks in the blocklist.
  */
-void RS_BlockList::clear()
+void BlockList::clear()
 {
        blocks.clear();
        setModified(true);
@@ -52,7 +52,7 @@ void RS_BlockList::clear()
 /**
  * @return Number of blocks available.
  */
-uint RS_BlockList::count()
+uint BlockList::count()
 {
        return blocks.count();
 }
@@ -60,7 +60,7 @@ uint RS_BlockList::count()
 /**
  * @return Block at given position or NULL if i is out of range.
  */
-RS_Block * RS_BlockList::at(uint i)
+Block * BlockList::at(uint i)
 {
        return blocks.at(i);
 }
@@ -69,9 +69,9 @@ RS_Block * RS_BlockList::at(uint i)
  * Activates the given block.
  * Listeners are notified.
  */
-void RS_BlockList::activate(const QString & name)
+void BlockList::activate(const QString & name)
 {
-       RS_DEBUG->print("RS_BlockList::activateBlock");
+       DEBUG->print("BlockList::activateBlock");
 
        activate(find(name));
 }
@@ -80,14 +80,14 @@ void RS_BlockList::activate(const QString & name)
  * Activates the given block.
  * Listeners are notified.
  */
-void RS_BlockList::activate(RS_Block * block)
+void BlockList::activate(Block * block)
 {
-       RS_DEBUG->print("RS_BlockList::activateBlock");
+       DEBUG->print("BlockList::activateBlock");
        activeBlock = block;
 
        /*
                for (uint i=0; i<blockListListeners.count(); ++i) {
-                       RS_BlockListListener* l = blockListListeners.at(i);
+                       BlockListListener* l = blockListListeners.at(i);
                if (l!=NULL) {
                        l->blockActivated(activeBlock);
                }
@@ -96,7 +96,7 @@ void RS_BlockList::activate(RS_Block * block)
 }
 
 //! @return The active block of NULL if no block is activated.
-RS_Block * RS_BlockList::getActive()
+Block * BlockList::getActive()
 {
        return activeBlock;
 }
@@ -110,15 +110,15 @@ RS_Block * RS_BlockList::getActive()
  *
  * @return false: block already existed and was deleted.
  */
-bool RS_BlockList::add(RS_Block * block, bool notify)
+bool BlockList::add(Block * block, bool notify)
 {
-       RS_DEBUG->print("RS_BlockList::add()");
+       DEBUG->print("BlockList::add()");
 
        if (block == NULL)
                return false;
 
        // check if block already exists:
-       RS_Block * b = find(block->getName());
+       Block * b = find(block->getName());
 
        if (b == NULL)
        {
@@ -148,12 +148,12 @@ bool RS_BlockList::add(RS_Block * block, bool notify)
  * used after adding a lot of blocks without auto-update or simply
  * to force an update of GUI blocklists.
  */
-void RS_BlockList::addNotification()
+void BlockList::addNotification()
 {
 #if 0
        for(int i=0; i<blockListListeners.count(); ++i)
        {
-               RS_BlockListListener * l = blockListListeners.at(i);
+               BlockListListener * l = blockListListeners.at(i);
                l->blockAdded(NULL);
        }
 #endif
@@ -164,9 +164,9 @@ void RS_BlockList::addNotification()
  * Listeners are notified after the block was removed from
  * the list but before it gets deleted.
  */
-void RS_BlockList::remove(RS_Block * block)
+void BlockList::remove(Block * block)
 {
-       RS_DEBUG->print("RS_BlockList::removeBlock()");
+       DEBUG->print("BlockList::removeBlock()");
 
        // here the block is removed from the list but not deleted
 //     blocks.remove(block);
@@ -175,7 +175,7 @@ void RS_BlockList::remove(RS_Block * block)
 #if 0
        for(int i=0; i<blockListListeners.count(); ++i)
        {
-               RS_BlockListListener * l = blockListListeners.at(i);
+               BlockListListener * l = blockListListeners.at(i);
                l->blockRemoved(block);
        }
 #endif
@@ -203,7 +203,7 @@ void RS_BlockList::remove(RS_Block * block)
  * @retval true block was successfully renamed.
  * @retval false block couldn't be renamed.
  */
-bool RS_BlockList::rename(RS_Block * block, const QString & name)
+bool BlockList::rename(Block * block, const QString & name)
 {
        if (block != NULL)
        {
@@ -224,11 +224,11 @@ bool RS_BlockList::rename(RS_Block * block, const QString & name)
  * Listeners are notified.
  */
 /*
-void RS_BlockList::editBlock(RS_Block* block, const RS_Block& source) {
+void BlockList::editBlock(Block* block, const Block& source) {
        *block = source;
 
        for (uint i=0; i<blockListListeners.count(); ++i) {
-               RS_BlockListListener* l = blockListListeners.at(i);
+               BlockListListener* l = blockListListeners.at(i);
 
                l->blockEdited(block);
        }
@@ -239,13 +239,13 @@ void RS_BlockList::editBlock(RS_Block* block, const RS_Block& source) {
  * @return Pointer to the block with the given name or
  * \p NULL if no such block was found.
  */
-RS_Block * RS_BlockList::find(const QString & name)
+Block * BlockList::find(const QString & name)
 {
-       //RS_DEBUG->print("RS_BlockList::find");
+       //DEBUG->print("BlockList::find");
 
        for(uint i=0; i<count(); i++)
        {
-               RS_Block * b = at(i);
+               Block * b = at(i);
 
                if (b->getName() == name)
                        return b;
@@ -259,7 +259,7 @@ RS_Block * RS_BlockList::find(const QString & name)
  *
  * @param suggestion Suggested name the new name will be based on.
  */
-QString RS_BlockList::newName(const QString & suggestion)
+QString BlockList::newName(const QString & suggestion)
 {
        QString name;
 
@@ -278,7 +278,7 @@ QString RS_BlockList::newName(const QString & suggestion)
  * Switches on / off the given block.
  * Listeners are notified.
  */
-void RS_BlockList::toggle(const QString & name)
+void BlockList::toggle(const QString & name)
 {
        toggle(find(name));
 }
@@ -287,7 +287,7 @@ void RS_BlockList::toggle(const QString & name)
  * Switches on / off the given block.
  * Listeners are notified.
  */
-void RS_BlockList::toggle(RS_Block * block)
+void BlockList::toggle(Block * block)
 {
        if (block == NULL)
                return;
@@ -298,7 +298,7 @@ void RS_BlockList::toggle(RS_Block * block)
        // Notify listeners:
        for(int i=0; i<blockListListeners.count(); ++i)
        {
-               RS_BlockListListener * l = blockListListeners.at(i);
+               BlockListListener * l = blockListListeners.at(i);
 
                l->blockToggled(block);
        }
@@ -310,7 +310,7 @@ void RS_BlockList::toggle(RS_Block * block)
  *
  * @param freeze true: freeze, false: defreeze
  */
-void RS_BlockList::freezeAll(bool freeze)
+void BlockList::freezeAll(bool freeze)
 {
        for(uint l=0; l<count(); l++)
                at(l)->freeze(freeze);
@@ -318,7 +318,7 @@ void RS_BlockList::freezeAll(bool freeze)
 #if 0
        for(int i=0; i<blockListListeners.count(); ++i)
        {
-               RS_BlockListListener * l = blockListListeners.at(i);
+               BlockListListener * l = blockListListeners.at(i);
                l->blockToggled(NULL);
        }
 #endif
@@ -329,13 +329,13 @@ void RS_BlockList::freezeAll(bool freeze)
  * Listeners are notified.
  */
 /*
-void RS_BlockList::toggleBlock(const QString& name) {
-       RS_Block* block = findBlock(name);
+void BlockList::toggleBlock(const QString& name) {
+       Block* block = findBlock(name);
        block->toggle();
 
     // Notify listeners:
        for (uint i=0; i<blockListListeners.count(); ++i) {
-               RS_BlockListListener* l = blockListListeners.at(i);
+               BlockListListener* l = blockListListeners.at(i);
 
                l->blockToggled(block);
        }
@@ -347,7 +347,7 @@ void RS_BlockList::toggleBlock(const QString& name) {
  * are notified when the block list changes.
  */
 #if 0
-void RS_BlockList::addListener(RS_BlockListListener * listener)
+void BlockList::addListener(BlockListListener * listener)
 {
        blockListListeners.append(listener);
 }
@@ -355,7 +355,7 @@ void RS_BlockList::addListener(RS_BlockListListener * listener)
 /**
  * removes a BlockListListener from the list of listeners.
  */
-void RS_BlockList::removeListener(RS_BlockListListener * listener)
+void BlockList::removeListener(BlockListListener * listener)
 {
        blockListListeners.removeAll(listener);
 }
@@ -364,7 +364,7 @@ void RS_BlockList::removeListener(RS_BlockListListener * listener)
 /**
  * Sets the layer lists modified status to 'm'.
  */
-void RS_BlockList::setModified(bool m)
+void BlockList::setModified(bool m)
 {
        modified = m;
 }
@@ -373,7 +373,7 @@ void RS_BlockList::setModified(bool m)
  * @retval true The layer list has been modified.
  * @retval false The layer list has not been modified.
  */
-/*virtual*/ bool RS_BlockList::isModified() const
+/*virtual*/ bool BlockList::isModified() const
 {
        return modified;
 }
@@ -381,13 +381,13 @@ void RS_BlockList::setModified(bool m)
 /**
  * Dumps the blocks to stdout.
  */
-std::ostream & operator<<(std::ostream & os, RS_BlockList & b)
+std::ostream & operator<<(std::ostream & os, BlockList & b)
 {
        os << "Blocklist: \n";
 
        for(uint i=0; i<b.count(); ++i)
        {
-               RS_Block * blk = b.at(i);
+               Block * blk = b.at(i);
 
                os << *blk << "\n";
        }
index 6b1c630c4929e40aa1de1f1a063d168c3783285d..72a0123077cfae51fbaddbfa5ddcb84e246b55d6 100644 (file)
@@ -9,48 +9,48 @@
 /**
  * List of blocks.
  *
- * @see RS_Block
+ * @see Block
  *
  * @author Andrew Mustun
  */
-class RS_BlockList
+class BlockList
 {
        public:
-               RS_BlockList(bool owner = false);
-               virtual ~RS_BlockList();
+               BlockList(bool owner = false);
+               virtual ~BlockList();
 
                void clear();
                uint count();
-               RS_Block * at(uint i);
+               Block * at(uint i);
                void activate(const QString & name);
-               void activate(RS_Block * block);
-               RS_Block * getActive();
-               virtual bool add(RS_Block * block, bool notify = true);
+               void activate(Block * block);
+               Block * getActive();
+               virtual bool add(Block * block, bool notify = true);
                virtual void addNotification();
-               virtual void remove(RS_Block * block);
-               virtual bool rename(RS_Block * block, const QString & name);
-               //virtual void editBlock(RS_Block* block, const RS_Block& source);
-               RS_Block * find(const QString & name);
+               virtual void remove(Block * block);
+               virtual bool rename(Block * block, const QString & name);
+               //virtual void editBlock(Block* block, const Block& source);
+               Block * find(const QString & name);
                QString newName(const QString & suggestion = "");
                void toggle(const QString & name);
-               void toggle(RS_Block * block);
+               void toggle(Block * block);
                void freezeAll(bool freeze);
-//             void addListener(RS_BlockListListener * listener);
-//             void removeListener(RS_BlockListListener * listener);
+//             void addListener(BlockListListener * listener);
+//             void removeListener(BlockListListener * listener);
                void setModified(bool m);
                virtual bool isModified() const;
 
-               friend std::ostream & operator<<(std::ostream & os, RS_BlockList & b);
+               friend std::ostream & operator<<(std::ostream & os, BlockList & b);
 
        private:
                //! Is the list owning the blocks?
                bool owner;
                //! Blocks in the graphic
-               QList<RS_Block *> blocks;
+               QList<Block *> blocks;
                //! List of registered BlockListListeners
-//             QList<RS_BlockListListener *> blockListListeners;
+//             QList<BlockListListener *> blockListListeners;
                //! Currently active block
-               RS_Block * activeBlock;
+               Block * activeBlock;
                /** Flag set if the layer list was modified and not yet saved. */
                bool modified;
 };
index dc66e348395b4cbbee1b12351d4e274d8e839b21..9162a5ae50eba88a9d193294639b1d13cd96f75e 100644 (file)
 /**
  * Default constructor.
  */
-RS_Circle::RS_Circle(RS_EntityContainer * parent, const RS_CircleData & d):
-       RS_AtomicEntity(parent), data(d)
+Circle::Circle(EntityContainer * parent, const CircleData & d):
+       AtomicEntity(parent), data(d)
 {
        calculateBorders();
 }
 
-/*virtual*/ RS_Circle::~RS_Circle()
+/*virtual*/ Circle::~Circle()
 {
 }
 
-/*virtual*/ RS_Entity * RS_Circle::clone()
+/*virtual*/ Entity * Circle::clone()
 {
-       RS_Circle * c = new RS_Circle(*this);
+       Circle * c = new Circle(*this);
        c->initId();
        return c;
 }
 
 /**    @return RS2::EntityCircle */
-/*virtual*/ RS2::EntityType RS_Circle::rtti() const
+/*virtual*/ RS2::EntityType Circle::rtti() const
 {
        return RS2::EntityCircle;
 }
 
 /** @return true */
-/*virtual*/ bool RS_Circle::isEdge() const
+/*virtual*/ bool Circle::isEdge() const
 {
        return true;
 }
 
 /** @return Copy of data that defines the circle. **/
-RS_CircleData RS_Circle::getData()
+CircleData Circle::getData()
 {
        return data;
 }
 
-VectorSolutions RS_Circle::getRefPoints()
+VectorSolutions Circle::getRefPoints()
 {
        Vector v1(data.radius, 0.0);
        Vector v2(0.0, data.radius);
@@ -70,12 +70,12 @@ VectorSolutions RS_Circle::getRefPoints()
        return ret;
 }
 
-/*virtual*/ Vector RS_Circle::getStartpoint() const
+/*virtual*/ Vector Circle::getStartpoint() const
 {
        return data.center + Vector(data.radius, 0.0);
 }
 
-/*virtual*/ Vector RS_Circle::getEndpoint() const
+/*virtual*/ Vector Circle::getEndpoint() const
 {
        return data.center + Vector(data.radius, 0.0);
 }
@@ -84,7 +84,7 @@ VectorSolutions RS_Circle::getRefPoints()
        * @return Direction 1. The angle at which the arc starts at
        * the startpoint.
        */
-double RS_Circle::getDirection1() const
+double Circle::getDirection1() const
 {
        return M_PI / 2.0;
 }
@@ -93,36 +93,36 @@ double RS_Circle::getDirection1() const
        * @return Direction 2. The angle at which the arc starts at
        * the endpoint.
        */
-double RS_Circle::getDirection2() const
+double Circle::getDirection2() const
 {
        return M_PI / 2.0 * 3.0;
 }
 
 /** @return The center point (x) of this arc */
-Vector RS_Circle::getCenter()
+Vector Circle::getCenter()
 {
        return data.center;
 }
 
 /** Sets new center. */
-void RS_Circle::setCenter(const Vector & c)
+void Circle::setCenter(const Vector & c)
 {
        data.center = c;
 }
 
 /** @return The radius of this arc */
-double RS_Circle::getRadius()
+double Circle::getRadius()
 {
        return data.radius;
 }
 
 /** Sets new radius. */
-void RS_Circle::setRadius(double r)
+void Circle::setRadius(double r)
 {
        data.radius = r;
 }
 
-void RS_Circle::calculateBorders()
+void Circle::calculateBorders()
 {
        Vector r(data.radius, data.radius, 0.0);
        minV = data.center - r;
@@ -132,7 +132,7 @@ void RS_Circle::calculateBorders()
 /**
  * @return Angle length in rad.
  */
-double RS_Circle::getAngleLength() const
+double Circle::getAngleLength() const
 {
        return 2 * M_PI;
 }
@@ -140,7 +140,7 @@ double RS_Circle::getAngleLength() const
 /**
  * @return Length of the circle which is the circumference.
  */
-double RS_Circle::getLength()
+double Circle::getLength()
 {
        return 2 * M_PI * data.radius;
 }
@@ -151,7 +151,7 @@ double RS_Circle::getLength()
  * @param c Center.
  * @param r Radius
  */
-bool RS_Circle::createFromCR(const Vector & c, double r)
+bool Circle::createFromCR(const Vector & c, double r)
 {
        if (fabs(r) > RS_TOLERANCE)
        {
@@ -161,7 +161,7 @@ bool RS_Circle::createFromCR(const Vector & c, double r)
        }
        else
        {
-               RS_DEBUG->print(RS_Debug::D_WARNING, "RS_Circle::createFromCR(): "
+               DEBUG->print(Debug::D_WARNING, "Circle::createFromCR(): "
                        "Cannot create a circle with radius 0.0.");
                return false;
        }
@@ -173,7 +173,7 @@ bool RS_Circle::createFromCR(const Vector & c, double r)
  * @param p1 1st point.
  * @param p2 2nd point.
  */
-bool RS_Circle::createFrom2P(const Vector & p1, const Vector & p2)
+bool Circle::createFrom2P(const Vector & p1, const Vector & p2)
 {
        if (p1.distanceTo(p2) > RS_TOLERANCE)
        {
@@ -183,7 +183,7 @@ bool RS_Circle::createFrom2P(const Vector & p1, const Vector & p2)
        }
        else
        {
-               RS_DEBUG->print(RS_Debug::D_WARNING, "RS_Circle::createFrom2P(): "
+               DEBUG->print(Debug::D_WARNING, "Circle::createFrom2P(): "
                        "Cannot create a circle with radius 0.0.");
                return false;
        }
@@ -196,7 +196,7 @@ bool RS_Circle::createFrom2P(const Vector & p1, const Vector & p2)
  * @param p2 2nd point.
  * @param p3 3rd point.
  */
-bool RS_Circle::createFrom3P(const Vector & p1, const Vector & p2, const Vector & p3)
+bool Circle::createFrom3P(const Vector & p1, const Vector & p2, const Vector & p3)
 {
        if (p1.distanceTo(p2) > RS_TOLERANCE
            && p2.distanceTo(p3) > RS_TOLERANCE
@@ -215,13 +215,13 @@ bool RS_Circle::createFrom3P(const Vector & p1, const Vector & p2, const Vector
                a2 = p2.angleTo(p3) + M_PI / 2.0;
                dir2.setPolar(100.0, a2);
 
-               RS_ConstructionLineData d1(mp1, mp1 + dir1);
-               RS_ConstructionLineData d2(mp2, mp2 + dir2);
-               RS_ConstructionLine midLine1(NULL, d1);
-               RS_ConstructionLine midLine2(NULL, d2);
+               ConstructionLineData d1(mp1, mp1 + dir1);
+               ConstructionLineData d2(mp2, mp2 + dir2);
+               ConstructionLine midLine1(NULL, d1);
+               ConstructionLine midLine2(NULL, d2);
 
                VectorSolutions sol =
-                       RS_Information::getIntersection(&midLine1, &midLine2);
+                       Information::getIntersection(&midLine1, &midLine2);
 
                data.center = sol.get(0);
                data.radius = data.center.distanceTo(p3);
@@ -230,14 +230,14 @@ bool RS_Circle::createFrom3P(const Vector & p1, const Vector & p2, const Vector
                        return true;
                else
                {
-                       RS_DEBUG->print(RS_Debug::D_WARNING, "RS_Circle::createFrom3P(): "
+                       DEBUG->print(Debug::D_WARNING, "Circle::createFrom3P(): "
                                "Cannot create a circle with inf radius.");
                        return false;
                }
        }
        else
        {
-               RS_DEBUG->print(RS_Debug::D_WARNING, "RS_Circle::createFrom3P(): "
+               DEBUG->print(Debug::D_WARNING, "Circle::createFrom3P(): "
                        "Cannot create a circle with radius 0.0.");
                return false;
        }
@@ -246,14 +246,14 @@ bool RS_Circle::createFrom3P(const Vector & p1, const Vector & p2, const Vector
 /**
  * @return Always an invalid vector.
  */
-Vector RS_Circle::getNearestEndpoint(const Vector & /*coord*/, double * dist)
+Vector Circle::getNearestEndpoint(const Vector & /*coord*/, double * dist)
 {
        if (dist != NULL)
                *dist = RS_MAXDOUBLE;
        return Vector(false);
 }
 
-Vector RS_Circle::getNearestPointOnEntity(const Vector & coord, bool /*onEntity*/, double * dist, RS_Entity ** entity)
+Vector Circle::getNearestPointOnEntity(const Vector & coord, bool /*onEntity*/, double * dist, Entity ** entity)
 {
        Vector vec(false);
 
@@ -270,33 +270,33 @@ Vector RS_Circle::getNearestPointOnEntity(const Vector & coord, bool /*onEntity*
        return vec;
 }
 
-Vector RS_Circle::getNearestCenter(const Vector & coord, double * dist)
+Vector Circle::getNearestCenter(const Vector & coord, double * dist)
 {
        if (dist != NULL)
                *dist = coord.distanceTo(data.center);
        return data.center;
 }
 
-Vector RS_Circle::getNearestMiddle(const Vector & /*coord*/, double * dist)
+Vector Circle::getNearestMiddle(const Vector & /*coord*/, double * dist)
 {
        if (dist != NULL)
                *dist = RS_MAXDOUBLE;
        return Vector(false);
 }
 
-Vector RS_Circle::getNearestDist(double /*distance*/, const Vector & /*coord*/, double * dist)
+Vector Circle::getNearestDist(double /*distance*/, const Vector & /*coord*/, double * dist)
 {
        if (dist != NULL)
                *dist = RS_MAXDOUBLE;
        return Vector(false);
 }
 
-Vector RS_Circle::getNearestDist(double /*distance*/, bool /*startp*/)
+Vector Circle::getNearestDist(double /*distance*/, bool /*startp*/)
 {
        return Vector(false);
 }
 
-double RS_Circle::getDistanceToPoint(const Vector & coord, RS_Entity * * entity, RS2::ResolveLevel, double)
+double Circle::getDistanceToPoint(const Vector & coord, Entity * * entity, RS2::ResolveLevel, double)
 {
        if (entity != NULL)
                *entity = this;
@@ -304,32 +304,32 @@ double RS_Circle::getDistanceToPoint(const Vector & coord, RS_Entity * * entity,
        return fabs((coord - data.center).magnitude() - data.radius);
 }
 
-void RS_Circle::move(Vector offset)
+void Circle::move(Vector offset)
 {
        data.center.move(offset);
        calculateBorders();
 }
 
-void RS_Circle::rotate(Vector center, double angle)
+void Circle::rotate(Vector center, double angle)
 {
        data.center.rotate(center, angle);
        calculateBorders();
 }
 
-void RS_Circle::scale(Vector center, Vector factor)
+void Circle::scale(Vector center, Vector factor)
 {
        data.center.scale(center, factor);
        data.radius *= factor.x;
        calculateBorders();
 }
 
-void RS_Circle::mirror(Vector axisPoint1, Vector axisPoint2)
+void Circle::mirror(Vector axisPoint1, Vector axisPoint2)
 {
        data.center.mirror(axisPoint1, axisPoint2);
        calculateBorders();
 }
 
-void RS_Circle::draw(PaintInterface * painter, GraphicView * view, double /*patternOffset*/)
+void Circle::draw(PaintInterface * painter, GraphicView * view, double /*patternOffset*/)
 {
        if (painter == NULL || view == NULL)
                return;
@@ -357,7 +357,7 @@ void RS_Circle::draw(PaintInterface * painter, GraphicView * view, double /*patt
                }
 
                // Pattern:
-               RS_LineTypePattern * pat;
+               LineTypePattern * pat;
 
                if (isSelected())
                        pat = &patternSelected;
@@ -371,7 +371,7 @@ void RS_Circle::draw(PaintInterface * painter, GraphicView * view, double /*patt
                        return;
 
                // Pen to draw pattern is always solid:
-               RS_Pen pen = painter->getPen();
+               Pen pen = painter->getPen();
                pen.setLineType(RS2::SolidLine);
                painter->setPen(pen);
 
@@ -425,7 +425,7 @@ void RS_Circle::draw(PaintInterface * painter, GraphicView * view, double /*patt
        }
 }
 
-void RS_Circle::moveRef(const Vector & ref, const Vector & offset)
+void Circle::moveRef(const Vector & ref, const Vector & offset)
 {
        Vector v1(data.radius, 0.0);
        Vector v2(0.0, data.radius);
@@ -443,9 +443,8 @@ void RS_Circle::moveRef(const Vector & ref, const Vector & offset)
 /**
  * Dumps the circle's data to stdout.
  */
-std::ostream & operator<<(std::ostream & os, const RS_Circle & a)
+std::ostream & operator<<(std::ostream & os, const Circle & a)
 {
        os << " Circle: " << a.data << "\n";
        return os;
 }
-
index 8edd3eae84f56e4f831a1cccad20204c04f13cb3..99cedd6ade902d956f5d9a2e762ea0cc3e8fa8dc 100644 (file)
@@ -6,14 +6,14 @@
 /**
  * Holds the data that defines a circle.
  */
-class RS_CircleData
+class CircleData
 {
        public:
-               RS_CircleData()
+               CircleData()
                {
                }
 
-               RS_CircleData(const Vector & center, double radius)
+               CircleData(const Vector & center, double radius)
                {
                        this->center = center;
                        this->radius = radius;
@@ -30,9 +30,9 @@ class RS_CircleData
                        return (center.valid && radius > RS_TOLERANCE);
                }
 
-               friend class RS_Circle;
+               friend class Circle;
 
-               friend std::ostream & operator<<(std::ostream & os, const RS_CircleData & ad)
+               friend std::ostream & operator<<(std::ostream & os, const CircleData & ad)
                {
                        os << "(" << ad.center << "/" << ad.radius << ")";
                        return os;
@@ -48,16 +48,16 @@ class RS_CircleData
  *
  * @author Andrew Mustun
  */
-class RS_Circle: public RS_AtomicEntity
+class Circle: public AtomicEntity
 {
        public:
-               RS_Circle(RS_EntityContainer * parent, const RS_CircleData & d);
-               virtual ~RS_Circle();
+               Circle(EntityContainer * parent, const CircleData & d);
+               virtual ~Circle();
 
-               virtual RS_Entity * clone();
+               virtual Entity * clone();
                virtual RS2::EntityType rtti() const;
                virtual bool isEdge() const;
-               RS_CircleData getData();
+               CircleData getData();
                virtual VectorSolutions getRefPoints();
                virtual Vector getStartpoint() const;
                virtual Vector getEndpoint() const;
@@ -75,12 +75,12 @@ class RS_Circle: public RS_AtomicEntity
                bool createFrom3P(const Vector & p1, const Vector & p2, const Vector & p3);
                virtual Vector getNearestEndpoint(const Vector & coord, double * dist = NULL);
                virtual Vector getNearestPointOnEntity(const Vector & coord, bool onEntity = true,
-                       double * dist = NULL, RS_Entity ** entity = NULL);
+                       double * dist = NULL, Entity ** entity = NULL);
                virtual Vector getNearestCenter(const Vector & coord, double * dist = NULL);
                virtual Vector getNearestMiddle(const Vector & coord, double * dist = NULL);
                virtual Vector getNearestDist(double distance, const Vector & coord, double * dist = NULL);
                virtual Vector getNearestDist(double distance, bool startp);
-               virtual double getDistanceToPoint(const Vector & coord, RS_Entity ** entity = NULL, RS2::ResolveLevel level = RS2::ResolveNone, double solidDist = RS_MAXDOUBLE);
+               virtual double getDistanceToPoint(const Vector & coord, Entity ** entity = NULL, RS2::ResolveLevel level = RS2::ResolveNone, double solidDist = RS_MAXDOUBLE);
 
                virtual void move(Vector offset);
                virtual void rotate(Vector center, double angle);
@@ -89,12 +89,12 @@ class RS_Circle: public RS_AtomicEntity
                virtual void moveRef(const Vector & ref, const Vector & offset);
                virtual void draw(PaintInterface * painter, GraphicView * view, double patternOffset = 0.0);
 
-               friend std::ostream & operator<<(std::ostream & os, const RS_Circle & a);
+               friend std::ostream & operator<<(std::ostream & os, const Circle & a);
 
                virtual void calculateBorders();
 
        protected:
-               RS_CircleData data;
+               CircleData data;
 };
 
 #endif
index 783951ebeb75547305d7ead3e8bea33662378789..943781afafc5040591d7d7a2ca4ab5884c0a610e 100644 (file)
 // Who  When        What
 // ---  ----------  -----------------------------------------------------------
 // JLH  05/28/2010  Added this text. :-)
+// JLH  09/09/2010  Removed implementation from header (where it DOESN'T
+//                  belong) and moved it here (where it DOES)
 //
 
 #include "clipboard.h"
+
 #include "block.h"
 #include "layer.h"
 #include "entity.h"
 
-RS_Clipboard* RS_Clipboard::uniqueInstance = NULL;
-
-
+Clipboard * Clipboard::uniqueInstance = NULL;
 
-void RS_Clipboard::clear() {
+void Clipboard::clear()
+{
        graphic.clear();
        graphic.clearBlocks();
        graphic.clearLayers();
        graphic.clearVariables();
 }
 
+void Clipboard::addBlock(Block * b)
+{
+       if (b)
+               graphic.addBlock(b, false);
+}
 
+bool Clipboard::hasBlock(const QString & name)
+{
+       return (graphic.findBlock(name) != NULL);
+}
 
+void Clipboard::addLayer(Layer * l)
+{
+       if (l)
+               graphic.addLayer(l);
+}
 
+bool Clipboard::hasLayer(const QString & name)
+{
+       return (graphic.findLayer(name) != NULL);
+}
 
-void RS_Clipboard::addBlock(RS_Block* b) {
-       if (b!=NULL) {
-               graphic.addBlock(b, false);
+void Clipboard::addEntity(Entity * e)
+{
+       if (e)
+       {
+               graphic.addEntity(e);
+               e->reparent(&graphic);
        }
 }
 
+/**
+ * Dumps the clipboard contents to stdout.
+ */
+std::ostream & operator<<(std::ostream & os, Clipboard & cb)
+{
+       os << "Clipboard: " << cb.graphic << "\n";
+       return os;
+}
 
-bool RS_Clipboard::hasBlock(const QString& name) {
-       return (graphic.findBlock(name)!=NULL);
+Clipboard::Clipboard()
+{
 }
 
+/**
+ * @return Instance to the unique clipboard object.
+ */
+/*static*/ Clipboard * Clipboard::instance()
+{
+       if (uniqueInstance == NULL)
+               uniqueInstance = new Clipboard();
 
-void RS_Clipboard::addLayer(RS_Layer* l) {
-       if (l!=NULL) {
-               //graphic.addLayer(l->clone());
-               graphic.addLayer(l);
-       }
+       return uniqueInstance;
 }
 
+int Clipboard::countBlocks()
+{
+       return graphic.countBlocks();
+}
 
+Block * Clipboard::blockAt(int i)
+{
+       return graphic.blockAt(i);
+}
 
-bool RS_Clipboard::hasLayer(const QString& name) {
-       return (graphic.findLayer(name)!=NULL);
+int Clipboard::countLayers()
+{
+       return graphic.countLayers();
 }
 
+Layer * Clipboard::layerAt(int i)
+{
+       return graphic.layerAt(i);
+}
 
+uint Clipboard::count()
+{
+       return graphic.count();
+}
 
-void RS_Clipboard::addEntity(RS_Entity* e) {
-       if (e!=NULL) {
-               //graphic.addEntity(e->clone());
-               graphic.addEntity(e);
-               e->reparent(&graphic);
-       }
+Entity * Clipboard::entityAt(uint i)
+{
+       return graphic.entityAt(i);
 }
 
-/**
- * Dumps the clipboard contents to stdout.
- */
-std::ostream& operator << (std::ostream& os, RS_Clipboard& cb) {
-       os << "Clipboard: " << cb.graphic << "\n";
+Entity * Clipboard::firstEntity()
+{
+       return graphic.firstEntity();
+}
 
-       return os;
+Entity * Clipboard::nextEntity()
+{
+       return graphic.nextEntity();
 }
 
+Drawing * Clipboard::getGraphic()
+{
+       return &graphic;
+}
index 247d07b10c16bf2384b807187b73580388860b1a..22d00270bdcdff5fa71637bbb9161712a3a0dffe 100644 (file)
@@ -4,82 +4,49 @@
 #include <iostream>
 #include "drawing.h"
 
-#define RS_CLIPBOARD RS_Clipboard::instance()
+#define CLIPBOARD Clipboard::instance()
 
-class RS_Block;
-class RS_Layer;
-class RS_Entity;
+class Block;
+class Layer;
+class Entity;
 
 /**
  * QCad internal clipboard. We don't use the system clipboard for
- * better portaility.
- * Implemented as singleton.
+ * better portability. Implemented as singleton.
  *
+ * @author James Hammons
  * @author Andrew Mustun
  */
-class RS_Clipboard {
-protected:
-    RS_Clipboard() {
-    }
-
-public:
-    /**
-     * @return Instance to the unique clipboard object.
-     */
-    static RS_Clipboard* instance() {
-        if (uniqueInstance==NULL) {
-            uniqueInstance = new RS_Clipboard();
-        }
-        return uniqueInstance;
-    }
-
-       void clear();
-
-       void addBlock(RS_Block* b);
-       bool hasBlock(const QString& name);
-       int  countBlocks() {
-               return graphic.countBlocks();
-       }
-       RS_Block* blockAt(int i) {
-               return graphic.blockAt(i);
-       }
-
-       void addLayer(RS_Layer* l);
-       bool hasLayer(const QString& name);
-       int  countLayers() {
-               return graphic.countLayers();
-       }
-       RS_Layer* layerAt(int i) {
-               return graphic.layerAt(i);
-       }
-
-       void addEntity(RS_Entity* e);
-
-       uint count() {
-               return graphic.count();
-       }
-       RS_Entity* entityAt(uint i) {
-               return graphic.entityAt(i);
-       }
-       RS_Entity* firstEntity() {
-               return graphic.firstEntity();
-       }
-
-       RS_Entity* nextEntity() {
-               return graphic.nextEntity();
-       }
-
-       Drawing* getGraphic() {
-               return &graphic;
-       }
-
-    friend std::ostream& operator << (std::ostream& os, RS_Clipboard& cb);
-
-protected:
-    static RS_Clipboard* uniqueInstance;
-
-       Drawing graphic;
+class Clipboard
+{
+       protected:
+               Clipboard();
+
+       public:
+               static Clipboard * instance();
+
+               void clear();
+               void addBlock(Block * b);
+               bool hasBlock(const QString & name);
+               int countBlocks();
+               Block * blockAt(int i);
+               void addLayer(Layer* l);
+               bool hasLayer(const QString & name);
+               int countLayers();
+               Layer * layerAt(int i);
+               void addEntity(Entity * e);
+               uint count();
+               Entity * entityAt(uint i);
+               Entity * firstEntity();
+               Entity * nextEntity();
+               Drawing * getGraphic();
+
+               friend std::ostream & operator<<(std::ostream & os, Clipboard & cb);
+
+       protected:
+               static Clipboard * uniqueInstance;
+
+               Drawing graphic;
 };
 
 #endif
-
index 82d8a1f731b5b11445b5314c9355567161044d66..7e049cac5e6f4958a1035854bdc16811bbf834dc 100644 (file)
 
 #include "color.h"
 
-#include "rs.h"
+#include "enums.h"
 
-RS_Color::RS_Color(): QColor(), RS_Flags()
+Color::Color(): QColor(), Flags()
 {
 }
 
-RS_Color::RS_Color(int r, int g, int b): QColor(r, g, b), RS_Flags()
+Color::Color(int r, int g, int b): QColor(r, g, b), Flags()
 {
 }
 
-RS_Color::RS_Color(const QColor & c): QColor(c), RS_Flags()
+Color::Color(const QColor & c): QColor(c), Flags()
 {
 }
 
-RS_Color::RS_Color(const RS_Color & c): QColor(c), RS_Flags()
+Color::Color(const Color & c): QColor(c), Flags()
 {
        setFlags(c.getFlags());
 }
 
-RS_Color::RS_Color(unsigned int f): QColor(), RS_Flags(f)
+Color::Color(unsigned int f): QColor(), Flags(f)
 {
 }
 
 /** @return A copy of this color without flags. */
-RS_Color RS_Color::stripFlags() const
+Color Color::stripFlags() const
 {
-       return RS_Color(red(), green(), blue());
+       return Color(red(), green(), blue());
 }
 
 /** @return true if the color is defined by layer. */
-bool RS_Color::isByLayer() const
+bool Color::isByLayer() const
 {
        return getFlag(RS2::FlagByLayer);
 }
 
 /** @return true if the color is defined by block. */
-bool RS_Color::isByBlock() const
+bool Color::isByBlock() const
 {
        return getFlag(RS2::FlagByBlock);
 }
 
-RS_Color & RS_Color::operator=(const RS_Color & c)
+Color & Color::operator=(const Color & c)
 {
        setRgb(c.red(), c.green(), c.blue());
        setFlags(c.getFlags());
@@ -65,20 +65,20 @@ RS_Color & RS_Color::operator=(const RS_Color & c)
        return *this;
 }
 
-bool RS_Color::operator==(const RS_Color & c) const
+bool Color::operator==(const Color & c) const
 {
        return (red() == c.red() && green() == c.green() && blue() == c.blue()
                && getFlags() == c.getFlags());
 }
 
 #if 0
-bool RS_Color::operator==(const QColor & c) const
+bool Color::operator==(const QColor & c) const
 {
        return (red() == c.red() && green() == c.green() && blue() == c.blue());
 }
 #endif
 
-/*friend*/ std::ostream & operator<<(std::ostream & os, const RS_Color & c)
+/*friend*/ std::ostream & operator<<(std::ostream & os, const Color & c)
 {
        os << " color: " << c.name().toLatin1().data()
                << " flags: " << (c.getFlag(RS2::FlagByLayer) ? "RS2::FlagByLayer " : "")
index d07f48da2df5ed7947ae2c99a7e7bc5047853241..9a5f7b36258793ae1b676f14225d1db756a911f5 100644 (file)
  *
  * @author Andrew Mustun
  */
-class RS_Color: public QColor, public RS_Flags
+class Color: public QColor, public Flags
 {
        public:
-               RS_Color();
-               RS_Color(int r, int g, int b);
-               RS_Color(const QColor & c);
-               RS_Color(const RS_Color & c);
-               RS_Color(unsigned int f);
+               Color();
+               Color(int r, int g, int b);
+               Color(const QColor & c);
+               Color(const Color & c);
+               Color(unsigned int f);
 
-               RS_Color stripFlags() const;
+               Color stripFlags() const;
                bool isByLayer() const;
                bool isByBlock() const;
-               RS_Color & operator=(const RS_Color & c);
-               bool operator==(const RS_Color & c) const;
+               Color & operator=(const Color & c);
+               bool operator==(const Color & c) const;
 //no,can't             bool operator==(const QColor & c) const;
-               friend std::ostream & operator<<(std::ostream & os, const RS_Color & c);
+               friend std::ostream & operator<<(std::ostream & os, const Color & c);
 };
 
 #endif
index c1b33b3be1991afc8e440fe50f29bb523263603c..f88aeb1a119b1dcb31f791c5e3c4286fb7e2bd2e 100644 (file)
@@ -22,7 +22,7 @@
  *
  * @param cmd the command that was triggered.
  */
-RS_CommandEvent::RS_CommandEvent(const QString & cmd)
+CommandEvent::CommandEvent(const QString & cmd)
 {
        this->cmd = cmd;
        accepted = false;
@@ -32,7 +32,7 @@ RS_CommandEvent::RS_CommandEvent(const QString & cmd)
  * @return the command that was triggered, usually by
  * the user.
  */
-QString RS_CommandEvent::getCommand()
+QString CommandEvent::getCommand()
 {
        return cmd;
 }
@@ -40,7 +40,7 @@ QString RS_CommandEvent::getCommand()
 /**
  * Sets the event state to accepted.
  */
-void RS_CommandEvent::accept()
+void CommandEvent::accept()
 {
        accepted = true;
 }
@@ -48,7 +48,7 @@ void RS_CommandEvent::accept()
 /**
  * @return Whether the event was already accepted or not.
  */
-bool RS_CommandEvent::isAccepted()
+bool CommandEvent::isAccepted()
 {
        return accepted;
 }
index 0eaefd569aa1bf8d0f70cb7f395b5f35e42fd6d1..dced82abf796ae83b7cc91ce5a0f76a12cb9463c 100644 (file)
@@ -6,10 +6,10 @@
 /**
  * Command Events.
  */
-class RS_CommandEvent
+class CommandEvent
 {
        public:
-               RS_CommandEvent(const QString & cmd);
+               CommandEvent(const QString & cmd);
 
                QString getCommand();
                void accept();
index 877a64d422137ccff6180b6f4575155756f8f6bc..923fca2f547b808c9f76f97f418070ce9f96969a 100644 (file)
@@ -22,8 +22,8 @@
 /**
  * Constructor.
  */
-RS_ConstructionLine::RS_ConstructionLine(RS_EntityContainer * parent,
-       const RS_ConstructionLineData & d): RS_AtomicEntity(parent), data(d)
+ConstructionLine::ConstructionLine(EntityContainer * parent,
+       const ConstructionLineData & d): AtomicEntity(parent), data(d)
 {
        calculateBorders();
 }
@@ -31,19 +31,19 @@ RS_ConstructionLine::RS_ConstructionLine(RS_EntityContainer * parent,
 /**
  * Destructor.
  */
-RS_ConstructionLine::~RS_ConstructionLine()
+ConstructionLine::~ConstructionLine()
 {
 }
 
-RS_Entity * RS_ConstructionLine::clone()
+Entity * ConstructionLine::clone()
 {
-       RS_ConstructionLine * c = new RS_ConstructionLine(*this);
+       ConstructionLine * c = new ConstructionLine(*this);
        c->initId();
        return c;
 }
 
 /**    @return RS2::EntityConstructionLine */
-/*virtual*/ RS2::EntityType RS_ConstructionLine::rtti() const
+/*virtual*/ RS2::EntityType ConstructionLine::rtti() const
 {
        return RS2::EntityConstructionLine;
 }
@@ -52,7 +52,7 @@ RS_Entity * RS_ConstructionLine::clone()
  * @todo
  * @return Start point of the entity.
  */
-/*virtual*/ Vector RS_ConstructionLine::getStartpoint() const
+/*virtual*/ Vector ConstructionLine::getStartpoint() const
 {
        return Vector(false);
 }
@@ -61,35 +61,35 @@ RS_Entity * RS_ConstructionLine::clone()
  * @todo
  * @return End point of the entity.
  */
-/*virtual*/ Vector RS_ConstructionLine::getEndpoint() const
+/*virtual*/ Vector ConstructionLine::getEndpoint() const
 {
        return Vector(false);
 }
 
 /** @return Copy of data that defines the line. */
-RS_ConstructionLineData RS_ConstructionLine::getData() const
+ConstructionLineData ConstructionLine::getData() const
 {
        return data;
 }
 
 /** @return First definition point. */
-Vector RS_ConstructionLine::getPoint1() const
+Vector ConstructionLine::getPoint1() const
 {
        return data.point1;
 }
 /** @return Second definition point. */
-Vector RS_ConstructionLine::getPoint2() const
+Vector ConstructionLine::getPoint2() const
 {
        return data.point2;
 }
 
-void RS_ConstructionLine::calculateBorders()
+void ConstructionLine::calculateBorders()
 {
        minV = Vector::minimum(data.point1, data.point2);
        maxV = Vector::maximum(data.point1, data.point2);
 }
 
-Vector RS_ConstructionLine::getNearestEndpoint(const Vector & coord, double * dist)
+Vector ConstructionLine::getNearestEndpoint(const Vector & coord, double * dist)
 {
        double dist1, dist2;
        Vector * nearerPoint;
@@ -115,8 +115,8 @@ Vector RS_ConstructionLine::getNearestEndpoint(const Vector & coord, double * di
        return *nearerPoint;
 }
 
-Vector RS_ConstructionLine::getNearestPointOnEntity(const Vector & coord,
-       bool /*onEntity*/, double * /*dist*/, RS_Entity ** entity)
+Vector ConstructionLine::getNearestPointOnEntity(const Vector & coord,
+       bool /*onEntity*/, double * /*dist*/, Entity ** entity)
 {
        if (entity != NULL)
                *entity = this;
@@ -136,7 +136,7 @@ Vector RS_ConstructionLine::getNearestPointOnEntity(const Vector & coord,
        return data.point1 + ba;
 }
 
-Vector RS_ConstructionLine::getNearestCenter(const Vector & /*coord*/, double * dist)
+Vector ConstructionLine::getNearestCenter(const Vector & /*coord*/, double * dist)
 {
        if (dist != NULL)
                *dist = RS_MAXDOUBLE;
@@ -144,7 +144,7 @@ Vector RS_ConstructionLine::getNearestCenter(const Vector & /*coord*/, double *
        return Vector(false);
 }
 
-Vector RS_ConstructionLine::getNearestMiddle(const Vector & /*coord*/, double * dist)
+Vector ConstructionLine::getNearestMiddle(const Vector & /*coord*/, double * dist)
 {
        if (dist != NULL)
                *dist = RS_MAXDOUBLE;
@@ -152,7 +152,7 @@ Vector RS_ConstructionLine::getNearestMiddle(const Vector & /*coord*/, double *
        return Vector(false);
 }
 
-Vector RS_ConstructionLine::getNearestDist(double /*distance*/, const Vector & /*coord*/,
+Vector ConstructionLine::getNearestDist(double /*distance*/, const Vector & /*coord*/,
        double * dist)
 {
        if (dist != NULL)
@@ -161,11 +161,11 @@ Vector RS_ConstructionLine::getNearestDist(double /*distance*/, const Vector & /
        return Vector(false);
 }
 
-double RS_ConstructionLine::getDistanceToPoint(const Vector& coord,
-        RS_Entity** entity,
+double ConstructionLine::getDistanceToPoint(const Vector& coord,
+        Entity** entity,
         RS2::ResolveLevel /*level*/, double /*solidDist*/)
 {
-       RS_DEBUG->print("RS_ConstructionLine::getDistanceToPoint");
+       DEBUG->print("ConstructionLine::getDistanceToPoint");
 
        if (entity != NULL)
                *entity = this;
@@ -180,11 +180,11 @@ double RS_ConstructionLine::getDistanceToPoint(const Vector& coord,
                return dist;
 
        // Orthogonal projection from both sides:
-       Vector ba = ae * Vector::dotP(ae, ap) / RS_Math::pow(ae.magnitude(), 2);
-       Vector be = ea * Vector::dotP(ea, ep) / RS_Math::pow(ea.magnitude(), 2);
+       Vector ba = ae * Vector::dotP(ae, ap) / Math::pow(ae.magnitude(), 2);
+       Vector be = ea * Vector::dotP(ea, ep) / Math::pow(ea.magnitude(), 2);
 
-       RS_DEBUG->print("ba: %f", ba.magnitude());
-       RS_DEBUG->print("ae: %f", ae.magnitude());
+       DEBUG->print("ba: %f", ba.magnitude());
+       DEBUG->print("ae: %f", ae.magnitude());
 
        Vector cp = Vector::crossP(ap, ae);
        dist = cp.magnitude() / ae.magnitude();
@@ -192,41 +192,41 @@ double RS_ConstructionLine::getDistanceToPoint(const Vector& coord,
        return dist;
 }
 
-void RS_ConstructionLine::move(Vector offset)
+void ConstructionLine::move(Vector offset)
 {
        data.point1.move(offset);
        data.point2.move(offset);
        //calculateBorders();
 }
 
-void RS_ConstructionLine::rotate(Vector center, double angle)
+void ConstructionLine::rotate(Vector center, double angle)
 {
        data.point1.rotate(center, angle);
        data.point2.rotate(center, angle);
        //calculateBorders();
 }
 
-void RS_ConstructionLine::scale(Vector center, Vector factor)
+void ConstructionLine::scale(Vector center, Vector factor)
 {
        data.point1.scale(center, factor);
        data.point2.scale(center, factor);
        //calculateBorders();
 }
 
-void RS_ConstructionLine::mirror(Vector axisPoint1, Vector axisPoint2)
+void ConstructionLine::mirror(Vector axisPoint1, Vector axisPoint2)
 {
        data.point1.mirror(axisPoint1, axisPoint2);
        data.point2.mirror(axisPoint1, axisPoint2);
 }
 
-/*virtual*/ void RS_ConstructionLine::draw(PaintInterface *, GraphicView *, double)
+/*virtual*/ void ConstructionLine::draw(PaintInterface *, GraphicView *, double)
 {
 }
 
 /**
  * Dumps the point's data to stdout.
  */
-std::ostream & operator<<(std::ostream & os, const RS_ConstructionLine & l)
+std::ostream & operator<<(std::ostream & os, const ConstructionLine & l)
 {
        os << " ConstructionLine: " << l.getData() << "\n";
        return os;
index e51a693ef0b3866691d240f7a55489122a2a2a64..e470c23c365107d2dbf469bf5404f2b201d7d091 100644 (file)
@@ -8,23 +8,23 @@
  * Holds the data that defines a construction line (a line
  * which is not limited to both directions).
  */
-class RS_ConstructionLineData
+class ConstructionLineData
 {
        public:
                /**
                 * Default constructor. Leaves the data object uninitialized.
                 */
-               RS_ConstructionLineData() {}
+               ConstructionLineData() {}
 
-               RS_ConstructionLineData(const Vector & point1, const Vector & point2)
+               ConstructionLineData(const Vector & point1, const Vector & point2)
                {
                        this->point1 = point1;
                        this->point2 = point2;
                }
 
-               friend class RS_ConstructionLine;
+               friend class ConstructionLine;
 
-               friend std::ostream & operator<<(std::ostream & os, const RS_ConstructionLineData & ld)
+               friend std::ostream & operator<<(std::ostream & os, const ConstructionLineData & ld)
                {
                        os << "(" << ld.point1 <<
                        "/" << ld.point2 <<
@@ -42,27 +42,27 @@ class RS_ConstructionLineData
  *
  * @author Andrew Mustun
  */
-class RS_ConstructionLine: public RS_AtomicEntity
+class ConstructionLine: public AtomicEntity
 {
        public:
-               RS_ConstructionLine(RS_EntityContainer * parent, const RS_ConstructionLineData & d);
-               virtual ~RS_ConstructionLine();
+               ConstructionLine(EntityContainer * parent, const ConstructionLineData & d);
+               virtual ~ConstructionLine();
 
-               virtual RS_Entity * clone();
+               virtual Entity * clone();
                virtual RS2::EntityType rtti() const;
                virtual Vector getStartpoint() const;
                virtual Vector getEndpoint() const;
-               RS_ConstructionLineData getData() const;
+               ConstructionLineData getData() const;
                Vector getPoint1() const;
                Vector getPoint2() const;
                virtual Vector getNearestEndpoint(const Vector & coord, double * dist = NULL);
                virtual Vector getNearestPointOnEntity(const Vector & coord,
-                       bool onEntity = true, double * dist = NULL, RS_Entity ** entity = NULL);
+                       bool onEntity = true, double * dist = NULL, Entity ** entity = NULL);
                virtual Vector getNearestCenter(const Vector & coord, double * dist = NULL);
                virtual Vector getNearestMiddle(const Vector & coord, double * dist = NULL);
                virtual Vector getNearestDist(double distance, const Vector & coord,
                        double * dist = NULL);
-               virtual double getDistanceToPoint(const Vector & coord, RS_Entity ** entity = NULL,
+               virtual double getDistanceToPoint(const Vector & coord, Entity ** entity = NULL,
                        RS2::ResolveLevel level = RS2::ResolveNone, double solidDist = RS_MAXDOUBLE);
                virtual void move(Vector offset);
                virtual void rotate(Vector center, double angle);
@@ -71,11 +71,11 @@ class RS_ConstructionLine: public RS_AtomicEntity
                virtual void draw(PaintInterface * /*painter*/, GraphicView * /*view*/,
                        double /*patternOffset*/);
 
-               friend std::ostream & operator<<(std::ostream & os, const RS_ConstructionLine & l);
+               friend std::ostream & operator<<(std::ostream & os, const ConstructionLine & l);
                virtual void calculateBorders();
 
        protected:
-               RS_ConstructionLineData data;
+               ConstructionLineData data;
 };
 
 #endif
index b6f9d79eb33d8f3867b717c4d729c95b3a0e7776..55051b4d6b31474b47f5990ae4c88c8a5c6bd3e0 100644 (file)
@@ -32,7 +32,7 @@
  *        entities. Usually that's an Drawing entity but
  *        it can also be a polyline, text, ...
  */
-RS_Creation::RS_Creation(RS_EntityContainer * container, GraphicView * graphicView,
+Creation::Creation(EntityContainer * container, GraphicView * graphicView,
        bool handleUndo)
 {
        this->container = container;
@@ -61,8 +61,8 @@ RS_Creation::RS_Creation(RS_EntityContainer * container, GraphicView * graphicVi
  *
  * @param p position
  */
-/*void RS_Creation::createPoint(const Vector& p) {
-    entityContainer->addEntity(new RS_Point(entityContainer, p));
+/*void Creation::createPoint(const Vector& p) {
+    entityContainer->addEntity(new Point(entityContainer, p));
 }*/
 
 /**
@@ -76,9 +76,9 @@ RS_Creation::RS_Creation(RS_EntityContainer * container, GraphicView * graphicVi
  * @param p1 start point
  * @param p2 end point
  */
-/*void RS_Creation::createLine2P(const Vector& p1, const Vector& p2) {
-    entityContainer->addEntity(new RS_Line(entityContainer,
-                                           RS_LineData(p1, p2)));
+/*void Creation::createLine2P(const Vector& p1, const Vector& p2) {
+    entityContainer->addEntity(new Line(entityContainer,
+                                           LineData(p1, p2)));
 }*/
 
 /**
@@ -92,17 +92,17 @@ RS_Creation::RS_Creation(RS_EntityContainer * container, GraphicView * graphicVi
  * @param p1 edge one
  * @param p2 edge two
  */
-/*void RS_Creation::createRectangle(const Vector& e1, const Vector& e2) {
+/*void Creation::createRectangle(const Vector& e1, const Vector& e2) {
     Vector e21(e2.x, e1.y);
     Vector e12(e1.x, e2.y);
-    entityContainer->addEntity(new RS_Line(entityContainer,
-                                           RS_LineData(e1, e12)));
-    entityContainer->addEntity(new RS_Line(entityContainer,
-                                           RS_LineData(e12, e2)));
-    entityContainer->addEntity(new RS_Line(entityContainer,
-                                           RS_LineData(e2, e21)));
-    entityContainer->addEntity(new RS_Line(entityContainer,
-                                           RS_LineData(e21, e1)));
+    entityContainer->addEntity(new Line(entityContainer,
+                                           LineData(e1, e12)));
+    entityContainer->addEntity(new Line(entityContainer,
+                                           LineData(e12, e2)));
+    entityContainer->addEntity(new Line(entityContainer,
+                                           LineData(e2, e21)));
+    entityContainer->addEntity(new Line(entityContainer,
+                                           LineData(e21, e1)));
 }*/
 
 /**
@@ -112,16 +112,16 @@ RS_Creation::RS_Creation(RS_EntityContainer * container, GraphicView * graphicVi
  *
  * E.g.:<br>
  * <code>
- * RS_Polyline *pl = creation.createPolyline(Vector(25.0, 55.0));<br>
+ * Polyline *pl = creation.createPolyline(Vector(25.0, 55.0));<br>
  * pl->addVertex(Vector(50.0, 75.0));<br>
  * </code>
  *
  * @param entities array of entities
  * @param startPoint Start point of the polyline
  */
-/*RS_Polyline* RS_Creation::createPolyline(const Vector& startPoint) {
-    RS_Polyline* pl = new RS_Polyline(entityContainer,
-               RS_PolylineData(startPoint, Vector(0.0,0.0), 0));
+/*Polyline* Creation::createPolyline(const Vector& startPoint) {
+    Polyline* pl = new Polyline(entityContainer,
+               PolylineData(startPoint, Vector(0.0,0.0), 0));
     entityContainer->addEntity(pl);
     return pl;
 }*/
@@ -138,7 +138,7 @@ RS_Creation::RS_Creation(RS_EntityContainer * container, GraphicView * graphicVi
  * @return Pointer to the first created parallel or NULL if no
  *    parallel has been created.
  */
-RS_Entity * RS_Creation::createParallelThrough(const Vector & coord, int number, RS_Entity * e)
+Entity * Creation::createParallelThrough(const Vector & coord, int number, Entity * e)
 {
        if (e == NULL)
                return NULL;
@@ -147,8 +147,8 @@ RS_Entity * RS_Creation::createParallelThrough(const Vector & coord, int number,
 
        if (e->rtti() == RS2::EntityLine)
        {
-               RS_Line * l = (RS_Line *)e;
-               RS_ConstructionLine cl(NULL, RS_ConstructionLineData(l->getStartpoint(),
+               Line * l = (Line *)e;
+               ConstructionLine cl(NULL, ConstructionLineData(l->getStartpoint(),
                        l->getEndpoint()));
                dist = cl.getDistanceToPoint(coord);
        }
@@ -178,24 +178,24 @@ RS_Entity * RS_Creation::createParallelThrough(const Vector & coord, int number,
  * @return Pointer to the first created parallel or NULL if no
  *    parallel has been created.
  */
-RS_Entity* RS_Creation::createParallel(const Vector& coord,
+Entity* Creation::createParallel(const Vector& coord,
                                        double distance, int number,
-                                       RS_Entity* e) {
+                                       Entity* e) {
     if (e==NULL) {
         return NULL;
     }
 
     switch (e->rtti()) {
     case RS2::EntityLine:
-        return createParallelLine(coord, distance, number, (RS_Line*)e);
+        return createParallelLine(coord, distance, number, (Line*)e);
         break;
 
     case RS2::EntityArc:
-        return createParallelArc(coord, distance, number, (RS_Arc*)e);
+        return createParallelArc(coord, distance, number, (Arc*)e);
         break;
 
     case RS2::EntityCircle:
-        return createParallelCircle(coord, distance, number, (RS_Circle*)e);
+        return createParallelCircle(coord, distance, number, (Circle*)e);
         break;
 
     default:
@@ -221,9 +221,9 @@ RS_Entity* RS_Creation::createParallel(const Vector& coord,
  * @return Pointer to the first created parallel or NULL if no
  *    parallel has been created.
  */
-RS_Line* RS_Creation::createParallelLine(const Vector& coord,
+Line* Creation::createParallelLine(const Vector& coord,
         double distance, int number,
-        RS_Line* e) {
+        Line* e) {
 
     if (e==NULL) {
         return NULL;
@@ -231,8 +231,8 @@ RS_Line* RS_Creation::createParallelLine(const Vector& coord,
 
     double ang = e->getAngle1() + M_PI/2.0;
     Vector p1, p2;
-    RS_LineData parallelData;
-    RS_Line* ret = NULL;
+    LineData parallelData;
+    Line* ret = NULL;
 
     if (document!=NULL && handleUndo) {
         document->startUndoCycle();
@@ -245,14 +245,14 @@ RS_Line* RS_Creation::createParallelLine(const Vector& coord,
         p1 += e->getStartpoint();
         p2.setPolar(distance*num, ang);
         p2 += e->getEndpoint();
-        RS_Line parallel1(NULL, RS_LineData(p1, p2));
+        Line parallel1(NULL, LineData(p1, p2));
 
         // calculate 2nd parallel:
         p1.setPolar(distance*num, ang+M_PI);
         p1 += e->getStartpoint();
         p2.setPolar(distance*num, ang+M_PI);
         p2 += e->getEndpoint();
-        RS_Line parallel2(NULL, RS_LineData(p1, p2));
+        Line parallel2(NULL, LineData(p1, p2));
 
         double dist1 = parallel1.getDistanceToPoint(coord);
         double dist2 = parallel2.getDistanceToPoint(coord);
@@ -266,7 +266,7 @@ RS_Line* RS_Creation::createParallelLine(const Vector& coord,
             }
 
 
-            RS_Line* newLine = new RS_Line(container, parallelData);
+            Line* newLine = new Line(container, parallelData);
             newLine->setLayerToActive();
             newLine->setPenToActive();
             if (ret==NULL) {
@@ -308,16 +308,16 @@ RS_Line* RS_Creation::createParallelLine(const Vector& coord,
  * @return Pointer to the first created parallel or NULL if no
  *    parallel has been created.
  */
-RS_Arc* RS_Creation::createParallelArc(const Vector& coord,
+Arc* Creation::createParallelArc(const Vector& coord,
                                        double distance, int number,
-                                       RS_Arc* e) {
+                                       Arc* e) {
 
     if (e==NULL) {
         return NULL;
     }
 
-    RS_ArcData parallelData;
-    RS_Arc* ret = NULL;
+    ArcData parallelData;
+    Arc* ret = NULL;
 
     bool inside = (e->getCenter().distanceTo(coord) < e->getRadius());
 
@@ -329,7 +329,7 @@ RS_Arc* RS_Creation::createParallelArc(const Vector& coord,
 
         // calculate parallel:
         bool ok = true;
-        RS_Arc parallel1(NULL, e->getData());
+        Arc parallel1(NULL, e->getData());
         parallel1.setRadius(e->getRadius() + distance*num);
         if (parallel1.getRadius()<0.0) {
             parallel1.setRadius(RS_MAXDOUBLE);
@@ -337,7 +337,7 @@ RS_Arc* RS_Creation::createParallelArc(const Vector& coord,
         }
 
         // calculate 2nd parallel:
-        //RS_Arc parallel2(NULL, e->getData());
+        //Arc parallel2(NULL, e->getData());
         //parallel2.setRadius(e->getRadius()+distance*num);
 
         //double dist1 = parallel1.getDistanceToPoint(coord);
@@ -356,7 +356,7 @@ RS_Arc* RS_Creation::createParallelArc(const Vector& coord,
                 document->startUndoCycle();
             }
 
-            RS_Arc* newArc = new RS_Arc(container, parallelData);
+            Arc* newArc = new Arc(container, parallelData);
             newArc->setLayerToActive();
             newArc->setPenToActive();
             if (ret==NULL) {
@@ -394,16 +394,16 @@ RS_Arc* RS_Creation::createParallelArc(const Vector& coord,
  * @return Pointer to the first created parallel or NULL if no
  *    parallel has been created.
  */
-RS_Circle* RS_Creation::createParallelCircle(const Vector& coord,
+Circle* Creation::createParallelCircle(const Vector& coord,
         double distance, int number,
-        RS_Circle* e) {
+        Circle* e) {
 
     if (e==NULL) {
         return NULL;
     }
 
-    RS_CircleData parallelData;
-    RS_Circle* ret = NULL;
+    CircleData parallelData;
+    Circle* ret = NULL;
 
     bool inside = (e->getCenter().distanceTo(coord) < e->getRadius());
 
@@ -415,7 +415,7 @@ RS_Circle* RS_Creation::createParallelCircle(const Vector& coord,
 
         // calculate parallel:
         bool ok = true;
-        RS_Circle parallel1(NULL, e->getData());
+        Circle parallel1(NULL, e->getData());
         parallel1.setRadius(e->getRadius() + distance*num);
         if (parallel1.getRadius()<0.0) {
             parallel1.setRadius(RS_MAXDOUBLE);
@@ -423,7 +423,7 @@ RS_Circle* RS_Creation::createParallelCircle(const Vector& coord,
         }
 
         // calculate 2nd parallel:
-        //RS_Circle parallel2(NULL, e->getData());
+        //Circle parallel2(NULL, e->getData());
         //parallel2.setRadius(e->getRadius()+distance*num);
 
         //double dist1 = parallel1.getDistanceToPoint(coord);
@@ -442,7 +442,7 @@ RS_Circle* RS_Creation::createParallelCircle(const Vector& coord,
                 document->startUndoCycle();
             }
 
-            RS_Circle* newCircle = new RS_Circle(container, parallelData);
+            Circle* newCircle = new Circle(container, parallelData);
             newCircle->setLayerToActive();
             newCircle->setPenToActive();
             if (ret==NULL) {
@@ -480,15 +480,15 @@ RS_Circle* RS_Creation::createParallelCircle(const Vector& coord,
  * @return Pointer to the first bisector created or NULL if no bisectors
  *   were created.
  */
-RS_Line * RS_Creation::createBisector(const Vector & coord1, const Vector & coord2,
-       double length, int num, RS_Line * l1, RS_Line * l2)
+Line * Creation::createBisector(const Vector & coord1, const Vector & coord2,
+       double length, int num, Line * l1, Line * l2)
 {
        // check given entities:
        if (!l1 || !l2 || l1->rtti() != RS2::EntityLine || l2->rtti() != RS2::EntityLine)
                return NULL;
 
        // intersection between entities:
-       VectorSolutions sol = RS_Information::getIntersection(l1, l2, false);
+       VectorSolutions sol = Information::getIntersection(l1, l2, false);
        Vector inters = sol.get(0);
 
        if (!inters.valid)
@@ -496,12 +496,12 @@ RS_Line * RS_Creation::createBisector(const Vector & coord1, const Vector & coor
 
        double angle1 = inters.angleTo(l1->getNearestPointOnEntity(coord1));
        double angle2 = inters.angleTo(l2->getNearestPointOnEntity(coord2));
-       double angleDiff = RS_Math::getAngleDifference(angle1, angle2);
+       double angleDiff = Math::getAngleDifference(angle1, angle2);
 
        if (angleDiff > M_PI)
                angleDiff = angleDiff - 2 * M_PI;
 
-       RS_Line * ret = NULL;
+       Line * ret = NULL;
 
        if (document && handleUndo)
                document->startUndoCycle();
@@ -511,8 +511,8 @@ RS_Line * RS_Creation::createBisector(const Vector & coord1, const Vector & coor
                double angle = angle1 + (angleDiff / (num + 1) * n);
                Vector v;
                v.setPolar(length, angle);
-               RS_LineData d = RS_LineData(inters, inters + v);
-               RS_Line * newLine = new RS_Line(container, d);
+               LineData d = LineData(inters, inters + v);
+               Line * newLine = new Line(container, d);
 
                if (container)
                {
@@ -549,10 +549,10 @@ RS_Line * RS_Creation::createBisector(const Vector & coord1, const Vector & coor
  * @param point Point.
  * @param circle Circle, arc or ellipse entity.
  */
-RS_Line* RS_Creation::createTangent1(const Vector& coord,
+Line* Creation::createTangent1(const Vector& coord,
                                      const Vector& point,
-                                     RS_Entity* circle) {
-    RS_Line* ret = NULL;
+                                     Entity* circle) {
+    Line* ret = NULL;
     Vector circleCenter;
 
     // check given entities:
@@ -564,11 +564,11 @@ RS_Line* RS_Creation::createTangent1(const Vector& coord,
     }
 
     if (circle->rtti()==RS2::EntityCircle) {
-        circleCenter = ((RS_Circle*)circle)->getCenter();
+        circleCenter = ((Circle*)circle)->getCenter();
     } else if (circle->rtti()==RS2::EntityArc) {
-        circleCenter = ((RS_Arc*)circle)->getCenter();
+        circleCenter = ((Arc*)circle)->getCenter();
     } else if (circle->rtti()==RS2::EntityEllipse) {
-        circleCenter = ((RS_Ellipse*)circle)->getCenter();
+        circleCenter = ((Ellipse*)circle)->getCenter();
     }
 
     // the two tangent points:
@@ -580,15 +580,15 @@ RS_Line* RS_Creation::createTangent1(const Vector& coord,
         Vector tCenter = (point + circleCenter)/2.0;
         double tRadius = point.distanceTo(tCenter);
 
-        RS_Circle tmp(NULL, RS_CircleData(tCenter, tRadius));
+        Circle tmp(NULL, CircleData(tCenter, tRadius));
 
         // get the two intersection points which are the tangent points:
-        sol = RS_Information::getIntersection(&tmp, circle, false);
+        sol = Information::getIntersection(&tmp, circle, false);
     }
 
     // calculate tangent points for ellipses:
     else {
-        RS_Ellipse* el = (RS_Ellipse*)circle;
+        Ellipse* el = (Ellipse*)circle;
         sol.alloc(2);
         //sol.set(0, circleCenter);
         //sol.set(1, circleCenter);
@@ -643,14 +643,14 @@ RS_Line* RS_Creation::createTangent1(const Vector& coord,
     }
 
     // create all possible tangents:
-    RS_Line* poss[2];
+    Line* poss[2];
 
-    RS_LineData d;
+    LineData d;
 
-    d = RS_LineData(sol.get(0), point);
-    poss[0] = new RS_Line(NULL, d);
-    d = RS_LineData(sol.get(1), point);
-    poss[1] = new RS_Line(NULL, d);
+    d = LineData(sol.get(0), point);
+    poss[0] = new Line(NULL, d);
+    d = LineData(sol.get(1), point);
+    poss[1] = new Line(NULL, d);
 
     // find closest tangent:
     double minDist = RS_MAXDOUBLE;
@@ -666,7 +666,7 @@ RS_Line* RS_Creation::createTangent1(const Vector& coord,
 
     // create the closest tangent:
     if (idx!=-1) {
-        RS_LineData d = poss[idx]->getData();
+        LineData d = poss[idx]->getData();
 
         for (int i=0; i<2; ++i) {
             delete poss[i];
@@ -676,7 +676,7 @@ RS_Line* RS_Creation::createTangent1(const Vector& coord,
             document->startUndoCycle();
         }
 
-        ret = new RS_Line(container, d);
+        ret = new Line(container, d);
         ret->setLayerToActive();
         ret->setPenToActive();
         if (container!=NULL) {
@@ -708,10 +708,10 @@ RS_Line* RS_Creation::createTangent1(const Vector& coord,
  * @param circle1 1st circle or arc entity.
  * @param circle2 2nd circle or arc entity.
  */
-RS_Line* RS_Creation::createTangent2(const Vector& coord,
-                                     RS_Entity* circle1,
-                                     RS_Entity* circle2) {
-    RS_Line* ret = NULL;
+Line* Creation::createTangent2(const Vector& coord,
+                                     Entity* circle1,
+                                     Entity* circle2) {
+    Line* ret = NULL;
     Vector circleCenter1;
     Vector circleCenter2;
     double circleRadius1 = 0.0;
@@ -728,28 +728,28 @@ RS_Line* RS_Creation::createTangent2(const Vector& coord,
     }
 
     if (circle1->rtti()==RS2::EntityCircle) {
-        circleCenter1 = ((RS_Circle*)circle1)->getCenter();
-        circleRadius1 = ((RS_Circle*)circle1)->getRadius();
+        circleCenter1 = ((Circle*)circle1)->getCenter();
+        circleRadius1 = ((Circle*)circle1)->getRadius();
     } else if (circle1->rtti()==RS2::EntityArc) {
-        circleCenter1 = ((RS_Arc*)circle1)->getCenter();
-        circleRadius1 = ((RS_Arc*)circle1)->getRadius();
+        circleCenter1 = ((Arc*)circle1)->getCenter();
+        circleRadius1 = ((Arc*)circle1)->getRadius();
     }
 
     if (circle2->rtti()==RS2::EntityCircle) {
-        circleCenter2 = ((RS_Circle*)circle2)->getCenter();
-        circleRadius2 = ((RS_Circle*)circle2)->getRadius();
+        circleCenter2 = ((Circle*)circle2)->getCenter();
+        circleRadius2 = ((Circle*)circle2)->getRadius();
     } else if (circle2->rtti()==RS2::EntityArc) {
-        circleCenter2 = ((RS_Arc*)circle2)->getCenter();
-        circleRadius2 = ((RS_Arc*)circle2)->getRadius();
+        circleCenter2 = ((Arc*)circle2)->getCenter();
+        circleRadius2 = ((Arc*)circle2)->getRadius();
     }
 
     // create all possible tangents:
-    RS_Line* poss[4];
+    Line* poss[4];
     for (int i=0; i<4; ++i) {
         poss[i] = NULL;
     }
 
-    RS_LineData d;
+    LineData d;
 
     double angle1 = circleCenter1.angleTo(circleCenter2);
     double dist1 = circleCenter1.distanceTo(circleCenter2);
@@ -767,17 +767,17 @@ RS_Line* RS_Creation::createTangent2(const Vector& coord,
             offs1.setPolar(circleRadius1, angt1);
             offs2.setPolar(circleRadius2, angt1);
 
-            d = RS_LineData(circleCenter1 + offs1,
+            d = LineData(circleCenter1 + offs1,
                             circleCenter2 + offs2);
-            poss[0] = new RS_Line(NULL, d);
+            poss[0] = new Line(NULL, d);
 
 
             offs1.setPolar(circleRadius1, angt2);
             offs2.setPolar(circleRadius2, angt2);
 
-            d = RS_LineData(circleCenter1 + offs1,
+            d = LineData(circleCenter1 + offs1,
                             circleCenter2 + offs2);
-            poss[1] = new RS_Line(NULL, d);
+            poss[1] = new Line(NULL, d);
         }
 
         // inner tangents:
@@ -792,17 +792,17 @@ RS_Line* RS_Creation::createTangent2(const Vector& coord,
             offs1.setPolar(circleRadius1, angt3);
             offs2.setPolar(circleRadius2, angt3);
 
-            d = RS_LineData(circleCenter1 - offs1,
+            d = LineData(circleCenter1 - offs1,
                             circleCenter2 + offs2);
-            poss[2] = new RS_Line(NULL, d);
+            poss[2] = new Line(NULL, d);
 
 
             offs1.setPolar(circleRadius1, angt4);
             offs2.setPolar(circleRadius2, angt4);
 
-            d = RS_LineData(circleCenter1 - offs1,
+            d = LineData(circleCenter1 - offs1,
                             circleCenter2 + offs2);
-            poss[3] = new RS_Line(NULL, d);
+            poss[3] = new Line(NULL, d);
         }
 
     }
@@ -822,7 +822,7 @@ RS_Line* RS_Creation::createTangent2(const Vector& coord,
     }
 
     if (idx!=-1) {
-        RS_LineData d = poss[idx]->getData();
+        LineData d = poss[idx]->getData();
         for (int i=0; i<4; ++i) {
             if (poss[i]!=NULL) {
                 delete poss[i];
@@ -833,7 +833,7 @@ RS_Line* RS_Creation::createTangent2(const Vector& coord,
             document->startUndoCycle();
         }
 
-        ret = new RS_Line(container, d);
+        ret = new Line(container, d);
         ret->setLayerToActive();
         ret->setPenToActive();
         if (container!=NULL) {
@@ -864,8 +864,8 @@ RS_Line* RS_Creation::createTangent2(const Vector& coord,
  * @param angle Angle of the line relative to the angle of the basis entity.
  * @param length Length of the line we're creating.
  */
-RS_Line* RS_Creation::createLineRelAngle(const Vector& coord,
-        RS_Entity* entity,
+Line* Creation::createLineRelAngle(const Vector& coord,
+        Entity* entity,
         double angle,
         double length) {
 
@@ -881,13 +881,13 @@ RS_Line* RS_Creation::createLineRelAngle(const Vector& coord,
 
     switch (entity->rtti()) {
     case RS2::EntityLine:
-        a1 = ((RS_Line*)entity)->getAngle1();
+        a1 = ((Line*)entity)->getAngle1();
         break;
     case RS2::EntityArc:
-        a1 = ((RS_Arc*)entity)->getCenter().angleTo(coord) + M_PI/2.0;
+        a1 = ((Arc*)entity)->getCenter().angleTo(coord) + M_PI/2.0;
         break;
     case RS2::EntityCircle:
-        a1 = ((RS_Circle*)entity)->getCenter().angleTo(coord);
+        a1 = ((Circle*)entity)->getCenter().angleTo(coord);
         break;
     default:
         // never reached
@@ -898,15 +898,15 @@ RS_Line* RS_Creation::createLineRelAngle(const Vector& coord,
 
     Vector v1;
     v1.setPolar(length, a1);
-    //RS_ConstructionLineData(coord-v1, coord+v1);
-    RS_LineData d(coord-v1, coord+v1);
-    RS_Line* ret;
+    //ConstructionLineData(coord-v1, coord+v1);
+    LineData d(coord-v1, coord+v1);
+    Line* ret;
 
     if (document!=NULL && handleUndo) {
         document->startUndoCycle();
     }
 
-    ret = new RS_Line(container, d);
+    ret = new Line(container, d);
     ret->setLayerToActive();
     ret->setPenToActive();
     if (container!=NULL) {
@@ -931,7 +931,7 @@ RS_Line* RS_Creation::createLineRelAngle(const Vector& coord,
  * @param corner The first corner of the polygon
  * @param number Number of edges / corners.
  */
-RS_Line* RS_Creation::createPolygon(const Vector& center,
+Line* Creation::createPolygon(const Vector& center,
                                     const Vector& corner,
                                     int number) {
 
@@ -940,7 +940,7 @@ RS_Line* RS_Creation::createPolygon(const Vector& center,
         return NULL;
     }
 
-    RS_Line* ret = NULL;
+    Line* ret = NULL;
 
     if (document!=NULL && handleUndo) {
         document->startUndoCycle();
@@ -948,13 +948,13 @@ RS_Line* RS_Creation::createPolygon(const Vector& center,
 
     Vector c1(false);
     Vector c2 = corner;
-    RS_Line* line;
+    Line* line;
 
     for (int n=1; n<=number; ++n) {
         c1 = c2;
         c2 = c2.rotate(center, (M_PI*2)/number);
 
-        line = new RS_Line(container, RS_LineData(c1, c2));
+        line = new Line(container, LineData(c1, c2));
         line->setLayerToActive();
         line->setPenToActive();
 
@@ -989,7 +989,7 @@ RS_Line* RS_Creation::createPolygon(const Vector& center,
  * @param corner2 The second corner of the polygon.
  * @param number Number of edges / corners.
  */
-RS_Line* RS_Creation::createPolygon2(const Vector& corner1,
+Line* Creation::createPolygon2(const Vector& corner1,
                                      const Vector& corner2,
                                      int number) {
 
@@ -998,7 +998,7 @@ RS_Line* RS_Creation::createPolygon2(const Vector& corner1,
         return NULL;
     }
 
-    RS_Line* ret = NULL;
+    Line* ret = NULL;
 
     if (document!=NULL && handleUndo) {
         document->startUndoCycle();
@@ -1011,14 +1011,14 @@ RS_Line* RS_Creation::createPolygon2(const Vector& corner1,
     Vector c1(false);
     Vector c2 = corner1;
     Vector edge;
-    RS_Line* line;
+    Line* line;
 
     for (int n=1; n<=number; ++n) {
         c1 = c2;
         edge.setPolar(len, ang);
         c2 = c1 + edge;
 
-        line = new RS_Line(container, RS_LineData(c1, c2));
+        line = new Line(container, LineData(c1, c2));
         line->setLayerToActive();
         line->setPenToActive();
 
@@ -1052,14 +1052,14 @@ RS_Line* RS_Creation::createPolygon2(const Vector& corner1,
  *
  * @param data Insert data (position, block name, ..)
  */
-RS_Insert* RS_Creation::createInsert(RS_InsertData & data)
+Insert* Creation::createInsert(InsertData & data)
 {
-       RS_DEBUG->print("RS_Creation::createInsert");
+       DEBUG->print("Creation::createInsert");
 
        if (document != NULL && handleUndo)
                document->startUndoCycle();
 
-       RS_Insert * ins = new RS_Insert(container, data);
+       Insert * ins = new Insert(container, data);
        // inserts are also on layers
        ins->setLayerToActive();
        ins->setPenToActive();
@@ -1076,7 +1076,7 @@ RS_Insert* RS_Creation::createInsert(RS_InsertData & data)
        if (graphicView != NULL)
                graphicView->drawEntity(ins);
 
-       RS_DEBUG->print("RS_Creation::createInsert: OK");
+       DEBUG->print("Creation::createInsert: OK");
 
        return ins;
 }
@@ -1084,13 +1084,13 @@ RS_Insert* RS_Creation::createInsert(RS_InsertData & data)
 /**
  * Creates an image with the given data.
  */
-RS_Image* RS_Creation::createImage(RS_ImageData& data) {
+Image* Creation::createImage(ImageData& data) {
 
     if (document!=NULL && handleUndo) {
         document->startUndoCycle();
     }
 
-    RS_Image* img = new RS_Image(container, data);
+    Image* img = new Image(container, data);
     img->setLayerToActive();
     img->setPenToActive();
     img->update();
@@ -1116,7 +1116,7 @@ RS_Image* RS_Creation::createImage(RS_ImageData& data) {
  * @param name Block name
  * @param remove true: remove existing entities, false: don't touch entities
  */
-RS_Block * RS_Creation::createBlock(const RS_BlockData & data,
+Block * Creation::createBlock(const BlockData & data,
        const Vector & referencePoint, const bool remove)
 {
        // start undo cycle for the container if we're deleting the existing entities
@@ -1124,15 +1124,15 @@ RS_Block * RS_Creation::createBlock(const RS_BlockData & data,
                document->startUndoCycle();
        }
 
-       RS_Block* block =
-               new RS_Block(container,
-                                               RS_BlockData(data.name, data.basePoint, data.frozen));
+       Block* block =
+               new Block(container,
+                                               BlockData(data.name, data.basePoint, data.frozen));
 
        // copy entities into a block
-       for(RS_Entity * e=container->firstEntity(); e!=NULL; e=container->nextEntity())
+       for(Entity * e=container->firstEntity(); e!=NULL; e=container->nextEntity())
        {
                //for (uint i=0; i<container->count(); ++i) {
-               //RS_Entity* e = container->entityAt(i);
+               //Entity* e = container->entityAt(i);
 
                if (e && e->isSelected())
                {
@@ -1164,7 +1164,7 @@ RS_Block * RS_Creation::createBlock(const RS_BlockData & data,
                        }
 
                        // add entity to block:
-                       RS_Entity * c = e->clone();
+                       Entity * c = e->clone();
                        c->move(-referencePoint);
                        block->addEntity(c);
 
@@ -1192,21 +1192,21 @@ RS_Block * RS_Creation::createBlock(const RS_BlockData & data,
 /**
  * Inserts a library item from the given path into the drawing.
  */
-RS_Insert * RS_Creation::createLibraryInsert(RS_LibraryInsertData & data)
+Insert * Creation::createLibraryInsert(LibraryInsertData & data)
 {
-       RS_DEBUG->print("RS_Creation::createLibraryInsert");
+       DEBUG->print("Creation::createLibraryInsert");
        Drawing g;
 
        if (!g.open(data.file, RS2::FormatUnknown))
        {
-               RS_DEBUG->print(RS_Debug::D_WARNING, "RS_Creation::createLibraryInsert: Cannot open file: %s");
+               DEBUG->print(Debug::D_WARNING, "Creation::createLibraryInsert: Cannot open file: %s");
                return NULL;
        }
 
        // unit conversion:
        if (graphic != NULL)
        {
-               double uf = RS_Units::convert(1.0, g.getUnit(), graphic->getUnit());
+               double uf = Units::convert(1.0, g.getUnit(), graphic->getUnit());
                g.scale(Vector(0.0, 0.0), Vector(uf, uf));
        }
 
@@ -1216,10 +1216,10 @@ RS_Insert * RS_Creation::createLibraryInsert(RS_LibraryInsertData & data)
 //     QString s = QFileInfo(data.file).baseName(true);
        QString s = QFileInfo(data.file).completeBaseName();
 
-       RS_Modification m(*container, graphicView);
-       m.paste(RS_PasteData(data.insertionPoint, data.factor, data.angle, true, s), &g);
+       Modification m(*container, graphicView);
+       m.paste(PasteData(data.insertionPoint, data.factor, data.angle, true, s), &g);
 
-       RS_DEBUG->print("RS_Creation::createLibraryInsert: OK");
+       DEBUG->print("Creation::createLibraryInsert: OK");
 
        return NULL;
 }
index 35c8d3000fa57fd48986177f8b80a2e93cd6b7e7..3492f48db75449c6cad25693e0ce53c3cb35da32 100644 (file)
@@ -4,25 +4,25 @@
 #include <QtCore>
 #include "vector.h"
 
-class RS_Arc;
-class RS_Block;
-class RS_BlockData;
-class RS_Circle;
-class RS_Document;
+class Arc;
+class Block;
+class BlockData;
+class Circle;
+class Document;
 class Drawing;
-class RS_Entity;
-class RS_EntityContainer;
+class Entity;
+class EntityContainer;
 class GraphicView;
-class RS_Image;
-class RS_ImageData;
-class RS_Insert;
-class RS_InsertData;
-class RS_Line;
+class Image;
+class ImageData;
+class Insert;
+class InsertData;
+class Line;
 
 /**
  * Data needed to insert library items.
  */
-struct RS_LibraryInsertData
+struct LibraryInsertData
 {
        QString file;
        Vector insertionPoint;
@@ -37,59 +37,59 @@ struct RS_LibraryInsertData
  *
  * @author Andrew Mustun
  */
-class RS_Creation
+class Creation
 {
        public:
-               RS_Creation(RS_EntityContainer * container, GraphicView * graphicView = NULL,
+               Creation(EntityContainer * container, GraphicView * graphicView = NULL,
                        bool handleUndo = true);
 
-               RS_Entity * createParallelThrough(const Vector & coord, int number,
-                       RS_Entity * e);
+               Entity * createParallelThrough(const Vector & coord, int number,
+                       Entity * e);
 
-               RS_Entity * createParallel(const Vector & coord, double distance,
-                       int number, RS_Entity * e);
+               Entity * createParallel(const Vector & coord, double distance,
+                       int number, Entity * e);
 
-               RS_Line * createParallelLine(const Vector & coord, double distance, int number,
-                       RS_Line * e);
+               Line * createParallelLine(const Vector & coord, double distance, int number,
+                       Line * e);
 
-               RS_Arc * createParallelArc(const Vector & coord, double distance, int number,
-                       RS_Arc * e);
+               Arc * createParallelArc(const Vector & coord, double distance, int number,
+                       Arc * e);
 
-               RS_Circle * createParallelCircle(const Vector & coord, double distance, int number,
-                       RS_Circle * e);
+               Circle * createParallelCircle(const Vector & coord, double distance, int number,
+                       Circle * e);
 
-               RS_Line * createBisector(const Vector & coord1, const Vector & coord2, double length,
-                       int num, RS_Line * l1, RS_Line * l2);
+               Line * createBisector(const Vector & coord1, const Vector & coord2, double length,
+                       int num, Line * l1, Line * l2);
 
-               RS_Line * createTangent1(const Vector & coord, const Vector & point, RS_Entity * circle);
+               Line * createTangent1(const Vector & coord, const Vector & point, Entity * circle);
 
-               RS_Line * createTangent2(const Vector & coord, RS_Entity * circle1, RS_Entity * circle2);
+               Line * createTangent2(const Vector & coord, Entity * circle1, Entity * circle2);
 
-               RS_Line * createLineRelAngle(const Vector & coord, RS_Entity * entity,
+               Line * createLineRelAngle(const Vector & coord, Entity * entity,
                        double angle, double length);
 
-               RS_Line * createPolygon(const Vector & center, const Vector & corner, int number);
+               Line * createPolygon(const Vector & center, const Vector & corner, int number);
 
-               RS_Line * createPolygon2(const Vector & corner1, const Vector & corner2, int number);
+               Line * createPolygon2(const Vector & corner1, const Vector & corner2, int number);
 
-               RS_Insert * createInsert(RS_InsertData & data);
+               Insert * createInsert(InsertData & data);
 
-               RS_Image * createImage(RS_ImageData & data);
+               Image * createImage(ImageData & data);
 
-               RS_Block * createBlock(const RS_BlockData & data, const Vector & referencePoint,
+               Block * createBlock(const BlockData & data, const Vector & referencePoint,
                        const bool remove);
 
-               RS_Insert * createLibraryInsert(RS_LibraryInsertData & data);
+               Insert * createLibraryInsert(LibraryInsertData & data);
 
                //void createPoint(const Vector& p);
                //void createLine2P(const Vector& p1, const Vector& p2);
                //void createRectangle(const Vector& e1, const Vector& e2);
-               //RS_Polyline* createPolyline(const Vector& p);
+               //Polyline* createPolyline(const Vector& p);
 
        protected:
-               RS_EntityContainer * container;
+               EntityContainer * container;
                Drawing * graphic;
-               RS_Document * document;
+               Document * document;
                GraphicView * graphicView;
                bool handleUndo;
 };
index acfafaca02fc282614b0c33e9cf64faa16490b05..36cb5ef054306182422d9ed4af07e26f8362497a 100644 (file)
 #include <stdarg.h>
 #include "system.h"
 
-RS_Debug * RS_Debug::uniqueInstance = NULL;
+Debug * Debug::uniqueInstance = NULL;
 
 /**
- *  Gets the one and only RS_Debug instance
- *  (creates a new one on first call only)
+ * Gets the one and only Debug instance (creates a new one on first call only)
  *
- *  @return Pointer to the single instance of this
- * singleton class
+ * @return Pointer to the single instance of this singleton class
  */
-RS_Debug * RS_Debug::instance()
+Debug * Debug::instance()
 {
        if (uniqueInstance == NULL)
        {
@@ -37,8 +35,8 @@ RS_Debug * RS_Debug::instance()
                nowStr = now.toString("yyyyMMdd_hhmmss");
                QString fName = QString("debug_%1.log").arg(nowStr);
 
-               uniqueInstance = new RS_Debug;
-               //uniqueInstance->stream = fopen(fName.latin1(), "wt");
+               uniqueInstance = new Debug;
+//             uniqueInstance->stream = fopen(fName.toAscii().data(), "wt");
 //             uniqueInstance->stream = stderr;
                uniqueInstance->stream = stdout;
        }
@@ -47,11 +45,11 @@ RS_Debug * RS_Debug::instance()
 }
 
 /**
- * Deletes the one and only RS_Debug instance.
+ * Deletes the one and only Debug instance.
  */
-void RS_Debug::deleteInstance()
+void Debug::deleteInstance()
 {
-       if (uniqueInstance != NULL)
+       if (uniqueInstance)
        {
                fclose(uniqueInstance->stream);
                delete uniqueInstance;
@@ -61,7 +59,7 @@ void RS_Debug::deleteInstance()
 /**
  * Constructor for a point with default coordinates.
  */
-RS_Debug::RS_Debug()
+Debug::Debug()
 {
        debugLevel = D_DEBUGGING;
 }
@@ -69,20 +67,20 @@ RS_Debug::RS_Debug()
 /**
  * Sets the debugging level.
  */
-void RS_Debug::setLevel(RS_DebugLevel level)
+void Debug::setLevel(DebugLevel level)
 {
        debugLevel = level;
-       print("RS_DEBUG: Warnings", D_WARNING);
-       print("RS_DEBUG: Errors", D_ERROR);
-       print("RS_DEBUG: Notice", D_NOTICE);
-       print("RS_DEBUG: Informational", D_INFORMATIONAL);
-       print("RS_DEBUG: Debugging", D_DEBUGGING);
+       print("DEBUG: Warnings", D_WARNING);
+       print("DEBUG: Errors", D_ERROR);
+       print("DEBUG: Notice", D_NOTICE);
+       print("DEBUG: Informational", D_INFORMATIONAL);
+       print("DEBUG: Debugging", D_DEBUGGING);
 }
 
 /**
  * Gets the current debugging level.
  */
-RS_Debug::RS_DebugLevel RS_Debug::getLevel()
+Debug::DebugLevel Debug::getLevel()
 {
        return debugLevel;
 }
@@ -90,7 +88,7 @@ RS_Debug::RS_DebugLevel RS_Debug::getLevel()
 /**
  * Prints the given message to stdout.
  */
-void RS_Debug::print(const char * format ...)
+void Debug::print(const char * format ...)
 {
        if (debugLevel == D_DEBUGGING)
        {
@@ -109,7 +107,7 @@ void RS_Debug::print(const char * format ...)
  *
  * @param level Debug level.
  */
-void RS_Debug::print(RS_DebugLevel level, const char * format ...)
+void Debug::print(DebugLevel level, const char * format ...)
 {
        if (debugLevel >= level)
        {
@@ -125,11 +123,11 @@ void RS_Debug::print(RS_DebugLevel level, const char * format ...)
 /**
  * Prints a time stamp in the format yyyyMMdd_hhmmss.
  */
-void RS_Debug::timestamp()
+void Debug::timestamp()
 {
        QDateTime now = QDateTime::currentDateTime();
        QString nowStr = now.toString("yyyyMMdd_hh:mm:ss:zzz ");
-       fprintf(stream, "%s", nowStr.toLatin1().data());
+       fprintf(stream, "%s", nowStr.toAscii().data());
        fprintf(stream, "\n");
        fflush(stream);
 }
@@ -137,13 +135,13 @@ void RS_Debug::timestamp()
 /**
  * Prints the unicode for every character in the given string.
  */
-void RS_Debug::printUnicode(const QString & text)
+void Debug::printUnicode(const QString & text)
 {
        for(int i=0; i<(int)text.length(); i++)
-               print("[%X] %c", text.at(i).unicode(), text.at(i).toLatin1());
+               print("[%X] %c", text.at(i).unicode(), text.at(i).toAscii());
 }
 
-void RS_Debug::setStream(FILE * s)
+void Debug::setStream(FILE * s)
 {
        stream = s;
 }
index 771719b0ee81399e138251256d0b1f9f42a2d85a..dc53e73c7223161a91af6dce099babda416ca30d 100644 (file)
@@ -9,7 +9,7 @@
 #include <stdio.h>
 #include <QtCore>
 
-#define RS_DEBUG RS_Debug::instance()
+#define DEBUG Debug::instance()
 
 /**
  * Debugging facilities.
@@ -17,7 +17,7 @@
  * @author James Hammons
  * @author Andrew Mustun
  */
-class RS_Debug
+class Debug
 {
        public:
                /**
@@ -33,33 +33,33 @@ class RS_Debug
                 *  <li>D_DEBUGGING: very verbose
                 * </ul>
                 */
-               enum RS_DebugLevel { D_NOTHING,
-                                                       D_CRITICAL,
-                                                       D_ERROR,
-                                                       D_WARNING,
-                                                       D_NOTICE,
-                                                       D_INFORMATIONAL,
-                                                       D_DEBUGGING };
+               enum DebugLevel { D_NOTHING,
+                       D_CRITICAL,
+                       D_ERROR,
+                       D_WARNING,
+                       D_NOTICE,
+                       D_INFORMATIONAL,
+                       D_DEBUGGING };
 
        private:
-               RS_Debug();
+               Debug();
 
        public:
-               static RS_Debug * instance();
+               static Debug * instance();
                static void deleteInstance();
 
-               void setLevel(RS_DebugLevel level);
-               RS_DebugLevel getLevel();
-               void print(RS_DebugLevel level, const char * format ...);
+               void setLevel(DebugLevel level);
+               DebugLevel getLevel();
+               void print(DebugLevel level, const char * format ...);
                void print(const char * format ...);
                void printUnicode(const QString & text);
                void timestamp();
                void setStream(FILE * s);
 
        private:
-               static RS_Debug * uniqueInstance;
+               static Debug * uniqueInstance;
 
-               RS_DebugLevel debugLevel;
+               DebugLevel debugLevel;
                FILE * stream;
 };
 
index 5fca3cbc0e87519a2cb445a4109784c89789b63c..47f814db4f2849815a048560c296e25e101a7fcf 100644 (file)
 
 #include "debug.h"
 
-RS_DialogFactory * RS_DialogFactory::uniqueInstance = NULL;
+DialogFactory * DialogFactory::uniqueInstance = NULL;
 
 /**
  * Private constructor.
  */
-RS_DialogFactory::RS_DialogFactory()
+DialogFactory::DialogFactory()
 {
-       RS_DEBUG->print("RS_DialogFacgory::RS_DialogFactory");
+       DEBUG->print("DialogFacgory::DialogFactory");
        factoryObject = NULL;
-       RS_DEBUG->print("RS_DialogFacgory::RS_DialogFactory: OK");
+       DEBUG->print("DialogFacgory::DialogFactory: OK");
 }
 
-/*virtual*/ RS_DialogFactory::~RS_DialogFactory()
+/*virtual*/ DialogFactory::~DialogFactory()
 {
 }
 
 /**
  * @return Instance to the unique font list.
  */
-RS_DialogFactory * RS_DialogFactory::instance()
+DialogFactory * DialogFactory::instance()
 {
-       RS_DEBUG->print("RS_DialogFactory::instance()");
+       DEBUG->print("DialogFactory::instance()");
 
        if (uniqueInstance == NULL)
-               uniqueInstance = new RS_DialogFactory();
+               uniqueInstance = new DialogFactory();
 
-       RS_DEBUG->print("RS_DialogFactory::instance(): OK");
+       DEBUG->print("DialogFactory::instance(): OK");
 
        return uniqueInstance;
 }
@@ -52,36 +52,36 @@ RS_DialogFactory * RS_DialogFactory::instance()
 /**
  * Sets the real factory object that can create and show dialogs.
  */
-void RS_DialogFactory::setFactoryObject(RS_DialogFactoryInterface * fo)
+void DialogFactory::setFactoryObject(DialogFactoryInterface * fo)
 {
-       RS_DEBUG->print("RS_DialogFactory::setFactoryObject");
+       DEBUG->print("DialogFactory::setFactoryObject");
        factoryObject = fo;
-       RS_DEBUG->print("RS_DialogFactory::setFactoryObject: OK");
+       DEBUG->print("DialogFactory::setFactoryObject: OK");
 }
 
 /**
  * @return Factory object. This is never NULL. If no factory
  * object was set, the default adapter will be returned.
  */
-RS_DialogFactoryInterface * RS_DialogFactory::getFactoryObject()
+DialogFactoryInterface * DialogFactory::getFactoryObject()
 {
-       RS_DEBUG->print("RS_DialogFactory::getFactoryObject");
+       DEBUG->print("DialogFactory::getFactoryObject");
 
        if (factoryObject != NULL)
        {
-               RS_DEBUG->print("RS_DialogFactory::getFactoryObject: returning factory object");
+               DEBUG->print("DialogFactory::getFactoryObject: returning factory object");
                return factoryObject;
        }
        else
        {
-               RS_DEBUG->print("RS_DialogFactory::getFactoryObject: returning adapter");
+               DEBUG->print("DialogFactory::getFactoryObject: returning adapter");
                return &factoryAdapter;
        }
 }
 
-void RS_DialogFactory::commandMessage(const QString & m)
+void DialogFactory::commandMessage(const QString & m)
 {
-       RS_DEBUG->print("RS_DialogFactory::commandMessage");
+       DEBUG->print("DialogFactory::commandMessage");
 
        if (factoryObject != NULL)
                factoryObject->commandMessage(m);
index b0f580a82677b677e841070193ae736eec5fa1f2..956a126f0f0f0445ae521df02c7bab63db455d86 100644 (file)
@@ -3,31 +3,31 @@
 
 #include "dialogfactoryadapter.h"
 
-#define RS_DIALOGFACTORY RS_DialogFactory::instance()->getFactoryObject()
+#define DIALOGFACTORY DialogFactory::instance()->getFactoryObject()
 
-class RS_DialogFactoryInterface;
+class DialogFactoryInterface;
 
 /**
  * Interface for objects that can create and show dialogs.
  */
-class RS_DialogFactory
+class DialogFactory
 {
        private:
-               RS_DialogFactory();
+               DialogFactory();
 
        public:
-               virtual ~RS_DialogFactory();
+               virtual ~DialogFactory();
 
-               static RS_DialogFactory * instance();
+               static DialogFactory * instance();
 
-               void setFactoryObject(RS_DialogFactoryInterface * fo);
-               RS_DialogFactoryInterface * getFactoryObject();
+               void setFactoryObject(DialogFactoryInterface * fo);
+               DialogFactoryInterface * getFactoryObject();
                void commandMessage(const QString & m);
 
        private:
-               RS_DialogFactoryInterface * factoryObject;
-               RS_DialogFactoryAdapter factoryAdapter;
-               static RS_DialogFactory * uniqueInstance;
+               DialogFactoryInterface * factoryObject;
+               DialogFactoryAdapter factoryAdapter;
+               static DialogFactory * uniqueInstance;
 };
 
 #endif // __DIALOGFACTORY_H__
index d36e450d0ee604378966db5f1a5a1e3205e7efc5..de34601eabdc15147be3f0a31243f4f4fa10e100 100644 (file)
@@ -5,46 +5,46 @@
 #include "block.h"
 #include "layer.h"
 
-class RS_BlockList;
-class RS_LayerList;
+class BlockList;
+class LayerList;
 
 /**
  * Adapter for dialog factory interface.
  * Used when no factory object was set.
  */
-class RS_DialogFactoryAdapter: public RS_DialogFactoryInterface
+class DialogFactoryAdapter: public DialogFactoryInterface
 {
        public:
-               RS_DialogFactoryAdapter() {}
-               virtual ~RS_DialogFactoryAdapter() {}
+               DialogFactoryAdapter() {}
+               virtual ~DialogFactoryAdapter() {}
                virtual void requestPreviousMenu() {}
                virtual void requestWarningDialog(const QString &) {}
                virtual GraphicView * requestNewDocument(const QString & = QString::null,
-                       RS_Document * = NULL) { return NULL; }
+                       Document * = NULL) { return NULL; }
                virtual void requestSimulationControls() {}
-               virtual RS_Layer * requestNewLayerDialog(RS_LayerList * = NULL) { return NULL; }
-               virtual RS_Layer * requestLayerRemovalDialog(RS_LayerList * = NULL) { return NULL; }
-               virtual RS_Layer * requestEditLayerDialog(RS_LayerList * = NULL) { return NULL; }
-               virtual RS_BlockData requestNewBlockDialog(RS_BlockList *) { return RS_BlockData(); }
-               virtual RS_Block * requestBlockRemovalDialog(RS_BlockList *) { return NULL; }
-               virtual RS_BlockData requestBlockAttributesDialog(RS_BlockList *) { return RS_BlockData(); }
-               virtual void requestEditBlockWindow(RS_BlockList *) {}
-               virtual void closeEditBlockWindow(RS_Block *) {}
+               virtual Layer * requestNewLayerDialog(LayerList * = NULL) { return NULL; }
+               virtual Layer * requestLayerRemovalDialog(LayerList * = NULL) { return NULL; }
+               virtual Layer * requestEditLayerDialog(LayerList * = NULL) { return NULL; }
+               virtual BlockData requestNewBlockDialog(BlockList *) { return BlockData(); }
+               virtual Block * requestBlockRemovalDialog(BlockList *) { return NULL; }
+               virtual BlockData requestBlockAttributesDialog(BlockList *) { return BlockData(); }
+               virtual void requestEditBlockWindow(BlockList *) {}
+               virtual void closeEditBlockWindow(Block *) {}
                virtual QString requestImageOpenDialog() { return ""; }
                virtual void requestOptions(ActionInterface *, bool, bool = false) {}
                virtual void requestSnapDistOptions(double &, bool) {}
-               virtual bool requestAttributesDialog(RS_AttributesData &, RS_LayerList &) { return false; }
-               virtual bool requestMoveDialog(RS_MoveData &) { return false; }
-               virtual bool requestRotateDialog(RS_RotateData &) { return false; }
-               virtual bool requestScaleDialog(RS_ScaleData &) { return false; }
-               virtual bool requestMirrorDialog(RS_MirrorData &) { return false; }
-               virtual bool requestMoveRotateDialog(RS_MoveRotateData &) { return false; }
-               virtual bool requestRotate2Dialog(RS_Rotate2Data &) { return false; }
+               virtual bool requestAttributesDialog(AttributesData &, LayerList &) { return false; }
+               virtual bool requestMoveDialog(MoveData &) { return false; }
+               virtual bool requestRotateDialog(RotateData &) { return false; }
+               virtual bool requestScaleDialog(ScaleData &) { return false; }
+               virtual bool requestMirrorDialog(MirrorData &) { return false; }
+               virtual bool requestMoveRotateDialog(MoveRotateData &) { return false; }
+               virtual bool requestRotate2Dialog(Rotate2Data &) { return false; }
                virtual void requestToolBar(RS2::ToolBarId) {}
                virtual void requestToolBarSelect(ActionInterface *, RS2::ActionType) {}
-               virtual bool requestModifyEntityDialog(RS_Entity *) { return false; }
-               virtual bool requestTextDialog(RS_Text *) { return false; }
-               virtual bool requestHatchDialog(RS_Hatch *) { return false; }
+               virtual bool requestModifyEntityDialog(Entity *) { return false; }
+               virtual bool requestTextDialog(Text *) { return false; }
+               virtual bool requestHatchDialog(Hatch *) { return false; }
                virtual void requestOptionsGeneralDialog() {}
                virtual void requestOptionsDrawingDialog(Drawing &) {}
 #ifdef RS_CAM
index c12ee70b5e2d1076dd961a3a66b3b31c2a3d48f1..4e413a02ca0f8f72798ea0f3ee634a114de24388 100644 (file)
@@ -2,49 +2,48 @@
 #define __DIALOGFACTORYINTERFACE_H__
 
 #include <QtCore>
-#include "rs.h"
+#include "enums.h"
 
 class ActionInterface;
-class RS_ArcData;
-class RS_AttributesData;
-class RS_BevelData;
-class RS_Block;
-class RS_BlockData;
-class RS_BlockList;
-class RS_CircleData;
-class RS_DimLinearData;
-class RS_DimensionData;
-class RS_Document;
+class ArcData;
+class AttributesData;
+class BevelData;
+class Block;
+class BlockData;
+class BlockList;
+class CircleData;
+class DimLinearData;
+class DimensionData;
+class Document;
 class Drawing;
-class RS_Entity;
-class RS_EventHandler;
+class Entity;
+class EventHandler;
 class GraphicView;
-class RS_Grid;
-class RS_Hatch;
-class RS_Insert;
-class RS_Layer;
-class RS_LayerList;
-class RS_MirrorData;
-class RS_MoveData;
-class RS_MoveRotateData;
-class RS_Painter;
-class RS_Rotate2Data;
-class RS_RotateData;
-class RS_RoundData;
-class RS_ScaleData;
-class RS_Solid;
-class RS_Text;
+class Grid;
+class Hatch;
+class Insert;
+class Layer;
+class LayerList;
+class MirrorData;
+class MoveData;
+class MoveRotateData;
+class Rotate2Data;
+class RotateData;
+class RoundData;
+class ScaleData;
+class Solid;
+class Text;
 class Vector;
 
 
 /**
  * Interface for objects that can create and show dialogs.
  */
-class RS_DialogFactoryInterface
+class DialogFactoryInterface
 {
 public:
-    RS_DialogFactoryInterface() {}
-    virtual ~RS_DialogFactoryInterface() {}
+    DialogFactoryInterface() {}
+    virtual ~DialogFactoryInterface() {}
 
     /**
      * This virtual method must be overwritten and must show the previously
@@ -64,7 +63,7 @@ public:
         * is given.
         */
     virtual GraphicView * requestNewDocument(const QString & fileName = QString::null,
-               RS_Document * doc = NULL) = 0;
+               Document * doc = NULL) = 0;
 
        /**
         * This virtual method must be overwritten and must create or show
@@ -82,7 +81,7 @@ public:
      *         to the newly created layer or NULL if the user
      *         cancels the dialog.
      */
-    virtual RS_Layer * requestNewLayerDialog(RS_LayerList * layerList = NULL) = 0;
+    virtual Layer * requestNewLayerDialog(LayerList * layerList = NULL) = 0;
 
     /**
      * This virtual method must be overwritten and must provide
@@ -94,7 +93,7 @@ public:
      *         to the layer which can ne removed or NULL if the user
      *         cancels the dialog.
      */
-    virtual RS_Layer * requestLayerRemovalDialog(RS_LayerList * layerList = NULL) = 0;
+    virtual Layer * requestLayerRemovalDialog(LayerList * layerList = NULL) = 0;
 
     /**
      * This virtual method must be overwritten and must provide
@@ -105,7 +104,7 @@ public:
      *         to the modified layer or NULL if the user
      *         cancels the dialog.
      */
-    virtual RS_Layer * requestEditLayerDialog(RS_LayerList * layerList = NULL) = 0;
+    virtual Layer * requestEditLayerDialog(LayerList * layerList = NULL) = 0;
 
     /**
      * This virtual method must be overwritten and must provide
@@ -120,7 +119,7 @@ public:
      *         to the newly created block or NULL if the user
      *         cancels the dialog.
      */
-    virtual RS_BlockData requestNewBlockDialog(RS_BlockList * blockList) = 0;
+    virtual BlockData requestNewBlockDialog(BlockList * blockList) = 0;
 
     /**
      * This virtual method must be overwritten and must provide
@@ -132,7 +131,7 @@ public:
      *         to the block which can be removed or NULL if the user
      *         cancels the dialog.
      */
-    virtual RS_Block * requestBlockRemovalDialog(RS_BlockList * blockList) = 0;
+    virtual Block * requestBlockRemovalDialog(BlockList * blockList) = 0;
 
     /**
      * This virtual method must be overwritten and must provide
@@ -143,15 +142,15 @@ public:
      *         to the block which was changed or NULL if the user
      *         cancels the dialog.
      */
-    virtual RS_BlockData requestBlockAttributesDialog(RS_BlockList * blockList) = 0;
+    virtual BlockData requestBlockAttributesDialog(BlockList * blockList) = 0;
 
     /**
      * This virtual method must be overwritten and should provide
      * a way to edit a block.
      */
-    virtual void requestEditBlockWindow(RS_BlockList * blockList) = 0;
+    virtual void requestEditBlockWindow(BlockList * blockList) = 0;
 
-       virtual void closeEditBlockWindow(RS_Block * block) = 0;
+       virtual void closeEditBlockWindow(Block * block) = 0;
 
     /**
      * This virtual method must be overwritten and must provide
@@ -214,7 +213,7 @@ public:
      * @param data Attribute data which can be directly changed
      *             by the presented widget.
      */
-    virtual bool requestAttributesDialog(RS_AttributesData & data, RS_LayerList & layerList) = 0;
+    virtual bool requestAttributesDialog(AttributesData & data, LayerList & layerList) = 0;
 
     /**
      * This virtual method must be overwritten and must present
@@ -223,7 +222,7 @@ public:
      * @param data Move data which can be directly changed
      *             by the presented widget.
      */
-    virtual bool requestMoveDialog(RS_MoveData & data) = 0;
+    virtual bool requestMoveDialog(MoveData & data) = 0;
 
     /**
      * This virtual method must be overwritten and must present
@@ -232,7 +231,7 @@ public:
      * @param data Rotation data which can be directly changed
      *             by the presented widget.
      */
-    virtual bool requestRotateDialog(RS_RotateData & data) = 0;
+    virtual bool requestRotateDialog(RotateData & data) = 0;
 
     /**
      * This virtual method must be overwritten and must present
@@ -241,7 +240,7 @@ public:
      * @param data Scaling data which can be directly changed
      *             by the presented widget.
      */
-    virtual bool requestScaleDialog(RS_ScaleData & data) = 0;
+    virtual bool requestScaleDialog(ScaleData & data) = 0;
 
     /**
      * This virtual method must be overwritten and must present
@@ -250,7 +249,7 @@ public:
      * @param data Mirror data which can be directly changed
      *             by the presented widget.
      */
-    virtual bool requestMirrorDialog(RS_MirrorData & data) = 0;
+    virtual bool requestMirrorDialog(MirrorData & data) = 0;
 
     /**
      * This virtual method must be overwritten and must present
@@ -259,7 +258,7 @@ public:
      * @param data Move/rotate data which can be directly changed
      *             by the presented widget.
      */
-    virtual bool requestMoveRotateDialog(RS_MoveRotateData & data) = 0;
+    virtual bool requestMoveRotateDialog(MoveRotateData & data) = 0;
 
     /**
      * This virtual method must be overwritten and must present
@@ -269,7 +268,7 @@ public:
      * @param data Rotate data which can be directly changed
      *             by the presented widget.
      */
-    virtual bool requestRotate2Dialog(RS_Rotate2Data & data) = 0;
+    virtual bool requestRotate2Dialog(Rotate2Data & data) = 0;
 
     /**
      * This virtual method must be overwritten and must show
@@ -294,7 +293,7 @@ public:
      *
      * @param entity Pointer to the entity.
      */
-    virtual bool requestModifyEntityDialog(RS_Entity * entity) = 0;
+    virtual bool requestModifyEntityDialog(Entity * entity) = 0;
 
     /**
      * This virtual method must be overwritten and must present
@@ -302,7 +301,7 @@ public:
      *
      * @param entity Pointer to the text entity.
      */
-    virtual bool requestTextDialog(RS_Text * text) = 0;
+    virtual bool requestTextDialog(Text * text) = 0;
 
     /**
      * This virtual method must be overwritten and must present
@@ -310,7 +309,7 @@ public:
      *
      * @param entity Pointer to the hatch entity.
      */
-    virtual bool requestHatchDialog(RS_Hatch * hatch) = 0;
+    virtual bool requestHatchDialog(Hatch * hatch) = 0;
 
     /**
      * This virtual method must be overwritten and must present
index cc9fc237983ffcfeff0d05ca3fb32b8a5bcf4229..c25ea9fdadacc4ca2020ebb854329c3c91a78062 100644 (file)
  * @para d Common dimension geometrical data.
  * @para ed Extended geometrical data for aligned dimension.
  */
-RS_DimAligned::RS_DimAligned(RS_EntityContainer * parent, const RS_DimensionData & d,
-       const RS_DimAlignedData & ed): RS_Dimension(parent, d), edata(ed)
+DimAligned::DimAligned(EntityContainer * parent, const DimensionData & d,
+       const DimAlignedData & ed): Dimension(parent, d), edata(ed)
 {
     calculateBorders();
 }
 
-/*virtual*/ RS_DimAligned::~RS_DimAligned()
+/*virtual*/ DimAligned::~DimAligned()
 {
 }
 
-/*virtual*/ RS_Entity * RS_DimAligned::clone()
+/*virtual*/ Entity * DimAligned::clone()
 {
-       RS_DimAligned * d = new RS_DimAligned(*this);
+       DimAligned * d = new DimAligned(*this);
 #warning "!!! Need to port setAutoDelete in QList/QMultiHash from Qt3 to Qt4 !!!"
 //     d->entities.setAutoDelete(entities.autoDelete());
        d->initId();
@@ -48,7 +48,7 @@ RS_DimAligned::RS_DimAligned(RS_EntityContainer * parent, const RS_DimensionData
 }
 
 /**    @return RS2::EntityDimAligned */
-/*virtual*/ RS2::EntityType RS_DimAligned::rtti() const
+/*virtual*/ RS2::EntityType DimAligned::rtti() const
 {
        return RS2::EntityDimAligned;
 }
@@ -57,7 +57,7 @@ RS_DimAligned::RS_DimAligned(RS_EntityContainer * parent, const RS_DimensionData
  * @return Copy of data that defines the aligned dimension.
  * @see getData()
  */
-RS_DimAlignedData RS_DimAligned::getEData() const
+DimAlignedData DimAligned::getEData() const
 {
        return edata;
 }
@@ -66,12 +66,12 @@ RS_DimAlignedData RS_DimAligned::getEData() const
  * Sets a new text. The entities representing the
  * text are updated.
  */
-//void RS_DimAligned::setText(const QString& t) {
+//void DimAligned::setText(const QString& t) {
 //    data.text = t;
 //    update();
 //}
 
-VectorSolutions RS_DimAligned::getRefPoints()
+VectorSolutions DimAligned::getRefPoints()
 {
        VectorSolutions ret(edata.extensionPoint1, edata.extensionPoint2,
                data.definitionPoint, data.middleOfText);
@@ -82,7 +82,7 @@ VectorSolutions RS_DimAligned::getRefPoints()
  * @return Automatically creted label for the default
  * measurement of this dimension.
  */
-QString RS_DimAligned::getMeasuredLabel()
+QString DimAligned::getMeasuredLabel()
 {
        double dist = edata.extensionPoint1.distanceTo(edata.extensionPoint2);
        Drawing * graphic = getGraphic();
@@ -90,7 +90,7 @@ QString RS_DimAligned::getMeasuredLabel()
 
        if (graphic != NULL)
        {
-               ret = RS_Units::formatLinear(dist, graphic->getUnit(),
+               ret = Units::formatLinear(dist, graphic->getUnit(),
                        graphic->getLinearFormat(), graphic->getLinearPrecision());
        }
        else
@@ -107,9 +107,9 @@ QString RS_DimAligned::getMeasuredLabel()
  *
  * @param autoText Automatically reposition the text label
  */
-void RS_DimAligned::update(bool autoText)
+void DimAligned::update(bool autoText)
 {
-       RS_DEBUG->print("RS_DimAligned::update");
+       DEBUG->print("DimAligned::update");
 
        clear();
 
@@ -131,28 +131,28 @@ void RS_DimAligned::update(bool autoText)
        double extLength = edata.extensionPoint2.distanceTo(data.definitionPoint);
 
        Vector v1, v2, e1;
-       RS_LineData ld;
-       RS_Line * line;
+       LineData ld;
+       Line * line;
 
        v1.setPolar(dimexo, extAngle);
        v2.setPolar(dimexe, extAngle);
        e1.setPolar(1.0, extAngle);
 
        // Extension line 1:
-       ld = RS_LineData(edata.extensionPoint1 + v1, edata.extensionPoint1 + e1 * extLength + v2);
-       line = new RS_Line(this, ld);
+       ld = LineData(edata.extensionPoint1 + v1, edata.extensionPoint1 + e1 * extLength + v2);
+       line = new Line(this, ld);
        //line->setLayerToActive();
        //line->setPenToActive();
-       line->setPen(RS_Pen(RS2::FlagInvalid));
+       line->setPen(Pen(RS2::FlagInvalid));
        line->setLayer(NULL);
        addEntity(line);
 
        // Extension line 2:
-       ld = RS_LineData(edata.extensionPoint2 + v1, edata.extensionPoint2 + e1 * extLength + v2);
-       line = new RS_Line(this, ld);
+       ld = LineData(edata.extensionPoint2 + v1, edata.extensionPoint2 + e1 * extLength + v2);
+       line = new Line(this, ld);
        //line->setLayerToActive();
        //line->setPenToActive();
-       line->setPen(RS_Pen(RS2::FlagInvalid));
+       line->setPen(Pen(RS2::FlagInvalid));
        line->setLayer(NULL);
        addEntity(line);
 
@@ -163,59 +163,59 @@ void RS_DimAligned::update(bool autoText)
        calculateBorders();
 }
 
-Vector RS_DimAligned::getExtensionPoint1()
+Vector DimAligned::getExtensionPoint1()
 {
        return edata.extensionPoint1;
 }
 
-Vector RS_DimAligned::getExtensionPoint2()
+Vector DimAligned::getExtensionPoint2()
 {
        return edata.extensionPoint2;
 }
 
-bool RS_DimAligned::hasEndpointsWithinWindow(Vector v1, Vector v2)
+bool DimAligned::hasEndpointsWithinWindow(Vector v1, Vector v2)
 {
        return (edata.extensionPoint1.isInWindow(v1, v2)
                || edata.extensionPoint2.isInWindow(v1, v2));
 }
 
-void RS_DimAligned::move(Vector offset)
+void DimAligned::move(Vector offset)
 {
-       RS_Dimension::move(offset);
+       Dimension::move(offset);
 
        edata.extensionPoint1.move(offset);
        edata.extensionPoint2.move(offset);
        update();
 }
 
-void RS_DimAligned::rotate(Vector center, double angle)
+void DimAligned::rotate(Vector center, double angle)
 {
-       RS_Dimension::rotate(center, angle);
+       Dimension::rotate(center, angle);
 
        edata.extensionPoint1.rotate(center, angle);
        edata.extensionPoint2.rotate(center, angle);
        update();
 }
 
-void RS_DimAligned::scale(Vector center, Vector factor)
+void DimAligned::scale(Vector center, Vector factor)
 {
-       RS_Dimension::scale(center, factor);
+       Dimension::scale(center, factor);
 
        edata.extensionPoint1.scale(center, factor);
        edata.extensionPoint2.scale(center, factor);
        update();
 }
 
-void RS_DimAligned::mirror(Vector axisPoint1, Vector axisPoint2)
+void DimAligned::mirror(Vector axisPoint1, Vector axisPoint2)
 {
-       RS_Dimension::mirror(axisPoint1, axisPoint2);
+       Dimension::mirror(axisPoint1, axisPoint2);
 
        edata.extensionPoint1.mirror(axisPoint1, axisPoint2);
        edata.extensionPoint2.mirror(axisPoint1, axisPoint2);
        update();
 }
 
-void RS_DimAligned::stretch(Vector firstCorner, Vector secondCorner, Vector offset)
+void DimAligned::stretch(Vector firstCorner, Vector secondCorner, Vector offset)
 {
        //e->calculateBorders();
        if (getMin().isInWindow(firstCorner, secondCorner) && getMax().isInWindow(firstCorner, secondCorner))
@@ -240,7 +240,7 @@ void RS_DimAligned::stretch(Vector firstCorner, Vector secondCorner, Vector offs
 
                double ang2 = edata.extensionPoint1.angleTo(edata.extensionPoint2) + M_PI / 2;
 
-               double diff = RS_Math::getAngleDifference(ang1, ang2);
+               double diff = Math::getAngleDifference(ang1, ang2);
 
                if (diff > M_PI)
                {
@@ -249,7 +249,7 @@ void RS_DimAligned::stretch(Vector firstCorner, Vector secondCorner, Vector offs
 
                if (fabs(diff) > M_PI / 2)
                {
-                       ang2 = RS_Math::correctAngle(ang2 + M_PI);
+                       ang2 = Math::correctAngle(ang2 + M_PI);
                }
 
                Vector v;
@@ -260,20 +260,20 @@ void RS_DimAligned::stretch(Vector firstCorner, Vector secondCorner, Vector offs
        update(true);
 }
 
-void RS_DimAligned::moveRef(const Vector & ref, const Vector & offset)
+void DimAligned::moveRef(const Vector & ref, const Vector & offset)
 {
        if (ref.distanceTo(data.definitionPoint) < 1.0e-4)
        {
-               RS_ConstructionLine l(NULL, RS_ConstructionLineData(edata.extensionPoint1,
+               ConstructionLine l(NULL, ConstructionLineData(edata.extensionPoint1,
                        edata.extensionPoint2));
                double d = l.getDistanceToPoint(data.definitionPoint + offset);
                double a = edata.extensionPoint2.angleTo(data.definitionPoint);
-               double ad = RS_Math::getAngleDifference(a,
+               double ad = Math::getAngleDifference(a,
                        edata.extensionPoint2.angleTo(data.definitionPoint + offset));
 
                if (fabs(ad) > M_PI / 2.0 && fabs(ad) < 3.0 / 2.0 * M_PI)
                {
-                       a = RS_Math::correctAngle(a + M_PI);
+                       a = Math::correctAngle(a + M_PI);
                }
 
                Vector v;
@@ -321,7 +321,7 @@ void RS_DimAligned::moveRef(const Vector & ref, const Vector & offset)
 /**
  * Dumps the point's data to stdout.
  */
-std::ostream & operator<<(std::ostream & os, const RS_DimAligned & d)
+std::ostream & operator<<(std::ostream & os, const DimAligned & d)
 {
     os << " DimAligned: " << d.getData() << "\n" << d.getEData() << "\n";
     return os;
index a8a7e4fc0854f28e8d5025f8e54ecbbcc2bc39e9..d4ed81787e2a4c7b04a984718eca7906a92d86f1 100644 (file)
@@ -6,13 +6,13 @@
 /**
  * Holds the data that defines an aligned dimension entity.
  */
-class RS_DimAlignedData
+class DimAlignedData
 {
        public:
                /**
                 * Default constructor. Leaves the data object uninitialized.
                 */
-               RS_DimAlignedData() {}
+               DimAlignedData() {}
 
                /**
                 * Constructor with initialisation.
@@ -22,16 +22,16 @@ class RS_DimAlignedData
                 * @para extensionPoint2 Definition point. Startpoint of the
                 *         second extension line.
                 */
-               RS_DimAlignedData(const Vector & extensionPoint1, const Vector & extensionPoint2)
+               DimAlignedData(const Vector & extensionPoint1, const Vector & extensionPoint2)
                {
                        this->extensionPoint1 = extensionPoint1;
                        this->extensionPoint2 = extensionPoint2;
                }
 
-               friend class RS_DimAligned;
+               friend class DimAligned;
                friend class ActionDimAligned;
 
-               friend std::ostream & operator<<(std::ostream & os, const RS_DimAlignedData & dd)
+               friend std::ostream & operator<<(std::ostream & os, const DimAlignedData & dd)
                {
                        os << "(" << dd.extensionPoint1 << "/" << dd.extensionPoint1 << ")";
                        return os;
@@ -49,15 +49,15 @@ class RS_DimAlignedData
  *
  * @author Andrew Mustun
  */
-class RS_DimAligned: public RS_Dimension
+class DimAligned: public Dimension
 {
        public:
-               RS_DimAligned(RS_EntityContainer * parent, const RS_DimensionData & d, const RS_DimAlignedData & ed);
-               virtual ~RS_DimAligned();
+               DimAligned(EntityContainer * parent, const DimensionData & d, const DimAlignedData & ed);
+               virtual ~DimAligned();
 
-               virtual RS_Entity * clone();
+               virtual Entity * clone();
                virtual RS2::EntityType rtti() const;
-               RS_DimAlignedData getEData() const;
+               DimAlignedData getEData() const;
                virtual VectorSolutions getRefPoints();
                virtual QString getMeasuredLabel();
                virtual void update(bool autoText = false);
@@ -73,11 +73,11 @@ class RS_DimAligned: public RS_Dimension
                virtual void stretch(Vector firstCorner, Vector secondCorner, Vector offset);
                virtual void moveRef(const Vector & ref, const Vector & offset);
 
-               friend std::ostream & operator<<(std::ostream & os, const RS_DimAligned & d);
+               friend std::ostream & operator<<(std::ostream & os, const DimAligned & d);
 
        protected:
                /** Extended data. */
-               RS_DimAlignedData edata;
+               DimAlignedData edata;
 };
 
 #endif
index 511a57010ac6c891fad44418318ea76da01ded6c..b1dfb4cae21df9579a95699fbf1612b2b6afcc64 100644 (file)
  * @para d Common dimension geometrical data.
  * @para ed Extended geometrical data for angular dimension.
  */
-RS_DimAngular::RS_DimAngular(RS_EntityContainer * parent, const RS_DimensionData & d,
-       const RS_DimAngularData & ed): RS_Dimension(parent, d), edata(ed)
+DimAngular::DimAngular(EntityContainer * parent, const DimensionData & d,
+       const DimAngularData & ed): Dimension(parent, d), edata(ed)
 {
        calculateBorders();
 }
 
-/*virtual*/ RS_DimAngular::~RS_DimAngular()
+/*virtual*/ DimAngular::~DimAngular()
 {
 }
 
-/*virtual*/ RS_Entity * RS_DimAngular::clone()
+/*virtual*/ Entity * DimAngular::clone()
 {
-       RS_DimAngular * d = new RS_DimAngular(*this);
+       DimAngular * d = new DimAngular(*this);
 #warning "!!! Need to deal with setAutoDelete() Qt3->Qt4 !!!"
 //     d->entities.setAutoDelete(entities.autoDelete());
        d->initId();
@@ -52,7 +52,7 @@ RS_DimAngular::RS_DimAngular(RS_EntityContainer * parent, const RS_DimensionData
 }
 
 /**    @return RS2::EntityDimAngular */
-/*virtual*/ RS2::EntityType RS_DimAngular::rtti() const
+/*virtual*/ RS2::EntityType DimAngular::rtti() const
 {
        return RS2::EntityDimAngular;
 }
@@ -61,7 +61,7 @@ RS_DimAngular::RS_DimAngular(RS_EntityContainer * parent, const RS_DimensionData
  * @return Copy of data that defines the angular dimension.
  * @see getData()
  */
-RS_DimAngularData RS_DimAngular::getEData() const
+DimAngularData DimAngular::getEData() const
 {
        return edata;
 }
@@ -70,20 +70,20 @@ RS_DimAngularData RS_DimAngular::getEData() const
  * @return Automatically created label for the default
  * measurement of this dimension.
  */
-QString RS_DimAngular::getMeasuredLabel()
+QString DimAngular::getMeasuredLabel()
 {
     QString ret;
 
        int dimaunit = getGraphicVariableInt("$DIMAUNIT", 0);
        int dimadec = getGraphicVariableInt("$DIMADEC", 0);
 
-       ret = RS_Units::formatAngle(getAngle(),
-               RS_FilterDXF::numberToAngleFormat(dimaunit),
+       ret = Units::formatAngle(getAngle(),
+               FilterDXF::numberToAngleFormat(dimaunit),
                dimadec);
 
     /*
        ret = QString("%1%2")
-          .arg(RS_Math::rad2deg(getAngle()))
+          .arg(Math::rad2deg(getAngle()))
           .arg(RS_Char(0xB0));
        */
     return ret;
@@ -94,7 +94,7 @@ QString RS_DimAngular::getMeasuredLabel()
 /**
  * @return Angle of the measured dimension.
  */
-double RS_DimAngular::getAngle() {
+double DimAngular::getAngle() {
     double ang1 = 0.0;
     double ang2 = 0.0;
     bool reversed = false;
@@ -121,12 +121,12 @@ double RS_DimAngular::getAngle() {
 /**
  * @return Center of the measured dimension.
  */
-Vector RS_DimAngular::getCenter() {
-    RS_ConstructionLine l1(NULL, RS_ConstructionLineData(edata.definitionPoint1,
+Vector DimAngular::getCenter() {
+    ConstructionLine l1(NULL, ConstructionLineData(edata.definitionPoint1,
                            edata.definitionPoint2));
-    RS_ConstructionLine l2(NULL, RS_ConstructionLineData(edata.definitionPoint3,
+    ConstructionLine l2(NULL, ConstructionLineData(edata.definitionPoint3,
                            data.definitionPoint));
-    VectorSolutions vs = RS_Information::getIntersection(&l1, &l2, false);
+    VectorSolutions vs = Information::getIntersection(&l1, &l2, false);
 
     return vs.get(0);
 }
@@ -142,7 +142,7 @@ Vector RS_DimAngular::getCenter() {
  *
  * @return true: on success
  */
-bool RS_DimAngular::getAngles(double& ang1, double& ang2, bool& reversed,
+bool DimAngular::getAngles(double& ang1, double& ang2, bool& reversed,
                               Vector& p1, Vector& p2) {
 
     Vector center = getCenter();
@@ -151,7 +151,7 @@ bool RS_DimAngular::getAngles(double& ang1, double& ang2, bool& reversed,
 
     // find out the angles this dimension refers to:
     for (int f1=0; f1<=1 && !done; ++f1) {
-        ang1 = RS_Math::correctAngle(
+        ang1 = Math::correctAngle(
                    edata.definitionPoint1.angleTo(edata.definitionPoint2) + f1*M_PI);
         if (f1==0) {
             p1 = edata.definitionPoint2;
@@ -159,7 +159,7 @@ bool RS_DimAngular::getAngles(double& ang1, double& ang2, bool& reversed,
             p1 = edata.definitionPoint1;
         }
         for (int f2=0; f2<=1 && !done; ++f2) {
-            ang2 = RS_Math::correctAngle(
+            ang2 = Math::correctAngle(
                        edata.definitionPoint3.angleTo(data.definitionPoint) + f2*M_PI);
             if (f2==0) {
                 p2 = data.definitionPoint;
@@ -183,10 +183,10 @@ bool RS_DimAngular::getAngles(double& ang1, double& ang2, bool& reversed,
                     angDiff = ang1-ang2;
                 }
 
-                ang1 = RS_Math::correctAngle(ang1);
-                ang2 = RS_Math::correctAngle(ang2);
+                ang1 = Math::correctAngle(ang1);
+                ang2 = Math::correctAngle(ang2);
 
-                if (RS_Math::isAngleBetween(ang, ang1, ang2, reversed) &&
+                if (Math::isAngleBetween(ang, ang1, ang2, reversed) &&
                         angDiff<=M_PI) {
                     done = true;
                     break;
@@ -206,9 +206,9 @@ bool RS_DimAngular::getAngles(double& ang1, double& ang2, bool& reversed,
  *
  * @param autoText Automatically reposition the text label
  */
-void RS_DimAngular::update(bool /*autoText*/) {
+void DimAngular::update(bool /*autoText*/) {
 
-    RS_DEBUG->print("RS_DimAngular::update");
+    DEBUG->print("DimAngular::update");
 
     clear();
 
@@ -242,7 +242,7 @@ void RS_DimAngular::update(bool /*autoText*/) {
 
     double rad = edata.definitionPoint4.distanceTo(center);
 
-    RS_Line* line;
+    Line* line;
     Vector dir;
     double len;
     double dist;
@@ -251,10 +251,10 @@ void RS_DimAngular::update(bool /*autoText*/) {
     dist = center.distanceTo(p1);
     len = rad - dist + dimexe;
     dir.setPolar(1.0, ang1);
-    line = new RS_Line(this,
-                       RS_LineData(center + dir*dist + dir*dimexo,
+    line = new Line(this,
+                       LineData(center + dir*dist + dir*dimexo,
                                    center + dir*dist + dir*len));
-    line->setPen(RS_Pen(RS2::FlagInvalid));
+    line->setPen(Pen(RS2::FlagInvalid));
     line->setLayer(NULL);
     addEntity(line);
 
@@ -262,18 +262,18 @@ void RS_DimAngular::update(bool /*autoText*/) {
     dist = center.distanceTo(p2);
     len = rad - dist + dimexe;
     dir.setPolar(1.0, ang2);
-    line = new RS_Line(this,
-                       RS_LineData(center + dir*dist + dir*dimexo,
+    line = new Line(this,
+                       LineData(center + dir*dist + dir*dimexo,
                                    center + dir*dist + dir*len));
-    line->setPen(RS_Pen(RS2::FlagInvalid));
+    line->setPen(Pen(RS2::FlagInvalid));
     line->setLayer(NULL);
     addEntity(line);
 
     // Create dimension line (arc):
-    RS_Arc* arc = new RS_Arc(this,
-                             RS_ArcData(center,
+    Arc* arc = new Arc(this,
+                             ArcData(center,
                                         rad, ang1, ang2, reversed));
-    arc->setPen(RS_Pen(RS2::FlagInvalid));
+    arc->setPen(Pen(RS2::FlagInvalid));
     arc->setLayer(NULL);
     addEntity(arc);
 
@@ -316,30 +316,30 @@ void RS_DimAngular::update(bool /*autoText*/) {
     }
 
     // Arrows:
-    RS_SolidData sd;
-    RS_Solid* arrow;
+    SolidData sd;
+    Solid* arrow;
 
     // arrow 1
-    arrow = new RS_Solid(this, sd);
+    arrow = new Solid(this, sd);
     arrow->shapeArrow(arc->getStartpoint(),
                       arrowAngle1,
                       getArrowSize());
-    arrow->setPen(RS_Pen(RS2::FlagInvalid));
+    arrow->setPen(Pen(RS2::FlagInvalid));
     arrow->setLayer(NULL);
     addEntity(arrow);
 
     // arrow 2:
-    arrow = new RS_Solid(this, sd);
+    arrow = new Solid(this, sd);
     arrow->shapeArrow(arc->getEndpoint(),
                       arrowAngle2,
                       getArrowSize());
-    arrow->setPen(RS_Pen(RS2::FlagInvalid));
+    arrow->setPen(Pen(RS2::FlagInvalid));
     arrow->setLayer(NULL);
     addEntity(arrow);
 
 
     // text label:
-    RS_TextData textData;
+    TextData textData;
     Vector textPos = arc->getMiddlepoint();
 
     Vector distV;
@@ -363,7 +363,7 @@ void RS_DimAngular::update(bool /*autoText*/) {
     // move text away from dimension line:
     textPos+=distV;
 
-    textData = RS_TextData(textPos,
+    textData = TextData(textPos,
                            dimtxt, 30.0,
                            RS2::VAlignBottom,
                            RS2::HAlignCenter,
@@ -374,39 +374,39 @@ void RS_DimAngular::update(bool /*autoText*/) {
                            "standard",
                            textAngle);
 
-    RS_Text* text = new RS_Text(this, textData);
+    Text* text = new Text(this, textData);
 
     // move text to the side:
-    text->setPen(RS_Pen(RS2::FlagInvalid));
+    text->setPen(Pen(RS2::FlagInvalid));
     text->setLayer(NULL);
     addEntity(text);
 
     calculateBorders();
 }
 
-Vector RS_DimAngular::getDefinitionPoint1()
+Vector DimAngular::getDefinitionPoint1()
 {
        return edata.definitionPoint1;
 }
 
-Vector RS_DimAngular::getDefinitionPoint2()
+Vector DimAngular::getDefinitionPoint2()
 {
        return edata.definitionPoint2;
 }
 
-Vector RS_DimAngular::getDefinitionPoint3()
+Vector DimAngular::getDefinitionPoint3()
 {
        return edata.definitionPoint3;
 }
 
-Vector RS_DimAngular::getDefinitionPoint4()
+Vector DimAngular::getDefinitionPoint4()
 {
        return edata.definitionPoint4;
 }
 
-void RS_DimAngular::move(Vector offset)
+void DimAngular::move(Vector offset)
 {
-    RS_Dimension::move(offset);
+    Dimension::move(offset);
 
     edata.definitionPoint1.move(offset);
     edata.definitionPoint2.move(offset);
@@ -417,8 +417,8 @@ void RS_DimAngular::move(Vector offset)
 
 
 
-void RS_DimAngular::rotate(Vector center, double angle) {
-    RS_Dimension::rotate(center, angle);
+void DimAngular::rotate(Vector center, double angle) {
+    Dimension::rotate(center, angle);
 
     edata.definitionPoint1.rotate(center, angle);
     edata.definitionPoint2.rotate(center, angle);
@@ -429,8 +429,8 @@ void RS_DimAngular::rotate(Vector center, double angle) {
 
 
 
-void RS_DimAngular::scale(Vector center, Vector factor) {
-    RS_Dimension::scale(center, factor);
+void DimAngular::scale(Vector center, Vector factor) {
+    Dimension::scale(center, factor);
 
     edata.definitionPoint1.scale(center, factor);
     edata.definitionPoint2.scale(center, factor);
@@ -441,8 +441,8 @@ void RS_DimAngular::scale(Vector center, Vector factor) {
 
 
 
-void RS_DimAngular::mirror(Vector axisPoint1, Vector axisPoint2) {
-    RS_Dimension::mirror(axisPoint1, axisPoint2);
+void DimAngular::mirror(Vector axisPoint1, Vector axisPoint2) {
+    Dimension::mirror(axisPoint1, axisPoint2);
 
     edata.definitionPoint1.mirror(axisPoint1, axisPoint2);
     edata.definitionPoint2.mirror(axisPoint1, axisPoint2);
@@ -454,7 +454,7 @@ void RS_DimAngular::mirror(Vector axisPoint1, Vector axisPoint2) {
 /**
  * Dumps the point's data to stdout.
  */
-std::ostream& operator << (std::ostream& os, const RS_DimAngular& d) {
+std::ostream& operator << (std::ostream& os, const DimAngular& d) {
     os << " DimAngular: " << d.getData() << "\n" << d.getEData() << "\n";
     return os;
 }
index 4c3f71ef2ea04758cedba9c7276b9aa78f5fe486..654e7c67a156e5a78fd7fa3313c97e0fc28a972e 100644 (file)
@@ -6,13 +6,13 @@
 /**
  * Holds the data that defines a angular dimension entity.
  */
-class RS_DimAngularData
+class DimAngularData
 {
        public:
                /**
                 * Default constructor. Leaves the data object uninitialized.
                 */
-               RS_DimAngularData() {}
+               DimAngularData() {}
 
                /**
                 * Constructor with initialisation.
@@ -20,7 +20,7 @@ class RS_DimAngularData
                 * @param definitionPoint Definition point of the angular dimension.
                 * @param leader Leader length.
                 */
-               RS_DimAngularData(const Vector& definitionPoint1, const Vector& definitionPoint2,
+               DimAngularData(const Vector& definitionPoint1, const Vector& definitionPoint2,
                        const Vector& definitionPoint3, const Vector& definitionPoint4)
                {
                        this->definitionPoint1 = definitionPoint1;
@@ -29,7 +29,7 @@ class RS_DimAngularData
                        this->definitionPoint4 = definitionPoint4;
                }
 
-               friend std::ostream & operator<<(std::ostream& os, const RS_DimAngularData & dd)
+               friend std::ostream & operator<<(std::ostream& os, const DimAngularData & dd)
                {
                        os << "(" << dd.definitionPoint1 << "/" << dd.definitionPoint2 << "/"
                                << dd.definitionPoint3 << "/" << dd.definitionPoint3 << ")";
@@ -52,15 +52,15 @@ class RS_DimAngularData
  *
  * @author Andrew Mustun
  */
-class RS_DimAngular: public RS_Dimension
+class DimAngular: public Dimension
 {
        public:
-               RS_DimAngular(RS_EntityContainer * parent, const RS_DimensionData & d, const RS_DimAngularData & ed);
-               virtual ~RS_DimAngular();
+               DimAngular(EntityContainer * parent, const DimensionData & d, const DimAngularData & ed);
+               virtual ~DimAngular();
 
-               virtual RS_Entity * clone();
+               virtual Entity * clone();
                virtual RS2::EntityType rtti() const;
-               RS_DimAngularData getEData() const;
+               DimAngularData getEData() const;
                virtual QString getMeasuredLabel();
                double getAngle();
                Vector getCenter();
@@ -78,11 +78,11 @@ class RS_DimAngular: public RS_Dimension
                virtual void scale(Vector center, Vector factor);
                virtual void mirror(Vector axisPoint1, Vector axisPoint2);
 
-               friend std::ostream & operator<<(std::ostream & os, const RS_DimAngular & d);
+               friend std::ostream & operator<<(std::ostream & os, const DimAngular & d);
 
        protected:
                /** Extended data. */
-               RS_DimAngularData edata;
+               DimAngularData edata;
 };
 
 #endif
index 811115dd5d272eeeff8ca6d547df652b33a5c5c8..934c1f2848e8bb324d5d3dac7500df8e29bdd88c 100644 (file)
  * @para d Common dimension geometrical data.
  * @para ed Extended geometrical data for diametric dimension.
  */
-RS_DimDiametric::RS_DimDiametric(RS_EntityContainer * parent, const RS_DimensionData & d,
-       const RS_DimDiametricData & ed): RS_Dimension(parent, d), edata(ed)
+DimDiametric::DimDiametric(EntityContainer * parent, const DimensionData & d,
+       const DimDiametricData & ed): Dimension(parent, d), edata(ed)
 {
     calculateBorders();
 }
 
-/*virtual*/ RS_DimDiametric::~RS_DimDiametric()
+/*virtual*/ DimDiametric::~DimDiametric()
 {
 }
 
-/*virtual*/ RS_Entity * RS_DimDiametric::clone()
+/*virtual*/ Entity * DimDiametric::clone()
 {
-       RS_DimDiametric * d = new RS_DimDiametric(*this);
+       DimDiametric * d = new DimDiametric(*this);
 #warning "!!! Need to deal with setAutoDelete() Qt3->Qt4 !!!"
 //     d->entities.setAutoDelete(entities.autoDelete());
        d->initId();
@@ -49,7 +49,7 @@ RS_DimDiametric::RS_DimDiametric(RS_EntityContainer * parent, const RS_Dimension
 }
 
 /**    @return RS2::EntityDimDiametric */
-/*virtual*/ RS2::EntityType RS_DimDiametric::rtti() const
+/*virtual*/ RS2::EntityType DimDiametric::rtti() const
 {
        return RS2::EntityDimDiametric;
 }
@@ -58,7 +58,7 @@ RS_DimDiametric::RS_DimDiametric(RS_EntityContainer * parent, const RS_Dimension
  * @return Copy of data that defines the diametric dimension.
  * @see getData()
  */
-RS_DimDiametricData RS_DimDiametric::getEData() const
+DimDiametricData DimDiametric::getEData() const
 {
        return edata;
 }
@@ -67,7 +67,7 @@ RS_DimDiametricData RS_DimDiametric::getEData() const
  * @return Automatically created label for the default
  * measurement of this dimension.
  */
-QString RS_DimDiametric::getMeasuredLabel()
+QString DimDiametric::getMeasuredLabel()
 {
     // Definitive dimension line:
     double dist = data.definitionPoint.distanceTo(edata.definitionPoint);
@@ -76,7 +76,7 @@ QString RS_DimDiametric::getMeasuredLabel()
 
     QString ret;
        if (graphic!=NULL) {
-               ret = RS_Units::formatLinear(dist, graphic->getUnit(),
+               ret = Units::formatLinear(dist, graphic->getUnit(),
                        graphic->getLinearFormat(), graphic->getLinearPrecision());
        }
        else {
@@ -86,7 +86,7 @@ QString RS_DimDiametric::getMeasuredLabel()
     return ret;
 }
 
-VectorSolutions RS_DimDiametric::getRefPoints()
+VectorSolutions DimDiametric::getRefPoints()
 {
        VectorSolutions ret(edata.definitionPoint, data.definitionPoint, data.middleOfText);
        return ret;
@@ -98,9 +98,9 @@ VectorSolutions RS_DimDiametric::getRefPoints()
  *
  * @param autoText Automatically reposition the text label
  */
-void RS_DimDiametric::update(bool autoText)
+void DimDiametric::update(bool autoText)
 {
-       RS_DEBUG->print("RS_DimDiametric::update");
+       DEBUG->print("DimDiametric::update");
        clear();
 
        if (isUndone())
@@ -111,48 +111,48 @@ void RS_DimDiametric::update(bool autoText)
        calculateBorders();
 }
 
-Vector RS_DimDiametric::getDefinitionPoint()
+Vector DimDiametric::getDefinitionPoint()
 {
        return edata.definitionPoint;
 }
 
-double RS_DimDiametric::getLeader()
+double DimDiametric::getLeader()
 {
        return edata.leader;
 }
 
-void RS_DimDiametric::move(Vector offset)
+void DimDiametric::move(Vector offset)
 {
-    RS_Dimension::move(offset);
+    Dimension::move(offset);
 
     edata.definitionPoint.move(offset);
     update();
 }
 
-void RS_DimDiametric::rotate(Vector center, double angle)
+void DimDiametric::rotate(Vector center, double angle)
 {
-    RS_Dimension::rotate(center, angle);
+    Dimension::rotate(center, angle);
 
     edata.definitionPoint.rotate(center, angle);
     update();
 }
 
-void RS_DimDiametric::scale(Vector center, Vector factor) {
-    RS_Dimension::scale(center, factor);
+void DimDiametric::scale(Vector center, Vector factor) {
+    Dimension::scale(center, factor);
 
     edata.definitionPoint.scale(center, factor);
        edata.leader*=factor.x;
     update();
 }
 
-void RS_DimDiametric::mirror(Vector axisPoint1, Vector axisPoint2) {
-    RS_Dimension::mirror(axisPoint1, axisPoint2);
+void DimDiametric::mirror(Vector axisPoint1, Vector axisPoint2) {
+    Dimension::mirror(axisPoint1, axisPoint2);
 
     edata.definitionPoint.mirror(axisPoint1, axisPoint2);
     update();
 }
 
-void RS_DimDiametric::moveRef(const Vector& ref, const Vector& offset)
+void DimDiametric::moveRef(const Vector& ref, const Vector& offset)
 {
     if (ref.distanceTo(edata.definitionPoint)<1.0e-4) {
                Vector c = (edata.definitionPoint + data.definitionPoint)/2.0;
@@ -185,7 +185,7 @@ void RS_DimDiametric::moveRef(const Vector& ref, const Vector& offset)
 /**
  * Dumps the point's data to stdout.
  */
-std::ostream & operator<<(std::ostream & os, const RS_DimDiametric & d)
+std::ostream & operator<<(std::ostream & os, const DimDiametric & d)
 {
     os << " DimDiametric: " << d.getData() << "\n" << d.getEData() << "\n";
     return os;
index d3ea9590f2e32241d3d0ed60a20ce3f605684a98..7f4ef8db91ecd16974727974b50d682fe64582c1 100644 (file)
@@ -6,13 +6,13 @@
 /**
  * Holds the data that defines a diametric dimension entity.
  */
-class RS_DimDiametricData
+class DimDiametricData
 {
 public:
     /**
      * Default constructor. Leaves the data object uninitialized.
      */
-    RS_DimDiametricData() {}
+    DimDiametricData() {}
 
     /**
      * Constructor with initialisation.
@@ -20,16 +20,16 @@ public:
      * @param definitionPoint Definition point of the diametric dimension.
      * @param leader Leader length.
      */
-    RS_DimDiametricData(const Vector& definitionPoint,
+    DimDiametricData(const Vector& definitionPoint,
                      double leader) {
         this->definitionPoint = definitionPoint;
         this->leader = leader;
     }
 
-    friend class RS_DimDiametric;
+    friend class DimDiametric;
     //friend class RS_ActionDimDiametric;
 
-    friend std::ostream & operator<<(std::ostream & os, const RS_DimDiametricData & dd)
+    friend std::ostream & operator<<(std::ostream & os, const DimDiametricData & dd)
     {
         os << "(" << dd.definitionPoint << "/" << dd.leader << ")";
         return os;
@@ -47,15 +47,15 @@ public:
  *
  * @author Andrew Mustun
  */
-class RS_DimDiametric: public RS_Dimension
+class DimDiametric: public Dimension
 {
        public:
-               RS_DimDiametric(RS_EntityContainer * parent, const RS_DimensionData & d, const RS_DimDiametricData & ed);
-               virtual ~RS_DimDiametric();
+               DimDiametric(EntityContainer * parent, const DimensionData & d, const DimDiametricData & ed);
+               virtual ~DimDiametric();
 
-               virtual RS_Entity * clone();
+               virtual Entity * clone();
                virtual RS2::EntityType rtti() const;
-               RS_DimDiametricData getEData() const;
+               DimDiametricData getEData() const;
                virtual VectorSolutions getRefPoints();
                virtual QString getMeasuredLabel();
                virtual void update(bool autoText=false);
@@ -67,11 +67,11 @@ class RS_DimDiametric: public RS_Dimension
                virtual void mirror(Vector axisPoint1, Vector axisPoint2);
                virtual void moveRef(const Vector & ref, const Vector & offset);
 
-               friend std::ostream & operator<<(std::ostream & os, const RS_DimDiametric & d);
+               friend std::ostream & operator<<(std::ostream & os, const DimDiametric & d);
 
        protected:
                /** Extended data. */
-               RS_DimDiametricData edata;
+               DimDiametricData edata;
 };
 
 #endif
index 56f73bd610ae57f1eb80520ca479a7430c53e704..471834518d8f617b883d578e03cda28f109f1c30 100644 (file)
 /**
  * Constructor.
  */
-RS_Dimension::RS_Dimension(RS_EntityContainer * parent, const RS_DimensionData & d):
-       RS_EntityContainer(parent), data(d)
+Dimension::Dimension(EntityContainer * parent, const DimensionData & d):
+       EntityContainer(parent), data(d)
 {
 }
 
-/*virtual*/ RS_Dimension::~RS_Dimension()
+/*virtual*/ Dimension::~Dimension()
 {
 }
 
 /** @return Copy of data that defines the dimension. */
-RS_DimensionData RS_Dimension::getData() const
+DimensionData Dimension::getData() const
 {
        return data;
 }
 
-Vector RS_Dimension::getNearestRef(const Vector & coord, double * dist)
+Vector Dimension::getNearestRef(const Vector & coord, double * dist)
 {
-       return RS_Entity::getNearestRef(coord, dist);
+       return Entity::getNearestRef(coord, dist);
 }
 
-Vector RS_Dimension::getNearestSelectedRef(const Vector & coord, double * dist)
+Vector Dimension::getNearestSelectedRef(const Vector & coord, double * dist)
 {
-       return RS_Entity::getNearestSelectedRef(coord, dist);
+       return Entity::getNearestSelectedRef(coord, dist);
 }
 
 /**
@@ -56,7 +56,7 @@ Vector RS_Dimension::getNearestSelectedRef(const Vector & coord, double * dist)
  *      label if appropriate.
  * @see getMeasuredLabel
  */
-QString RS_Dimension::getLabel(bool resolve)
+QString Dimension::getLabel(bool resolve)
 {
        if (!resolve)
                return data.text;
@@ -82,7 +82,7 @@ QString RS_Dimension::getLabel(bool resolve)
 /**
  * Sets a new text for the label.
  */
-void RS_Dimension::setLabel(const QString & l)
+void Dimension::setLabel(const QString & l)
 {
        data.text = l;
 }
@@ -92,11 +92,11 @@ void RS_Dimension::setLabel(const QString & l)
  *
  * @param forceAutoText Automatically reposition the text label.
  */
-void RS_Dimension::updateCreateDimensionLine(const Vector & p1,
+void Dimension::updateCreateDimensionLine(const Vector & p1,
        const Vector & p2, bool arrow1, bool arrow2, bool forceAutoText)
 {
 #if 0
-printf("RS_Dimension::updateCreateDimensionLine()...\n");
+printf("Dimension::updateCreateDimensionLine()...\n");
 #endif
        // text height (DIMTXT)
        double dimtxt = getTextHeight();
@@ -110,8 +110,8 @@ printf("RS_Dimension::updateCreateDimensionLine()...\n");
        double arrowAngle1, arrowAngle2;
 
        // Create dimension line:
-       RS_Line * dimensionLine = new RS_Line(this, RS_LineData(p1, p2));
-       dimensionLine->setPen(RS_Pen(RS2::FlagInvalid));
+       Line * dimensionLine = new Line(this, LineData(p1, p2));
+       dimensionLine->setPen(Pen(RS2::FlagInvalid));
        dimensionLine->setLayer(NULL);
        addEntity(dimensionLine);
 
@@ -133,15 +133,15 @@ printf("RS_Dimension::updateCreateDimensionLine()...\n");
        }
 
        // Arrows:
-       RS_SolidData sd;
-       RS_Solid * arrow;
+       SolidData sd;
+       Solid * arrow;
 
        if (arrow1)
        {
                // arrow 1
-               arrow = new RS_Solid(this, sd);
+               arrow = new Solid(this, sd);
                arrow->shapeArrow(p1, arrowAngle1, getArrowSize());
-               arrow->setPen(RS_Pen(RS2::FlagInvalid));
+               arrow->setPen(Pen(RS2::FlagInvalid));
                arrow->setLayer(NULL);
                addEntity(arrow);
        }
@@ -149,21 +149,21 @@ printf("RS_Dimension::updateCreateDimensionLine()...\n");
        if (arrow2)
        {
                // arrow 2:
-               arrow = new RS_Solid(this, sd);
+               arrow = new Solid(this, sd);
                arrow->shapeArrow(p2, arrowAngle2, getArrowSize());
-               arrow->setPen(RS_Pen(RS2::FlagInvalid));
+               arrow->setPen(Pen(RS2::FlagInvalid));
                arrow->setLayer(NULL);
                addEntity(arrow);
        }
 
        // Text label:
-       RS_TextData textData;
+       TextData textData;
        Vector textPos;
 
        double dimAngle1 = dimensionLine->getAngle1();
        double textAngle;
        bool corrected = false;
-       textAngle = RS_Math::makeAngleReadable(dimAngle1, true, &corrected);
+       textAngle = Math::makeAngleReadable(dimAngle1, true, &corrected);
 
        if (data.middleOfText.valid && !forceAutoText)
        {
@@ -188,13 +188,13 @@ printf("RS_Dimension::updateCreateDimensionLine()...\n");
                data.middleOfText = textPos;
        }
 
-       textData = RS_TextData(textPos, dimtxt, 30.0, RS2::VAlignMiddle, RS2::HAlignCenter,
+       textData = TextData(textPos, dimtxt, 30.0, RS2::VAlignMiddle, RS2::HAlignCenter,
                RS2::LeftToRight, RS2::Exact, 1.0, getLabel(), "standard", textAngle);
 #if 0
 printf("--> %s\n", getLabel().toAscii().data());
 #endif
 
-       RS_Text * text = new RS_Text(this, textData);
+       Text * text = new Text(this, textData);
 
        // move text to the side:
        Vector distH;
@@ -205,52 +205,52 @@ printf("--> %s\n", getLabel().toAscii().data());
                text->move(distH);
        }
 
-       text->setPen(RS_Pen(RS2::FlagInvalid));
+       text->setPen(Pen(RS2::FlagInvalid));
        text->setLayer(NULL);
        addEntity(text);
 }
 
-Vector RS_Dimension::getDefinitionPoint()
+Vector Dimension::getDefinitionPoint()
 {
        return data.definitionPoint;
 }
 
-Vector RS_Dimension::getMiddleOfText()
+Vector Dimension::getMiddleOfText()
 {
        return data.middleOfText;
 }
 
-RS2::VAlign RS_Dimension::getVAlign()
+RS2::VAlign Dimension::getVAlign()
 {
        return data.valign;
 }
 
-RS2::HAlign RS_Dimension::getHAlign()
+RS2::HAlign Dimension::getHAlign()
 {
        return data.halign;
 }
 
-RS2::TextLineSpacingStyle RS_Dimension::getLineSpacingStyle()
+RS2::TextLineSpacingStyle Dimension::getLineSpacingStyle()
 {
        return data.lineSpacingStyle;
 }
 
-double RS_Dimension::getLineSpacingFactor()
+double Dimension::getLineSpacingFactor()
 {
        return data.lineSpacingFactor;
 }
 
-QString RS_Dimension::getText()
+QString Dimension::getText()
 {
        return data.text;
 }
 
-QString RS_Dimension::getStyle()
+QString Dimension::getStyle()
 {
        return data.style;
 }
 
-double RS_Dimension::getAngle()
+double Dimension::getAngle()
 {
        return data.angle;
 }
@@ -258,7 +258,7 @@ double RS_Dimension::getAngle()
 /**
  * @return arrow size in drawing units.
  */
-double RS_Dimension::getArrowSize()
+double Dimension::getArrowSize()
 {
        return getGraphicVariable("$DIMASZ", 2.5, 40);
 }
@@ -266,7 +266,7 @@ double RS_Dimension::getArrowSize()
 /**
  * @return extension line overlength in drawing units.
  */
-double RS_Dimension::getExtensionLineExtension()
+double Dimension::getExtensionLineExtension()
 {
        return getGraphicVariable("$DIMEXE", 1.25, 40);
 }
@@ -274,7 +274,7 @@ double RS_Dimension::getExtensionLineExtension()
 /**
  * @return extension line offset from entities in drawing units.
  */
-double RS_Dimension::getExtensionLineOffset()
+double Dimension::getExtensionLineOffset()
 {
        return getGraphicVariable("$DIMEXO", 0.625, 40);
 }
@@ -282,7 +282,7 @@ double RS_Dimension::getExtensionLineOffset()
 /**
  * @return extension line gap to text in drawing units.
  */
-double RS_Dimension::getDimensionLineGap()
+double Dimension::getDimensionLineGap()
 {
        return getGraphicVariable("$DIMGAP", 0.625, 40);
 }
@@ -290,7 +290,7 @@ double RS_Dimension::getDimensionLineGap()
 /**
  * @return Dimension lables text height.
  */
-double RS_Dimension::getTextHeight()
+double Dimension::getTextHeight()
 {
        return getGraphicVariable("$DIMTXT", 2.5, 40);
 }
@@ -301,13 +301,13 @@ double RS_Dimension::getTextHeight()
  * If the variable is not found it is added with the given default
  * value converted to the local unit.
  */
-double RS_Dimension::getGraphicVariable(const QString & key, double defMM, int code)
+double Dimension::getGraphicVariable(const QString & key, double defMM, int code)
 {
        double v = getGraphicVariableDouble(key, RS_MINDOUBLE);
 
        if (v <= RS_MINDOUBLE)
        {
-               addGraphicVariable(key, RS_Units::convert(defMM, RS2::Millimeter, getGraphicUnit()),
+               addGraphicVariable(key, Units::convert(defMM, RS2::Millimeter, getGraphicUnit()),
                        code);
                v = getGraphicVariableDouble(key, 1.0);
        }
@@ -315,31 +315,31 @@ double RS_Dimension::getGraphicVariable(const QString & key, double defMM, int c
        return v;
 }
 
-/*virtual*/ double RS_Dimension::getLength()
+/*virtual*/ double Dimension::getLength()
 {
        return -1.0;
 }
 
-void RS_Dimension::move(Vector offset)
+void Dimension::move(Vector offset)
 {
        data.definitionPoint.move(offset);
        data.middleOfText.move(offset);
 }
 
-void RS_Dimension::rotate(Vector center, double angle)
+void Dimension::rotate(Vector center, double angle)
 {
        data.definitionPoint.rotate(center, angle);
        data.middleOfText.rotate(center, angle);
-       data.angle = RS_Math::correctAngle(data.angle+angle);
+       data.angle = Math::correctAngle(data.angle+angle);
 }
 
-void RS_Dimension::scale(Vector center, Vector factor)
+void Dimension::scale(Vector center, Vector factor)
 {
        data.definitionPoint.scale(center, factor);
        data.middleOfText.scale(center, factor);
 }
 
-void RS_Dimension::mirror(Vector axisPoint1, Vector axisPoint2)
+void Dimension::mirror(Vector axisPoint1, Vector axisPoint2)
 {
        data.definitionPoint.mirror(axisPoint1, axisPoint2);
        data.middleOfText.mirror(axisPoint1, axisPoint2);
index fadc601540bf0752bdbf6b16f37f3e8f0af82134..50360da2157b66789fe87d21db302f3aabc74496 100644 (file)
@@ -6,13 +6,13 @@
 /**
  * Holds the data that is common to all dimension entities.
  */
-class RS_DimensionData: public RS_Flags
+class DimensionData: public Flags
 {
        public:
                /**
                 * Default constructor. Leaves the data object uninitialized.
                 */
-               RS_DimensionData() {}
+               DimensionData() {}
 
                /**
                 * Constructor with initialisation.
@@ -30,7 +30,7 @@ class RS_DimensionData: public RS_Flags
                 * @param angle Rotation angle of dimension text away from
                 *         default orientation.
                 */
-               RS_DimensionData(const Vector & definitionPoint,
+               DimensionData(const Vector & definitionPoint,
                        const Vector & middleOfText,
                        RS2::VAlign valign,
                        RS2::HAlign halign,
@@ -51,13 +51,13 @@ class RS_DimensionData: public RS_Flags
                        this->angle = angle;
                }
 
-               friend class RS_Dimension;
-               friend class RS_DimAligned;
-               friend class RS_DimLinear;
+               friend class Dimension;
+               friend class DimAligned;
+               friend class DimLinear;
                friend class RS_ActionDimAligned;
                friend class RS_ActionDimLinear;
 
-               friend std::ostream & operator<<(std::ostream & os, const RS_DimensionData & dd)
+               friend std::ostream & operator<<(std::ostream & os, const DimensionData & dd)
                {
                        os << "(" << dd.definitionPoint << ")";
                        return os;
@@ -93,13 +93,13 @@ class RS_DimensionData: public RS_Flags
  *
  * @author Andrew Mustun
  */
-class RS_Dimension: public RS_EntityContainer
+class Dimension: public EntityContainer
 {
        public:
-               RS_Dimension(RS_EntityContainer * parent, const RS_DimensionData & d);
-               virtual ~RS_Dimension();
+               Dimension(EntityContainer * parent, const DimensionData & d);
+               virtual ~Dimension();
 
-               RS_DimensionData getData() const;
+               DimensionData getData() const;
                Vector getNearestRef(const Vector & coord, double * dist);
                Vector getNearestSelectedRef(const Vector & coord, double * dist);
                QString getLabel(bool resolve = true);
@@ -142,7 +142,7 @@ class RS_Dimension: public RS_EntityContainer
 
        protected:
                /** Data common to all dimension entities. */
-               RS_DimensionData data;
+               DimensionData data;
 };
 
 #endif
index 9ce80df3a8ec950d789a03d8ffe8e52105be4976..16063aa1fd39fdccefb5b34804cbb6ea647105b9 100644 (file)
  * @para d Common dimension geometrical data.
  * @para ed Extended geometrical data for linear dimension.
  */
-RS_DimLinear::RS_DimLinear(RS_EntityContainer * parent, const RS_DimensionData & d,
-       const RS_DimLinearData & ed): RS_Dimension(parent, d), edata(ed)
+DimLinear::DimLinear(EntityContainer * parent, const DimensionData & d,
+       const DimLinearData & ed): Dimension(parent, d), edata(ed)
 {
     calculateBorders();
 }
 
-/*virtual*/ RS_DimLinear::~RS_DimLinear()
+/*virtual*/ DimLinear::~DimLinear()
 {
 }
 
-/*virtual*/ RS_Entity * RS_DimLinear::clone()
+/*virtual*/ Entity * DimLinear::clone()
 {
-       RS_DimLinear * d = new RS_DimLinear(*this);
+       DimLinear * d = new DimLinear(*this);
 #warning "!!! Need to deal with setAutoDelete() Qt3->Qt4 !!!"
 //     d->entities.setAutoDelete(entities.autoDelete());
        d->initId();
@@ -51,7 +51,7 @@ RS_DimLinear::RS_DimLinear(RS_EntityContainer * parent, const RS_DimensionData &
 }
 
 /**    @return RS2::EntityDimLinear */
-/*virtual*/ RS2::EntityType RS_DimLinear::rtti() const
+/*virtual*/ RS2::EntityType DimLinear::rtti() const
 {
        return RS2::EntityDimLinear;
 }
@@ -60,12 +60,12 @@ RS_DimLinear::RS_DimLinear(RS_EntityContainer * parent, const RS_DimensionData &
  * @return Copy of data that defines the linear dimension.
  * @see getData()
  */
-RS_DimLinearData RS_DimLinear::getEData() const
+DimLinearData DimLinear::getEData() const
 {
        return edata;
 }
 
-VectorSolutions RS_DimLinear::getRefPoints()
+VectorSolutions DimLinear::getRefPoints()
 {
        VectorSolutions ret(edata.extensionPoint1, edata.extensionPoint2,
                data.definitionPoint, data.middleOfText);
@@ -77,14 +77,14 @@ VectorSolutions RS_DimLinear::getRefPoints()
  * @return Automatically created label for the default
  * measurement of this dimension.
  */
-QString RS_DimLinear::getMeasuredLabel()
+QString DimLinear::getMeasuredLabel()
 {
        // direction of dimension line
        Vector dirDim;
        dirDim.setPolar(100.0, edata.angle);
 
        // construction line for dimension line
-       RS_ConstructionLine dimLine(NULL, RS_ConstructionLineData(data.definitionPoint,
+       ConstructionLine dimLine(NULL, ConstructionLineData(data.definitionPoint,
                data.definitionPoint + dirDim));
 
        Vector dimP1 = dimLine.getNearestPointOnEntity(edata.extensionPoint1);
@@ -98,17 +98,17 @@ QString RS_DimLinear::getMeasuredLabel()
        QString ret;
 
        if (graphic)
-               ret = RS_Units::formatLinear(dist, graphic->getUnit(),
+               ret = Units::formatLinear(dist, graphic->getUnit(),
                        graphic->getLinearFormat(), graphic->getLinearPrecision());
        else
                ret = QString("%1").arg(dist);
 //It's properly creating the label...
-//printf("RS_DimLinear::getMeasuredLabel: label=\"%s\"\n", ret.toAscii().data());
+//printf("DimLinear::getMeasuredLabel: label=\"%s\"\n", ret.toAscii().data());
 
        return ret;
 }
 
-bool RS_DimLinear::hasEndpointsWithinWindow(Vector v1, Vector v2)
+bool DimLinear::hasEndpointsWithinWindow(Vector v1, Vector v2)
 {
        return (edata.extensionPoint1.isInWindow(v1, v2)
                || edata.extensionPoint2.isInWindow(v1, v2));
@@ -120,9 +120,9 @@ bool RS_DimLinear::hasEndpointsWithinWindow(Vector v1, Vector v2)
  *
  * @param autoText Automatically reposition the text label
  */
-void RS_DimLinear::update(bool autoText)
+void DimLinear::update(bool autoText)
 {
-       RS_DEBUG->print("RS_DimLinear::update");
+       DEBUG->print("DimLinear::update");
 
        clear();
 
@@ -134,7 +134,7 @@ void RS_DimLinear::update(bool autoText)
        // extension line extension (DIMEXE)
        double dimexe = getExtensionLineExtension();
 
-       RS_LineData ld;
+       LineData ld;
        double extAngle = edata.angle + (M_PI / 2.0);
 
        // direction of dimension line
@@ -145,7 +145,7 @@ void RS_DimLinear::update(bool autoText)
        dirExt.setPolar(100.0, extAngle);
 
        // construction line for dimension line
-       RS_ConstructionLine dimLine(NULL, RS_ConstructionLineData(data.definitionPoint,
+       ConstructionLine dimLine(NULL, ConstructionLineData(data.definitionPoint,
                data.definitionPoint + dirDim));
 
        Vector dimP1 = dimLine.getNearestPointOnEntity(edata.extensionPoint1);
@@ -154,8 +154,8 @@ void RS_DimLinear::update(bool autoText)
        // Definitive dimension line:
        updateCreateDimensionLine(dimP1, dimP2, true, true, autoText);
        /*
-       ld = RS_LineData(data.definitionPoint, dimP1);
-       RS_Line* dimensionLine = new RS_Line(this, ld);
+       ld = LineData(data.definitionPoint, dimP1);
+       Line* dimensionLine = new Line(this, ld);
                addEntity(dimensionLine);
        */
        Vector vDimexo1, vDimexe1, vDimexo2, vDimexe2;
@@ -178,78 +178,78 @@ void RS_DimLinear::update(bool autoText)
        }
 
        // extension lines:
-       ld = RS_LineData(edata.extensionPoint1 + vDimexo1, dimP1 + vDimexe1);
-       RS_Line * line = new RS_Line(this, ld);
-       line->setPen(RS_Pen(RS2::FlagInvalid));
+       ld = LineData(edata.extensionPoint1 + vDimexo1, dimP1 + vDimexe1);
+       Line * line = new Line(this, ld);
+       line->setPen(Pen(RS2::FlagInvalid));
        line->setLayer(NULL);
        addEntity(line);
 
-       ld = RS_LineData(edata.extensionPoint2 + vDimexo2, dimP2 + vDimexe2);
+       ld = LineData(edata.extensionPoint2 + vDimexo2, dimP2 + vDimexe2);
        //data.definitionPoint+vDimexe2);
-       line = new RS_Line(this, ld);
-       line->setPen(RS_Pen(RS2::FlagInvalid));
+       line = new Line(this, ld);
+       line->setPen(Pen(RS2::FlagInvalid));
        line->setLayer(NULL);
        addEntity(line);
 
        calculateBorders();
 }
 
-Vector RS_DimLinear::getExtensionPoint1()
+Vector DimLinear::getExtensionPoint1()
 {
        return edata.extensionPoint1;
 }
 
-Vector RS_DimLinear::getExtensionPoint2()
+Vector DimLinear::getExtensionPoint2()
 {
        return edata.extensionPoint2;
 }
 
-double RS_DimLinear::getAngle()
+double DimLinear::getAngle()
 {
        return edata.angle;
 }
 
-void RS_DimLinear::setAngle(double a)
+void DimLinear::setAngle(double a)
 {
-       edata.angle = RS_Math::correctAngle(a);
+       edata.angle = Math::correctAngle(a);
 }
 
-double RS_DimLinear::getOblique()
+double DimLinear::getOblique()
 {
        return edata.oblique;
 }
 
-void RS_DimLinear::move(Vector offset)
+void DimLinear::move(Vector offset)
 {
-       RS_Dimension::move(offset);
+       Dimension::move(offset);
 
        edata.extensionPoint1.move(offset);
        edata.extensionPoint2.move(offset);
        update();
 }
 
-void RS_DimLinear::rotate(Vector center, double angle)
+void DimLinear::rotate(Vector center, double angle)
 {
-       RS_Dimension::rotate(center, angle);
+       Dimension::rotate(center, angle);
 
        edata.extensionPoint1.rotate(center, angle);
        edata.extensionPoint2.rotate(center, angle);
-       edata.angle = RS_Math::correctAngle(edata.angle+angle);
+       edata.angle = Math::correctAngle(edata.angle+angle);
        update();
 }
 
-void RS_DimLinear::scale(Vector center, Vector factor)
+void DimLinear::scale(Vector center, Vector factor)
 {
-       RS_Dimension::scale(center, factor);
+       Dimension::scale(center, factor);
 
        edata.extensionPoint1.scale(center, factor);
        edata.extensionPoint2.scale(center, factor);
        update();
 }
 
-void RS_DimLinear::mirror(Vector axisPoint1, Vector axisPoint2)
+void DimLinear::mirror(Vector axisPoint1, Vector axisPoint2)
 {
-       RS_Dimension::mirror(axisPoint1, axisPoint2);
+       Dimension::mirror(axisPoint1, axisPoint2);
 
        edata.extensionPoint1.mirror(axisPoint1, axisPoint2);
        edata.extensionPoint2.mirror(axisPoint1, axisPoint2);
@@ -262,7 +262,7 @@ void RS_DimLinear::mirror(Vector axisPoint1, Vector axisPoint2)
        update();
 }
 
-void RS_DimLinear::stretch(Vector firstCorner, Vector secondCorner, Vector offset)
+void DimLinear::stretch(Vector firstCorner, Vector secondCorner, Vector offset)
 {
        //e->calculateBorders();
        if (getMin().isInWindow(firstCorner, secondCorner)
@@ -287,13 +287,13 @@ void RS_DimLinear::stretch(Vector firstCorner, Vector secondCorner, Vector offse
                double ang2 = edata.extensionPoint1.angleTo(edata.extensionPoint2)
                                                + M_PI/2;
 
-               double diff = RS_Math::getAngleDifference(ang1, ang2);
+               double diff = Math::getAngleDifference(ang1, ang2);
                if (diff>M_PI) {
                        diff-=2*M_PI;
                }
 
                if (fabs(diff)>M_PI/2) {
-                       ang2 = RS_Math::correctAngle(ang2+M_PI);
+                       ang2 = Math::correctAngle(ang2+M_PI);
                }
 
                Vector v;
@@ -305,7 +305,7 @@ void RS_DimLinear::stretch(Vector firstCorner, Vector secondCorner, Vector offse
        update(true);
 }
 
-void RS_DimLinear::moveRef(const Vector & ref, const Vector & offset)
+void DimLinear::moveRef(const Vector & ref, const Vector & offset)
 {
        if (ref.distanceTo(data.definitionPoint) < 1.0e-4)
        {
@@ -332,7 +332,7 @@ void RS_DimLinear::moveRef(const Vector & ref, const Vector & offset)
 /**
  * Dumps the point's data to stdout.
  */
-std::ostream & operator<<(std::ostream & os, const RS_DimLinear & d)
+std::ostream & operator<<(std::ostream & os, const DimLinear & d)
 {
     os << " DimLinear: " << d.getData() << "\n" << d.getEData() << "\n";
     return os;
index 80ed0b19800419066cd19381eca2571ec3af58db..fbedb126a314f243a7db34418ce43c15edd5831f 100644 (file)
@@ -6,13 +6,13 @@
 /**
  * Holds the data that defines a linear dimension entity.
  */
-class RS_DimLinearData
+class DimLinearData
 {
        public:
                /**
                 * Default constructor. Leaves the data object uninitialized.
                 */
-               RS_DimLinearData() {}
+               DimLinearData() {}
 
                /**
                 * Constructor with initialisation.
@@ -22,7 +22,7 @@ class RS_DimLinearData
                 * @param angle Rotation angle in rad.
                 * @param oblique Oblique angle in rad.
                 */
-               RS_DimLinearData(const Vector & extensionPoint1,
+               DimLinearData(const Vector & extensionPoint1,
                        const Vector & extensionPoint2,
                        double angle, double oblique)
                {
@@ -32,10 +32,10 @@ class RS_DimLinearData
                        this->oblique = oblique;
                }
 
-               friend class RS_DimLinear;
+               friend class DimLinear;
                friend class RS_ActionDimLinear;
 
-               friend std::ostream & operator<<(std::ostream & os, const RS_DimLinearData & dd)
+               friend std::ostream & operator<<(std::ostream & os, const DimLinearData & dd)
                {
                        os << "(" << dd.extensionPoint1 << "/" << dd.extensionPoint1 << ")";
                        return os;
@@ -57,15 +57,15 @@ class RS_DimLinearData
  *
  * @author Andrew Mustun
  */
-class RS_DimLinear: public RS_Dimension
+class DimLinear: public Dimension
 {
        public:
-               RS_DimLinear(RS_EntityContainer * parent, const RS_DimensionData & d, const RS_DimLinearData & ed);
-               virtual ~RS_DimLinear();
+               DimLinear(EntityContainer * parent, const DimensionData & d, const DimLinearData & ed);
+               virtual ~DimLinear();
 
-               virtual RS_Entity * clone();
+               virtual Entity * clone();
                virtual RS2::EntityType rtti() const;
-               RS_DimLinearData getEData() const;
+               DimLinearData getEData() const;
                virtual VectorSolutions getRefPoints();
                virtual QString getMeasuredLabel();
                virtual void update(bool autoText = false);
@@ -82,11 +82,11 @@ class RS_DimLinear: public RS_Dimension
                virtual void stretch(Vector firstCorner, Vector secondCorner, Vector offset);
                virtual void moveRef(const Vector & ref, const Vector & offset);
 
-               friend std::ostream & operator<<(std::ostream & os, const RS_DimLinear & d);
+               friend std::ostream & operator<<(std::ostream & os, const DimLinear & d);
 
        protected:
                /** Extended data. */
-               RS_DimLinearData edata;
+               DimLinearData edata;
 };
 
 #endif
index d2d48dc76ca80b29a0860953f646876faaac78bd..dd783622ebf0b9bf3483fe7225576bcebe77aacd 100644 (file)
  * @para d Common dimension geometrical data.
  * @para ed Extended geometrical data for radial dimension.
  */
-RS_DimRadial::RS_DimRadial(RS_EntityContainer * parent, const RS_DimensionData & d,
-       const RS_DimRadialData & ed): RS_Dimension(parent, d), edata(ed)
+DimRadial::DimRadial(EntityContainer * parent, const DimensionData & d,
+       const DimRadialData & ed): Dimension(parent, d), edata(ed)
 {
 }
 
-/*virtual*/ RS_DimRadial::~RS_DimRadial()
+/*virtual*/ DimRadial::~DimRadial()
 {
 }
 
-/*virtual*/ RS_Entity * RS_DimRadial::clone()
+/*virtual*/ Entity * DimRadial::clone()
 {
-       RS_DimRadial * d = new RS_DimRadial(*this);
+       DimRadial * d = new DimRadial(*this);
 #warning "!!! Need to deal with setAutoDelete() Qt3->Qt4 !!!"
 //     d->entities.setAutoDelete(entities.autoDelete());
        d->initId();
@@ -48,7 +48,7 @@ RS_DimRadial::RS_DimRadial(RS_EntityContainer * parent, const RS_DimensionData &
 }
 
 /**    @return RS2::EntityDimRadial */
-/*virtual*/ RS2::EntityType RS_DimRadial::rtti() const
+/*virtual*/ RS2::EntityType DimRadial::rtti() const
 {
        return RS2::EntityDimRadial;
 }
@@ -57,7 +57,7 @@ RS_DimRadial::RS_DimRadial(RS_EntityContainer * parent, const RS_DimensionData &
  * @return Copy of data that defines the radial dimension.
  * @see getData()
  */
-RS_DimRadialData RS_DimRadial::getEData() const
+DimRadialData DimRadial::getEData() const
 {
        return edata;
 }
@@ -66,7 +66,7 @@ RS_DimRadialData RS_DimRadial::getEData() const
  * @return Automatically created label for the default
  * measurement of this dimension.
  */
-QString RS_DimRadial::getMeasuredLabel()
+QString DimRadial::getMeasuredLabel()
 {
     // Definitive dimension line:
     double dist = data.definitionPoint.distanceTo(edata.definitionPoint);
@@ -75,7 +75,7 @@ QString RS_DimRadial::getMeasuredLabel()
 
     QString ret;
     if (graphic!=NULL) {
-        ret = RS_Units::formatLinear(dist, graphic->getUnit(),
+        ret = Units::formatLinear(dist, graphic->getUnit(),
                                      graphic->getLinearFormat(), graphic->getLinearPrecision());
     } else {
         ret = QString("%1").arg(dist);
@@ -85,7 +85,7 @@ QString RS_DimRadial::getMeasuredLabel()
 }
 
 
-VectorSolutions RS_DimRadial::getRefPoints() {
+VectorSolutions DimRadial::getRefPoints() {
        VectorSolutions ret(edata.definitionPoint,
                                                data.definitionPoint, data.middleOfText);
        return ret;
@@ -97,9 +97,9 @@ VectorSolutions RS_DimRadial::getRefPoints() {
  *
  * @param autoText Automatically reposition the text label
  */
-void RS_DimRadial::update(bool autoText)
+void DimRadial::update(bool autoText)
 {
-    RS_DEBUG->print("RS_DimRadial::update");
+    DEBUG->print("DimRadial::update");
 
     clear();
 
@@ -123,9 +123,9 @@ void RS_DimRadial::update(bool autoText)
     // length of dimension line:
     double length = p1.distanceTo(p2);
 
-    RS_TextData textData;
+    TextData textData;
 
-    textData = RS_TextData(Vector(0.0,0.0),
+    textData = TextData(Vector(0.0,0.0),
                            dimtxt, 30.0,
                            RS2::VAlignMiddle,
                            RS2::HAlignCenter,
@@ -136,7 +136,7 @@ void RS_DimRadial::update(bool autoText)
                            "standard",
                            0.0);
 
-    RS_Text* text = new RS_Text(this, textData);
+    Text* text = new Text(this, textData);
     double textWidth = text->getSize().x;
 
     // do we have to put the arrow / text outside of the arc?
@@ -151,14 +151,14 @@ void RS_DimRadial::update(bool autoText)
     }
 
     // create arrow:
-    RS_SolidData sd;
-    RS_Solid* arrow;
+    SolidData sd;
+    Solid* arrow;
 
-    arrow = new RS_Solid(this, sd);
+    arrow = new Solid(this, sd);
     arrow->shapeArrow(p2,
                       arrowAngle,
                       getArrowSize());
-    arrow->setPen(RS_Pen(RS2::FlagInvalid));
+    arrow->setPen(Pen(RS2::FlagInvalid));
     arrow->setLayer(NULL);
     addEntity(arrow);
 
@@ -167,8 +167,8 @@ void RS_DimRadial::update(bool autoText)
     p3 += p1;
 
     // Create dimension line:
-    RS_Line* dimensionLine = new RS_Line(this, RS_LineData(p1, p3));
-    dimensionLine->setPen(RS_Pen(RS2::FlagInvalid));
+    Line* dimensionLine = new Line(this, LineData(p1, p3));
+    dimensionLine->setPen(Pen(RS2::FlagInvalid));
     dimensionLine->setLayer(NULL);
     addEntity(dimensionLine);
 
@@ -209,34 +209,34 @@ void RS_DimRadial::update(bool autoText)
     text->rotate(Vector(0.0,0.0), textAngle);
     text->move(textPos);
 
-    text->setPen(RS_Pen(RS2::FlagInvalid));
+    text->setPen(Pen(RS2::FlagInvalid));
     text->setLayer(NULL);
     addEntity(text);
 
     calculateBorders();
 }
 
-Vector RS_DimRadial::getDefinitionPoint()
+Vector DimRadial::getDefinitionPoint()
 {
        return edata.definitionPoint;
 }
 
-double RS_DimRadial::getLeader()
+double DimRadial::getLeader()
 {
        return edata.leader;
 }
 
-void RS_DimRadial::move(Vector offset)
+void DimRadial::move(Vector offset)
 {
-    RS_Dimension::move(offset);
+    Dimension::move(offset);
 
     edata.definitionPoint.move(offset);
     update();
 }
 
-void RS_DimRadial::rotate(Vector center, double angle)
+void DimRadial::rotate(Vector center, double angle)
 {
-    RS_Dimension::rotate(center, angle);
+    Dimension::rotate(center, angle);
 
     edata.definitionPoint.rotate(center, angle);
     update();
@@ -244,8 +244,8 @@ void RS_DimRadial::rotate(Vector center, double angle)
 
 
 
-void RS_DimRadial::scale(Vector center, Vector factor) {
-    RS_Dimension::scale(center, factor);
+void DimRadial::scale(Vector center, Vector factor) {
+    Dimension::scale(center, factor);
 
     edata.definitionPoint.scale(center, factor);
     edata.leader*=factor.x;
@@ -254,15 +254,15 @@ void RS_DimRadial::scale(Vector center, Vector factor) {
 
 
 
-void RS_DimRadial::mirror(Vector axisPoint1, Vector axisPoint2) {
-    RS_Dimension::mirror(axisPoint1, axisPoint2);
+void DimRadial::mirror(Vector axisPoint1, Vector axisPoint2) {
+    Dimension::mirror(axisPoint1, axisPoint2);
 
     edata.definitionPoint.mirror(axisPoint1, axisPoint2);
     update();
 }
 
 
-void RS_DimRadial::moveRef(const Vector& ref, const Vector& offset) {
+void DimRadial::moveRef(const Vector& ref, const Vector& offset) {
 
     if (ref.distanceTo(edata.definitionPoint)<1.0e-4) {
                double d = data.definitionPoint.distanceTo(edata.definitionPoint);
@@ -282,7 +282,7 @@ void RS_DimRadial::moveRef(const Vector& ref, const Vector& offset) {
 /**
  * Dumps the point's data to stdout.
  */
-std::ostream& operator << (std::ostream& os, const RS_DimRadial& d) {
+std::ostream& operator << (std::ostream& os, const DimRadial& d) {
     os << " DimRadial: " << d.getData() << "\n" << d.getEData() << "\n";
     return os;
 }
index 4570d96aa672dcd65bc3cd5580b9a02514a639e5..b239ac8efadf7515eb60ce39b2c823fd9e136895 100644 (file)
@@ -6,13 +6,13 @@
 /**
  * Holds the data that defines a radial dimension entity.
  */
-class RS_DimRadialData
+class DimRadialData
 {
 public:
     /**
      * Default constructor. Leaves the data object uninitialized.
      */
-    RS_DimRadialData() {}
+    DimRadialData() {}
 
     /**
      * Constructor with initialisation.
@@ -20,17 +20,17 @@ public:
      * @param definitionPoint Definition point of the radial dimension.
      * @param leader Leader length.
      */
-    RS_DimRadialData(const Vector& definitionPoint,
+    DimRadialData(const Vector& definitionPoint,
                      double leader) {
         this->definitionPoint = definitionPoint;
         this->leader = leader;
     }
 
-    friend class RS_DimRadial;
+    friend class DimRadial;
     //friend class RS_ActionDimRadial;
 
     friend std::ostream& operator << (std::ostream& os,
-                                      const RS_DimRadialData& dd) {
+                                      const DimRadialData& dd) {
         os << "(" << dd.definitionPoint << "/" << dd.leader << ")";
         return os;
     }
@@ -47,15 +47,15 @@ public:
  *
  * @author Andrew Mustun
  */
-class RS_DimRadial: public RS_Dimension
+class DimRadial: public Dimension
 {
        public:
-               RS_DimRadial(RS_EntityContainer * parent, const RS_DimensionData & d, const RS_DimRadialData & ed);
-               virtual ~RS_DimRadial();
+               DimRadial(EntityContainer * parent, const DimensionData & d, const DimRadialData & ed);
+               virtual ~DimRadial();
 
-               virtual RS_Entity * clone();
+               virtual Entity * clone();
                virtual RS2::EntityType rtti() const;
-               RS_DimRadialData getEData() const;
+               DimRadialData getEData() const;
                virtual VectorSolutions getRefPoints();
                virtual QString getMeasuredLabel();
                virtual void update(bool autoText = false);
@@ -67,11 +67,11 @@ class RS_DimRadial: public RS_Dimension
                virtual void mirror(Vector axisPoint1, Vector axisPoint2);
                virtual void moveRef(const Vector& ref, const Vector& offset);
 
-               friend std::ostream& operator << (std::ostream& os, const RS_DimRadial& d);
+               friend std::ostream& operator << (std::ostream& os, const DimRadial& d);
 
        protected:
                /** Extended data. */
-               RS_DimRadialData edata;
+               DimRadialData edata;
 };
 
 #endif
index cd8503e1f79a813a41ff7e981476e4df2fb7e306..b1d31b754c9399f2825edffeb359b2e87e1174f3 100644 (file)
  * @param parent Parent of the document. Often that's NULL but
  *        for blocks it's the blocklist.
  */
-RS_Document::RS_Document(RS_EntityContainer * parent):
-       RS_EntityContainer(parent), RS_Undo()
+Document::Document(EntityContainer * parent):
+       EntityContainer(parent), Undo()
 {
-       RS_DEBUG->print("RS_Document::RS_Document() ");
+       DEBUG->print("Document::Document() ");
 
        filename = "";
        formatType = RS2::FormatUnknown;
        setModified(false);
-       RS_Color col(RS2::FlagByLayer);
-       activePen = RS_Pen(col, RS2::WidthByLayer, RS2::LineByLayer);
+       Color col(RS2::FlagByLayer);
+       activePen = Pen(col, RS2::WidthByLayer, RS2::LineByLayer);
 }
 
-RS_Document::~RS_Document()
+Document::~Document()
 {
 }
 
 /**
  * @return true for all document entities (e.g. Graphics or Blocks).
  */
-bool RS_Document::isDocument() const
+bool Document::isDocument() const
 {
        return true;
 }
 
 /**
  * Removes an entity from the entiy container. Implementation
- * from RS_Undo.
+ * from Undo.
  */
-void RS_Document::removeUndoable(RS_Undoable * u)
+void Document::removeUndoable(Undoable * u)
 {
        if (u != NULL && u->undoRtti() == RS2::UndoableEntity)
        {
-               removeEntity((RS_Entity *)u);
+               removeEntity((Entity *)u);
        }
 }
 
 /**
  * @return Currently active drawing pen.
  */
-RS_Pen RS_Document::getActivePen() const
+Pen Document::getActivePen() const
 {
        return activePen;
 }
@@ -71,7 +71,7 @@ RS_Pen RS_Document::getActivePen() const
 /**
  * Sets the currently active drawing pen to p.
  */
-void RS_Document::setActivePen(RS_Pen p)
+void Document::setActivePen(Pen p)
 {
        activePen = p;
 }
@@ -80,7 +80,7 @@ void RS_Document::setActivePen(RS_Pen p)
  * @return File name of the document currently loaded.
  * Note, that the default file name is empty.
  */
-QString RS_Document::getFilename() const
+QString Document::getFilename() const
 {
        return filename;
 }
@@ -88,7 +88,7 @@ QString RS_Document::getFilename() const
 /**
  * Sets file name for the document currently loaded.
  */
-void RS_Document::setFilename(const QString & fn)
+void Document::setFilename(const QString & fn)
 {
        filename = fn;
 }
@@ -96,9 +96,9 @@ void RS_Document::setFilename(const QString & fn)
 /**
  * Sets the documents modified status to 'm'.
  */
-void RS_Document::setModified(bool m)
+void Document::setModified(bool m)
 {
-       //std::cout << "RS_Document::setModified: %d" << (int)m << std::endl;
+       //std::cout << "Document::setModified: %d" << (int)m << std::endl;
        modified = m;
 }
 
@@ -106,7 +106,7 @@ void RS_Document::setModified(bool m)
  * @retval true The document has been modified since it was last saved.
  * @retval false The document has not been modified since it was last saved.
  */
-bool RS_Document::isModified() const
+bool Document::isModified() const
 {
        return modified;
 }
@@ -114,8 +114,8 @@ bool RS_Document::isModified() const
 /**
  * Overwritten to set modified flag before starting an undo cycle.
  */
-void RS_Document::startUndoCycle()
+void Document::startUndoCycle()
 {
        setModified(true);
-       RS_Undo::startUndoCycle();
+       Undo::startUndoCycle();
 }
index dd5463c4624f30ced91669a2be50b4936d63b656..8c0044e1bd499e5e0ff298aca8c5f54df7c9fe73 100644 (file)
@@ -5,8 +5,8 @@
 #include "entitycontainer.h"
 #include "undo.h"
 
-class RS_BlockList;
-class RS_LayerList;
+class BlockList;
+class LayerList;
 
 /**
  * Base class for documents. Documents can be either graphics or
@@ -16,14 +16,14 @@ class RS_LayerList;
  *
  * @author Andrew Mustun
  */
-class RS_Document: public RS_EntityContainer, public RS_Undo
+class Document: public EntityContainer, public Undo
 {
        public:
-               RS_Document(RS_EntityContainer * parent = NULL);
-               virtual ~RS_Document();
+               Document(EntityContainer * parent = NULL);
+               virtual ~Document();
 
-               virtual RS_LayerList * getLayerList() = 0;
-               virtual RS_BlockList * getBlockList() = 0;
+               virtual LayerList * getLayerList() = 0;
+               virtual BlockList * getBlockList() = 0;
 
                virtual void newDoc() = 0;
                virtual bool save() = 0;
@@ -31,9 +31,9 @@ class RS_Document: public RS_EntityContainer, public RS_Undo
                virtual bool open(const QString &filename, RS2::FormatType type) = 0;
 
                virtual bool isDocument() const;
-               virtual void removeUndoable(RS_Undoable * u);
-               RS_Pen getActivePen() const;
-               void setActivePen(RS_Pen p);
+               virtual void removeUndoable(Undoable * u);
+               Pen getActivePen() const;
+               void setActivePen(Pen p);
                QString getFilename() const;
                void setFilename(const QString & fn);
                virtual void setModified(bool m);
@@ -44,7 +44,7 @@ class RS_Document: public RS_EntityContainer, public RS_Undo
                /** Flag set if the document was modified and not yet saved. */
                bool modified;
                /** Active pen. */
-               RS_Pen activePen;
+               Pen activePen;
                /** File name of the document or empty for a new document. */
                QString filename;
                /** Format type */
index 4193ae52af46ca5924be31749555b315305aa361..d376e049a4bb12c80e5104407a096723b7303955 100644 (file)
 /**
  * Default constructor.
  */
-Drawing::Drawing(RS_EntityContainer * parent): RS_Document(parent), layerList(),
+Drawing::Drawing(EntityContainer * parent): Document(parent), layerList(),
        blockList(true)
 #ifdef RS_CAM
        , camData()
 #endif
 {
        settings.beginGroup("Defaults");
-       setUnit(RS_Units::stringToUnit(settings.value("Unit", "None").toString()));
+       setUnit(Units::stringToUnit(settings.value("Unit", "None").toString()));
        settings.endGroup();
 
        RS2::Unit unit = getUnit();
@@ -50,11 +50,11 @@ Drawing::Drawing(RS_EntityContainer * parent): RS_Document(parent), layerList(),
        }
        else
        {
-               addVariable("$DIMASZ", RS_Units::convert(2.5, RS2::Millimeter, unit), 40);
-               addVariable("$DIMEXE", RS_Units::convert(1.25, RS2::Millimeter, unit), 40);
-               addVariable("$DIMEXO", RS_Units::convert(0.625, RS2::Millimeter, unit), 40);
-               addVariable("$DIMGAP", RS_Units::convert(0.625, RS2::Millimeter, unit), 40);
-               addVariable("$DIMTXT", RS_Units::convert(2.5, RS2::Millimeter, unit), 40);
+               addVariable("$DIMASZ", Units::convert(2.5, RS2::Millimeter, unit), 40);
+               addVariable("$DIMEXE", Units::convert(1.25, RS2::Millimeter, unit), 40);
+               addVariable("$DIMEXO", Units::convert(0.625, RS2::Millimeter, unit), 40);
+               addVariable("$DIMGAP", Units::convert(0.625, RS2::Millimeter, unit), 40);
+               addVariable("$DIMTXT", Units::convert(2.5, RS2::Millimeter, unit), 40);
        }
 
        setModified(false);
@@ -76,13 +76,13 @@ Drawing::~Drawing()
 /**
  * Counts the entities on the given layer.
  */
-unsigned long int Drawing::countLayerEntities(RS_Layer * layer)
+unsigned long int Drawing::countLayerEntities(Layer * layer)
 {
     int c = 0;
 
     if (layer != NULL)
        {
-        for(RS_Entity * t=firstEntity(RS2::ResolveNone); t!=NULL; t=nextEntity(RS2::ResolveNone))
+        for(Entity * t=firstEntity(RS2::ResolveNone); t!=NULL; t=nextEntity(RS2::ResolveNone))
                {
             if (t->getLayer()!=NULL && t->getLayer()->getName()==layer->getName())
                        {
@@ -94,12 +94,12 @@ unsigned long int Drawing::countLayerEntities(RS_Layer * layer)
     return c;
 }
 
-/*virtual*/ RS_LayerList * Drawing::getLayerList()
+/*virtual*/ LayerList * Drawing::getLayerList()
 {
        return &layerList;
 }
 
-/*virtual*/ RS_BlockList * Drawing::getBlockList()
+/*virtual*/ BlockList * Drawing::getBlockList()
 {
        return &blockList;
 }
@@ -110,15 +110,15 @@ unsigned long int Drawing::countLayerEntities(RS_Layer * layer)
  */
 void Drawing::newDoc()
 {
-       RS_DEBUG->print("Drawing::newDoc");
+       DEBUG->print("Drawing::newDoc");
 
        clear();
 
        clearLayers();
        clearBlocks();
 
-       addLayer(new RS_Layer("0"));
-       //addLayer(new RS_Layer("ByBlock"));
+       addLayer(new Layer("0"));
+       //addLayer(new Layer("ByBlock"));
 
        setModified(false);
 }
@@ -130,11 +130,11 @@ bool Drawing::save()
 {
        bool ret = false;
 
-       RS_DEBUG->print("Drawing::save");
-       RS_DEBUG->print("  file: %s", filename.toLatin1().data());
-       RS_DEBUG->print("  format: %d", (int)formatType);
-       RS_DEBUG->print("  export...");
-       ret = RS_FILEIO->fileExport(*this, filename, formatType);
+       DEBUG->print("Drawing::save");
+       DEBUG->print("  file: %s", filename.toLatin1().data());
+       DEBUG->print("  format: %d", (int)formatType);
+       DEBUG->print("  export...");
+       ret = FILEIO->fileExport(*this, filename, formatType);
 
        if (ret)
        {
@@ -143,7 +143,7 @@ bool Drawing::save()
                blockList.setModified(false);
        }
 
-       RS_DEBUG->print("Drawing::save ok");
+       DEBUG->print("Drawing::save ok");
 
        return ret;
 }
@@ -153,7 +153,7 @@ bool Drawing::save()
  */
 bool Drawing::saveAs(const QString & filename, RS2::FormatType type)
 {
-       RS_DEBUG->print("Drawing::saveAs");
+       DEBUG->print("Drawing::saveAs");
 
        this->filename = filename;
        this->formatType = type;
@@ -166,20 +166,20 @@ bool Drawing::saveAs(const QString & filename, RS2::FormatType type)
  */
 bool Drawing::open(const QString & filename, RS2::FormatType type)
 {
-       RS_DEBUG->print("Drawing::open(%s)", filename.toLatin1().data());
+       DEBUG->print("Drawing::open(%s)", filename.toLatin1().data());
        bool ret = false;
        this->filename = filename;
        // clean all:
        newDoc();
        // import file:
-       ret = RS_FILEIO->fileImport(*this, filename, type);
+       ret = FILEIO->fileImport(*this, filename, type);
        setModified(false);
        layerList.setModified(false);
        blockList.setModified(false);
 
        //cout << *((Drawing*)graphic);
        //calculateBorders();
-       RS_DEBUG->print("Drawing::open(%s): OK", filename.toLatin1().data());
+       DEBUG->print("Drawing::open(%s): OK", filename.toLatin1().data());
 
        return ret;
 }
@@ -195,7 +195,7 @@ uint Drawing::countLayers() const
        return layerList.count();
 }
 
-RS_Layer * Drawing::layerAt(uint i)
+Layer * Drawing::layerAt(uint i)
 {
        return layerList.at(i);
 }
@@ -205,17 +205,17 @@ void Drawing::activateLayer(const QString & name)
        layerList.activate(name);
 }
 
-void Drawing::activateLayer(RS_Layer * layer)
+void Drawing::activateLayer(Layer * layer)
 {
        layerList.activate(layer);
 }
 
-RS_Layer * Drawing::getActiveLayer()
+Layer * Drawing::getActiveLayer()
 {
        return layerList.getActive();
 }
 
-/*virtual*/ void Drawing::addLayer(RS_Layer * layer)
+/*virtual*/ void Drawing::addLayer(Layer * layer)
 {
        layerList.add(layer);
 }
@@ -223,14 +223,14 @@ RS_Layer * Drawing::getActiveLayer()
 /**
  * Removes the given layer and undoes all entities on it.
  */
-/*virtual*/ void Drawing::removeLayer(RS_Layer * layer)
+/*virtual*/ void Drawing::removeLayer(Layer * layer)
 {
        if (layer != NULL && layer->getName() != "0")
        {
                // remove all entities on that layer:
                startUndoCycle();
 
-               for(RS_Entity * e=firstEntity(RS2::ResolveNone); e!=NULL; e=nextEntity(RS2::ResolveNone))
+               for(Entity * e=firstEntity(RS2::ResolveNone); e!=NULL; e=nextEntity(RS2::ResolveNone))
                {
                        if (e->getLayer() && e->getLayer()->getName() == layer->getName())
                        {
@@ -245,11 +245,11 @@ RS_Layer * Drawing::getActiveLayer()
                // remove all entities in blocks that are on that layer:
                for(uint bi=0; bi<blockList.count(); bi++)
                {
-                       RS_Block * blk = blockList.at(bi);
+                       Block * blk = blockList.at(bi);
 
                        if (blk)
                        {
-                               for(RS_Entity * e=blk->firstEntity(RS2::ResolveNone); e!=NULL; e=blk->nextEntity(RS2::ResolveNone))
+                               for(Entity * e=blk->firstEntity(RS2::ResolveNone); e!=NULL; e=blk->nextEntity(RS2::ResolveNone))
                                {
                                        if (e->getLayer() != NULL && e->getLayer()->getName() == layer->getName())
                                        {
@@ -265,12 +265,12 @@ RS_Layer * Drawing::getActiveLayer()
        }
 }
 
-/*virtual*/ void Drawing::editLayer(RS_Layer * layer, const RS_Layer & source)
+/*virtual*/ void Drawing::editLayer(Layer * layer, const Layer & source)
 {
        layerList.edit(layer, source);
 }
 
-RS_Layer * Drawing::findLayer(const QString & name)
+Layer * Drawing::findLayer(const QString & name)
 {
        return layerList.find(name);
 }
@@ -280,12 +280,12 @@ void Drawing::toggleLayer(const QString & name)
        layerList.toggle(name);
 }
 
-void Drawing::toggleLayer(RS_Layer * layer)
+void Drawing::toggleLayer(Layer * layer)
 {
        layerList.toggle(layer);
 }
 
-void Drawing::toggleLayerLock(RS_Layer * layer)
+void Drawing::toggleLayerLock(Layer * layer)
 {
        layerList.toggleLock(layer);
 }
@@ -296,12 +296,12 @@ void Drawing::freezeAllLayers(bool freeze)
 }
 
 #if 0
-void Drawing::addLayerListListener(RS_LayerListListener * listener)
+void Drawing::addLayerListListener(LayerListListener * listener)
 {
        layerList.addListener(listener);
 }
 
-void Drawing::removeLayerListListener(RS_LayerListListener * listener)
+void Drawing::removeLayerListListener(LayerListListener * listener)
 {
        layerList.removeListener(listener);
 }
@@ -319,7 +319,7 @@ uint Drawing::countBlocks()
        return blockList.count();
 }
 
-RS_Block * Drawing::blockAt(uint i)
+Block * Drawing::blockAt(uint i)
 {
        return blockList.at(i);
 }
@@ -329,17 +329,17 @@ void Drawing::activateBlock(const QString & name)
        blockList.activate(name);
 }
 
-void Drawing::activateBlock(RS_Block * block)
+void Drawing::activateBlock(Block * block)
 {
        blockList.activate(block);
 }
 
-RS_Block * Drawing::getActiveBlock()
+Block * Drawing::getActiveBlock()
 {
        return blockList.getActive();
 }
 
-/*virtual*/ bool Drawing::addBlock(RS_Block * block, bool notify/*= true*/)
+/*virtual*/ bool Drawing::addBlock(Block * block, bool notify/*= true*/)
 {
        return blockList.add(block, notify);
 }
@@ -349,12 +349,12 @@ RS_Block * Drawing::getActiveBlock()
        blockList.addNotification();
 }
 
-/*virtual*/ void Drawing::removeBlock(RS_Block * block)
+/*virtual*/ void Drawing::removeBlock(Block * block)
 {
        blockList.remove(block);
 }
 
-RS_Block * Drawing::findBlock(const QString & name)
+Block * Drawing::findBlock(const QString & name)
 {
        return blockList.find(name);
 }
@@ -369,7 +369,7 @@ void Drawing::toggleBlock(const QString & name)
        blockList.toggle(name);
 }
 
-void Drawing::toggleBlock(RS_Block * block)
+void Drawing::toggleBlock(Block * block)
 {
        blockList.toggle(block);
 }
@@ -380,12 +380,12 @@ void Drawing::freezeAllBlocks(bool freeze)
 }
 
 #if 0
-void Drawing::addBlockListListener(RS_BlockListListener * listener)
+void Drawing::addBlockListListener(BlockListListener * listener)
 {
        blockList.addListener(listener);
 }
 
-void Drawing::removeBlockListListener(RS_BlockListListener * listener)
+void Drawing::removeBlockListListener(BlockListListener * listener)
 {
        blockList.removeListener(listener);
 }
@@ -447,8 +447,8 @@ void Drawing::removeVariable(const QString & key)
        variableDict.remove(key);
 }
 
-//Q3Dict<RS_Variable> & getVariableDict()
-QMultiHash<QString, RS_Variable *> & Drawing::getVariableDict()
+//Q3Dict<Variable> & getVariableDict()
+QMultiHash<QString, Variable *> & Drawing::getVariableDict()
 {
        return variableDict.getVariableDict();
 }
@@ -476,7 +476,7 @@ void Drawing::setGridOn(bool on)
  */
 void Drawing::setUnit(RS2::Unit u)
 {
-       setPaperSize(RS_Units::convert(getPaperSize(), getUnit(), u));
+       setPaperSize(Units::convert(getPaperSize(), getUnit(), u));
        addVariable("$INSUNITS", (int)u, 70);
        //unit = u;
 }
@@ -601,7 +601,7 @@ void Drawing::setPaperInsertionBase(const Vector & p)
  */
 Vector Drawing::getPaperSize()
 {
-       Vector def = RS_Units::convert(Vector(210.0, 297.0), RS2::Millimeter, getUnit());
+       Vector def = Units::convert(Vector(210.0, 297.0), RS2::Millimeter, getUnit());
        Vector v1 = getVariableVector("$PLIMMIN", Vector(0.0, 0.0));
        Vector v2 = getVariableVector("$PLIMMAX", def);
 
@@ -625,12 +625,12 @@ void Drawing::setPaperSize(const Vector & s)
  */
 RS2::PaperFormat Drawing::getPaperFormat(bool * landscape)
 {
-       Vector size = RS_Units::convert(getPaperSize(), getUnit(), RS2::Millimeter);
+       Vector size = Units::convert(getPaperSize(), getUnit(), RS2::Millimeter);
 
        if (landscape != NULL)
                *landscape = (size.x > size.y);
 
-       return RS_Units::paperSizeToFormat(size);
+       return Units::paperSizeToFormat(size);
 }
 
 /**
@@ -638,7 +638,7 @@ RS2::PaperFormat Drawing::getPaperFormat(bool * landscape)
  */
 void Drawing::setPaperFormat(RS2::PaperFormat f, bool landscape)
 {
-       Vector size = RS_Units::paperFormatToSize(f);
+       Vector size = Units::paperFormatToSize(f);
 
        if (landscape)
        {
@@ -648,7 +648,7 @@ void Drawing::setPaperFormat(RS2::PaperFormat f, bool landscape)
        }
 
        if (f != RS2::Custom)
-               setPaperSize(RS_Units::convert(size, RS2::Millimeter, getUnit()));
+               setPaperSize(Units::convert(size, RS2::Millimeter, getUnit()));
 }
 
 /**
@@ -690,14 +690,14 @@ void Drawing::centerToPage()
  */
 void Drawing::fitToPage()
 {
-       double border = RS_Units::convert(25.0, RS2::Millimeter, getUnit());
+       double border = Units::convert(25.0, RS2::Millimeter, getUnit());
        Vector ps = getPaperSize() - Vector(border, border);
        Vector s = getSize();
        double fx = RS_MAXDOUBLE;
        double fy = RS_MAXDOUBLE;
        //double factor = 1.0;
 
-       //ps = RS_Units::convert(ps, getUnit(), RS2::Millimeter);
+       //ps = Units::convert(ps, getUnit(), RS2::Millimeter);
 
        if (fabs(s.x) > 1.0e-6)
                fx = ps.x / s.x;
@@ -748,8 +748,8 @@ std::ostream & operator<<(std::ostream & os, Drawing & g)
     os << "--- Drawing: \n";
     os << "---" << *g.getLayerList() << "\n";
     os << "---" << *g.getBlockList() << "\n";
-    os << "---" << (RS_Undo &)g << "\n";
-    os << "---" << (RS_EntityContainer &)g << "\n";
+    os << "---" << (Undo &)g << "\n";
+    os << "---" << (EntityContainer &)g << "\n";
 
     return os;
 }
index 1190f71038eaf2de2fdbb4f7869236bb9c5fcdaf..3163070798c9216f211a9b9d6721becad9a9fdce 100644 (file)
  *
  * @author Andrew Mustun
  */
-class Drawing: public RS_Document
+class Drawing: public Document
 {
        public:
-               Drawing(RS_EntityContainer * parent = NULL);
+               Drawing(EntityContainer * parent = NULL);
                virtual ~Drawing();
 
                virtual RS2::EntityType rtti() const;
-               virtual unsigned long int countLayerEntities(RS_Layer * layer);
-               virtual RS_LayerList * getLayerList();
-               virtual RS_BlockList * getBlockList();
+               virtual unsigned long int countLayerEntities(Layer * layer);
+               virtual LayerList * getLayerList();
+               virtual BlockList * getBlockList();
                virtual void newDoc();
                virtual bool save();
                virtual bool saveAs(const QString& filename, RS2::FormatType type);
@@ -34,38 +34,38 @@ class Drawing: public RS_Document
                // Wrappers for Layer functions:
                void clearLayers();
                uint countLayers() const;
-               RS_Layer * layerAt(uint i);
+               Layer * layerAt(uint i);
                void activateLayer(const QString & name);
-               void activateLayer(RS_Layer * layer);
-               RS_Layer * getActiveLayer();
-               virtual void addLayer(RS_Layer * layer);
-               virtual void removeLayer(RS_Layer * layer);
-               virtual void editLayer(RS_Layer * layer, const RS_Layer & source);
-               RS_Layer * findLayer(const QString & name);
+               void activateLayer(Layer * layer);
+               Layer * getActiveLayer();
+               virtual void addLayer(Layer * layer);
+               virtual void removeLayer(Layer * layer);
+               virtual void editLayer(Layer * layer, const Layer & source);
+               Layer * findLayer(const QString & name);
                void toggleLayer(const QString & name);
-               void toggleLayer(RS_Layer * layer);
-               void toggleLayerLock(RS_Layer * layer);
+               void toggleLayer(Layer * layer);
+               void toggleLayerLock(Layer * layer);
                void freezeAllLayers(bool freeze);
-//         void addLayerListListener(RS_LayerListListener * listener);
-//         void removeLayerListListener(RS_LayerListListener * listener);
+//         void addLayerListListener(LayerListListener * listener);
+//         void removeLayerListListener(LayerListListener * listener);
 
                // Wrapper for block functions:
                void clearBlocks();
                uint countBlocks();
-               RS_Block * blockAt(uint i);
+               Block * blockAt(uint i);
                void activateBlock(const QString & name);
-               void activateBlock(RS_Block * block);
-               RS_Block * getActiveBlock();
-               virtual bool addBlock(RS_Block * block, bool notify = true);
+               void activateBlock(Block * block);
+               Block * getActiveBlock();
+               virtual bool addBlock(Block * block, bool notify = true);
                virtual void addBlockNotification();
-               virtual void removeBlock(RS_Block * block);
-               RS_Block * findBlock(const QString & name);
+               virtual void removeBlock(Block * block);
+               Block * findBlock(const QString & name);
                QString newBlockName();
                void toggleBlock(const QString & name);
-               void toggleBlock(RS_Block * block);
+               void toggleBlock(Block * block);
                void freezeAllBlocks(bool freeze);
-//         void addBlockListListener(RS_BlockListListener * listener);
-//         void removeBlockListListener(RS_BlockListListener * listener);
+//         void addBlockListListener(BlockListListener * listener);
+//         void removeBlockListListener(BlockListListener * listener);
 
                // Wrappers for variable functions:
                void clearVariables();
@@ -79,8 +79,8 @@ class Drawing: public RS_Document
                int getVariableInt(const QString & key, int def);
                double getVariableDouble(const QString & key, double def);
                void removeVariable(const QString & key);
-       //      Q3Dict<RS_Variable> & getVariableDict();
-               QMultiHash<QString, RS_Variable *> & getVariableDict();
+       //      Q3Dict<Variable> & getVariableDict();
+               QMultiHash<QString, Variable *> & getVariableDict();
 
                RS2::LinearFormat getLinearFormat();
                int getLinearPrecision();
@@ -112,9 +112,9 @@ class Drawing: public RS_Document
                friend std::ostream & operator<<(std::ostream & os, Drawing & g);
 
        private:
-               RS_LayerList layerList;
-               RS_BlockList blockList;
-               RS_VariableDict variableDict;
+               LayerList layerList;
+               BlockList blockList;
+               VariableDict variableDict;
 #ifdef RS_CAM
                RS_CamData camData;
 #endif
index 030a73311819cbbfeda5887446678b519d1364e2..5d4fbd5cd0895e11346228feb34aa18badcddc15 100644 (file)
 /**
  * Constructor.
  */
-RS_Ellipse::RS_Ellipse(RS_EntityContainer * parent, const RS_EllipseData & d):
-       RS_AtomicEntity(parent), data(d)
+Ellipse::Ellipse(EntityContainer * parent, const EllipseData & d):
+       AtomicEntity(parent), data(d)
 {
        //calculateEndpoints();
        calculateBorders();
 }
 
-/*virtual*/ RS_Ellipse::~RS_Ellipse()
+/*virtual*/ Ellipse::~Ellipse()
 {
 }
 
-/*virtual*/ RS_Entity * RS_Ellipse::clone()
+/*virtual*/ Entity * Ellipse::clone()
 {
-       RS_Ellipse * e = new RS_Ellipse(*this);
+       Ellipse * e = new Ellipse(*this);
        e->initId();
        return e;
 }
 
 /**    @return RS2::EntityEllipse */
-/*virtual*/ RS2::EntityType RS_Ellipse::rtti() const
+/*virtual*/ RS2::EntityType Ellipse::rtti() const
 {
        return RS2::EntityEllipse;
 }
@@ -52,7 +52,7 @@ RS_Ellipse::RS_Ellipse(RS_EntityContainer * parent, const RS_EllipseData & d):
 /**
  * @return Start point of the entity.
  */
-/*virtual*/ Vector RS_Ellipse::getStartpoint() const
+/*virtual*/ Vector Ellipse::getStartpoint() const
 {
        Vector p;
        p.set(data.center.x + cos(data.angle1) * getMajorRadius(),
@@ -64,7 +64,7 @@ RS_Ellipse::RS_Ellipse(RS_EntityContainer * parent, const RS_EllipseData & d):
 /**
  * @return End point of the entity.
  */
-/*virtual*/ Vector RS_Ellipse::getEndpoint() const
+/*virtual*/ Vector Ellipse::getEndpoint() const
 {
        Vector p;
        p.set(data.center.x + cos(data.angle2) * getMajorRadius(),
@@ -73,7 +73,7 @@ RS_Ellipse::RS_Ellipse(RS_EntityContainer * parent, const RS_EllipseData & d):
        return p;
 }
 
-void RS_Ellipse::moveStartpoint(const Vector & pos)
+void Ellipse::moveStartpoint(const Vector & pos)
 {
        data.angle1 = getEllipseAngle(pos);
        //data.angle1 = data.center.angleTo(pos);
@@ -81,7 +81,7 @@ void RS_Ellipse::moveStartpoint(const Vector & pos)
        calculateBorders();
 }
 
-void RS_Ellipse::moveEndpoint(const Vector & pos)
+void Ellipse::moveEndpoint(const Vector & pos)
 {
        data.angle2 = getEllipseAngle(pos);
        //data.angle2 = data.center.angleTo(pos);
@@ -89,12 +89,12 @@ void RS_Ellipse::moveEndpoint(const Vector & pos)
        calculateBorders();
 }
 
-RS2::Ending RS_Ellipse::getTrimPoint(const Vector & coord, const Vector & trimPoint)
+RS2::Ending Ellipse::getTrimPoint(const Vector & coord, const Vector & trimPoint)
 {
        double angEl = getEllipseAngle(trimPoint);
        double angM = getEllipseAngle(coord);
 
-       if (RS_Math::getAngleDifference(angM, angEl) > M_PI)
+       if (Math::getAngleDifference(angM, angEl) > M_PI)
                //if (data.reversed) {
                //      return RS2::EndingEnd;
                //}
@@ -110,7 +110,7 @@ RS2::Ending RS_Ellipse::getTrimPoint(const Vector & coord, const Vector & trimPo
                //}
 }
 
-double RS_Ellipse::getEllipseAngle(const Vector & pos)
+double Ellipse::getEllipseAngle(const Vector & pos)
 {
        Vector m = pos;
        m.rotate(data.center, -data.majorP.angle());
@@ -120,12 +120,12 @@ double RS_Ellipse::getEllipseAngle(const Vector & pos)
 }
 
 /** @return Copy of data that defines the ellipse. **/
-RS_EllipseData RS_Ellipse::getData()
+EllipseData Ellipse::getData()
 {
        return data;
 }
 
-VectorSolutions RS_Ellipse::getRefPoints()
+VectorSolutions Ellipse::getRefPoints()
 {
        VectorSolutions ret(getStartpoint(), getEndpoint(), data.center);
        return ret;
@@ -135,79 +135,79 @@ VectorSolutions RS_Ellipse::getRefPoints()
  * @retval true if the arc is reversed (clockwise),
  * @retval false otherwise
  */
-bool RS_Ellipse::isReversed() const
+bool Ellipse::isReversed() const
 {
        return data.reversed;
 }
 
 /** sets the reversed status. */
-void RS_Ellipse::setReversed(bool r)
+void Ellipse::setReversed(bool r)
 {
        data.reversed = r;
 }
 
 /** @return The rotation angle of this ellipse */
-double RS_Ellipse::getAngle() const
+double Ellipse::getAngle() const
 {
        return data.majorP.angle();
 }
 
 /** @return The start angle of this arc */
-double RS_Ellipse::getAngle1()
+double Ellipse::getAngle1()
 {
        return data.angle1;
 }
 
 /** Sets new start angle. */
-void RS_Ellipse::setAngle1(double a1)
+void Ellipse::setAngle1(double a1)
 {
        data.angle1 = a1;
 }
 
 /** @return The end angle of this arc */
-double RS_Ellipse::getAngle2()
+double Ellipse::getAngle2()
 {
        return data.angle2;
 }
 
 /** Sets new end angle. */
-void RS_Ellipse::setAngle2(double a2)
+void Ellipse::setAngle2(double a2)
 {
        data.angle2 = a2;
 }
 
 /** @return The center point (x) of this arc */
-Vector RS_Ellipse::getCenter()
+Vector Ellipse::getCenter()
 {
        return data.center;
 }
 
 /** Sets new center. */
-void RS_Ellipse::setCenter(const Vector & c)
+void Ellipse::setCenter(const Vector & c)
 {
        data.center = c;
 }
 
 /** @return The endpoint of the major axis (relative to center). */
-Vector RS_Ellipse::getMajorP()
+Vector Ellipse::getMajorP()
 {
        return data.majorP;
 }
 
 /** Sets new major point (relative to center). */
-void RS_Ellipse::setMajorP(const Vector & p)
+void Ellipse::setMajorP(const Vector & p)
 {
        data.majorP = p;
 }
 
 /** @return The ratio of minor to major axis */
-double RS_Ellipse::getRatio()
+double Ellipse::getRatio()
 {
        return data.ratio;
 }
 
 /** Sets new ratio. */
-void RS_Ellipse::setRatio(double r)
+void Ellipse::setRatio(double r)
 {
        data.ratio = r;
 }
@@ -215,7 +215,7 @@ void RS_Ellipse::setRatio(double r)
 /**
  * @return Angle length in rad.
  */
-/*virtual*/ double RS_Ellipse::getAngleLength() const
+/*virtual*/ double Ellipse::getAngleLength() const
 {
        if (isReversed())
                return data.angle1 - data.angle2;
@@ -224,13 +224,13 @@ void RS_Ellipse::setRatio(double r)
 }
 
 /** @return The major radius of this ellipse. Same as getRadius() */
-double RS_Ellipse::getMajorRadius() const
+double Ellipse::getMajorRadius() const
 {
        return data.majorP.magnitude();
 }
 
 /** @return The minor radius of this ellipse */
-double RS_Ellipse::getMinorRadius() const
+double Ellipse::getMinorRadius() const
 {
        return data.majorP.magnitude() * data.ratio;
 }
@@ -239,7 +239,7 @@ double RS_Ellipse::getMinorRadius() const
  * Recalculates the endpoints using the angles and the radius.
  */
 /*
-   void RS_Ellipse::calculateEndpoints() {
+   void Ellipse::calculateEndpoints() {
    double angle = data.majorP.angle();
    double radius1 = getMajorRadius();
    double radius2 = getMinorRadius();
@@ -258,9 +258,9 @@ double RS_Ellipse::getMinorRadius() const
  *
  * @todo Fix that - the algorithm used is really bad / slow.
  */
-void RS_Ellipse::calculateBorders()
+void Ellipse::calculateBorders()
 {
-       RS_DEBUG->print("RS_Ellipse::calculateBorders");
+       DEBUG->print("Ellipse::calculateBorders");
 
        double radius1 = getMajorRadius();
        double radius2 = getMinorRadius();
@@ -292,15 +292,15 @@ void RS_Ellipse::calculateBorders()
 
                a += 0.03;
        }
-       while (RS_Math::isAngleBetween(RS_Math::correctAngle(a), a1, a2, false)
+       while (Math::isAngleBetween(Math::correctAngle(a), a1, a2, false)
               && a < 4 * M_PI);
 
        minV.set(minX, minY);
        maxV.set(maxX, maxY);
-       RS_DEBUG->print("RS_Ellipse::calculateBorders: OK");
+       DEBUG->print("Ellipse::calculateBorders: OK");
 }
 
-Vector RS_Ellipse::getNearestEndpoint(const Vector & coord, double * dist)
+Vector Ellipse::getNearestEndpoint(const Vector & coord, double * dist)
 {
        double dist1, dist2;
        Vector nearerPoint;
@@ -326,9 +326,9 @@ Vector RS_Ellipse::getNearestEndpoint(const Vector & coord, double * dist)
        return nearerPoint;
 }
 
-Vector RS_Ellipse::getNearestPointOnEntity(const Vector & coord, bool onEntity, double * dist, RS_Entity * * entity)
+Vector Ellipse::getNearestPointOnEntity(const Vector & coord, bool onEntity, double * dist, Entity * * entity)
 {
-       RS_DEBUG->print("RS_Ellipse::getNearestPointOnEntity");
+       DEBUG->print("Ellipse::getNearestPointOnEntity");
 
        Vector ret(false);
 
@@ -376,7 +376,7 @@ Vector RS_Ellipse::getNearestPointOnEntity(const Vector & coord, bool onEntity,
 
        for (i = 0; i < iMax; i++)
        {
-               RS_DEBUG->print("RS_Ellipse::getNearestPointOnEntity: i: %d", i);
+               DEBUG->print("Ellipse::getNearestPointOnEntity: i: %d", i);
                double dTpASqr = dT + dA * dA;
                double dTpBSqr = dT + dB * dB;
                double dInvTpASqr = 1.0 / dTpASqr;
@@ -386,7 +386,7 @@ Vector RS_Ellipse::getNearestPointOnEntity(const Vector & coord, bool onEntity,
                double dXDivASqr = dXDivA * dXDivA;
                double dYDivBSqr = dYDivB * dYDivB;
                double dF = dXDivASqr + dYDivBSqr - 1.0;
-               RS_DEBUG->print("RS_Ellipse::getNearestPointOnEntity: dF: %f", dF);
+               DEBUG->print("Ellipse::getNearestPointOnEntity: dF: %f", dF);
 
                if (fabs(dF) < dEpsilon)
                {
@@ -394,12 +394,12 @@ Vector RS_Ellipse::getNearestPointOnEntity(const Vector & coord, bool onEntity,
                        rdX = dXDivA * dA;
                        rdY = dYDivB * dB;
                        riIFinal = i;
-                       RS_DEBUG->print("RS_Ellipse::getNearestPointOnEntity: rdX,rdY 1: %f,%f", rdX, rdY);
+                       DEBUG->print("Ellipse::getNearestPointOnEntity: rdX,rdY 1: %f,%f", rdX, rdY);
                        break;
                }
                double dFDer = 2.0 * (dXDivASqr * dInvTpASqr + dYDivBSqr * dInvTpBSqr);
                double dRatio = dF / dFDer;
-               RS_DEBUG->print("RS_Ellipse::getNearestPointOnEntity: dRatio: %f", dRatio);
+               DEBUG->print("Ellipse::getNearestPointOnEntity: dRatio: %f", dRatio);
 
                if (fabs(dRatio) < dEpsilon)
                {
@@ -407,7 +407,7 @@ Vector RS_Ellipse::getNearestPointOnEntity(const Vector & coord, bool onEntity,
                        rdX = dXDivA * dA;
                        rdY = dYDivB * dB;
                        riIFinal = i;
-                       RS_DEBUG->print("RS_Ellipse::getNearestPointOnEntity: rdX,rdY 2: %f,%f", rdX, rdY);
+                       DEBUG->print("Ellipse::getNearestPointOnEntity: rdX,rdY 2: %f,%f", rdX, rdY);
                        break;
                }
                dT += dRatio;
@@ -416,7 +416,7 @@ Vector RS_Ellipse::getNearestPointOnEntity(const Vector & coord, bool onEntity,
        if (i == iMax)
        {
                // failed to converge:
-               RS_DEBUG->print("RS_Ellipse::getNearestPointOnEntity: failed");
+               DEBUG->print("Ellipse::getNearestPointOnEntity: failed");
                dDistance = RS_MAXDOUBLE;
        }
        else
@@ -425,8 +425,8 @@ Vector RS_Ellipse::getNearestPointOnEntity(const Vector & coord, bool onEntity,
                double dDelta1 = rdY - dV;
                dDistance = sqrt(dDelta0 * dDelta0 + dDelta1 * dDelta1);
                ret = Vector(rdX, rdY);
-               RS_DEBUG->print("RS_Ellipse::getNearestPointOnEntity: rdX,rdY 2: %f,%f", rdX, rdY);
-               RS_DEBUG->print("RS_Ellipse::getNearestPointOnEntity: ret: %f,%f", ret.x, ret.y);
+               DEBUG->print("Ellipse::getNearestPointOnEntity: rdX,rdY 2: %f,%f", rdX, rdY);
+               DEBUG->print("Ellipse::getNearestPointOnEntity: ret: %f,%f", ret.x, ret.y);
        }
 
        if (dist != NULL)
@@ -457,7 +457,7 @@ Vector RS_Ellipse::getNearestPointOnEntity(const Vector & coord, bool onEntity,
                        double a2 = data.center.angleTo(getEndpoint());
                        double a = data.center.angleTo(ret);
 
-                       if (!RS_Math::isAngleBetween(a, a1, a2, data.reversed))
+                       if (!Math::isAngleBetween(a, a1, a2, data.reversed))
                                ret = Vector(false);
                }
        }
@@ -471,13 +471,13 @@ Vector RS_Ellipse::getNearestPointOnEntity(const Vector & coord, bool onEntity,
  * @retval true if the given point is on this entity.
  * @retval false otherwise
  */
-bool RS_Ellipse::isPointOnEntity(const Vector & coord, double tolerance)
+bool Ellipse::isPointOnEntity(const Vector & coord, double tolerance)
 {
        double dist = getDistanceToPoint(coord, NULL, RS2::ResolveNone);
        return (dist <= tolerance);
 }
 
-Vector RS_Ellipse::getNearestCenter(const Vector & coord, double * dist)
+Vector Ellipse::getNearestCenter(const Vector & coord, double * dist)
 {
        if (dist != NULL)
                *dist = coord.distanceTo(data.center);
@@ -487,21 +487,21 @@ Vector RS_Ellipse::getNearestCenter(const Vector & coord, double * dist)
 /**
  * @todo Implement this.
  */
-Vector RS_Ellipse::getNearestMiddle(const Vector & /*coord*/, double * dist)
+Vector Ellipse::getNearestMiddle(const Vector & /*coord*/, double * dist)
 {
        if (dist != NULL)
                *dist = RS_MAXDOUBLE;
        return Vector(false);
 }
 
-Vector RS_Ellipse::getNearestDist(double /*distance*/, const Vector & /*coord*/, double * dist)
+Vector Ellipse::getNearestDist(double /*distance*/, const Vector & /*coord*/, double * dist)
 {
        if (dist != NULL)
                *dist = RS_MAXDOUBLE;
        return Vector(false);
 }
 
-double RS_Ellipse::getDistanceToPoint(const Vector & coord, RS_Entity * * entity, RS2::ResolveLevel, double /*solidDist*/)
+double Ellipse::getDistanceToPoint(const Vector & coord, Entity * * entity, RS2::ResolveLevel, double /*solidDist*/)
 {
        double dist = RS_MAXDOUBLE;
        getNearestPointOnEntity(coord, true, &dist, entity);
@@ -509,14 +509,14 @@ double RS_Ellipse::getDistanceToPoint(const Vector & coord, RS_Entity * * entity
        return dist;
 }
 
-void RS_Ellipse::move(Vector offset)
+void Ellipse::move(Vector offset)
 {
        data.center.move(offset);
        //calculateEndpoints();
        calculateBorders();
 }
 
-void RS_Ellipse::rotate(Vector center, double angle)
+void Ellipse::rotate(Vector center, double angle)
 {
        data.center.rotate(center, angle);
        data.majorP.rotate(angle);
@@ -524,7 +524,7 @@ void RS_Ellipse::rotate(Vector center, double angle)
        calculateBorders();
 }
 
-void RS_Ellipse::scale(Vector center, Vector factor)
+void Ellipse::scale(Vector center, Vector factor)
 {
        data.center.scale(center, factor);
        data.majorP.scale(factor);
@@ -535,7 +535,7 @@ void RS_Ellipse::scale(Vector center, Vector factor)
 /**
  * @todo deal with angles correctly
  */
-void RS_Ellipse::mirror(Vector axisPoint1, Vector axisPoint2)
+void Ellipse::mirror(Vector axisPoint1, Vector axisPoint2)
 {
        Vector mp = data.center + data.majorP;
 
@@ -561,7 +561,7 @@ void RS_Ellipse::mirror(Vector axisPoint1, Vector axisPoint2)
        calculateBorders();
 }
 
-void RS_Ellipse::moveRef(const Vector & ref, const Vector & offset)
+void Ellipse::moveRef(const Vector & ref, const Vector & offset)
 {
        Vector startpoint = getStartpoint();
        Vector endpoint = getEndpoint();
@@ -574,7 +574,7 @@ void RS_Ellipse::moveRef(const Vector & ref, const Vector & offset)
                moveEndpoint(endpoint + offset);
 }
 
-void RS_Ellipse::draw(PaintInterface * painter, GraphicView * view, double /*patternOffset*/)
+void Ellipse::draw(PaintInterface * painter, GraphicView * view, double /*patternOffset*/)
 {
        if (!painter || !view)
                return;
@@ -599,7 +599,7 @@ void RS_Ellipse::draw(PaintInterface * painter, GraphicView * view, double /*pat
                }
 
                // Pattern:
-               RS_LineTypePattern * pat;
+               LineTypePattern * pat;
 
                if (isSelected())
                        pat = &patternSelected;
@@ -610,7 +610,7 @@ void RS_Ellipse::draw(PaintInterface * painter, GraphicView * view, double /*pat
                        return;
 
                // Pen to draw pattern is always solid:
-               RS_Pen pen = painter->getPen();
+               Pen pen = painter->getPen();
                pen.setLineType(RS2::SolidLine);
                painter->setPen(pen);
 
@@ -633,8 +633,8 @@ void RS_Ellipse::draw(PaintInterface * painter, GraphicView * view, double /*pat
 
                do
                {
-                       curR = sqrt(RS_Math::pow(getMinorRadius() * cos(curA), 2.0)
-                                       + RS_Math::pow(getMajorRadius() * sin(curA), 2.0));
+                       curR = sqrt(Math::pow(getMinorRadius() * cos(curA), 2.0)
+                                       + Math::pow(getMajorRadius() * sin(curA), 2.0));
 
                        if (curR > 1.0e-6)
                        {
@@ -667,7 +667,7 @@ void RS_Ellipse::draw(PaintInterface * painter, GraphicView * view, double /*pat
 /**
  * Dumps the point's data to stdout.
  */
-std::ostream & operator<<(std::ostream & os, const RS_Ellipse & a)
+std::ostream & operator<<(std::ostream & os, const Ellipse & a)
 {
        os << " Ellipse: " << a.data << "\n";
        return os;
index 2ed0f989f461c52e88f556f8ac3be78b3d395509..f0bff36105f23d5d13392648b21d5ed1b5e14e77 100644 (file)
@@ -6,10 +6,10 @@
 /**
  * Holds the data that defines an ellipse.
  */
-class RS_EllipseData
+class EllipseData
 {
        public:
-               RS_EllipseData(const Vector & center, const Vector & majorP, double ratio, double angle1, double angle2, bool reversed)
+               EllipseData(const Vector & center, const Vector & majorP, double ratio, double angle1, double angle2, bool reversed)
                {
                        this->center = center;
                        this->majorP = majorP;
@@ -19,9 +19,9 @@ class RS_EllipseData
                        this->reversed = reversed;
                }
 
-               friend class RS_Ellipse;
+               friend class Ellipse;
 
-               friend std::ostream & operator<<(std::ostream & os, const RS_EllipseData & ed)
+               friend std::ostream & operator<<(std::ostream & os, const EllipseData & ed)
                {
                        os << "(" << ed.center
                        << "/" << ed.majorP
@@ -52,13 +52,13 @@ class RS_EllipseData
  *
  * @author Andrew Mustun
  */
-class RS_Ellipse: public RS_AtomicEntity
+class Ellipse: public AtomicEntity
 {
        public:
-               RS_Ellipse(RS_EntityContainer * parent, const RS_EllipseData & d);
-               virtual ~RS_Ellipse();
+               Ellipse(EntityContainer * parent, const EllipseData & d);
+               virtual ~Ellipse();
 
-               virtual RS_Entity * clone();
+               virtual Entity * clone();
                virtual RS2::EntityType rtti() const;
                virtual Vector getStartpoint() const;
                virtual Vector getEndpoint() const;
@@ -66,7 +66,7 @@ class RS_Ellipse: public RS_AtomicEntity
                virtual void moveEndpoint(const Vector & pos);
                virtual RS2::Ending getTrimPoint(const Vector & coord, const Vector & trimPoint);
                double getEllipseAngle(const Vector & pos);
-               RS_EllipseData getData();
+               EllipseData getData();
                virtual VectorSolutions getRefPoints();
                bool isReversed() const;
                void setReversed(bool r);
@@ -86,11 +86,11 @@ class RS_Ellipse: public RS_AtomicEntity
                double getMinorRadius() const;
 
                virtual Vector getNearestEndpoint(const Vector & coord, double * dist = NULL);
-               virtual Vector getNearestPointOnEntity(const Vector & coord, bool onEntity = true, double * dist = NULL, RS_Entity ** entity = NULL);
+               virtual Vector getNearestPointOnEntity(const Vector & coord, bool onEntity = true, double * dist = NULL, Entity ** entity = NULL);
                virtual Vector getNearestCenter(const Vector & coord, double * dist = NULL);
                virtual Vector getNearestMiddle(const Vector & coord, double * dist = NULL);
                virtual Vector getNearestDist(double distance, const Vector & coord, double * dist = NULL);
-               virtual double getDistanceToPoint(const Vector & coord, RS_Entity ** entity = NULL, RS2::ResolveLevel level = RS2::ResolveNone, double solidDist = RS_MAXDOUBLE);
+               virtual double getDistanceToPoint(const Vector & coord, Entity ** entity = NULL, RS2::ResolveLevel level = RS2::ResolveNone, double solidDist = RS_MAXDOUBLE);
                virtual bool isPointOnEntity(const Vector & coord, double tolerance = RS_TOLERANCE);
 
                virtual void move(Vector offset);
@@ -101,13 +101,13 @@ class RS_Ellipse: public RS_AtomicEntity
 
                virtual void draw(PaintInterface * painter, GraphicView * view, double patternOffset = 0.0);
 
-               friend std::ostream & operator<<(std::ostream & os, const RS_Ellipse & a);
+               friend std::ostream & operator<<(std::ostream & os, const Ellipse & a);
 
                //virtual void calculateEndpoints();
                virtual void calculateBorders();
 
        protected:
-               RS_EllipseData data;
+               EllipseData data;
 };
 
 #endif
index bf5be9cff0eaf6b824fcaf2cf9298756c9cc01d1..b963731bf22d411f902d2d59b36c30a6ab4aa200 100644 (file)
@@ -38,7 +38,7 @@
  *               E.g. a line might have a graphic entity or
  *               a polyline entity as parent.
  */
-RS_Entity::RS_Entity(RS_EntityContainer * parent)
+Entity::Entity(EntityContainer * parent)
 {
        this->parent = parent;
        init();
@@ -47,7 +47,7 @@ RS_Entity::RS_Entity(RS_EntityContainer * parent)
 /**
  * Copy constructor.
  */
-/*RS_Entity::RS_Entity(const RS_Entity& e) : RS_Flags(e.getFlags()) {
+/*Entity::Entity(const Entity& e) : Flags(e.getFlags()) {
        cout << "copy constructor called\n";
        init();
        parent = e.parent;
@@ -61,11 +61,11 @@ RS_Entity::RS_Entity(RS_EntityContainer * parent)
 /**
  * Destructor.
  */
-RS_Entity::~RS_Entity()
+Entity::~Entity()
 {
 }
 
-/*virtual*/ void RS_Entity::reparent(RS_EntityContainer * parent)
+/*virtual*/ void Entity::reparent(EntityContainer * parent)
 {
        this->parent = parent;
 }
@@ -73,13 +73,13 @@ RS_Entity::~RS_Entity()
 /**
  * Initialisation. Called from all constructors.
  */
-void RS_Entity::init()
+void Entity::init()
 {
        resetBorders();
 
        setFlag(RS2::FlagVisible);
        //layer = NULL;
-       //pen = RS_Pen();
+       //pen = Pen();
        updateEnabled = true;
        setLayerToActive();
        setPenToActive();
@@ -89,7 +89,7 @@ void RS_Entity::init()
 /**
  * Gives this entity a new unique id.
  */
-void RS_Entity::initId()
+void Entity::initId()
 {
        static unsigned long int idCounter = 0;
        id = idCounter++;
@@ -98,7 +98,7 @@ void RS_Entity::initId()
 /**
  * Resets the borders of this element.
  */
-void RS_Entity::resetBorders()
+void Entity::resetBorders()
 {
        // TODO: Check that. windoze XP crashes with MAXDOUBLE
        double maxd = RS_MAXDOUBLE;
@@ -112,7 +112,7 @@ void RS_Entity::resetBorders()
  * Must be overwritten to return the rtti of this entity
  * (e.g. RS2::EntityArc).
  */
-/*virtual*/ RS2::EntityType RS_Entity::rtti() const
+/*virtual*/ RS2::EntityType Entity::rtti() const
 {
        return RS2::EntityUnknown;
 }
@@ -121,7 +121,7 @@ void RS_Entity::resetBorders()
  * Identify all entities as undoable entities.
  * @return RS2::UndoableEntity
  */
-/*virtual*/ RS2::UndoableType RS_Entity::undoRtti()
+/*virtual*/ RS2::UndoableType Entity::undoRtti()
 {
        return RS2::UndoableEntity;
 }
@@ -129,7 +129,7 @@ void RS_Entity::resetBorders()
 /**
  * @return Unique Id of this entity.
  */
-unsigned long int RS_Entity::getId() const
+unsigned long int Entity::getId() const
 {
        return id;
 }
@@ -139,7 +139,7 @@ unsigned long int RS_Entity::getId() const
  * is a potential edge entity of a contour. By default
  * this returns false.
  */
-/*virtual*/ bool RS_Entity::isEdge() const
+/*virtual*/ bool Entity::isEdge() const
 {
        return false;
 }
@@ -148,7 +148,7 @@ unsigned long int RS_Entity::getId() const
  * @return true for all document entities (e.g. Graphics or Blocks).
  * false otherwise.
  */
-/*virtual*/ bool RS_Entity::isDocument() const
+/*virtual*/ bool Entity::isDocument() const
 {
        return false;
 }
@@ -158,7 +158,7 @@ unsigned long int RS_Entity::getId() const
  *
  * @param select True to select, false to deselect.
  */
-bool RS_Entity::setSelected(bool select)
+bool Entity::setSelected(bool select)
 {
        // layer is locked:
        if (select && isLocked())
@@ -175,7 +175,7 @@ bool RS_Entity::setSelected(bool select)
 /**
  * Toggles select on this entity.
  */
-bool RS_Entity::toggleSelected()
+bool Entity::toggleSelected()
 {
        return setSelected(!isSelected());
        //toggleFlag(RS2::FlagSelected);
@@ -186,7 +186,7 @@ bool RS_Entity::toggleSelected()
  * not be selected but one of its parents is selected. In that case
  * this function returns false.
  */
-bool RS_Entity::isSelected() const
+bool Entity::isSelected() const
 {
        return getFlag(RS2::FlagSelected);
 }
@@ -194,9 +194,9 @@ bool RS_Entity::isSelected() const
 /**
  * @return true if a parent entity of this entity is selected.
  */
-bool RS_Entity::isParentSelected()
+bool Entity::isParentSelected()
 {
-       RS_Entity * p = this;
+       Entity * p = this;
 
        do
        {
@@ -215,7 +215,7 @@ bool RS_Entity::isParentSelected()
  *
  * @param on True to set, false to reset.
  */
-void RS_Entity::setProcessed(bool on)
+void Entity::setProcessed(bool on)
 {
        if (on)
                setFlag(RS2::FlagProcessed);
@@ -226,7 +226,7 @@ void RS_Entity::setProcessed(bool on)
 /**
  * @return True if the processed flag is set.
  */
-bool RS_Entity::isProcessed() const
+bool Entity::isProcessed() const
 {
        return getFlag(RS2::FlagProcessed);
 }
@@ -237,7 +237,7 @@ bool RS_Entity::isProcessed() const
  * @param undone true: entity has become invisible.
  *               false: entity has become visible.
  */
-void RS_Entity::undoStateChanged(bool /*undone*/)
+void Entity::undoStateChanged(bool /*undone*/)
 {
        setSelected(false);
        update();
@@ -246,18 +246,18 @@ void RS_Entity::undoStateChanged(bool /*undone*/)
 /**
  * @return true if this entity or any parent entities are undone.
  */
-bool RS_Entity::isUndone() const
+bool Entity::isUndone() const
 {
        if (parent == NULL)
-               return RS_Undoable::isUndone();
+               return Undoable::isUndone();
 
-       return RS_Undoable::isUndone() || parent->isUndone();
+       return Undoable::isUndone() || parent->isUndone();
 }
 
 /**
  * @return True if the entity is in the given range.
  */
-bool RS_Entity::isInWindow(Vector v1, Vector v2)
+bool Entity::isInWindow(Vector v1, Vector v2)
 {
        double right, left, top, bottom;
 
@@ -276,13 +276,13 @@ bool RS_Entity::isInWindow(Vector v1, Vector v2)
  * @retval true if the given point is on this entity.
  * @retval false otherwise
  */
-bool RS_Entity::isPointOnEntity(const Vector & coord, double tolerance)
+bool Entity::isPointOnEntity(const Vector & coord, double tolerance)
 {
        double dist = getDistanceToPoint(coord, NULL, RS2::ResolveNone);
        return (dist <= tolerance);
 }
 
-/*virtual*/ bool RS_Entity::hasEndpointsWithinWindow(Vector /*v1*/, Vector /*v2*/)
+/*virtual*/ bool Entity::hasEndpointsWithinWindow(Vector /*v1*/, Vector /*v2*/)
 {
        return false;
 }
@@ -294,7 +294,7 @@ bool RS_Entity::isPointOnEntity(const Vector & coord, double tolerance)
  * The Layer might also be NULL. In that case the layer visiblity
 * is ignored.
  */
-/*virtual*/ bool RS_Entity::isVisible()
+/*virtual*/ bool Entity::isVisible()
 {
        if (!getFlag(RS2::FlagVisible))
                return false;
@@ -302,7 +302,7 @@ bool RS_Entity::isPointOnEntity(const Vector & coord, double tolerance)
        if (isUndone())
                return false;
 
-       /*RS_EntityCotnainer* parent = getParent();
+       /*EntityCotnainer* parent = getParent();
        if (parent!=NULL && parent->isUndone()) {
                return false;
        }*/
@@ -359,7 +359,7 @@ bool RS_Entity::isPointOnEntity(const Vector & coord, double tolerance)
        return false;
 }
 
-/*virtual*/ void RS_Entity::setVisible(bool v)
+/*virtual*/ void Entity::setVisible(bool v)
 {
        if (v)
                setFlag(RS2::FlagVisible);
@@ -371,7 +371,7 @@ bool RS_Entity::isPointOnEntity(const Vector & coord, double tolerance)
  * Sets the highlight status of the entity. Highlighted entities
  * usually indicate a feedback to a user action.
  */
-void RS_Entity::setHighlighted(bool on)
+void Entity::setHighlighted(bool on)
 {
        if (on)
                setFlag(RS2::FlagHighlighted);
@@ -382,7 +382,7 @@ void RS_Entity::setHighlighted(bool on)
 /**
  * @return true if the entity is highlighted.
  */
-bool RS_Entity::isHighlighted()
+bool Entity::isHighlighted()
 {
        return getFlag(RS2::FlagHighlighted);
 }
@@ -390,7 +390,7 @@ bool RS_Entity::isHighlighted()
 /**
  * @return true if the layer this entity is on is locked.
  */
-bool RS_Entity::isLocked()
+bool Entity::isLocked()
 {
        if (getLayer(true) != NULL && getLayer()->isLocked())
                return true;
@@ -402,7 +402,7 @@ bool RS_Entity::isLocked()
  * Implementations must return the total length of the entity
  * or a negative number if the entity has no length (e.g. a text or hatch).
  */
-/*virtual*/ double RS_Entity::getLength()
+/*virtual*/ double Entity::getLength()
 {
        return -1.0;
 }
@@ -410,7 +410,7 @@ bool RS_Entity::isLocked()
 /**
  * @return Parent of this entity or NULL if this is a root entity.
  */
-RS_EntityContainer * RS_Entity::getParent() const
+EntityContainer * Entity::getParent() const
 {
        return parent;
 }
@@ -418,7 +418,7 @@ RS_EntityContainer * RS_Entity::getParent() const
 /**
  * Reparents this entity.
  */
-void RS_Entity::setParent(RS_EntityContainer * p)
+void Entity::setParent(EntityContainer * p)
 {
        parent = p;
 }
@@ -428,7 +428,7 @@ void RS_Entity::setParent(RS_EntityContainer * p)
  * or the parent's parent graphic or NULL if none of the parents
  * are stored in a graphic.
  */
-Drawing * RS_Entity::getGraphic()
+Drawing * Entity::getGraphic()
 {
        if (rtti() == RS2::EntityGraphic)
                return (Drawing *)this;
@@ -443,10 +443,10 @@ Drawing * RS_Entity::getGraphic()
  * or the parent's parent block or NULL if none of the parents
  * are stored in a block.
  */
-RS_Block * RS_Entity::getBlock()
+Block * Entity::getBlock()
 {
        if (rtti() == RS2::EntityBlock)
-               return (RS_Block *)this;
+               return (Block *)this;
        else if (parent == NULL)
                return NULL;
        else
@@ -458,10 +458,10 @@ RS_Block * RS_Entity::getBlock()
  * or the parent's parent block or NULL if none of the parents
  * are stored in a block.
  */
-RS_Insert * RS_Entity::getInsert()
+Insert * Entity::getInsert()
 {
        if (rtti() == RS2::EntityInsert)
-               return (RS_Insert *)this;
+               return (Insert *)this;
        else if (parent == NULL)
                return NULL;
        else
@@ -473,7 +473,7 @@ RS_Insert * RS_Entity::getInsert()
  * or the parent's parent block or insert or NULL if none of the parents
  * are stored in a block or insert.
  */
-RS_Entity * RS_Entity::getBlockOrInsert()
+Entity * Entity::getBlockOrInsert()
 {
        if (rtti() == RS2::EntityBlock || rtti() == RS2::EntityInsert)
                return this;
@@ -489,10 +489,10 @@ RS_Entity * RS_Entity::getBlockOrInsert()
  * are stored in a document. Note that a document is usually
  * either a Graphic or a Block.
  */
-RS_Document * RS_Entity::getDocument()
+Document * Entity::getDocument()
 {
        if (isDocument() == true)
-               return (RS_Document *)this;
+               return (Document *)this;
        else if (parent == NULL)
                return NULL;
        else
@@ -504,11 +504,11 @@ RS_Document * RS_Entity::getDocument()
  * temporary subentities. update() is called if the entity's
  * paramters or undo state changed.
  */
-/*virtual*/ void RS_Entity::update()
+/*virtual*/ void Entity::update()
 {
 }
 
-/*virtual*/ void RS_Entity::setUpdateEnabled(bool on)
+/*virtual*/ void Entity::setUpdateEnabled(bool on)
 {
        updateEnabled = on;
 }
@@ -518,7 +518,7 @@ RS_Document * RS_Entity::getDocument()
  * @return minimum coordinate of the entity.
  * @see calculateBorders()
  */
-Vector RS_Entity::getMin() const
+Vector Entity::getMin() const
 {
        return minV;
 }
@@ -528,7 +528,7 @@ Vector RS_Entity::getMin() const
  * @return minimum coordinate of the entity.
  * @see calculateBorders()
  */
-Vector RS_Entity::getMax() const
+Vector Entity::getMax() const
 {
        return maxV;
 }
@@ -541,7 +541,7 @@ Vector RS_Entity::getMax() const
  * @see getMin()
  * @see getMax()
  */
-Vector RS_Entity::getSize() const
+Vector Entity::getSize() const
 {
        return maxV - minV;
 }
@@ -552,7 +552,7 @@ Vector RS_Entity::getSize() const
  * @param key Variable name (e.g. "$DIMASZ")
  * @param val Default value
  */
-void RS_Entity::addGraphicVariable(const QString & key, double val, int code)
+void Entity::addGraphicVariable(const QString & key, double val, int code)
 {
        Drawing * graphic = getGraphic();
 
@@ -566,7 +566,7 @@ void RS_Entity::addGraphicVariable(const QString & key, double val, int code)
  * @param key Variable name (e.g. "$DIMASZ")
  * @param val Default value
  */
-void RS_Entity::addGraphicVariable(const QString & key, int val, int code)
+void Entity::addGraphicVariable(const QString & key, int val, int code)
 {
        Drawing * graphic = getGraphic();
 
@@ -580,7 +580,7 @@ void RS_Entity::addGraphicVariable(const QString & key, int val, int code)
  * @param key Variable name (e.g. "$DIMASZ")
  * @param val Default value
  */
-void RS_Entity::addGraphicVariable(const QString & key, const QString & val, int code)
+void Entity::addGraphicVariable(const QString & key, const QString & val, int code)
 {
        Drawing * graphic = getGraphic();
 
@@ -597,7 +597,7 @@ void RS_Entity::addGraphicVariable(const QString & key, const QString & val, int
  * @return value of variable or default value if the given variable
  *    doesn't exist.
  */
-double RS_Entity::getGraphicVariableDouble(const QString & key, double def)
+double Entity::getGraphicVariableDouble(const QString & key, double def)
 {
        Drawing * graphic = getGraphic();
        double ret = def;
@@ -617,7 +617,7 @@ double RS_Entity::getGraphicVariableDouble(const QString & key, double def)
  * @return value of variable or default value if the given variable
  *    doesn't exist.
  */
-int RS_Entity::getGraphicVariableInt(const QString & key, int def)
+int Entity::getGraphicVariableInt(const QString & key, int def)
 {
        Drawing * graphic = getGraphic();
        int ret = def;
@@ -637,7 +637,7 @@ int RS_Entity::getGraphicVariableInt(const QString & key, int def)
  * @return value of variable or default value if the given variable
  *    doesn't exist.
  */
-QString RS_Entity::getGraphicVariableString(const QString & key, const QString & def)
+QString Entity::getGraphicVariableString(const QString & key, const QString & def)
 {
        Drawing * graphic = getGraphic();
        QString ret = def;
@@ -652,7 +652,7 @@ QString RS_Entity::getGraphicVariableString(const QString & key, const QString &
  * @return The unit the parent graphic works on or None if there's no
  * parent graphic.
  */
-RS2::Unit RS_Entity::getGraphicUnit()
+RS2::Unit Entity::getGraphicUnit()
 {
        Drawing * graphic = getGraphic();
        RS2::Unit ret = RS2::None;
@@ -666,7 +666,7 @@ RS2::Unit RS_Entity::getGraphicUnit()
 /**
  * Must be overwritten to get all reference points of the entity.
  */
-/*virtual*/ VectorSolutions RS_Entity::getRefPoints()
+/*virtual*/ VectorSolutions Entity::getRefPoints()
 {
        VectorSolutions ret;
        return ret;
@@ -681,7 +681,7 @@ RS2::Unit RS_Entity::getGraphicUnit()
  *
  * @return The point with the given distance to the start- or endpoint.
  */
-/*virtual*/ Vector RS_Entity::getNearestDist(double /*distance*/, bool /*startp*/)
+/*virtual*/ Vector Entity::getNearestDist(double /*distance*/, bool /*startp*/)
 {
        return Vector(false);
 }
@@ -697,7 +697,7 @@ RS2::Unit RS_Entity::getGraphicUnit()
  *
  * @return The closest point with the given distance to the endpoint.
  */
-/*virtual*/ Vector RS_Entity::getNearestRef(const Vector & coord, double * dist/*= NULL*/)
+/*virtual*/ Vector Entity::getNearestRef(const Vector & coord, double * dist/*= NULL*/)
 {
        VectorSolutions s = getRefPoints();
 
@@ -717,7 +717,7 @@ RS2::Unit RS_Entity::getGraphicUnit()
  *
  * @return The closest point with the given distance to the endpoint.
  */
-/*virtual*/ Vector RS_Entity::getNearestSelectedRef(const Vector & coord, double * dist/*= NULL*/)
+/*virtual*/ Vector Entity::getNearestSelectedRef(const Vector & coord, double * dist/*= NULL*/)
 {
        if (isSelected())
                return getNearestRef(coord, dist);
@@ -729,7 +729,7 @@ RS2::Unit RS_Entity::getGraphicUnit()
  * Acts like scale(Vector) but with equal factors.
  * Equal to scale(center, Vector(factor, factor)).
  */
-/*virtual*/ void RS_Entity::scale(Vector center, double factor)
+/*virtual*/ void Entity::scale(Vector center, double factor)
 {
        scale(center, Vector(factor, factor));
 }
@@ -738,7 +738,7 @@ RS2::Unit RS_Entity::getGraphicUnit()
  * Implementations must drag the reference point(s) of all
  * (sub-)entities that are very close to ref by offset.
  */
-/*virtual*/ void RS_Entity::moveRef(const Vector &/*ref*/, const Vector &/*offset*/)
+/*virtual*/ void Entity::moveRef(const Vector &/*ref*/, const Vector &/*offset*/)
 {
        return;
 }
@@ -747,7 +747,7 @@ RS2::Unit RS_Entity::getGraphicUnit()
  * Implementations must drag the reference point(s) of selected
  * (sub-)entities that are very close to ref by offset.
  */
-/*virtual*/ void RS_Entity::moveSelectedRef(const Vector &/*ref*/, const Vector &/*offset*/)
+/*virtual*/ void Entity::moveSelectedRef(const Vector &/*ref*/, const Vector &/*offset*/)
 {
        return;
 }
@@ -764,7 +764,7 @@ RS2::Unit RS_Entity::getGraphicUnit()
  * layer NULL is returned. If all parents are on layer NULL, NULL
  * is returned.
  */
-RS_Layer * RS_Entity::getLayer(bool resolve) const
+Layer * Entity::getLayer(bool resolve) const
 {
        if (resolve)
        {
@@ -786,7 +786,7 @@ RS_Layer * RS_Entity::getLayer(bool resolve) const
 /**
  * Sets the layer of this entity to the layer with the given name
  */
-void RS_Entity::setLayer(const QString & name)
+void Entity::setLayer(const QString & name)
 {
        Drawing * graphic = getGraphic();
 
@@ -799,7 +799,7 @@ void RS_Entity::setLayer(const QString & name)
 /**
  * Sets the layer of this entity to the layer given.
  */
-void RS_Entity::setLayer(RS_Layer * l)
+void Entity::setLayer(Layer * l)
 {
     layer = l;
 }
@@ -809,7 +809,7 @@ void RS_Entity::setLayer(RS_Layer * l)
  * the graphic this entity is in. If this entity (and none
  * of its parents) are in a graphic the layer is set to NULL.
  */
-void RS_Entity::setLayerToActive()
+void Entity::setLayerToActive()
 {
        Drawing * graphic = getGraphic();
 
@@ -830,14 +830,14 @@ void RS_Entity::setLayerToActive()
  *
  * @return Pen for this entity.
  */
-RS_Pen RS_Entity::getPen(bool resolve) const
+Pen Entity::getPen(bool resolve) const
 {
        if (!resolve)
                return pen;
        else
        {
-               RS_Pen p = pen;
-               RS_Layer * l = getLayer(true);
+               Pen p = pen;
+               Layer * l = getLayer(true);
 
                // use parental attributes (e.g. vertex of a polyline, block
                // entities when they are drawn in block documents):
@@ -876,7 +876,7 @@ RS_Pen RS_Entity::getPen(bool resolve) const
  * Sets the explicit pen for this entity or a pen with special
  * attributes such as BY_LAYER, ..
  */
-void RS_Entity::setPen(const RS_Pen & pen)
+void Entity::setPen(const Pen & pen)
 {
        this->pen = pen;
 }
@@ -886,19 +886,19 @@ void RS_Entity::setPen(const RS_Pen & pen)
  * the graphic this entity is in. If this entity (and none
  * of its parents) are in a graphic the pen is not changed.
  */
-void RS_Entity::setPenToActive()
+void Entity::setPenToActive()
 {
-       RS_Document * doc = getDocument();
+       Document * doc = getDocument();
 
        if (doc != NULL)
                pen = doc->getActivePen();
        else
        {
-               //RS_DEBUG->print(RS_Debug::D_WARNING, "RS_Entity::setPenToActive(): "
+               //DEBUG->print(Debug::D_WARNING, "Entity::setPenToActive(): "
                //                "No document / active pen linked to this entity.");
        }
        //else {
-       //   pen = RS_Pen();
+       //   pen = Pen();
        //}
 }
 
@@ -907,7 +907,7 @@ void RS_Entity::setPenToActive()
  * by the given offset. This default implementation moves the
  * whole entity if it is completely inside the given range.
  */
-void RS_Entity::stretch(Vector firstCorner, Vector secondCorner, Vector offset)
+void Entity::stretch(Vector firstCorner, Vector secondCorner, Vector offset)
 {
        //e->calculateBorders();
        if (getMin().isInWindow(firstCorner, secondCorner)
@@ -919,7 +919,7 @@ void RS_Entity::stretch(Vector firstCorner, Vector secondCorner, Vector offset)
  * @return Factor for scaling the line styles considering the current
  * paper scaling and the fact that styles are stored in Millimeter.
  */
-double RS_Entity::getStyleFactor(GraphicView * view)
+double Entity::getStyleFactor(GraphicView * view)
 {
        double styleFactor = 1.0;
 
@@ -938,7 +938,7 @@ double RS_Entity::getStyleFactor(GraphicView * view)
                        {
                                unit = g->getUnit();
                                //double scale = g->getPaperScale();
-                               styleFactor = RS_Units::convert(1.0, RS2::Millimeter, unit);
+                               styleFactor = Units::convert(1.0, RS2::Millimeter, unit);
                                // / scale;
                        }
 
@@ -958,8 +958,8 @@ double RS_Entity::getStyleFactor(GraphicView * view)
                }
        }
 
-       //RS_DEBUG->print("stylefactor: %f", styleFactor);
-       //RS_DEBUG->print("viewfactor: %f", view->getFactor().x);
+       //DEBUG->print("stylefactor: %f", styleFactor);
+       //DEBUG->print("viewfactor: %f", view->getFactor().x);
 
        if (styleFactor * view->getFactor().x < 0.2)
                styleFactor = -1.0;
@@ -970,7 +970,7 @@ double RS_Entity::getStyleFactor(GraphicView * view)
 /**
  * @return User defined variable connected to this entity.
  */
-QString * RS_Entity::getUserDefVar(QString key)
+QString * Entity::getUserDefVar(QString key)
 {
 //     return (this->varList.find(key));
        return (this->varList.value(key));
@@ -979,7 +979,7 @@ QString * RS_Entity::getUserDefVar(QString key)
 /**
  * Add a user defined variable to this entity.
  */
-void RS_Entity::setUserDefVar(QString key, QString val)
+void Entity::setUserDefVar(QString key, QString val)
 {
        varList.insert(key, new QString(val));
 }
@@ -987,7 +987,7 @@ void RS_Entity::setUserDefVar(QString key, QString val)
 /**
  * Deletes the given user defined variable.
  */
-void RS_Entity::delUserDefVar(QString key)
+void Entity::delUserDefVar(QString key)
 {
        varList.remove(key);
 }
@@ -995,7 +995,7 @@ void RS_Entity::delUserDefVar(QString key)
 /**
  * @return A list of all keys connected to this entity.
  */
-QStringList RS_Entity::getAllKeys()
+QStringList Entity::getAllKeys()
 {
        QStringList keys;
 //     Q3DictIterator<QString> it(varList);
@@ -1015,7 +1015,7 @@ QStringList RS_Entity::getAllKeys()
 /**
  * Dumps the elements data to stdout.
  */
-std::ostream & operator<<(std::ostream & os, RS_Entity & e)
+std::ostream & operator<<(std::ostream & os, Entity & e)
 {
        //os << "Warning: Virtual entity!\n";
        //return os;
@@ -1062,35 +1062,35 @@ std::ostream & operator<<(std::ostream & os, RS_Entity & e)
        switch (e.rtti())
        {
        case RS2::EntityPoint:
-               os << (RS_Point &)e;
+               os << (Point &)e;
                break;
 
        case RS2::EntityLine:
-               os << (RS_Line &)e;
+               os << (Line &)e;
                break;
 
        case RS2::EntityPolyline:
-               os << (RS_Polyline &)e;
+               os << (Polyline &)e;
                break;
 
        case RS2::EntityArc:
-               os << (RS_Arc &)e;
+               os << (Arc &)e;
                break;
 
        case RS2::EntityCircle:
-               os << (RS_Circle &)e;
+               os << (Circle &)e;
                break;
 
        case RS2::EntityEllipse:
-               os << (RS_Ellipse &)e;
+               os << (Ellipse &)e;
                break;
 
        case RS2::EntityInsert:
-               os << (RS_Insert &)e;
+               os << (Insert &)e;
                break;
 
        case RS2::EntityText:
-               os << (RS_Text &)e;
+               os << (Text &)e;
                break;
 
        default:
index 8aad2465c6d5f2862ef4deb51d1c8fa5586fcfc0..c7c996c875b0ea41df68253d4dc772ef158add8a 100644 (file)
@@ -2,7 +2,7 @@
 #define __ENTITY_H__
 
 #include <QtCore>
-#include "rs.h"
+#include "enums.h"
 #include "layer.h"
 #include "mathextra.h"
 #include "pen.h"
 #include "vector.h"
 #include "vectorsolutions.h"
 
-class RS_Arc;
-class RS_Block;
-class RS_Circle;
-class RS_Document;
-class RS_EntityContainer;
+class Arc;
+class Block;
+class Circle;
+class Document;
+class EntityContainer;
 class Drawing;
 class GraphicView;
-class RS_Insert;
-class RS_Line;
-class RS_Point;
-class RS_Polyline;
-class RS_Text;
+class Insert;
+class Line;
+class Point;
+class Polyline;
+class Text;
 class PaintInterface;
 
 /**
@@ -29,16 +29,16 @@ class PaintInterface;
  *
  * @author Andrew Mustun
  */
-class RS_Entity: public RS_Undoable
+class Entity: public Undoable
 {
        public:
-               RS_Entity(RS_EntityContainer * parent = NULL);
-               virtual ~RS_Entity();
+               Entity(EntityContainer * parent = NULL);
+               virtual ~Entity();
 
                void init();
                virtual void initId();
-               virtual RS_Entity * clone() = 0;
-               virtual void reparent(RS_EntityContainer * parent);
+               virtual Entity * clone() = 0;
+               virtual void reparent(EntityContainer * parent);
                void resetBorders();
                virtual RS2::EntityType rtti() const;
                virtual RS2::UndoableType undoRtti();
@@ -57,21 +57,21 @@ class RS_Entity: public RS_Undoable
                virtual unsigned long int countDeep() = 0;
 
                virtual double getLength();
-               RS_EntityContainer * getParent() const;
-               void setParent(RS_EntityContainer * p);
+               EntityContainer * getParent() const;
+               void setParent(EntityContainer * p);
                Drawing * getGraphic();
-               RS_Block * getBlock();
-               RS_Insert * getInsert();
-               RS_Entity * getBlockOrInsert();
-               RS_Document * getDocument();
+               Block * getBlock();
+               Insert * getInsert();
+               Entity * getBlockOrInsert();
+               Document * getDocument();
 
                void setLayer(const QString & name);
-               void setLayer(RS_Layer * l);
+               void setLayer(Layer * l);
                void setLayerToActive();
-               RS_Layer * getLayer(bool resolve = true) const;
-               void setPen(const RS_Pen & pen);
+               Layer * getLayer(bool resolve = true) const;
+               void setPen(const Pen & pen);
                void setPenToActive();
-               RS_Pen getPen(bool resolve = true) const;
+               Pen getPen(bool resolve = true) const;
 
                /**
                 * Must be overwritten to return true if an entity type
@@ -144,7 +144,7 @@ class RS_Entity: public RS_Undoable
                 * @return The closest coordinate.
                 */
                virtual Vector getNearestPointOnEntity(const Vector& /*coord*/,
-                       bool onEntity = true, double * dist = NULL, RS_Entity ** entity = NULL) = 0;
+                       bool onEntity = true, double * dist = NULL, Entity ** entity = NULL) = 0;
 
                /**
                 * Must be overwritten to get the (nearest) center point to the
@@ -207,7 +207,7 @@ class RS_Entity: public RS_Undoable
                 *
                 * @return The measured distance between \p coord and the entity.
                 */
-               virtual double getDistanceToPoint(const Vector & coord, RS_Entity ** entity = NULL,
+               virtual double getDistanceToPoint(const Vector & coord, Entity ** entity = NULL,
                         RS2::ResolveLevel level = RS2::ResolveNone, double solidDist = RS_MAXDOUBLE) = 0;
 
                virtual bool isPointOnEntity(const Vector & coord, double tolerance = RS_TOLERANCE);
@@ -251,27 +251,27 @@ class RS_Entity: public RS_Undoable
                void setUserDefVar(QString key, QString val);
                void delUserDefVar(QString key);
 
-               friend std::ostream & operator<<(std::ostream & os, RS_Entity & e);
+               friend std::ostream & operator<<(std::ostream & os, Entity & e);
 
                /** Recalculates the borders of this entity. */
                virtual void calculateBorders() = 0;
 
        protected:
                //! Entity's parent entity or NULL is this entity has no parent.
-               RS_EntityContainer * parent;
+               EntityContainer * parent;
                //! minimum coordinates
                Vector minV;
                //! maximum coordinates
                Vector maxV;
 
                //! Pointer to layer
-               RS_Layer * layer;
+               Layer * layer;
 
                //! Entity id
                unsigned long int id;
 
                //! pen (attributes) for this entity
-               RS_Pen pen;
+               Pen pen;
 
                //! auto updating enabled?
                bool updateEnabled;
index 238c5a8b3f239508520f97655eda934eb59762f7..7babc889d54de73a4465a732d57777d8745b45bf 100644 (file)
 #include "graphicview.h"
 #include "paintinterface.h"
 
-bool RS_EntityContainer::autoUpdateBorders = true;
+bool EntityContainer::autoUpdateBorders = true;
 
 /**
  * Default constructor.
  *
  * @param owner True if we own and also delete the entities.
  */
-RS_EntityContainer::RS_EntityContainer(RS_EntityContainer * parent/*= NULL*/, bool owner/*= true*/):
-       RS_Entity(parent), entityIterator(entities)
+EntityContainer::EntityContainer(EntityContainer * parent/*= NULL*/, bool owner/*= true*/):
+       Entity(parent), entityIterator(entities)
 //NOTE: This constructor may not be explicitly OR implicitly called, meaning that
 //      entityIterator will not get initialized!
 {
 #warning "!!! Need to deal with setAutoDelete() Qt3->Qt4 !!!"
 //    entities.setAutoDelete(owner);
-       RS_DEBUG->print("RS_EntityContainer::RS_EntityContainer: owner: %d", (int)owner);
+       DEBUG->print("EntityContainer::EntityContainer: owner: %d", (int)owner);
     subContainer = NULL;
     //autoUpdateBorders = true;
 }
@@ -52,8 +52,8 @@ RS_EntityContainer::RS_EntityContainer(RS_EntityContainer * parent/*= NULL*/, bo
  * Copy constructor. Makes a deep copy of all entities.
  */
 /*
-RS_EntityContainer::RS_EntityContainer(const RS_EntityContainer& ec)
- : RS_Entity(ec)
+EntityContainer::EntityContainer(const EntityContainer& ec)
+ : Entity(ec)
 {
 }
 */
@@ -61,18 +61,18 @@ RS_EntityContainer::RS_EntityContainer(const RS_EntityContainer& ec)
 /**
  * Destructor.
  */
-RS_EntityContainer::~RS_EntityContainer()
+EntityContainer::~EntityContainer()
 {
        clear();
 }
 
-RS_Entity * RS_EntityContainer::clone()
+Entity * EntityContainer::clone()
 {
-//     RS_DEBUG->print("RS_EntityContainer::clone: ori autoDel: %d", entities.autoDelete());
-       RS_EntityContainer * ec = new RS_EntityContainer(*this);
+//     DEBUG->print("EntityContainer::clone: ori autoDel: %d", entities.autoDelete());
+       EntityContainer * ec = new EntityContainer(*this);
 #warning "!!! Need to deal with setAutoDelete() Qt3->Qt4 !!!"
 //     ec->entities.setAutoDelete(entities.autoDelete());
-//     RS_DEBUG->print("RS_EntityContainer::clone: clone autoDel: %d", ec->entities.autoDelete());
+//     DEBUG->print("EntityContainer::clone: clone autoDel: %d", ec->entities.autoDelete());
        ec->detach();
        ec->initId();
 
@@ -83,17 +83,17 @@ RS_Entity * RS_EntityContainer::clone()
  * Detaches shallow copies and creates deep copies of all subentities.
  * This is called after cloning entity containers.
  */
-void RS_EntityContainer::detach()
+void EntityContainer::detach()
 {
-//    Q3PtrList<RS_Entity> tmp;
-       QList<RS_Entity *> tmp;
+//    Q3PtrList<Entity> tmp;
+       QList<Entity *> tmp;
 #warning "!!! Need to deal with setAutoDelete() Qt3->Qt4 !!!"
 //     bool autoDel = entities.autoDelete();
-//     RS_DEBUG->print("RS_EntityContainer::detach: autoDel: %d", (int)autoDel);
+//     DEBUG->print("EntityContainer::detach: autoDel: %d", (int)autoDel);
 //     entities.setAutoDelete(false);
 
        // make deep copies of all entities:
-       for(RS_Entity * e=firstEntity(); e!=NULL; e=nextEntity())
+       for(Entity * e=firstEntity(); e!=NULL; e=nextEntity())
        {
                if (!e->getFlag(RS2::FlagTemp))
                {
@@ -106,27 +106,27 @@ void RS_EntityContainer::detach()
 //     entities.setAutoDelete(autoDel);
 
        // point to new deep copies:
-//     for(RS_Entity * e=tmp.first(); e!=NULL; e=tmp.next())
+//     for(Entity * e=tmp.first(); e!=NULL; e=tmp.next())
        for(int i=0; i<tmp.size(); i++)
        {
-               RS_Entity * e = tmp[i];
+               Entity * e = tmp[i];
                entities.append(e);
                e->reparent(this);
        }
 }
 
 /** @return RS2::EntityContainer */
-/*virtual*/ RS2::EntityType RS_EntityContainer::rtti() const
+/*virtual*/ RS2::EntityType EntityContainer::rtti() const
 {
        return RS2::EntityContainer;
 }
 
-void RS_EntityContainer::reparent(RS_EntityContainer * parent)
+void EntityContainer::reparent(EntityContainer * parent)
 {
-    RS_Entity::reparent(parent);
+    Entity::reparent(parent);
 
     // All sub-entities:
-    for(RS_Entity * e=firstEntity(RS2::ResolveNone); e!=NULL; e=nextEntity(RS2::ResolveNone))
+    for(Entity * e=firstEntity(RS2::ResolveNone); e!=NULL; e=nextEntity(RS2::ResolveNone))
        {
         e->reparent(parent);
     }
@@ -136,7 +136,7 @@ void RS_EntityContainer::reparent(RS_EntityContainer * parent)
  * @return true: because entities made from this class
  *         and subclasses are containers for other entities.
  */
-/*virtual*/ bool RS_EntityContainer::isContainer() const
+/*virtual*/ bool EntityContainer::isContainer() const
 {
        return true;
 }
@@ -145,7 +145,7 @@ void RS_EntityContainer::reparent(RS_EntityContainer * parent)
  * @return false: because entities made from this class
  *         and subclasses are containers for other entities.
  */
-/*virtual*/ bool RS_EntityContainer::isAtomic() const
+/*virtual*/ bool EntityContainer::isAtomic() const
 {
        return false;
 }
@@ -156,28 +156,28 @@ void RS_EntityContainer::reparent(RS_EntityContainer * parent)
  * @param undone true: entity has become invisible.
  *               false: entity has become visible.
  */
-void RS_EntityContainer::undoStateChanged(bool undone)
+void EntityContainer::undoStateChanged(bool undone)
 {
-    RS_Entity::undoStateChanged(undone);
+    Entity::undoStateChanged(undone);
 
     // ! don't pass on to subentities. undo list handles them
     // All sub-entities:
-    /*for (RS_Entity* e=firstEntity(RS2::ResolveNone);
+    /*for (Entity* e=firstEntity(RS2::ResolveNone);
             e!=NULL;
             e=nextEntity(RS2::ResolveNone)) {
        e->setUndoState(undone);
 }*/
 }
 
-void RS_EntityContainer::setVisible(bool v)
+void EntityContainer::setVisible(bool v)
 {
-    RS_DEBUG->print("RS_EntityContainer::setVisible: %d", v);
-    RS_Entity::setVisible(v);
+    DEBUG->print("EntityContainer::setVisible: %d", v);
+    Entity::setVisible(v);
 
     // All sub-entities:
-    for(RS_Entity * e=firstEntity(RS2::ResolveNone); e!=NULL; e=nextEntity(RS2::ResolveNone))
+    for(Entity * e=firstEntity(RS2::ResolveNone); e!=NULL; e=nextEntity(RS2::ResolveNone))
        {
-        RS_DEBUG->print("RS_EntityContainer::setVisible: subentity: %d", v);
+        DEBUG->print("EntityContainer::setVisible: subentity: %d", v);
         e->setVisible(v);
     }
 }
@@ -185,11 +185,11 @@ void RS_EntityContainer::setVisible(bool v)
 /**
  * @return Total length of all entities in this container.
  */
-double RS_EntityContainer::getLength()
+double EntityContainer::getLength()
 {
        double ret = 0.0;
 
-       for(RS_Entity * e=firstEntity(RS2::ResolveNone); e!=NULL; e=nextEntity(RS2::ResolveNone))
+       for(Entity * e=firstEntity(RS2::ResolveNone); e!=NULL; e=nextEntity(RS2::ResolveNone))
        {
                if (e->isVisible())
                {
@@ -213,13 +213,13 @@ double RS_EntityContainer::getLength()
 /**
  * Selects this entity.
  */
-bool RS_EntityContainer::setSelected(bool select)
+bool EntityContainer::setSelected(bool select)
 {
        // This entity's select:
-       if (RS_Entity::setSelected(select))
+       if (Entity::setSelected(select))
        {
                // All sub-entity's select:
-               for(RS_Entity * e=firstEntity(RS2::ResolveNone); e!=NULL; e=nextEntity(RS2::ResolveNone))
+               for(Entity * e=firstEntity(RS2::ResolveNone); e!=NULL; e=nextEntity(RS2::ResolveNone))
                {
                        if (e->isVisible())
                        {
@@ -238,14 +238,14 @@ bool RS_EntityContainer::setSelected(bool select)
 /**
  * Toggles select on this entity.
  */
-bool RS_EntityContainer::toggleSelected()
+bool EntityContainer::toggleSelected()
 {
        // Toggle this entity's select:
-       if (RS_Entity::toggleSelected())
+       if (Entity::toggleSelected())
        {
 
                // Toggle all sub-entity's select:
-               /*for (RS_Entity* e=firstEntity(RS2::ResolveNone);
+               /*for (Entity* e=firstEntity(RS2::ResolveNone);
                                e!=NULL;
                                e=nextEntity(RS2::ResolveNone)) {
                        e->toggleSelected();
@@ -263,11 +263,11 @@ bool RS_EntityContainer::toggleSelected()
  *
  * @param select True to select, False to deselect the entities.
  */
-void RS_EntityContainer::selectWindow(Vector v1, Vector v2, bool select, bool cross)
+void EntityContainer::selectWindow(Vector v1, Vector v2, bool select, bool cross)
 {
        bool included;
 
-       for(RS_Entity * e=firstEntity(RS2::ResolveNone); e!=NULL; e=nextEntity(RS2::ResolveNone))
+       for(Entity * e=firstEntity(RS2::ResolveNone); e!=NULL; e=nextEntity(RS2::ResolveNone))
        {
                included = false;
 
@@ -280,25 +280,25 @@ void RS_EntityContainer::selectWindow(Vector v1, Vector v2, bool select, bool cr
                        }
                        else if (cross == true)
                        {
-                               RS_Line l[] =
+                               Line l[] =
                                        {
-                                               RS_Line(NULL, RS_LineData(v1, Vector(v2.x, v1.y))),
-                                               RS_Line(NULL, RS_LineData(Vector(v2.x, v1.y), v2)),
-                                               RS_Line(NULL, RS_LineData(v2, Vector(v1.x, v2.y))),
-                                               RS_Line(NULL, RS_LineData(Vector(v1.x, v2.y), v1))
+                                               Line(NULL, LineData(v1, Vector(v2.x, v1.y))),
+                                               Line(NULL, LineData(Vector(v2.x, v1.y), v2)),
+                                               Line(NULL, LineData(v2, Vector(v1.x, v2.y))),
+                                               Line(NULL, LineData(Vector(v1.x, v2.y), v1))
                                        };
                                VectorSolutions sol;
 
                                if (e->isContainer())
                                {
-                                       RS_EntityContainer * ec = (RS_EntityContainer *)e;
+                                       EntityContainer * ec = (EntityContainer *)e;
 
-                                       for(RS_Entity * se=ec->firstEntity(RS2::ResolveAll); se!=NULL && included==false;
+                                       for(Entity * se=ec->firstEntity(RS2::ResolveAll); se!=NULL && included==false;
                                                se=ec->nextEntity(RS2::ResolveAll))
                                        {
                                                for(int i=0; i<4; ++i)
                                                {
-                                                       sol = RS_Information::getIntersection(se, &l[i], true);
+                                                       sol = Information::getIntersection(se, &l[i], true);
 
                                                        if (sol.hasValid())
                                                        {
@@ -312,7 +312,7 @@ void RS_EntityContainer::selectWindow(Vector v1, Vector v2, bool select, bool cr
                                {
                                        for(int i=0; i<4; ++i)
                                        {
-                                               sol = RS_Information::getIntersection(e, &l[i], true);
+                                               sol = Information::getIntersection(e, &l[i], true);
 
                                                if (sol.hasValid())
                                                {
@@ -335,20 +335,20 @@ void RS_EntityContainer::selectWindow(Vector v1, Vector v2, bool select, bool cr
  * Adds a entity to this container and updates the borders of this
  * entity-container if autoUpdateBorders is true.
  */
-void RS_EntityContainer::addEntity(RS_Entity * entity)
+void EntityContainer::addEntity(Entity * entity)
 {
        /*
                if (isDocument()) {
-                       RS_LayerList* lst = getDocument()->getLayerList();
+                       LayerList* lst = getDocument()->getLayerList();
                        if (lst!=NULL) {
-                               RS_Layer* l = lst->getActive();
+                               Layer* l = lst->getActive();
                                if (l!=NULL && l->isLocked()) {
                                        return;
                                }
                        }
                }
        */
-//printf("RS_EntityContainer::addEntity(): entity=%08X\n", entity);
+//printf("EntityContainer::addEntity(): entity=%08X\n", entity);
 
        if (!entity)
                return;
@@ -367,7 +367,7 @@ void RS_EntityContainer::addEntity(RS_Entity * entity)
  * Inserts a entity to this container at the given position and updates
  * the borders of this entity-container if autoUpdateBorders is true.
  */
-void RS_EntityContainer::insertEntity(int index, RS_Entity * entity)
+void EntityContainer::insertEntity(int index, Entity * entity)
 {
        if (entity == NULL)
                return;
@@ -382,7 +382,7 @@ void RS_EntityContainer::insertEntity(int index, RS_Entity * entity)
  * Replaces the entity at the given index with the given entity
  * and updates the borders of this entity-container if autoUpdateBorders is true.
  */
-void RS_EntityContainer::replaceEntity(int index, RS_Entity * entity)
+void EntityContainer::replaceEntity(int index, Entity * entity)
 {
        if (entity == NULL)
                return;
@@ -397,7 +397,7 @@ void RS_EntityContainer::replaceEntity(int index, RS_Entity * entity)
  * Removes an entity from this container and updates the borders of
  * this entity-container if autoUpdateBorders is true.
  */
-bool RS_EntityContainer::removeEntity(RS_Entity * entity)
+bool EntityContainer::removeEntity(Entity * entity)
 {
 //     bool ret = entities.remove(entity);
        bool ret = (bool)entities.removeAll(entity);
@@ -411,7 +411,7 @@ bool RS_EntityContainer::removeEntity(RS_Entity * entity)
 /**
  * Erases all entities in this container and resets the borders..
  */
-void RS_EntityContainer::clear()
+void EntityContainer::clear()
 {
        entities.clear();
        resetBorders();
@@ -420,7 +420,7 @@ void RS_EntityContainer::clear()
 /**
  * Counts all entities (branches of the tree).
  */
-unsigned long int RS_EntityContainer::count()
+unsigned long int EntityContainer::count()
 {
        return entities.count();
 }
@@ -428,11 +428,11 @@ unsigned long int RS_EntityContainer::count()
 /**
  * Counts all entities (leaves of the tree).
  */
-unsigned long int RS_EntityContainer::countDeep()
+unsigned long int EntityContainer::countDeep()
 {
        unsigned long int c = 0;
 
-       for(RS_Entity * t=firstEntity(RS2::ResolveNone); t!=NULL; t=nextEntity(RS2::ResolveNone))
+       for(Entity * t=firstEntity(RS2::ResolveNone); t!=NULL; t=nextEntity(RS2::ResolveNone))
        {
                c += t->countDeep();
        }
@@ -443,11 +443,11 @@ unsigned long int RS_EntityContainer::countDeep()
 /**
  * Counts the selected entities in this container.
  */
-unsigned long int RS_EntityContainer::countSelected()
+unsigned long int EntityContainer::countSelected()
 {
        unsigned long int c = 0;
 
-       for(RS_Entity * t=firstEntity(RS2::ResolveNone); t!=NULL; t=nextEntity(RS2::ResolveNone))
+       for(Entity * t=firstEntity(RS2::ResolveNone); t!=NULL; t=nextEntity(RS2::ResolveNone))
        {
                if (t->isSelected())
                {
@@ -462,7 +462,7 @@ unsigned long int RS_EntityContainer::countSelected()
  * Enables / disables automatic update of borders on entity removals
  * and additions. By default this is turned on.
  */
-/*virtual*/ void RS_EntityContainer::setAutoUpdateBorders(bool enable)
+/*virtual*/ void EntityContainer::setAutoUpdateBorders(bool enable)
 {
        autoUpdateBorders = enable;
 }
@@ -470,9 +470,9 @@ unsigned long int RS_EntityContainer::countSelected()
 /**
  * Adjusts the borders of this graphic (max/min values)
  */
-void RS_EntityContainer::adjustBorders(RS_Entity * entity)
+void EntityContainer::adjustBorders(Entity * entity)
 {
-       //RS_DEBUG->print("RS_EntityContainer::adjustBorders");
+       //DEBUG->print("EntityContainer::adjustBorders");
        //resetBorders();
 
        if (entity != NULL)
@@ -496,17 +496,17 @@ void RS_EntityContainer::adjustBorders(RS_Entity * entity)
 /**
  * Recalculates the borders of this entity container.
  */
-void RS_EntityContainer::calculateBorders()
+void EntityContainer::calculateBorders()
 {
-       RS_DEBUG->print("RS_EntityContainer::calculateBorders");
+       DEBUG->print("EntityContainer::calculateBorders");
 
        resetBorders();
 
-       for(RS_Entity * e=firstEntity(RS2::ResolveNone); e!=NULL; e=nextEntity(RS2::ResolveNone))
+       for(Entity * e=firstEntity(RS2::ResolveNone); e!=NULL; e=nextEntity(RS2::ResolveNone))
        {
-               RS_Layer * layer = e->getLayer();
+               Layer * layer = e->getLayer();
 
-               RS_DEBUG->print("RS_EntityContainer::calculateBorders: isVisible: %d", (int)e->isVisible());
+               DEBUG->print("EntityContainer::calculateBorders: isVisible: %d", (int)e->isVisible());
 
                if (e->isVisible() && (layer == NULL || !layer->isFrozen()))
                {
@@ -515,7 +515,7 @@ void RS_EntityContainer::calculateBorders()
                }
        }
 
-       RS_DEBUG->print("RS_EntityContainer::calculateBorders: size 1: %f,%f", getSize().x, getSize().y);
+       DEBUG->print("EntityContainer::calculateBorders: size 1: %f,%f", getSize().x, getSize().y);
 
        // needed for correcting corrupt data (PLANS.dxf)
        if (minV.x > maxV.x || minV.x > RS_MAXDOUBLE || maxV.x > RS_MAXDOUBLE
@@ -532,31 +532,31 @@ void RS_EntityContainer::calculateBorders()
                maxV.y = 0.0;
        }
 
-       RS_DEBUG->print("RS_EntityCotnainer::calculateBorders: size: %f,%f", getSize().x, getSize().y);
+       DEBUG->print("EntityCotnainer::calculateBorders: size: %f,%f", getSize().x, getSize().y);
 
-       //RS_DEBUG->print("  borders: %f/%f %f/%f", minV.x, minV.y, maxV.x, maxV.y);
+       //DEBUG->print("  borders: %f/%f %f/%f", minV.x, minV.y, maxV.x, maxV.y);
 
        //printf("borders: %lf/%lf  %lf/%lf\n", minV.x, minV.y, maxV.x, maxV.y);
-       //RS_Entity::calculateBorders();
+       //Entity::calculateBorders();
 }
 
 /**
  * Recalculates the borders of this entity container including
  * invisible entities.
  */
-void RS_EntityContainer::forcedCalculateBorders()
+void EntityContainer::forcedCalculateBorders()
 {
-       //RS_DEBUG->print("RS_EntityContainer::calculateBorders");
+       //DEBUG->print("EntityContainer::calculateBorders");
 
        resetBorders();
 
-       for(RS_Entity * e=firstEntity(RS2::ResolveNone); e!=NULL; e=nextEntity(RS2::ResolveNone))
+       for(Entity * e=firstEntity(RS2::ResolveNone); e!=NULL; e=nextEntity(RS2::ResolveNone))
        {
-               //RS_Layer* layer = e->getLayer();
+               //Layer* layer = e->getLayer();
 
                if (e->isContainer())
                {
-                       ((RS_EntityContainer *)e)->forcedCalculateBorders();
+                       ((EntityContainer *)e)->forcedCalculateBorders();
                }
                else
                {
@@ -581,74 +581,74 @@ void RS_EntityContainer::forcedCalculateBorders()
                maxV.y = 0.0;
        }
 
-       //RS_DEBUG->print("  borders: %f/%f %f/%f", minV.x, minV.y, maxV.x, maxV.y);
+       //DEBUG->print("  borders: %f/%f %f/%f", minV.x, minV.y, maxV.x, maxV.y);
 
        //printf("borders: %lf/%lf  %lf/%lf\n", minV.x, minV.y, maxV.x, maxV.y);
-       //RS_Entity::calculateBorders();
+       //Entity::calculateBorders();
 }
 
 /**
  * Updates all Dimension entities in this container and
  * reposition their labels.
  */
-void RS_EntityContainer::updateDimensions()
+void EntityContainer::updateDimensions()
 {
-       RS_DEBUG->print("RS_EntityContainer::updateDimensions()");
+       DEBUG->print("EntityContainer::updateDimensions()");
 
-       //for (RS_Entity* e=firstEntity(RS2::ResolveNone);
+       //for (Entity* e=firstEntity(RS2::ResolveNone);
        //        e!=NULL;
        //        e=nextEntity(RS2::ResolveNone)) {
 
 #if 0
-//     Q3PtrListIterator<RS_Entity> it = createIterator();
-       QListIterator<RS_Entity *> it = createIterator();
-//     return QListIterator<RS_Entity *>(entities);
+//     Q3PtrListIterator<Entity> it = createIterator();
+       QListIterator<Entity *> it = createIterator();
+//     return QListIterator<Entity *>(entities);
 
-       RS_Entity * e;
+       Entity * e;
 
        while ((e = it.current()) != NULL)
        {
                ++it;
 
-               if (RS_Information::isDimension(e->rtti()))
+               if (Information::isDimension(e->rtti()))
                {
                        // update and reposition label:
-                       ((RS_Dimension *)e)->update(true);
+                       ((Dimension *)e)->update(true);
                }
                else if (e->isContainer())
                {
-                       ((RS_EntityContainer *)e)->updateDimensions();
+                       ((EntityContainer *)e)->updateDimensions();
                }
        }
 #else
        for(int i=0; i<entities.size(); i++)
        {
-               RS_Entity * e = entities[i];
+               Entity * e = entities[i];
 
-               if (RS_Information::isDimension(e->rtti()))
+               if (Information::isDimension(e->rtti()))
                        // update and reposition label:
-                       ((RS_Dimension *)e)->update(true);
+                       ((Dimension *)e)->update(true);
                else if (e->isContainer())
-                       ((RS_EntityContainer *)e)->updateDimensions();
+                       ((EntityContainer *)e)->updateDimensions();
        }
 #endif
 
-       RS_DEBUG->print("RS_EntityContainer::updateDimensions() OK");
+       DEBUG->print("EntityContainer::updateDimensions() OK");
 }
 
 /**
  * Updates all Insert entities in this container.
  */
-void RS_EntityContainer::updateInserts()
+void EntityContainer::updateInserts()
 {
-       RS_DEBUG->print("RS_EntityContainer::updateInserts()");
+       DEBUG->print("EntityContainer::updateInserts()");
 
-       //for (RS_Entity* e=firstEntity(RS2::ResolveNone);
+       //for (Entity* e=firstEntity(RS2::ResolveNone);
        //        e!=NULL;
        //        e=nextEntity(RS2::ResolveNone)) {
 #if 0
-       Q3PtrListIterator<RS_Entity> it = createIterator();
-       RS_Entity * e;
+       Q3PtrListIterator<Entity> it = createIterator();
+       Entity * e;
 
        while ((e = it.current()) != NULL)
        {
@@ -656,126 +656,126 @@ void RS_EntityContainer::updateInserts()
                //// Only update our own inserts and not inserts of inserts
                if (e->rtti() == RS2::EntityInsert  /*&& e->getParent()==this*/)
                {
-                       ((RS_Insert *)e)->update();
+                       ((Insert *)e)->update();
                }
                else if (e->isContainer() && e->rtti() != RS2::EntityHatch)
                {
-                       ((RS_EntityContainer *)e)->updateInserts();
+                       ((EntityContainer *)e)->updateInserts();
                }
        }
 #else
        for(int i=0; i<entities.size(); i++)
        {
-               RS_Entity * e = entities[i];
+               Entity * e = entities[i];
 
                //// Only update our own inserts and not inserts of inserts
                if (e->rtti() == RS2::EntityInsert  /*&& e->getParent()==this*/)
-                       ((RS_Insert *)e)->update();
+                       ((Insert *)e)->update();
                else if (e->isContainer() && e->rtti() != RS2::EntityHatch)
-                       ((RS_EntityContainer *)e)->updateInserts();
+                       ((EntityContainer *)e)->updateInserts();
        }
 #endif
 
-       RS_DEBUG->print("RS_EntityContainer::updateInserts() OK");
+       DEBUG->print("EntityContainer::updateInserts() OK");
 }
 
 /**
  * Renames all inserts with name 'oldName' to 'newName'. This is
  *   called after a block was rename to update the inserts.
  */
-void RS_EntityContainer::renameInserts(const QString& oldName, const QString& newName)
+void EntityContainer::renameInserts(const QString& oldName, const QString& newName)
 {
-    RS_DEBUG->print("RS_EntityContainer::renameInserts()");
+    DEBUG->print("EntityContainer::renameInserts()");
 
-    //for (RS_Entity* e=firstEntity(RS2::ResolveNone);
+    //for (Entity* e=firstEntity(RS2::ResolveNone);
     //        e!=NULL;
     //        e=nextEntity(RS2::ResolveNone)) {
 
 #if 0
-    Q3PtrListIterator<RS_Entity> it = createIterator();
-    RS_Entity* e;
+    Q3PtrListIterator<Entity> it = createIterator();
+    Entity* e;
     while ( (e = it.current()) != NULL ) {
         ++it;
 
         if (e->rtti()==RS2::EntityInsert) {
-            RS_Insert* i = ((RS_Insert*)e);
+            Insert* i = ((Insert*)e);
             if (i->getName()==oldName) {
                 i->setName(newName);
             }
         } else if (e->isContainer()) {
-            ((RS_EntityContainer*)e)->renameInserts(oldName, newName);
+            ((EntityContainer*)e)->renameInserts(oldName, newName);
         }
     }
 #else
        for(int i=0; i<entities.size(); i++)
        {
-               RS_Entity * e = entities[i];
+               Entity * e = entities[i];
 
         if (e->rtti() == RS2::EntityInsert)
                {
-            RS_Insert * i = ((RS_Insert *)e);
+            Insert * i = ((Insert *)e);
 
                        if (i->getName() == oldName)
                 i->setName(newName);
         }
         else if (e->isContainer())
-            ((RS_EntityContainer *)e)->renameInserts(oldName, newName);
+            ((EntityContainer *)e)->renameInserts(oldName, newName);
        }
 #endif
 
-    RS_DEBUG->print("RS_EntityContainer::renameInserts() OK");
+    DEBUG->print("EntityContainer::renameInserts() OK");
 
 }
 
 /**
  * Updates all Spline entities in this container.
  */
-void RS_EntityContainer::updateSplines()
+void EntityContainer::updateSplines()
 {
-    RS_DEBUG->print("RS_EntityContainer::updateSplines()");
+    DEBUG->print("EntityContainer::updateSplines()");
 
-    //for (RS_Entity* e=firstEntity(RS2::ResolveNone);
+    //for (Entity* e=firstEntity(RS2::ResolveNone);
     //        e!=NULL;
     //        e=nextEntity(RS2::ResolveNone)) {
 #if 0
-    Q3PtrListIterator<RS_Entity> it = createIterator();
-    RS_Entity* e;
+    Q3PtrListIterator<Entity> it = createIterator();
+    Entity* e;
     while ( (e = it.current()) != NULL ) {
         ++it;
         //// Only update our own inserts and not inserts of inserts
         if (e->rtti()==RS2::EntitySpline  /*&& e->getParent()==this*/) {
-            ((RS_Spline*)e)->update();
+            ((Spline*)e)->update();
         } else if (e->isContainer() && e->rtti()!=RS2::EntityHatch) {
-            ((RS_EntityContainer*)e)->updateSplines();
+            ((EntityContainer*)e)->updateSplines();
         }
     }
 #else
        for(int i=0; i<entities.size(); i++)
        {
-               RS_Entity * e = entities[i];
+               Entity * e = entities[i];
 
                //// Only update our own inserts and not inserts of inserts
                if (e->rtti() == RS2::EntitySpline  /*&& e->getParent()==this*/)
-                       ((RS_Spline *)e)->update();
+                       ((Spline *)e)->update();
                else if (e->isContainer() && e->rtti() != RS2::EntityHatch)
-                       ((RS_EntityContainer *)e)->updateSplines();
+                       ((EntityContainer *)e)->updateSplines();
        }
 #endif
 
-    RS_DEBUG->print("RS_EntityContainer::updateSplines() OK");
+    DEBUG->print("EntityContainer::updateSplines() OK");
 }
 
 /**
  * Updates the sub entities of this container.
  */
-void RS_EntityContainer::update()
+void EntityContainer::update()
 {
-    //for (RS_Entity* e=firstEntity(RS2::ResolveNone);
+    //for (Entity* e=firstEntity(RS2::ResolveNone);
     //        e!=NULL;
     //        e=nextEntity(RS2::ResolveNone)) {
 #if 0
-    Q3PtrListIterator<RS_Entity> it = createIterator();
-    RS_Entity* e;
+    Q3PtrListIterator<Entity> it = createIterator();
+    Entity* e;
     while ( (e = it.current()) != NULL ) {
         ++it;
         e->update();
@@ -783,7 +783,7 @@ void RS_EntityContainer::update()
 #else
        for(int i=0; i<entities.size(); i++)
        {
-//             RS_Entity * e = entities[i];
+//             Entity * e = entities[i];
 //             e->update();
                entities[i]->update();
        }
@@ -794,7 +794,7 @@ void RS_EntityContainer::update()
  * Returns the first entity or NULL if this graphic is empty.
  * @param level
  */
-RS_Entity * RS_EntityContainer::firstEntity(RS2::ResolveLevel level)
+Entity * EntityContainer::firstEntity(RS2::ResolveLevel level)
 {
        switch (level)
        {
@@ -808,15 +808,15 @@ RS_Entity * RS_EntityContainer::firstEntity(RS2::ResolveLevel level)
        case RS2::ResolveAllButInserts:
        {
                subContainer = NULL;
-//             RS_Entity * e = entities.first();
+//             Entity * e = entities.first();
 //             entityIterator.toFront();
                entityIterator = entities;
-               RS_Entity * e = (entityIterator.hasNext() ? entityIterator.next() : NULL);
+               Entity * e = (entityIterator.hasNext() ? entityIterator.next() : NULL);
 
                if (e != NULL && e->isContainer() && e->rtti() != RS2::EntityInsert)
                {
-                       subContainer = (RS_EntityContainer *)e;
-                       e = ((RS_EntityContainer *)e)->firstEntity(level);
+                       subContainer = (EntityContainer *)e;
+                       e = ((EntityContainer *)e)->firstEntity(level);
 
                        // emtpy container:
                        if (e == NULL)
@@ -833,15 +833,15 @@ RS_Entity * RS_EntityContainer::firstEntity(RS2::ResolveLevel level)
        case RS2::ResolveAll:
        {
                subContainer = NULL;
-//             RS_Entity * e = entities.first();
+//             Entity * e = entities.first();
 //             entityIterator.toFront();
                entityIterator = entities;
-               RS_Entity * e = (entityIterator.hasNext() ? entityIterator.next() : NULL);
+               Entity * e = (entityIterator.hasNext() ? entityIterator.next() : NULL);
 
                if (e != NULL && e->isContainer())
                {
-                       subContainer = (RS_EntityContainer *)e;
-                       e = ((RS_EntityContainer *)e)->firstEntity(level);
+                       subContainer = (EntityContainer *)e;
+                       e = ((EntityContainer *)e)->firstEntity(level);
 
                        // emtpy container:
                        if (e == NULL)
@@ -866,7 +866,7 @@ RS_Entity * RS_EntityContainer::firstEntity(RS2::ResolveLevel level)
  *              \li \p 1 (default) only Groups are resolved
  *              \li \p 2 all Entity Containers are resolved
  */
-RS_Entity * RS_EntityContainer::lastEntity(RS2::ResolveLevel level)
+Entity * EntityContainer::lastEntity(RS2::ResolveLevel level)
 {
        switch (level)
        {
@@ -879,16 +879,16 @@ RS_Entity * RS_EntityContainer::lastEntity(RS2::ResolveLevel level)
 
        case RS2::ResolveAllButInserts:
        {
-//             RS_Entity * e = entities.last();
+//             Entity * e = entities.last();
                entityIterator = entities;
                entityIterator.toBack();
-               RS_Entity * e = (entityIterator.hasPrevious() ? entityIterator.previous() : NULL);
+               Entity * e = (entityIterator.hasPrevious() ? entityIterator.previous() : NULL);
                subContainer = NULL;
 
                if (e != NULL && e->isContainer() && e->rtti() != RS2::EntityInsert)
                {
-                       subContainer = (RS_EntityContainer *)e;
-                       e = ((RS_EntityContainer *)e)->lastEntity(level);
+                       subContainer = (EntityContainer *)e;
+                       e = ((EntityContainer *)e)->lastEntity(level);
                }
 
                return e;
@@ -897,16 +897,16 @@ RS_Entity * RS_EntityContainer::lastEntity(RS2::ResolveLevel level)
 
        case RS2::ResolveAll:
        {
-//             RS_Entity * e = entities.last();
+//             Entity * e = entities.last();
                entityIterator = entities;
                entityIterator.toBack();
-               RS_Entity * e = (entityIterator.hasPrevious() ? entityIterator.previous() : NULL);
+               Entity * e = (entityIterator.hasPrevious() ? entityIterator.previous() : NULL);
                subContainer = NULL;
 
                if (e != NULL && e->isContainer())
                {
-                       subContainer = (RS_EntityContainer *)e;
-                       e = ((RS_EntityContainer *)e)->lastEntity(level);
+                       subContainer = (EntityContainer *)e;
+                       e = ((EntityContainer *)e)->lastEntity(level);
                }
 
                return e;
@@ -921,7 +921,7 @@ RS_Entity * RS_EntityContainer::lastEntity(RS2::ResolveLevel level)
  * Returns the next entity or container or \p NULL if the last entity
  * returned by \p next() was the last entity in the container.
  */
-RS_Entity * RS_EntityContainer::nextEntity(RS2::ResolveLevel level)
+Entity * EntityContainer::nextEntity(RS2::ResolveLevel level)
 {
        switch (level)
        {
@@ -932,7 +932,7 @@ RS_Entity * RS_EntityContainer::nextEntity(RS2::ResolveLevel level)
 
        case RS2::ResolveAllButInserts:
        {
-               RS_Entity * e = NULL;
+               Entity * e = NULL;
 
                if (subContainer != NULL)
                {
@@ -956,8 +956,8 @@ RS_Entity * RS_EntityContainer::nextEntity(RS2::ResolveLevel level)
 
                if (e != NULL && e->isContainer() && e->rtti() != RS2::EntityInsert)
                {
-                       subContainer = (RS_EntityContainer *)e;
-                       e = ((RS_EntityContainer *)e)->firstEntity(level);
+                       subContainer = (EntityContainer *)e;
+                       e = ((EntityContainer *)e)->firstEntity(level);
 
                        // emtpy container:
                        if (e == NULL)
@@ -973,7 +973,7 @@ RS_Entity * RS_EntityContainer::nextEntity(RS2::ResolveLevel level)
 
        case RS2::ResolveAll:
        {
-               RS_Entity * e = NULL;
+               Entity * e = NULL;
 
                if (subContainer != NULL)
                {
@@ -993,8 +993,8 @@ RS_Entity * RS_EntityContainer::nextEntity(RS2::ResolveLevel level)
 
                if (e != NULL && e->isContainer())
                {
-                       subContainer = (RS_EntityContainer *)e;
-                       e = ((RS_EntityContainer *)e)->firstEntity(level);
+                       subContainer = (EntityContainer *)e;
+                       e = ((EntityContainer *)e)->firstEntity(level);
 
                        // emtpy container:
                        if (e == NULL)
@@ -1015,9 +1015,9 @@ RS_Entity * RS_EntityContainer::nextEntity(RS2::ResolveLevel level)
  * Returns the prev entity or container or \p NULL if the last entity
  * returned by \p prev() was the first entity in the container.
  */
-RS_Entity * RS_EntityContainer::prevEntity(RS2::ResolveLevel level)
+Entity * EntityContainer::prevEntity(RS2::ResolveLevel level)
 {
-       RS_Entity * e = NULL;
+       Entity * e = NULL;
 
        switch (level)
        {
@@ -1047,8 +1047,8 @@ RS_Entity * RS_EntityContainer::prevEntity(RS2::ResolveLevel level)
 
                if (e != NULL && e->isContainer() && e->rtti() != RS2::EntityInsert)
                {
-                       subContainer = (RS_EntityContainer *)e;
-                       e = ((RS_EntityContainer *)e)->lastEntity(level);
+                       subContainer = (EntityContainer *)e;
+                       e = ((EntityContainer *)e)->lastEntity(level);
 
                        // emtpy container:
                        if (e == NULL)
@@ -1081,8 +1081,8 @@ RS_Entity * RS_EntityContainer::prevEntity(RS2::ResolveLevel level)
 
                if (e != NULL && e->isContainer())
                {
-                       subContainer = (RS_EntityContainer *)e;
-                       e = ((RS_EntityContainer *)e)->lastEntity(level);
+                       subContainer = (EntityContainer *)e;
+                       e = ((EntityContainer *)e)->lastEntity(level);
 
                        // emtpy container:
                        if (e == NULL)
@@ -1101,7 +1101,7 @@ RS_Entity * RS_EntityContainer::prevEntity(RS2::ResolveLevel level)
 /**
  * @return Entity at the given index or NULL if the index is out of range.
  */
-RS_Entity * RS_EntityContainer::entityAt(uint index)
+Entity * EntityContainer::entityAt(uint index)
 {
        return entities.at(index);
 }
@@ -1109,7 +1109,7 @@ RS_Entity * RS_EntityContainer::entityAt(uint index)
 /**
  * @return Current index.
  */
-int RS_EntityContainer::entityAt()
+int EntityContainer::entityAt()
 {
 #warning "!!! Not sure how to convert this from Qt3 -> Qt4 !!! (it seems we can ignore this for now as nothing calls it)"
 //     return entities.at();
@@ -1119,7 +1119,7 @@ int RS_EntityContainer::entityAt()
 /**
  * Finds the given entity and makes it the current entity if found.
  */
-int RS_EntityContainer::findEntity(RS_Entity * entity)
+int EntityContainer::findEntity(Entity * entity)
 {
 //     return entities.find(entity);
 
@@ -1132,7 +1132,7 @@ int RS_EntityContainer::findEntity(RS_Entity * entity)
 /**
  * @return The current entity.
  */
-RS_Entity * RS_EntityContainer::currentEntity()
+Entity * EntityContainer::currentEntity()
 {
 //     return entities.current();
 
@@ -1146,15 +1146,15 @@ RS_Entity * RS_EntityContainer::currentEntity()
 /**
  * Returns the copy to a new iterator for traversing the entities.
  */
-//Q3PtrListIterator<RS_Entity> RS_EntityContainer::createIterator()
-QListIterator<RS_Entity *> RS_EntityContainer::createIterator()
+//Q3PtrListIterator<Entity> EntityContainer::createIterator()
+QListIterator<Entity *> EntityContainer::createIterator()
 {
-//     return Q3PtrListIterator<RS_Entity>(entities);
-       return QListIterator<RS_Entity *>(entities);
+//     return Q3PtrListIterator<Entity>(entities);
+       return QListIterator<Entity *>(entities);
 }
 #endif
 
-/*virtual*/ bool RS_EntityContainer::isEmpty()
+/*virtual*/ bool EntityContainer::isEmpty()
 {
        return (count() == 0);
 }
@@ -1163,18 +1163,18 @@ QListIterator<RS_Entity *> RS_EntityContainer::createIterator()
  * @return The point which is closest to 'coord'
  * (one of the vertexes)
  */
-Vector RS_EntityContainer::getNearestEndpoint(const Vector & coord, double * dist)
+Vector EntityContainer::getNearestEndpoint(const Vector & coord, double * dist)
 {
     double minDist = RS_MAXDOUBLE;  // minimum measured distance
     double curDist;                 // currently measured distance
     Vector closestPoint(false);  // closest found endpoint
     Vector point;                // endpoint found
 
-    //Q3PtrListIterator<RS_Entity> it = createIterator();
-    //RS_Entity* en;
+    //Q3PtrListIterator<Entity> it = createIterator();
+    //Entity* en;
     //while ( (en = it.current()) != NULL ) {
     //    ++it;
-    for (RS_Entity* en = firstEntity();
+    for (Entity* en = firstEntity();
             en != NULL;
             en = nextEntity()) {
 
@@ -1193,12 +1193,12 @@ Vector RS_EntityContainer::getNearestEndpoint(const Vector & coord, double * dis
     return closestPoint;
 }
 
-Vector RS_EntityContainer::getNearestPointOnEntity(const Vector & coord,
-       bool onEntity, double * dist, RS_Entity ** entity)
+Vector EntityContainer::getNearestPointOnEntity(const Vector & coord,
+       bool onEntity, double * dist, Entity ** entity)
 {
        Vector point(false);
 
-       RS_Entity * e = getNearestEntity(coord, dist, RS2::ResolveNone);
+       Entity * e = getNearestEntity(coord, dist, RS2::ResolveNone);
 
        if (e && e->isVisible())
                point = e->getNearestPointOnEntity(coord, onEntity, dist, entity);
@@ -1206,10 +1206,10 @@ Vector RS_EntityContainer::getNearestPointOnEntity(const Vector & coord,
        return point;
 }
 
-Vector RS_EntityContainer::getNearestCenter(const Vector & coord, double * dist)
+Vector EntityContainer::getNearestCenter(const Vector & coord, double * dist)
 {
        Vector point(false);
-       RS_Entity * closestEntity = getNearestEntity(coord, NULL, RS2::ResolveNone);
+       Entity * closestEntity = getNearestEntity(coord, NULL, RS2::ResolveNone);
 
        if (closestEntity)
                point = closestEntity->getNearestCenter(coord, dist);
@@ -1217,10 +1217,10 @@ Vector RS_EntityContainer::getNearestCenter(const Vector & coord, double * dist)
        return point;
 }
 
-Vector RS_EntityContainer::getNearestMiddle(const Vector & coord, double * dist)
+Vector EntityContainer::getNearestMiddle(const Vector & coord, double * dist)
 {
        Vector point(false);
-       RS_Entity * closestEntity = getNearestEntity(coord, NULL, RS2::ResolveNone);
+       Entity * closestEntity = getNearestEntity(coord, NULL, RS2::ResolveNone);
 
        if (closestEntity)
                point = closestEntity->getNearestMiddle(coord, dist);
@@ -1228,11 +1228,11 @@ Vector RS_EntityContainer::getNearestMiddle(const Vector & coord, double * dist)
        return point;
 }
 
-Vector RS_EntityContainer::getNearestDist(double distance, const Vector & coord,
+Vector EntityContainer::getNearestDist(double distance, const Vector & coord,
        double * dist)
 {
        Vector point(false);
-       RS_Entity * closestEntity = getNearestEntity(coord, NULL, RS2::ResolveNone);
+       Entity * closestEntity = getNearestEntity(coord, NULL, RS2::ResolveNone);
 
        if (closestEntity)
                point = closestEntity->getNearestDist(distance, coord, dist);
@@ -1243,7 +1243,7 @@ Vector RS_EntityContainer::getNearestDist(double distance, const Vector & coord,
 /**
  * @return The intersection which is closest to 'coord'
  */
-Vector RS_EntityContainer::getNearestIntersection(const Vector & coord,
+Vector EntityContainer::getNearestIntersection(const Vector & coord,
        double * dist)
 {
        double minDist = RS_MAXDOUBLE;                          // minimum measured distance
@@ -1251,18 +1251,18 @@ Vector RS_EntityContainer::getNearestIntersection(const Vector & coord,
        Vector closestPoint(false);                                     // closest found endpoint
        Vector point;                                                           // endpoint found
        VectorSolutions sol;
-       RS_Entity * closestEntity;
+       Entity * closestEntity;
 
        closestEntity = getNearestEntity(coord, NULL, RS2::ResolveAll);
 
        if (closestEntity)
        {
-               for(RS_Entity * en=firstEntity(RS2::ResolveAll); en!=NULL;
+               for(Entity * en=firstEntity(RS2::ResolveAll); en!=NULL;
                        en = nextEntity(RS2::ResolveAll))
                {
                        if (en->isVisible() && en!=closestEntity)
                        {
-                               sol = RS_Information::getIntersection(closestEntity, en, true);
+                               sol = Information::getIntersection(closestEntity, en, true);
 
                                for(int i=0; i<4; i++)
                                {
@@ -1289,14 +1289,14 @@ Vector RS_EntityContainer::getNearestIntersection(const Vector & coord,
        return closestPoint;
 }
 
-Vector RS_EntityContainer::getNearestRef(const Vector & coord, double * dist)
+Vector EntityContainer::getNearestRef(const Vector & coord, double * dist)
 {
        double minDist = RS_MAXDOUBLE;  // minimum measured distance
        double curDist;                 // currently measured distance
        Vector closestPoint(false);  // closest found endpoint
        Vector point;                // endpoint found
 
-       for(RS_Entity * en=firstEntity(); en!=NULL; en=nextEntity())
+       for(Entity * en=firstEntity(); en!=NULL; en=nextEntity())
        {
                if (en->isVisible())
                {
@@ -1316,7 +1316,7 @@ Vector RS_EntityContainer::getNearestRef(const Vector & coord, double * dist)
        return closestPoint;
 }
 
-Vector RS_EntityContainer::getNearestSelectedRef(const Vector & coord,
+Vector EntityContainer::getNearestSelectedRef(const Vector & coord,
        double * dist)
 {
        double minDist = RS_MAXDOUBLE;                          // minimum measured distance
@@ -1324,7 +1324,7 @@ Vector RS_EntityContainer::getNearestSelectedRef(const Vector & coord,
        Vector closestPoint(false);                                     // closest found endpoint
        Vector point;                                                           // endpoint found
 
-       for(RS_Entity * en=firstEntity(); en!=NULL; en=nextEntity())
+       for(Entity * en=firstEntity(); en!=NULL; en=nextEntity())
        {
                if (en->isVisible() && en->isSelected() && !en->isParentSelected())
                {
@@ -1344,25 +1344,25 @@ Vector RS_EntityContainer::getNearestSelectedRef(const Vector & coord,
        return closestPoint;
 }
 
-double RS_EntityContainer::getDistanceToPoint(const Vector & coord,
-       RS_Entity ** entity, RS2::ResolveLevel level, double solidDist)
+double EntityContainer::getDistanceToPoint(const Vector & coord,
+       Entity ** entity, RS2::ResolveLevel level, double solidDist)
 {
-       RS_DEBUG->print("RS_EntityContainer::getDistanceToPoint");
+       DEBUG->print("EntityContainer::getDistanceToPoint");
 
        double minDist = RS_MAXDOUBLE;      // minimum measured distance
        double curDist;                     // currently measured distance
-       RS_Entity * closestEntity = NULL;    // closest entity found
-       RS_Entity * subEntity = NULL;
+       Entity * closestEntity = NULL;    // closest entity found
+       Entity * subEntity = NULL;
 
        //int k=0;
-       for(RS_Entity * e=firstEntity(level); e!=NULL; e=nextEntity(level))
+       for(Entity * e=firstEntity(level); e!=NULL; e=nextEntity(level))
        {
                if (e->isVisible())
                {
-                       RS_DEBUG->print("entity: getDistanceToPoint");
-                       RS_DEBUG->print("entity: %d", e->rtti());
+                       DEBUG->print("entity: getDistanceToPoint");
+                       DEBUG->print("entity: %d", e->rtti());
                        curDist = e->getDistanceToPoint(coord, &subEntity, level, solidDist);
-                       RS_DEBUG->print("entity: getDistanceToPoint: OK");
+                       DEBUG->print("entity: getDistanceToPoint: OK");
 
                        if (curDist<minDist)
                        {
@@ -1379,15 +1379,15 @@ double RS_EntityContainer::getDistanceToPoint(const Vector & coord,
        if (entity)
                *entity = closestEntity;
 
-       RS_DEBUG->print("RS_EntityContainer::getDistanceToPoint: OK");
+       DEBUG->print("EntityContainer::getDistanceToPoint: OK");
        return minDist;
 }
 
-RS_Entity * RS_EntityContainer::getNearestEntity(const Vector & coord,
+Entity * EntityContainer::getNearestEntity(const Vector & coord,
        double * dist, RS2::ResolveLevel level)
 {
-       RS_DEBUG->print("RS_EntityContainer::getNearestEntity");
-       RS_Entity * e = NULL;
+       DEBUG->print("EntityContainer::getNearestEntity");
+       Entity * e = NULL;
 
        // distance for points inside solids:
        double solidDist = RS_MAXDOUBLE;
@@ -1404,7 +1404,7 @@ RS_Entity * RS_EntityContainer::getNearestEntity(const Vector & coord,
        if (dist)
                *dist = d;
 
-       RS_DEBUG->print("RS_EntityContainer::getNearestEntity: OK");
+       DEBUG->print("EntityContainer::getNearestEntity: OK");
        return e;
 }
 
@@ -1416,24 +1416,24 @@ RS_Entity * RS_EntityContainer::getNearestEntity(const Vector & coord,
  * @retval true all contours were closed
  * @retval false at least one contour is not closed
  */
-bool RS_EntityContainer::optimizeContours()
+bool EntityContainer::optimizeContours()
 {
-       RS_DEBUG->print("RS_EntityContainer::optimizeContours");
+       DEBUG->print("EntityContainer::optimizeContours");
 
        Vector current(false);
        Vector start(false);
-       RS_EntityContainer tmp;
+       EntityContainer tmp;
 
        bool changed = false;
        bool closed = true;
 
        for(uint ci=0; ci<count(); ++ci)
        {
-               RS_Entity * e1=entityAt(ci);
+               Entity * e1=entityAt(ci);
 
                if (e1 && e1->isEdge() && !e1->isContainer() && !e1->isProcessed())
                {
-                       RS_AtomicEntity * ce = (RS_AtomicEntity *)e1;
+                       AtomicEntity * ce = (AtomicEntity *)e1;
 
                        // next contour start:
                        ce->setProcessed(true);
@@ -1449,12 +1449,12 @@ bool RS_EntityContainer::optimizeContours()
                                done = true;
                                for(uint ei=0; ei<count(); ++ei)
                                {
-                                       RS_Entity * e2=entityAt(ei);
+                                       Entity * e2=entityAt(ei);
 
                                        if (e2 != NULL && e2->isEdge() && !e2->isContainer() &&
                                                !e2->isProcessed())
                                        {
-                                               RS_AtomicEntity * e = (RS_AtomicEntity *)e2;
+                                               AtomicEntity * e = (AtomicEntity *)e2;
 
                                                if (e->getStartpoint().distanceTo(current) < 1.0e-4)
                                                {
@@ -1466,7 +1466,7 @@ bool RS_EntityContainer::optimizeContours()
                                                else if (e->getEndpoint().distanceTo(current) < 1.0e-4)
                                                {
                                                        e->setProcessed(true);
-                                                       RS_AtomicEntity * cl = (RS_AtomicEntity *)e->clone();
+                                                       AtomicEntity * cl = (AtomicEntity *)e->clone();
                                                        cl->reverse();
                                                        tmp.addEntity(cl);
                                                        current = cl->getEndpoint();
@@ -1493,7 +1493,7 @@ bool RS_EntityContainer::optimizeContours()
        {
                done = true;
 
-               for(RS_Entity * en=firstEntity(); en!=NULL; en=nextEntity())
+               for(Entity * en=firstEntity(); en!=NULL; en=nextEntity())
                {
                        if (!en->isContainer())
                        {
@@ -1506,19 +1506,19 @@ bool RS_EntityContainer::optimizeContours()
        while (!done);
 
        // add new sorted entities:
-       for(RS_Entity * en=tmp.firstEntity(); en!=NULL; en=tmp.nextEntity())
+       for(Entity * en=tmp.firstEntity(); en!=NULL; en=tmp.nextEntity())
        {
                en->setProcessed(false);
                addEntity(en->clone());
        }
 
-       RS_DEBUG->print("RS_EntityContainer::optimizeContours: OK");
+       DEBUG->print("EntityContainer::optimizeContours: OK");
        return closed;
 }
 
-bool RS_EntityContainer::hasEndpointsWithinWindow(Vector v1, Vector v2)
+bool EntityContainer::hasEndpointsWithinWindow(Vector v1, Vector v2)
 {
-       for(RS_Entity * e=firstEntity(RS2::ResolveNone); e!=NULL; e=nextEntity(RS2::ResolveNone))
+       for(Entity * e=firstEntity(RS2::ResolveNone); e!=NULL; e=nextEntity(RS2::ResolveNone))
        {
                if (e->hasEndpointsWithinWindow(v1, v2))
                        return true;
@@ -1527,29 +1527,29 @@ bool RS_EntityContainer::hasEndpointsWithinWindow(Vector v1, Vector v2)
        return false;
 }
 
-void RS_EntityContainer::move(Vector offset)
+void EntityContainer::move(Vector offset)
 {
-       for(RS_Entity * e=firstEntity(RS2::ResolveNone); e!=NULL; e=nextEntity(RS2::ResolveNone))
+       for(Entity * e=firstEntity(RS2::ResolveNone); e!=NULL; e=nextEntity(RS2::ResolveNone))
                e->move(offset);
 
        if (autoUpdateBorders)
                calculateBorders();
 }
 
-void RS_EntityContainer::rotate(Vector center, double angle)
+void EntityContainer::rotate(Vector center, double angle)
 {
-       for(RS_Entity * e=firstEntity(RS2::ResolveNone); e!=NULL; e=nextEntity(RS2::ResolveNone))
+       for(Entity * e=firstEntity(RS2::ResolveNone); e!=NULL; e=nextEntity(RS2::ResolveNone))
                e->rotate(center, angle);
 
        if (autoUpdateBorders)
                calculateBorders();
 }
 
-void RS_EntityContainer::scale(Vector center, Vector factor)
+void EntityContainer::scale(Vector center, Vector factor)
 {
        if (fabs(factor.x) > RS_TOLERANCE && fabs(factor.y) > RS_TOLERANCE)
        {
-               for(RS_Entity * e=firstEntity(RS2::ResolveNone); e!=NULL; e=nextEntity(RS2::ResolveNone))
+               for(Entity * e=firstEntity(RS2::ResolveNone); e!=NULL; e=nextEntity(RS2::ResolveNone))
                        e->scale(center, factor);
        }
 
@@ -1557,16 +1557,16 @@ void RS_EntityContainer::scale(Vector center, Vector factor)
                calculateBorders();
 }
 
-void RS_EntityContainer::mirror(Vector axisPoint1, Vector axisPoint2)
+void EntityContainer::mirror(Vector axisPoint1, Vector axisPoint2)
 {
        if (axisPoint1.distanceTo(axisPoint2) > 1.0e-6)
        {
-               for(RS_Entity * e=firstEntity(RS2::ResolveNone); e!=NULL; e=nextEntity(RS2::ResolveNone))
+               for(Entity * e=firstEntity(RS2::ResolveNone); e!=NULL; e=nextEntity(RS2::ResolveNone))
                        e->mirror(axisPoint1, axisPoint2);
        }
 }
 
-void RS_EntityContainer::stretch(Vector firstCorner, Vector secondCorner,
+void EntityContainer::stretch(Vector firstCorner, Vector secondCorner,
        Vector offset)
 {
        if (getMin().isInWindow(firstCorner, secondCorner) &&
@@ -1576,51 +1576,51 @@ void RS_EntityContainer::stretch(Vector firstCorner, Vector secondCorner,
        }
        else
        {
-               for(RS_Entity * e=firstEntity(RS2::ResolveNone); e!=NULL; e=nextEntity(RS2::ResolveNone))
+               for(Entity * e=firstEntity(RS2::ResolveNone); e!=NULL; e=nextEntity(RS2::ResolveNone))
                        e->stretch(firstCorner, secondCorner, offset);
        }
 
-       // some entitiycontainers might need an update (e.g. RS_Leader):
+       // some entitiycontainers might need an update (e.g. Leader):
        update();
 }
 
-void RS_EntityContainer::moveRef(const Vector & ref, const Vector & offset)
+void EntityContainer::moveRef(const Vector & ref, const Vector & offset)
 {
-       for(RS_Entity* e=firstEntity(RS2::ResolveNone); e!=NULL; e=nextEntity(RS2::ResolveNone))
+       for(Entity* e=firstEntity(RS2::ResolveNone); e!=NULL; e=nextEntity(RS2::ResolveNone))
                e->moveRef(ref, offset);
 
        if (autoUpdateBorders)
                calculateBorders();
 }
 
-void RS_EntityContainer::moveSelectedRef(const Vector & ref, const Vector & offset)
+void EntityContainer::moveSelectedRef(const Vector & ref, const Vector & offset)
 {
-       for(RS_Entity * e=firstEntity(RS2::ResolveNone); e!=NULL; e=nextEntity(RS2::ResolveNone))
+       for(Entity * e=firstEntity(RS2::ResolveNone); e!=NULL; e=nextEntity(RS2::ResolveNone))
                e->moveSelectedRef(ref, offset);
 
        if (autoUpdateBorders)
                calculateBorders();
 }
 
-void RS_EntityContainer::draw(PaintInterface * painter, GraphicView * view, double /*patternOffset*/)
+void EntityContainer::draw(PaintInterface * painter, GraphicView * view, double /*patternOffset*/)
 {
        if (!painter || !view)
                return;
 
-       for(RS_Entity * e=firstEntity(RS2::ResolveNone); e!=NULL; e=nextEntity(RS2::ResolveNone))
+       for(Entity * e=firstEntity(RS2::ResolveNone); e!=NULL; e=nextEntity(RS2::ResolveNone))
 #if 0
 {
 if (e->rtti() == RS2::EntityText)
 {
        std::cout << "About to draw TEXT entity... "
-               << "TEXT=\"" << ((RS_Text *)e)->getText().toAscii().data() << "\"" << std::endl;
+               << "TEXT=\"" << ((Text *)e)->getText().toAscii().data() << "\"" << std::endl;
 }
 //OK, we have text, but no insert entities at least none that are drawn...
 //Ah! But with a standard text entity, it DOES have them!
 else if (e->rtti() == RS2::EntityInsert)
 {
        std::cout << "About to draw INSERT entity... "
-               << "INSERT=\"" << ((RS_Insert *)e)->getData().name.toAscii().data() << "\"" << std::endl;
+               << "INSERT=\"" << ((Insert *)e)->getData().name.toAscii().data() << "\"" << std::endl;
 }
 #endif
                view->drawEntity(e);
@@ -1632,7 +1632,7 @@ else if (e->rtti() == RS2::EntityInsert)
 /**
  * Dumps the entities to stdout.
  */
-std::ostream & operator<<(std::ostream & os, RS_EntityContainer & ec)
+std::ostream & operator<<(std::ostream & os, EntityContainer & ec)
 {
        static int indent = 0;
        char * tab = new char[indent * 2 + 1];
@@ -1648,7 +1648,7 @@ std::ostream & operator<<(std::ostream & os, RS_EntityContainer & ec)
        os << tab << "Borders[" << id << "]: "
        << ec.minV << " - " << ec.maxV << "\n";
        //os << tab << "Unit[" << id << "]: "
-       //<< RS_Units::unit2string (ec.unit) << "\n";
+       //<< Units::unit2string (ec.unit) << "\n";
        if (ec.getLayer())
        {
                os << tab << "Layer[" << id << "]: "
@@ -1672,25 +1672,25 @@ QString s;
 os << "(# of entities in this = " << ec.entities.size() << ")\n";
 for(int i=0; i<ec.entities.size(); i++)
 {
-       RS_Entity * t = ec.entities[i];
+       Entity * t = ec.entities[i];
        s.sprintf("(Entity = $%08X, rtti = %d\n", t, t->rtti());
        os << s.toAscii().data();
 }
 s.sprintf("(firstEntity = $%08X)\n", ec.firstEntity());
 os << s.toAscii().data();
 
-       for(RS_Entity * t=ec.firstEntity(); t!=NULL; t=ec.nextEntity())
+       for(Entity * t=ec.firstEntity(); t!=NULL; t=ec.nextEntity())
        {
                switch (t->rtti())
                {
                case RS2::EntityInsert:
-                       os << tab << *((RS_Insert *)t);
-                       os << tab << *((RS_Entity *)t);
-                       os << tab << *((RS_EntityContainer *)t);
+                       os << tab << *((Insert *)t);
+                       os << tab << *((Entity *)t);
+                       os << tab << *((EntityContainer *)t);
                        break;
                default:
                        if (t->isContainer())
-                               os << tab << *((RS_EntityContainer *)t);
+                               os << tab << *((EntityContainer *)t);
                        else
                                os << tab << *t;
 
index a8c4d9ebbea6ddb3a7e83eea4a946584da212fa6..f05572401446de5ebfd20d535073866c51bd7f90 100644 (file)
  *
  * @author Andrew Mustun
  */
-class RS_EntityContainer: public RS_Entity
+class EntityContainer: public Entity
 {
        public:
-               RS_EntityContainer(RS_EntityContainer * parent = NULL, bool owner = true);
-               //RS_EntityContainer(const RS_EntityContainer& ec);
-               virtual ~RS_EntityContainer();
+               EntityContainer(EntityContainer * parent = NULL, bool owner = true);
+               //EntityContainer(const EntityContainer& ec);
+               virtual ~EntityContainer();
 
-               virtual RS_Entity * clone();
+               virtual Entity * clone();
                virtual void detach();
                virtual RS2::EntityType rtti() const;
-               void reparent(RS_EntityContainer * parent);
+               void reparent(EntityContainer * parent);
                virtual bool isContainer() const;
                virtual bool isAtomic() const;
                virtual double getLength();
@@ -38,29 +38,29 @@ class RS_EntityContainer: public RS_Entity
 
                virtual void selectWindow(Vector v1, Vector v2, bool select = true, bool cross = false);
 
-               virtual void addEntity(RS_Entity * entity);
-               virtual void insertEntity(int index, RS_Entity * entity);
-               virtual void replaceEntity(int index, RS_Entity * entity);
-               virtual bool removeEntity(RS_Entity * entity);
-               virtual RS_Entity * firstEntity(RS2::ResolveLevel level = RS2::ResolveNone);
-               virtual RS_Entity * lastEntity(RS2::ResolveLevel level = RS2::ResolveNone);
-               virtual RS_Entity * nextEntity(RS2::ResolveLevel level = RS2::ResolveNone);
-               virtual RS_Entity * prevEntity(RS2::ResolveLevel level = RS2::ResolveNone);
-               virtual RS_Entity * entityAt(uint index);
-               virtual RS_Entity * currentEntity();
+               virtual void addEntity(Entity * entity);
+               virtual void insertEntity(int index, Entity * entity);
+               virtual void replaceEntity(int index, Entity * entity);
+               virtual bool removeEntity(Entity * entity);
+               virtual Entity * firstEntity(RS2::ResolveLevel level = RS2::ResolveNone);
+               virtual Entity * lastEntity(RS2::ResolveLevel level = RS2::ResolveNone);
+               virtual Entity * nextEntity(RS2::ResolveLevel level = RS2::ResolveNone);
+               virtual Entity * prevEntity(RS2::ResolveLevel level = RS2::ResolveNone);
+               virtual Entity * entityAt(uint index);
+               virtual Entity * currentEntity();
                virtual int entityAt();
-               virtual int findEntity(RS_Entity * entity);
+               virtual int findEntity(Entity * entity);
                virtual void clear();
 
-       //      Q3PtrListIterator<RS_Entity> createIterator();
-//             QListIterator<RS_Entity *> createIterator();
+       //      Q3PtrListIterator<Entity> createIterator();
+//             QListIterator<Entity *> createIterator();
 
                virtual bool isEmpty();
                virtual unsigned long int count();
                virtual unsigned long int countDeep();
                virtual unsigned long int countSelected();
                virtual void setAutoUpdateBorders(bool enable);
-               virtual void adjustBorders(RS_Entity * entity);
+               virtual void adjustBorders(Entity * entity);
                virtual void calculateBorders();
                virtual void forcedCalculateBorders();
                virtual void updateDimensions();
@@ -71,11 +71,11 @@ class RS_EntityContainer: public RS_Entity
 
                virtual Vector getNearestEndpoint(const Vector & coord, double * dist = NULL);
 
-               RS_Entity * getNearestEntity(const Vector & point, double * dist = NULL,
+               Entity * getNearestEntity(const Vector & point, double * dist = NULL,
                        RS2::ResolveLevel level = RS2::ResolveAll);
 
                virtual Vector getNearestPointOnEntity(const Vector & coord, bool onEntity = true,
-                       double * dist = NULL, RS_Entity ** entity = NULL);
+                       double * dist = NULL, Entity ** entity = NULL);
 
                virtual Vector getNearestCenter(const Vector & coord, double * dist = NULL);
                virtual Vector getNearestMiddle(const Vector & coord, double * dist = NULL);
@@ -84,7 +84,7 @@ class RS_EntityContainer: public RS_Entity
                virtual Vector getNearestRef(const Vector & coord, double * dist = NULL);
                virtual Vector getNearestSelectedRef(const Vector & coord, double * dist = NULL);
 
-               virtual double getDistanceToPoint(const Vector & coord, RS_Entity ** entity,
+               virtual double getDistanceToPoint(const Vector & coord, Entity ** entity,
                        RS2::ResolveLevel level = RS2::ResolveNone, double solidDist = RS_MAXDOUBLE);
 
                virtual bool optimizeContours();
@@ -101,14 +101,14 @@ class RS_EntityContainer: public RS_Entity
                virtual void moveSelectedRef(const Vector & ref, const Vector & offset);
                virtual void draw(PaintInterface * painter, GraphicView * view, double patternOffset = 0.0);
 
-               friend std::ostream & operator<<(std::ostream & os, RS_EntityContainer & ec);
+               friend std::ostream & operator<<(std::ostream & os, EntityContainer & ec);
 
        protected:
                /** entities in the container */
-               QList<RS_Entity *> entities;
+               QList<Entity *> entities;
 
                /** sub container used only temporarly for iteration. */
-               RS_EntityContainer * subContainer;
+               EntityContainer * subContainer;
 
                /**
                 * Class variable:
@@ -118,7 +118,7 @@ class RS_EntityContainer: public RS_Entity
                static bool autoUpdateBorders;
 
        private:
-               QListIterator<RS_Entity *> entityIterator;
+               QListIterator<Entity *> entityIterator;
 };
 
 #endif // __ENTITYCONTAINER_H__
similarity index 75%
rename from src/base/rs.h
rename to src/base/enums.h
index d0bfc411e7eba9cd451cc5d2aa79860b588bbcc8..667f311d93df04a3d4b91afd8de93fbbe5eb2927 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef __RS_H__
-#define __RS_H__
+#ifndef __ENUMS_H__
+#define __ENUMS_H__
 
 #include <QtGui>
 #include <QPrinter>
@@ -21,6 +21,7 @@
  * @author James Hammons
  * @author Andrew Mustun
  */
+//change from RS2 to EN (for ENum)
 class RS2
 {
 public:
@@ -62,7 +63,7 @@ public:
     };
 
     /**
-     * Variable types used by RS_VariableDict and RS_Variable.
+     * Variable types used by VariableDict and Variable.
      */
     enum VariableType {
         VariableString,
@@ -594,88 +595,6 @@ public:
         LineByBlock = -2      /**< Line type defined by block not entity */
     };
 
-    /**
-     * Wrapper for Qt
-     */
-    static Qt::PenStyle rsToQtLineType(RS2::LineType t) {
-        switch (t) {
-        case NoPen:
-            return Qt::NoPen;
-            break;
-        case SolidLine:
-            return Qt::SolidLine;
-            break;
-        case DotLine:
-        case DotLine2:
-        case DotLineX2:
-            return Qt::DotLine;
-            break;
-        case DashLine:
-        case DashLine2:
-        case DashLineX2:
-            return Qt::DashLine;
-            break;
-        case DashDotLine:
-        case DashDotLine2:
-        case DashDotLineX2:
-            return Qt::DashDotLine;
-            break;
-        case DivideLine:
-        case DivideLine2:
-        case DivideLineX2:
-            return Qt::DashDotDotLine;
-            break;
-        case CenterLine:
-        case CenterLine2:
-        case CenterLineX2:
-            return Qt::DashDotLine;
-            break;
-        case BorderLine:
-        case BorderLine2:
-        case BorderLineX2:
-            return Qt::DashDotLine;
-            break;
-        case LineByLayer:
-        case LineByBlock:
-        default:
-            return Qt::SolidLine;
-            break;
-        }
-        return Qt::SolidLine;
-    }
-
-    /**
-     * Wrapper for Qt.
-     */
-    static RS2::LineType qtToRsPenStyle(Qt::PenStyle s)
-    {
-        switch (s)
-               {
-        case Qt::NoPen:
-            return NoPen;
-        case Qt::SolidLine:
-            return SolidLine;
-            break;
-        case Qt::DashLine:
-            return DashLine;
-            break;
-        case Qt::DotLine:
-            return DotLine;
-            break;
-        case Qt::DashDotLine:
-            return DashDotLine;
-            break;
-        case Qt::DashDotDotLine:
-            return DivideLine;
-            break;
-        default:
-            return SolidLine;
-            break;
-        }
-
-               return SolidLine;
-    }
-
     /**
      * \brief Struct that stores a line type pattern (e.g. dash dot dot).
      */
@@ -719,121 +638,6 @@ public:
         WidthDefault = -3  /**< Line width defaults to the predefined line width. */
     };
 
-    /**
-     * Wrapper for Qt
-     */
-    static LineWidth intToLineWidth(int w)
-    {
-               if (w == -3)
-               {
-                       return WidthDefault;
-               }
-               else if (w == -2)
-               {
-                       return WidthByBlock;
-               }
-               else if (w == -1)
-               {
-                       return WidthByLayer;
-               }
-               else if (w < 3)
-               {
-                       return Width00;
-               }
-               else if (w < 8)
-               {
-                       return Width01;
-               }
-               else if (w < 12)
-               {
-                       return Width02;
-               }
-               else if (w < 14)
-               {
-                       return Width03;
-               }
-               else if (w < 17)
-               {
-                       return Width04;
-               }
-               else if (w < 19)
-               {
-                       return Width05;
-               }
-               else if (w < 23)
-               {
-                       return Width06;
-               }
-               else if (w < 28)
-               {
-                       return Width07;
-               }
-               else if (w < 33)
-               {
-                       return Width08;
-               }
-               else if (w < 38)
-               {
-                       return Width09;
-               }
-               else if (w < 46)
-               {
-                       return Width10;
-               }
-               else if (w < 52)
-               {
-                       return Width11;
-               }
-               else if (w < 57)
-               {
-                       return Width12;
-               }
-               else if (w < 66)
-               {
-                       return Width13;
-               }
-               else if (w < 76)
-               {
-                       return Width14;
-               }
-               else if (w < 86)
-               {
-                       return Width15;
-               }
-               else if (w < 96)
-               {
-                       return Width16;
-               }
-               else if (w < 104)
-               {
-                       return Width17;
-               }
-               else if (w < 114)
-               {
-                       return Width18;
-               }
-               else if (w < 131)
-               {
-                       return Width19;
-               }
-               else if (w < 150)
-               {
-                       return Width20;
-               }
-               else if (w < 180)
-               {
-                       return Width21;
-               }
-               else if (w < 206)
-               {
-                       return Width22;
-               }
-               else
-               {
-                       return Width23;
-               }
-    }
-
     /**
      * Enum of cursor types.
      */
@@ -861,69 +665,6 @@ public:
         MovingHandCursor      /**< Moving hand - a little flat hand. */
     };
 
-    /**
-     * Wrapper for Qt.
-     */
-    static Qt::CursorShape rsToQtCursorType(RS2::CursorType t)
-    {
-        switch (t)
-               {
-        case ArrowCursor:
-            return Qt::ArrowCursor;
-            break;
-        case UpArrowCursor:
-            return Qt::UpArrowCursor;
-            break;
-        case CrossCursor:
-            return Qt::CrossCursor;
-            break;
-        case WaitCursor:
-            return Qt::WaitCursor;
-            break;
-        case IbeamCursor:
-            return Qt::IBeamCursor;
-            break;
-        case SizeVerCursor:
-            return Qt::SizeVerCursor;
-            break;
-        case SizeHorCursor:
-            return Qt::SizeHorCursor;
-            break;
-        case SizeBDiagCursor:
-            return Qt::SizeBDiagCursor;
-            break;
-        case SizeFDiagCursor:
-            return Qt::SizeFDiagCursor;
-            break;
-        case SizeAllCursor:
-            return Qt::SizeAllCursor;
-            break;
-        case BlankCursor:
-            return Qt::BlankCursor;
-            break;
-        case SplitVCursor:
-            return Qt::SplitVCursor;
-            break;
-        case SplitHCursor:
-            return Qt::SplitHCursor;
-            break;
-        case PointingHandCursor:
-            return Qt::PointingHandCursor;
-            break;
-        case ForbiddenCursor:
-            return Qt::ForbiddenCursor;
-            break;
-        case WhatsThisCursor:
-            return Qt::WhatsThisCursor;
-            break;
-        default:
-            return Qt::ArrowCursor;
-            break;
-        }
-
-               return Qt::ArrowCursor;
-    }
-
     /**
      * Paper formats.
      */
@@ -962,116 +703,14 @@ public:
                NPageSize
        };
 
-    /**
-     * Wrapper for Qt.
-     */
-    static QPrinter::PageSize rsToQtPaperFormat(RS2::PaperFormat f)
-    {
-               QPrinter::PageSize ret;
-
-               switch (f)
-               {
-        case Custom:
-                       ret = QPrinter::Custom;
-                       break;
-               case Letter:
-                       ret = QPrinter::Letter;
-                       break;
-               case Legal:
-                       ret = QPrinter::Legal;
-                       break;
-               case Executive:
-                       ret = QPrinter::Executive;
-                       break;
-        case A0:
-                       ret = QPrinter::A0;
-                       break;
-               case A1:
-                       ret = QPrinter::A1;
-                       break;
-               case A2:
-                       ret = QPrinter::A2;
-                       break;
-               case A3:
-                       ret = QPrinter::A3;
-                       break;
-               default:
-               case A4:
-                       ret = QPrinter::A4;
-                       break;
-               case A5:
-                       ret = QPrinter::A5;
-                       break;
-               case A6:
-                       ret = QPrinter::A6;
-                       break;
-               case A7:
-                       ret = QPrinter::A7;
-                       break;
-               case A8:
-                       ret = QPrinter::A8;
-                       break;
-               case A9:
-                       ret = QPrinter::A9;
-                       break;
-               case B0:
-                       ret = QPrinter::B0;
-                       break;
-               case B1:
-                       ret = QPrinter::B1;
-                       break;
-               case B2:
-                       ret = QPrinter::B2;
-                       break;
-               case B3:
-                       ret = QPrinter::B3;
-                       break;
-               case B4:
-                       ret = QPrinter::B4;
-                       break;
-               case B5:
-                       ret = QPrinter::B5;
-                       break;
-               case B6:
-                       ret = QPrinter::B6;
-                       break;
-               case B7:
-                       ret = QPrinter::B7;
-                       break;
-               case B8:
-                       ret = QPrinter::B8;
-                       break;
-               case B9:
-                       ret = QPrinter::B9;
-                       break;
-               case B10:
-                       ret = QPrinter::B10;
-                       break;
-               case C5E:
-                       ret = QPrinter::C5E;
-                       break;
-               case Comm10E:
-                       ret = QPrinter::Comm10E;
-                       break;
-        case DLE:
-                       ret = QPrinter::DLE;
-                       break;
-               case Folio:
-                       ret = QPrinter::Folio;
-                       break;
-               //case Ledger:
-               //      ret = QPrinter::Ledger;
-               //      break;
-               case Tabloid:
-                       ret = QPrinter::Tabloid;
-                       break;
-               case NPageSize:
-                       ret = QPrinter::NPageSize;
-                       break;
-               }
-
-               return ret;
-       }
+               /**
+                * Wrappers for Qt (ICK)
+                */
+               static Qt::PenStyle rsToQtLineType(RS2::LineType t);
+               static RS2::LineType qtToRsPenStyle(Qt::PenStyle s);
+               static RS2::LineWidth intToLineWidth(int w);
+               static Qt::CursorShape rsToQtCursorType(RS2::CursorType t);
+               static QPrinter::PageSize rsToQtPaperFormat(RS2::PaperFormat f);
 };
 
-#endif // __RS_H__
+#endif // __ENUMS_H__
index 58334af9958ac11b3b2afef28d4d4aadf9be4be6..a8b64179e4207ff8a8a504d10759cdcb1a6de70f 100644 (file)
@@ -26,7 +26,7 @@
 /**
  * Constructor.
  */
-RS_EventHandler::RS_EventHandler(GraphicView * graphicView)
+EventHandler::EventHandler(GraphicView * graphicView)
 {
        this->graphicView = graphicView;
        actionIndex = -1;
@@ -41,9 +41,9 @@ RS_EventHandler::RS_EventHandler(GraphicView * graphicView)
 /**
  * Destructor.
  */
-RS_EventHandler::~RS_EventHandler()
+EventHandler::~EventHandler()
 {
-       RS_DEBUG->print("RS_EventHandler::~RS_EventHandler");
+       DEBUG->print("EventHandler::~EventHandler");
 
        if (defaultAction != NULL)
        {
@@ -54,7 +54,7 @@ RS_EventHandler::~RS_EventHandler()
 
        killAllActions();
 
-       RS_DEBUG->print("RS_EventHandler::~RS_EventHandler: Deleting all actions..");
+       DEBUG->print("EventHandler::~EventHandler: Deleting all actions..");
 
        for(int i=0; i<RS_MAXACTIONS; ++i)
        {
@@ -67,14 +67,14 @@ RS_EventHandler::~RS_EventHandler()
        }
 
        cleanUp();
-       RS_DEBUG->print("RS_EventHandler::~RS_EventHandler: Deleting all actions..: OK");
-       RS_DEBUG->print("RS_EventHandler::~RS_EventHandler: OK");
+       DEBUG->print("EventHandler::~EventHandler: Deleting all actions..: OK");
+       DEBUG->print("EventHandler::~EventHandler: OK");
 }
 
 /**
  * Go back in current action.
  */
-void RS_EventHandler::back()
+void EventHandler::back()
 {
        QMouseEvent e(QEvent::MouseButtonRelease, QPoint(0, 0), Qt::RightButton, Qt::RightButton,
                Qt::NoModifier);
@@ -84,7 +84,7 @@ void RS_EventHandler::back()
 /**
  * Go enter pressed event for current action.
  */
-void RS_EventHandler::enter()
+void EventHandler::enter()
 {
 //     QKeyEvent e(QEvent::KeyPress, Qt::Key_Enter, '\n', 0);
        QKeyEvent e(QEvent::KeyPress, Qt::Key_Enter, Qt::NoModifier, "\n", false, 0);
@@ -94,7 +94,7 @@ void RS_EventHandler::enter()
 /**
  * Called by GraphicView
  */
-void RS_EventHandler::mousePressEvent(QMouseEvent * e)
+void EventHandler::mousePressEvent(QMouseEvent * e)
 {
        if (actionIndex >= 0 && currentActions[actionIndex] != NULL)
        {
@@ -110,7 +110,7 @@ void RS_EventHandler::mousePressEvent(QMouseEvent * e)
                }
                else
                {
-                       RS_DEBUG->print("currently no action defined");
+                       DEBUG->print("currently no action defined");
                        e->ignore();
                }
        }
@@ -119,12 +119,12 @@ void RS_EventHandler::mousePressEvent(QMouseEvent * e)
 /**
  * Called by GraphicView
  */
-void RS_EventHandler::mouseReleaseEvent(QMouseEvent * e)
+void EventHandler::mouseReleaseEvent(QMouseEvent * e)
 {
        if (actionIndex >= 0 && currentActions[actionIndex] != NULL
                && !currentActions[actionIndex]->isFinished())
        {
-               RS_DEBUG->print("call action %s", currentActions[actionIndex]->getName().toLatin1().data());
+               DEBUG->print("call action %s", currentActions[actionIndex]->getName().toLatin1().data());
                currentActions[actionIndex]->mouseReleaseEvent(e);
 
                // Clean up actions - one might be finished now
@@ -143,7 +143,7 @@ void RS_EventHandler::mouseReleaseEvent(QMouseEvent * e)
 /**
  * Called by GraphicView
  */
-void RS_EventHandler::mouseMoveEvent(QMouseEvent * e)
+void EventHandler::mouseMoveEvent(QMouseEvent * e)
 {
        if (actionIndex >= 0 && currentActions[actionIndex]
                && !currentActions[actionIndex]->isFinished())
@@ -160,14 +160,14 @@ void RS_EventHandler::mouseMoveEvent(QMouseEvent * e)
                }
                else
                        e->ignore();
-               //RS_DEBUG->print("currently no action defined");
+               //DEBUG->print("currently no action defined");
        }
 }
 
 /**
  * Called by GraphicView
  */
-void RS_EventHandler::mouseLeaveEvent()
+void EventHandler::mouseLeaveEvent()
 {
        if (actionIndex >= 0 && currentActions[actionIndex]
                && !currentActions[actionIndex]->isFinished())
@@ -178,14 +178,14 @@ void RS_EventHandler::mouseLeaveEvent()
        {
                if (defaultAction)
                        defaultAction->suspend();
-               //RS_DEBUG->print("currently no action defined");
+               //DEBUG->print("currently no action defined");
        }
 }
 
 /**
  * Called by GraphicView
  */
-void RS_EventHandler::mouseEnterEvent()
+void EventHandler::mouseEnterEvent()
 {
        if (actionIndex >= 0 && currentActions[actionIndex]
                && !currentActions[actionIndex]->isFinished())
@@ -202,7 +202,7 @@ void RS_EventHandler::mouseEnterEvent()
 /**
  * Called by GraphicView
  */
-void RS_EventHandler::keyPressEvent(QKeyEvent * e)
+void EventHandler::keyPressEvent(QKeyEvent * e)
 {
        if (actionIndex >= 0 && currentActions[actionIndex]
                && !currentActions[actionIndex]->isFinished())
@@ -216,14 +216,14 @@ void RS_EventHandler::keyPressEvent(QKeyEvent * e)
                else
                        e->ignore();
 
-               //RS_DEBUG->print("currently no action defined");
+               //DEBUG->print("currently no action defined");
        }
 }
 
 /**
  * Called by GraphicView
  */
-void RS_EventHandler::keyReleaseEvent(QKeyEvent * e)
+void EventHandler::keyReleaseEvent(QKeyEvent * e)
 {
        if (actionIndex >= 0 && currentActions[actionIndex]
                && !currentActions[actionIndex]->isFinished())
@@ -237,16 +237,16 @@ void RS_EventHandler::keyReleaseEvent(QKeyEvent * e)
                else
                        e->ignore();
 
-               //RS_DEBUG->print("currently no action defined");
+               //DEBUG->print("currently no action defined");
        }
 }
 
 /**
  * Handles command line events.
  */
-void RS_EventHandler::commandEvent(RS_CommandEvent * e)
+void EventHandler::commandEvent(CommandEvent * e)
 {
-       RS_DEBUG->print("RS_EventHandler::commandEvent");
+       DEBUG->print("EventHandler::commandEvent");
        QString cmd = e->getCommand();
 
        if (coordinateInputEnabled)
@@ -260,27 +260,27 @@ void RS_EventHandler::commandEvent(RS_CommandEvent * e)
                                        && !currentActions[actionIndex]->isFinished())
                                {
                                        int commaPos = cmd.indexOf(',');
-                                       RS_DEBUG->print("RS_EventHandler::commandEvent: 001");
+                                       DEBUG->print("EventHandler::commandEvent: 001");
                                        bool ok1, ok2;
-                                       RS_DEBUG->print("RS_EventHandler::commandEvent: 002");
-                                       double x = RS_Math::eval(cmd.left(commaPos), &ok1);
-                                       RS_DEBUG->print("RS_EventHandler::commandEvent: 003a");
-                                       double y = RS_Math::eval(cmd.mid(commaPos + 1), &ok2);
-                                       RS_DEBUG->print("RS_EventHandler::commandEvent: 004");
+                                       DEBUG->print("EventHandler::commandEvent: 002");
+                                       double x = Math::eval(cmd.left(commaPos), &ok1);
+                                       DEBUG->print("EventHandler::commandEvent: 003a");
+                                       double y = Math::eval(cmd.mid(commaPos + 1), &ok2);
+                                       DEBUG->print("EventHandler::commandEvent: 004");
 
                                        if (ok1 && ok2)
                                        {
-//                                             RS_DEBUG->print("RS_EventHandler::commandEvent: 005");
-//                                             RS_CoordinateEvent ce(Vector(x, y));
-                                               RS_DEBUG->print("RS_EventHandler::commandEvent: 006");
+//                                             DEBUG->print("EventHandler::commandEvent: 005");
+//                                             CoordinateEvent ce(Vector(x, y));
+                                               DEBUG->print("EventHandler::commandEvent: 006");
 //                                             currentActions[actionIndex]->coordinateEvent(&ce);
                                                Vector ce(x, y);
                                                currentActions[actionIndex]->coordinateEvent(&ce);
                                        }
                                        else
                                        {
-                                               if (RS_DIALOGFACTORY != NULL)
-                                                       RS_DIALOGFACTORY->commandMessage("Expression Syntax Error");
+                                               if (DIALOGFACTORY != NULL)
+                                                       DIALOGFACTORY->commandMessage("Expression Syntax Error");
                                        }
 
                                        e->accept();
@@ -298,20 +298,20 @@ void RS_EventHandler::commandEvent(RS_CommandEvent * e)
                                {
                                        int commaPos = cmd.indexOf(',');
                                        bool ok1, ok2;
-                                       double x = RS_Math::eval(cmd.mid(1, commaPos - 1), &ok1);
-                                       double y = RS_Math::eval(cmd.mid(commaPos + 1), &ok2);
+                                       double x = Math::eval(cmd.mid(1, commaPos - 1), &ok1);
+                                       double y = Math::eval(cmd.mid(commaPos + 1), &ok2);
 
                                        if (ok1 && ok2)
                                        {
-//                                             RS_CoordinateEvent ce(Vector(x,y) + graphicView->getRelativeZero());
+//                                             CoordinateEvent ce(Vector(x,y) + graphicView->getRelativeZero());
 //                                             currentActions[actionIndex]->coordinateEvent(&ce);
                                                Vector ce(Vector(x,y) + graphicView->getRelativeZero());
                                                currentActions[actionIndex]->coordinateEvent(&ce);
                                        }
                                        else
                                        {
-                                               if (RS_DIALOGFACTORY != NULL)
-                                                       RS_DIALOGFACTORY->commandMessage("Expression Syntax Error");
+                                               if (DIALOGFACTORY != NULL)
+                                                       DIALOGFACTORY->commandMessage("Expression Syntax Error");
                                        }
 
                                        e->accept();
@@ -329,21 +329,21 @@ void RS_EventHandler::commandEvent(RS_CommandEvent * e)
                                {
                                        int commaPos = cmd.indexOf('<');
                                        bool ok1, ok2;
-                                       double r = RS_Math::eval(cmd.left(commaPos), &ok1);
-                                       double a = RS_Math::eval(cmd.mid(commaPos + 1), &ok2);
+                                       double r = Math::eval(cmd.left(commaPos), &ok1);
+                                       double a = Math::eval(cmd.mid(commaPos + 1), &ok2);
 
                                        if (ok1 && ok2)
                                        {
                                                Vector pos;
-                                               pos.setPolar(r,RS_Math::deg2rad(a));
-//                                             RS_CoordinateEvent ce(pos);
+                                               pos.setPolar(r,Math::deg2rad(a));
+//                                             CoordinateEvent ce(pos);
 //                                             currentActions[actionIndex]->coordinateEvent(&ce);
                                                currentActions[actionIndex]->coordinateEvent(&pos);
                                        }
                                        else
                                        {
-                                               if (RS_DIALOGFACTORY != NULL)
-                                                       RS_DIALOGFACTORY->commandMessage("Expression Syntax Error");
+                                               if (DIALOGFACTORY != NULL)
+                                                       DIALOGFACTORY->commandMessage("Expression Syntax Error");
                                        }
 
                                        e->accept();
@@ -362,22 +362,22 @@ void RS_EventHandler::commandEvent(RS_CommandEvent * e)
 //                                     int commaPos = cmd.find('<');
                                        int commaPos = cmd.indexOf('<');
                                        bool ok1, ok2;
-                                       double r = RS_Math::eval(cmd.mid(1, commaPos - 1), &ok1);
-                                       double a = RS_Math::eval(cmd.mid(commaPos + 1), &ok2);
+                                       double r = Math::eval(cmd.mid(1, commaPos - 1), &ok1);
+                                       double a = Math::eval(cmd.mid(commaPos + 1), &ok2);
 
                                        if (ok1 && ok2)
                                        {
                                                Vector pos;
-                                               pos.setPolar(r,RS_Math::deg2rad(a));
-//                                             RS_CoordinateEvent ce(pos + graphicView->getRelativeZero());
+                                               pos.setPolar(r,Math::deg2rad(a));
+//                                             CoordinateEvent ce(pos + graphicView->getRelativeZero());
 //                                             currentActions[actionIndex]->coordinateEvent(&ce);
                                                Vector ce(pos + graphicView->getRelativeZero());
                                                currentActions[actionIndex]->coordinateEvent(&ce);
                                        }
                                        else
                                        {
-                                               if (RS_DIALOGFACTORY)
-                                                       RS_DIALOGFACTORY->commandMessage("Expression Syntax Error");
+                                               if (DIALOGFACTORY)
+                                                       DIALOGFACTORY->commandMessage("Expression Syntax Error");
                                        }
 
                                        e->accept();
@@ -402,13 +402,13 @@ void RS_EventHandler::commandEvent(RS_CommandEvent * e)
                }
        }
 
-       RS_DEBUG->print("RS_EventHandler::commandEvent: OK");
+       DEBUG->print("EventHandler::commandEvent: OK");
 }
 
 /**
  * Enables coordinate input in the command line.
  */
-void RS_EventHandler::enableCoordinateInput()
+void EventHandler::enableCoordinateInput()
 {
        coordinateInputEnabled = true;
 }
@@ -416,7 +416,7 @@ void RS_EventHandler::enableCoordinateInput()
 /**
  * Enables coordinate input in the command line.
  */
-void RS_EventHandler::disableCoordinateInput()
+void EventHandler::disableCoordinateInput()
 {
        coordinateInputEnabled = false;
 }
@@ -424,7 +424,7 @@ void RS_EventHandler::disableCoordinateInput()
 /**
  * @return Current action.
  */
-ActionInterface * RS_EventHandler::getCurrentAction()
+ActionInterface * EventHandler::getCurrentAction()
 {
        if (actionIndex >= 0 && currentActions[actionIndex]
                && !currentActions[actionIndex]->isFinished())
@@ -436,7 +436,7 @@ ActionInterface * RS_EventHandler::getCurrentAction()
 /**
  * @return The current default action.
  */
-ActionInterface * RS_EventHandler::getDefaultAction()
+ActionInterface * EventHandler::getDefaultAction()
 {
        return defaultAction;
 }
@@ -444,7 +444,7 @@ ActionInterface * RS_EventHandler::getDefaultAction()
 /**
  * Sets the default action.
  */
-void RS_EventHandler::setDefaultAction(ActionInterface * action)
+void EventHandler::setDefaultAction(ActionInterface * action)
 {
        if (defaultAction)
        {
@@ -459,9 +459,9 @@ void RS_EventHandler::setDefaultAction(ActionInterface * action)
 /**
  * Sets the current action.
  */
-void RS_EventHandler::setCurrentAction(ActionInterface * action)
+void EventHandler::setCurrentAction(ActionInterface * action)
 {
-       RS_DEBUG->print("RS_EventHandler::setCurrentAction");
+       DEBUG->print("EventHandler::setCurrentAction");
 
        if (!action)
                return;
@@ -507,35 +507,35 @@ void RS_EventHandler::setCurrentAction(ActionInterface * action)
 
        // Set current action:
        currentActions[actionIndex] = action;
-       RS_DEBUG->print("RS_EventHandler::setCurrentAction: current action is: %s",
+       DEBUG->print("EventHandler::setCurrentAction: current action is: %s",
                currentActions[actionIndex]->getName().toLatin1().data());
 
        // Initialisation of our new action:
-       RS_DEBUG->print("RS_EventHandler::setCurrentAction: init current action");
+       DEBUG->print("EventHandler::setCurrentAction: init current action");
        action->init();
 
        // ## new:
        if (action->isFinished() == false)
        {
-               RS_DEBUG->print("RS_EventHandler::setCurrentAction: show options");
+               DEBUG->print("EventHandler::setCurrentAction: show options");
                currentActions[actionIndex]->showOptions();
-               RS_DEBUG->print("RS_EventHandler::setCurrentAction: set predecessor");
+               DEBUG->print("EventHandler::setCurrentAction: set predecessor");
                action->setPredecessor(predecessor);
        }
 
-       RS_DEBUG->print("RS_EventHandler::setCurrentAction: cleaning up..");
+       DEBUG->print("EventHandler::setCurrentAction: cleaning up..");
        cleanUp();
 
-       RS_DEBUG->print("RS_EventHandler::setCurrentAction: debugging actions");
+       DEBUG->print("EventHandler::setCurrentAction: debugging actions");
        debugActions();
-       RS_DEBUG->print("GraphicView::setCurrentAction: OK");
+       DEBUG->print("GraphicView::setCurrentAction: OK");
 }
 
 /**
  * Kills all running selection actions. Called when a selection action
  * is launched to reduce confusion.
  */
-void RS_EventHandler::killSelectActions()
+void EventHandler::killSelectActions()
 {
        for(int c=0; c<RS_MAXACTIONS; ++c)
        {
@@ -554,7 +554,7 @@ void RS_EventHandler::killSelectActions()
 /**
  * Kills all running actions. Called when a window is closed.
  */
-void RS_EventHandler::killAllActions()
+void EventHandler::killAllActions()
 {
        /*
     for (int c=0; c<RS_MAXACTIONS; ++c) {
@@ -569,7 +569,7 @@ void RS_EventHandler::killAllActions()
 /**
  * @return true if there is at least one action in the action stack.
  */
-bool RS_EventHandler::hasAction()
+bool EventHandler::hasAction()
 {
        if (actionIndex != -1 || defaultAction)
                return true;
@@ -580,9 +580,9 @@ bool RS_EventHandler::hasAction()
 /**
  * Garbage collector for actions.
  */
-void RS_EventHandler::cleanUp()
+void EventHandler::cleanUp()
 {
-       RS_DEBUG->print("RS_EventHandler::cleanUp");
+       DEBUG->print("EventHandler::cleanUp");
 
        int o = 0;                              // old index
        int n = 0;                              // new index
@@ -650,13 +650,13 @@ void RS_EventHandler::cleanUp()
                }
        }
 
-       RS_DEBUG->print("RS_EventHandler::cleanUp: OK");
+       DEBUG->print("EventHandler::cleanUp: OK");
 }
 
 /**
  * Sets the snap mode for all currently active actions.
  */
-void RS_EventHandler::setSnapMode(RS2::SnapMode sm)
+void EventHandler::setSnapMode(RS2::SnapMode sm)
 {
 #if 0
        for(int c=0; c<RS_MAXACTIONS; ++c)
@@ -675,7 +675,7 @@ void RS_EventHandler::setSnapMode(RS2::SnapMode sm)
 /**
  * Sets the snap restriction for all currently active actions.
  */
-void RS_EventHandler::setSnapRestriction(RS2::SnapRestriction sr)
+void EventHandler::setSnapRestriction(RS2::SnapRestriction sr)
 {
 #if 0
        for(int c=0; c<RS_MAXACTIONS; ++c)
@@ -691,20 +691,20 @@ void RS_EventHandler::setSnapRestriction(RS2::SnapRestriction sr)
 #endif
 }
 
-void RS_EventHandler::debugActions()
+void EventHandler::debugActions()
 {
-       RS_DEBUG->print("---");
+       DEBUG->print("---");
 
        for(int c=0; c<RS_MAXACTIONS; ++c)
        {
                if (c == actionIndex)
-                       RS_DEBUG->print("Current");
+                       DEBUG->print("Current");
 
                if (currentActions[c])
-                       RS_DEBUG->print("Action %03d: %s [%s]",
+                       DEBUG->print("Action %03d: %s [%s]",
                                c, currentActions[c]->getName().toLatin1().data(),
                                currentActions[c]->isFinished() ? "finished" : "active");
                else
-                       RS_DEBUG->print("Action %03d: NULL", c);
+                       DEBUG->print("Action %03d: NULL", c);
        }
 }
index aab7f3931d2eed39ed2800a025e0b498902504c2..4651a8971e947828ea8a2635baeae01bf6e4364d 100644 (file)
@@ -2,12 +2,12 @@
 #define __EVENTHANDLER_H__
 
 #include <QtGui>
-#include "rs.h"
+#include "enums.h"
 
 #define RS_MAXACTIONS 16
 
 class ActionInterface;
-class RS_CommandEvent;
+class CommandEvent;
 class GraphicView;
 
 /**
@@ -15,11 +15,11 @@ class GraphicView;
  * active. All events going from the view to the actions come over
  * this class.
  */
-class RS_EventHandler
+class EventHandler
 {
        public:
-               RS_EventHandler(GraphicView * graphicView);
-               ~RS_EventHandler();
+               EventHandler(GraphicView * graphicView);
+               ~EventHandler();
 
                void back();
                void enter();
@@ -30,7 +30,7 @@ class RS_EventHandler
                void mouseEnterEvent();
                void keyPressEvent(QKeyEvent * e);
                void keyReleaseEvent(QKeyEvent * e);
-               void commandEvent(RS_CommandEvent * e);
+               void commandEvent(CommandEvent * e);
                void enableCoordinateInput();
                void disableCoordinateInput();
                void setDefaultAction(ActionInterface * action);
index 3187bedfe0b5533d85c2b93befbeabe4d5f0ec89..cde23ea546e09c040cd6c3562605b078666d9c26 100644 (file)
 #include "filterdxf1.h"
 #include "filterinterface.h"
 
-RS_FileIO * RS_FileIO::uniqueInstance = NULL;
+FileIO * FileIO::uniqueInstance = NULL;
 
 // Constructor
-RS_FileIO::RS_FileIO()
+FileIO::FileIO()
 {
 }
 
 /**
  * @return Instance to the unique import object.
  */
-/*static*/ RS_FileIO * RS_FileIO::instance()
+/*static*/ FileIO * FileIO::instance()
 {
        if (!uniqueInstance)
-               uniqueInstance = new RS_FileIO();
+               uniqueInstance = new FileIO();
 
        return uniqueInstance;
 }
@@ -43,7 +43,7 @@ RS_FileIO::RS_FileIO()
 /**
  * Registers a new import filter.
  */
-void RS_FileIO::registerFilter(RS_FilterInterface * f)
+void FileIO::registerFilter(FilterInterface * f)
 {
        filterList.append(f);
 }
@@ -51,7 +51,7 @@ void RS_FileIO::registerFilter(RS_FilterInterface * f)
 /**
  * @return List of registered filters.
  */
-QList<RS_FilterInterface *> RS_FileIO::getFilterList()
+QList<FilterInterface *> FileIO::getFilterList()
 {
        return filterList;
 }
@@ -59,11 +59,11 @@ QList<RS_FilterInterface *> RS_FileIO::getFilterList()
 /**
  * @return Filter which can import the given file type.
  */
-RS_FilterInterface * RS_FileIO::getImportFilter(RS2::FormatType t)
+FilterInterface * FileIO::getImportFilter(RS2::FormatType t)
 {
        for(int i=0; i<filterList.size(); i++)
        {
-               RS_FilterInterface * f = filterList[i];
+               FilterInterface * f = filterList[i];
 
                if (f->canImport(t))
                        return f;
@@ -75,11 +75,11 @@ RS_FilterInterface * RS_FileIO::getImportFilter(RS2::FormatType t)
 /**
  * @return Filter which can export the given file type.
  */
-RS_FilterInterface * RS_FileIO::getExportFilter(RS2::FormatType t)
+FilterInterface * FileIO::getExportFilter(RS2::FormatType t)
 {
        for(int i=0; i<filterList.size(); i++)
        {
-               RS_FilterInterface * f = filterList[i];
+               FilterInterface * f = filterList[i];
 
                if (f->canExport(t))
                        return f;
@@ -97,11 +97,11 @@ RS_FilterInterface * RS_FileIO::getExportFilter(RS2::FormatType t)
  *        it can also be a polyline, text, ...
  * @param file Path and name of the file to import.
  */
-bool RS_FileIO::fileImport(Drawing & graphic, const QString & file, RS2::FormatType type)
+bool FileIO::fileImport(Drawing & graphic, const QString & file, RS2::FormatType type)
 {
-       RS_DEBUG->print("Trying to import file '%s'...", file.toAscii().data());
+       DEBUG->print("Trying to import file '%s'...", file.toAscii().data());
 
-       RS_FilterInterface * filter = NULL;
+       FilterInterface * filter = NULL;
        RS2::FormatType t = (type == RS2::FormatUnknown ? detectFormat(file) : type);
        filter = getImportFilter(t);
 
@@ -109,7 +109,7 @@ bool RS_FileIO::fileImport(Drawing & graphic, const QString & file, RS2::FormatT
         return filter->fileImport(graphic, file, t);
        else
        {
-               RS_DEBUG->print(RS_Debug::D_WARNING, "RS_FileIO::fileImport: failed to import file: %s",
+               DEBUG->print(Debug::D_WARNING, "FileIO::fileImport: failed to import file: %s",
                        file.toAscii().data());
        }
 
@@ -122,9 +122,9 @@ bool RS_FileIO::fileImport(Drawing & graphic, const QString & file, RS2::FormatT
  *
  * @param file Path and name of the file to import.
  */
-bool RS_FileIO::fileExport(Drawing & graphic, const QString & file, RS2::FormatType type)
+bool FileIO::fileExport(Drawing & graphic, const QString & file, RS2::FormatType type)
 {
-       RS_DEBUG->print("RS_FileIO::fileExport");
+       DEBUG->print("FileIO::fileExport");
 
        if (type == RS2::FormatUnknown)
        {
@@ -136,12 +136,12 @@ bool RS_FileIO::fileExport(Drawing & graphic, const QString & file, RS2::FormatT
                        type = RS2::FormatCXF;
        }
 
-       RS_FilterInterface * filter = getExportFilter(type);
+       FilterInterface * filter = getExportFilter(type);
 
        if (filter)
                return filter->fileExport(graphic, file, type);
 
-       RS_DEBUG->print("RS_FileIO::fileExport: no filter found");
+       DEBUG->print("FileIO::fileExport: no filter found");
 
        return false;
 }
@@ -149,7 +149,7 @@ bool RS_FileIO::fileExport(Drawing & graphic, const QString & file, RS2::FormatT
 /**
  * Detects and returns the file format of the given file.
  */
-RS2::FormatType RS_FileIO::detectFormat(const QString & file)
+RS2::FormatType FileIO::detectFormat(const QString & file)
 {
        RS2::FormatType type = RS2::FormatUnknown;
        QFileInfo info(file);
@@ -167,13 +167,13 @@ RS2::FormatType RS_FileIO::detectFormat(const QString & file)
                if (!f.open(QIODevice::ReadOnly))
                {
                        // Error opening file:
-                       RS_DEBUG->print(RS_Debug::D_WARNING,
-                               "RS_FileIO::detectFormat: Cannot open file: %s", file.toAscii().data());
+                       DEBUG->print(Debug::D_WARNING,
+                               "FileIO::detectFormat: Cannot open file: %s", file.toAscii().data());
                        type = RS2::FormatUnknown;
                }
                else
                {
-                       RS_DEBUG->print("RS_FileIO::detectFormat: Successfully opened DXF file: %s",
+                       DEBUG->print("FileIO::detectFormat: Successfully opened DXF file: %s",
                                file.toAscii().data());
 
                        QTextStream ts(&f);
index a564f782d9fa3b7e4854c1dbc46d056bab39fb5d..d3b90ed5700b26287edf98105f383f3ccc19549d 100644 (file)
@@ -2,12 +2,12 @@
 #define __FILEIO_H__
 
 #include <QtCore>
-#include "rs.h"
+#include "enums.h"
 
-#define RS_FILEIO RS_FileIO::instance()
+#define FILEIO FileIO::instance()
 
 class Drawing;
-class RS_FilterInterface;
+class FilterInterface;
 
 /**
  * API Class for importing files.
@@ -15,17 +15,17 @@ class RS_FilterInterface;
  * @author James Hammons
  * @author Andrew Mustun
  */
-class RS_FileIO
+class FileIO
 {
        protected:
-               RS_FileIO();
+               FileIO();
 
        public:
-               static RS_FileIO * instance();
-               void registerFilter(RS_FilterInterface * f);
-               QList<RS_FilterInterface *> getFilterList();
-               RS_FilterInterface * getImportFilter(RS2::FormatType t);
-               RS_FilterInterface * getExportFilter(RS2::FormatType t);
+               static FileIO * instance();
+               void registerFilter(FilterInterface * f);
+               QList<FilterInterface *> getFilterList();
+               FilterInterface * getImportFilter(RS2::FormatType t);
+               FilterInterface * getExportFilter(RS2::FormatType t);
                bool fileImport(Drawing & graphic, const QString & file,
                        RS2::FormatType type = RS2::FormatUnknown);
                bool fileExport(Drawing & graphic, const QString & file,
@@ -33,8 +33,8 @@ class RS_FileIO
                RS2::FormatType detectFormat(const QString & file);
 
        protected:
-               static RS_FileIO * uniqueInstance;
-               QList<RS_FilterInterface *> filterList;
+               static FileIO * uniqueInstance;
+               QList<FilterInterface *> filterList;
 };
 
 #endif // __FILEIO_H__
index 31c80e72b92a7d49fe74f643e44c66522f59826b..a8c5b20c7eeedd78473ac1b6ff94da6db1b3c3d1 100644 (file)
 /**
  * Default constructor.
  */
-RS_FilterCXF::RS_FilterCXF(): RS_FilterInterface()
+FilterCXF::FilterCXF(): FilterInterface()
 {
-    RS_DEBUG->print("Setting up CXF filter...");
+    DEBUG->print("Setting up CXF filter...");
 
     addImportFormat(RS2::FormatCXF);
     addExportFormat(RS2::FormatCXF);
 }
 
-RS_FilterCXF::~RS_FilterCXF()
+FilterCXF::~FilterCXF()
 {
 }
 
@@ -47,21 +47,21 @@ RS_FilterCXF::~RS_FilterCXF()
  * will be created or the graphics from which the entities are
  * taken to be stored in a file.
  */
-bool RS_FilterCXF::fileImport(Drawing & g, const QString & file, RS2::FormatType /*type*/)
+bool FilterCXF::fileImport(Drawing & g, const QString & file, RS2::FormatType /*type*/)
 {
-       RS_DEBUG->print("CXF Filter: importing file '%s'...", file.toLatin1().data());
+       DEBUG->print("CXF Filter: importing file '%s'...", file.toLatin1().data());
 
        //this->graphic = &g;
        bool success = false;
 
        // Load font file as we normally do, but the font doesn't own the
        // letters (we'll add them to the graphic instead. Hence 'false').
-       RS_Font font(file, false);
+       Font font(file, false);
        success = font.loadFont();
 
        if (!success)
        {
-               RS_DEBUG->print(RS_Debug::D_WARNING, "Cannot open CXF file '%s'.", file.toLatin1().data());
+               DEBUG->print(Debug::D_WARNING, "Cannot open CXF file '%s'.", file.toLatin1().data());
                return false;
        }
 
@@ -74,11 +74,11 @@ bool RS_FilterCXF::fileImport(Drawing & g, const QString & file, RS2::FormatType
        if (!font.getEncoding().isEmpty())
                g.addVariable("Encoding", font.getEncoding(), 0);
 
-       RS_BlockList * letterList = font.getLetterList();
+       BlockList * letterList = font.getLetterList();
 
        for(uint i=0; i<font.countLetters(); i++)
        {
-               RS_Block * ch = font.letterAt(i);
+               Block * ch = font.letterAt(i);
 
                QString uCode;
                uCode.setNum(ch->getName().at(0).unicode(), 16);
@@ -105,34 +105,34 @@ bool RS_FilterCXF::fileImport(Drawing & g, const QString & file, RS2::FormatType
  *
  * @param file Full path to the CXF file that will be written.
  */
-bool RS_FilterCXF::fileExport(Drawing & g, const QString & file, RS2::FormatType /*type*/)
+bool FilterCXF::fileExport(Drawing & g, const QString & file, RS2::FormatType /*type*/)
 {
-       RS_DEBUG->print("CXF Filter: exporting file '%s'...", file.toAscii().data());
+       DEBUG->print("CXF Filter: exporting file '%s'...", file.toAscii().data());
 
        // crashes under windoze xp:
        //std::ofstream fout;
 
-       RS_DEBUG->print("RS_FilterCXF::fileExport: open");
+       DEBUG->print("FilterCXF::fileExport: open");
        //fout.open((const char*)file.local8Bit());
        FILE * fp;
 
        if ((fp = fopen((const char *)file.toLocal8Bit(), "wt")) != NULL)
        {
-               RS_DEBUG->print("RS_FilterCXF::fileExport: open: OK");
-               RS_DEBUG->print("RS_FilterCXF::fileExport: header");
+               DEBUG->print("FilterCXF::fileExport: open: OK");
+               DEBUG->print("FilterCXF::fileExport: header");
 
                // header:
                fprintf(fp, "# Format:            QCad II Font\n");
-               fprintf(fp, "# Creator:           %s\n", (const char *)RS_SYSTEM->getAppName().toLocal8Bit());
-               fprintf(fp, "# Version:           %s\n", (const char *)RS_SYSTEM->getAppVersion().toLocal8Bit());
+               fprintf(fp, "# Creator:           %s\n", (const char *)SYSTEM->getAppName().toLocal8Bit());
+               fprintf(fp, "# Version:           %s\n", (const char *)SYSTEM->getAppVersion().toLocal8Bit());
 
-               RS_DEBUG->print("001");
+               DEBUG->print("001");
                QString ns = g.getVariableString("Names", "");
 
                if (!ns.isEmpty())
                {
                        QStringList names = ns.split(',');
-                       RS_DEBUG->print("002");
+                       DEBUG->print("002");
 
                        for(QStringList::Iterator it=names.begin(); it!=names.end(); ++it)
                        {
@@ -140,76 +140,76 @@ bool RS_FilterCXF::fileExport(Drawing & g, const QString & file, RS2::FormatType
                        }
                }
 
-               RS_DEBUG->print("003");
+               DEBUG->print("003");
 
                QString es = g.getVariableString("Encoding", "");
 
                if (!es.isEmpty())
                        fprintf(fp, "# Encoding:          %s\n", (const char *)es.toLocal8Bit());
 
-               RS_DEBUG->print("004a");
+               DEBUG->print("004a");
 
                fprintf(fp, "# LetterSpacing:     %f\n", g.getVariableDouble("LetterSpacing", 3.0));
                fprintf(fp, "# WordSpacing:       %f\n", g.getVariableDouble("WordSpacing", 6.75));
                fprintf(fp, "# LineSpacingFactor: %f\n", g.getVariableDouble("LineSpacingFactor", 1.0));
 
                QString sa = g.getVariableString("Authors", "");
-               RS_DEBUG->print("authors: %s", (const char *)sa.toLocal8Bit());
+               DEBUG->print("authors: %s", (const char *)sa.toLocal8Bit());
 
                if (!sa.isEmpty())
                {
                        QStringList authors = sa.split(',');
-                       RS_DEBUG->print("006");
-                       RS_DEBUG->print("count: %d", authors.count());
+                       DEBUG->print("006");
+                       DEBUG->print("count: %d", authors.count());
 
                        QString a;
 
                        for(QStringList::Iterator it2=authors.begin(); it2!=authors.end(); ++it2)
                        {
-                               RS_DEBUG->print("006a");
+                               DEBUG->print("006a");
                                a = QString(*it2);
-                               RS_DEBUG->print("006b");
-                               RS_DEBUG->print("string is: %s", a.toAscii().data());
-                               RS_DEBUG->print("006b0");
+                               DEBUG->print("006b");
+                               DEBUG->print("string is: %s", a.toAscii().data());
+                               DEBUG->print("006b0");
                                fprintf(fp, "# Author:            ");
-                               RS_DEBUG->print("006b1");
+                               DEBUG->print("006b1");
                                fprintf(fp, "%s\n", a.toAscii().data());
                                //fout << "# Author:            " << a.ascii() << "\n";
                        }
 
-                       RS_DEBUG->print("007");
+                       DEBUG->print("007");
                }
 
-               RS_DEBUG->print("RS_FilterCXF::fileExport: header: OK");
+               DEBUG->print("FilterCXF::fileExport: header: OK");
 
-               RS_DEBUG->print("008");
+               DEBUG->print("008");
                // iterate through blocks (=letters of font)
                for(uint i=0; i<g.countBlocks(); ++i)
                {
-                       RS_Block * blk = g.blockAt(i);
+                       Block * blk = g.blockAt(i);
 
-                       RS_DEBUG->print("block: %d", i);
-                       RS_DEBUG->print("001");
+                       DEBUG->print("block: %d", i);
+                       DEBUG->print("001");
 
                        if (blk != NULL)
                        {
-                               RS_DEBUG->print("002");
-                               RS_DEBUG->print("002a: %s", (const char *)(blk->getName().toLocal8Bit()));
+                               DEBUG->print("002");
+                               DEBUG->print("002a: %s", (const char *)(blk->getName().toLocal8Bit()));
 
                                fprintf(fp, "\n%s\n", (const char *)(blk->getName().toLocal8Bit()));
 
                                // iterate through entities of this letter:
-                               for(RS_Entity * e=blk->firstEntity(RS2::ResolveAll); e!=NULL;
+                               for(Entity * e=blk->firstEntity(RS2::ResolveAll); e!=NULL;
                                        e=blk->nextEntity(RS2::ResolveAll))
                                {
                                        if (!e->isUndone())
                                        {
-                                               RS_DEBUG->print("004");
+                                               DEBUG->print("004");
 
                                                // lines:
                                                if (e->rtti() == RS2::EntityLine)
                                                {
-                                                       RS_Line * l = (RS_Line *)e;
+                                                       Line * l = (Line *)e;
 
                                                        fprintf(fp, "L %f,%f,%f,%f\n", l->getStartpoint().x, l->getStartpoint().y,
                                                                l->getEndpoint().x, l->getEndpoint().y);
@@ -217,7 +217,7 @@ bool RS_FilterCXF::fileExport(Drawing & g, const QString & file, RS2::FormatType
                                                // arcs:
                                                else if (e->rtti() == RS2::EntityArc)
                                                {
-                                                       RS_Arc * a = (RS_Arc *)e;
+                                                       Arc * a = (Arc *)e;
 
                                                        if (!a->isReversed())
                                                        {
@@ -237,21 +237,21 @@ bool RS_FilterCXF::fileExport(Drawing & g, const QString & file, RS2::FormatType
                                                }
                                        }
 
-                                       RS_DEBUG->print("005");
+                                       DEBUG->print("005");
                                }
-                               RS_DEBUG->print("006");
+                               DEBUG->print("006");
                        }
-                       RS_DEBUG->print("007");
+                       DEBUG->print("007");
                }
 
                //fout.close();
                fclose(fp);
-               RS_DEBUG->print("CXF Filter: exporting file: OK");
+               DEBUG->print("CXF Filter: exporting file: OK");
                return true;
        }
        else
        {
-               RS_DEBUG->print("CXF Filter: exporting file failed");
+               DEBUG->print("CXF Filter: exporting file failed");
        }
 
        return false;
@@ -262,7 +262,7 @@ bool RS_FilterCXF::fileExport(Drawing & g, const QString & file, RS2::FormatType
  *
  * @param value A double value. e.g. 2.700000
  */
-void RS_FilterCXF::stream(std::ofstream & fs, double value)
+void FilterCXF::stream(std::ofstream & fs, double value)
 {
-    fs << (const char *)RS_Utility::doubleToString(value).toAscii().data();
+    fs << (const char *)Utility::doubleToString(value).toAscii().data();
 }
index 973af92eb3a2abf02608d858b9e663ffb9da5227..e07f9f8b4b5e8277009321773ed66f8b764eb061 100644 (file)
@@ -9,11 +9,11 @@
  *
  * @author Andrew Mustun
  */
-class RS_FilterCXF: public RS_FilterInterface
+class FilterCXF: public FilterInterface
 {
        public:
-               RS_FilterCXF();
-               ~RS_FilterCXF();
+               FilterCXF();
+               ~FilterCXF();
 
                /**
                * @return RS2::FormatCXF.
index 18fb3f9586926c6a038d525ccbebd121ccd5a6c9..5bc10588c7704b4ac09fd6255ac548cd93580277 100644 (file)
@@ -35,9 +35,9 @@
  * Default constructor.
  *
  */
-RS_FilterDXF::RS_FilterDXF(): RS_FilterInterface()
+FilterDXF::FilterDXF(): FilterInterface()
 {
-       RS_DEBUG->print("RS_FilterDXF::RS_FilterDXF()");
+       DEBUG->print("FilterDXF::FilterDXF()");
 
        addImportFormat(RS2::FormatDXF);
        addExportFormat(RS2::FormatDXF);
@@ -52,16 +52,16 @@ RS_FilterDXF::RS_FilterDXF(): RS_FilterInterface()
        graphic = NULL;
        //exportVersion = DL_Codes::VER_2002;
        //systemVariables.setAutoDelete(true);
-       RS_DEBUG->print("RS_FilterDXF::RS_FilterDXF(): OK");
+       DEBUG->print("FilterDXF::FilterDXF(): OK");
 }
 
 /**
  * Destructor.
  */
-RS_FilterDXF::~RS_FilterDXF()
+FilterDXF::~FilterDXF()
 {
-       RS_DEBUG->print("RS_FilterDXF::~RS_FilterDXF()");
-       RS_DEBUG->print("RS_FilterDXF::~RS_FilterDXF(): OK");
+       DEBUG->print("FilterDXF::~FilterDXF()");
+       DEBUG->print("FilterDXF::~FilterDXF(): OK");
 }
 
 /**
@@ -72,50 +72,50 @@ RS_FilterDXF::~RS_FilterDXF()
  * will be created or the graphics from which the entities are
  * taken to be stored in a file.
  */
-bool RS_FilterDXF::fileImport(Drawing & g, const QString & file, RS2::FormatType /*type*/)
+bool FilterDXF::fileImport(Drawing & g, const QString & file, RS2::FormatType /*type*/)
 {
-       RS_DEBUG->print("RS_FilterDXF::fileImport");
-       //RS_DEBUG->timestamp();
+       DEBUG->print("FilterDXF::fileImport");
+       //DEBUG->timestamp();
 
-       RS_DEBUG->print("DXF Filter: importing file '%s'...", (const char *)QFile::encodeName(file));
+       DEBUG->print("DXF Filter: importing file '%s'...", (const char *)QFile::encodeName(file));
 
        graphic = &g;
        currentContainer = graphic;
        this->file = file;
 
-       RS_DEBUG->print("graphic->countLayers(): %d", graphic->countLayers());
+       DEBUG->print("graphic->countLayers(): %d", graphic->countLayers());
 
        //graphic->setAutoUpdateBorders(false);
-       RS_DEBUG->print("RS_FilterDXF::fileImport: reading file");
+       DEBUG->print("FilterDXF::fileImport: reading file");
        bool success = dxf.in((const char *)QFile::encodeName(file), this);
-       RS_DEBUG->print("RS_FilterDXF::fileImport: reading file: OK");
+       DEBUG->print("FilterDXF::fileImport: reading file: OK");
        //graphic->setAutoUpdateBorders(true);
 
        if (!success)
        {
-               RS_DEBUG->print(RS_Debug::D_WARNING, "Cannot open DXF file '%s'.",
+               DEBUG->print(Debug::D_WARNING, "Cannot open DXF file '%s'.",
                        (const char *)QFile::encodeName(file));
                return false;
        }
 
-       RS_DEBUG->print("RS_FilterDXF::fileImport: adding variables");
+       DEBUG->print("FilterDXF::fileImport: adding variables");
 
        // add some variables that need to be there for DXF drawings:
        if (graphic->getVariableString("$DIMSTYLE", "").isEmpty())
        {
-               RS_DEBUG->print("RS_FilterDXF::fileImport: adding DIMSTYLE");
+               DEBUG->print("FilterDXF::fileImport: adding DIMSTYLE");
                graphic->addVariable("$DIMSTYLE", "Standard", 2);
-               RS_DEBUG->print("RS_FilterDXF::fileImport: adding DIMSTYLE: OK");
+               DEBUG->print("FilterDXF::fileImport: adding DIMSTYLE: OK");
        }
 
-       RS_DEBUG->print("RS_FilterDXF::fileImport: adding variables: OK");
+       DEBUG->print("FilterDXF::fileImport: adding variables: OK");
 
-       RS_DEBUG->print("RS_FilterDXF::fileImport: updating inserts");
+       DEBUG->print("FilterDXF::fileImport: updating inserts");
        graphic->updateInserts();
-       RS_DEBUG->print("RS_FilterDXF::fileImport: updating inserts: OK");
+       DEBUG->print("FilterDXF::fileImport: updating inserts: OK");
 
-       RS_DEBUG->print("RS_FilterDXF::fileImport OK");
-       //RS_DEBUG->timestamp();
+       DEBUG->print("FilterDXF::fileImport OK");
+       //DEBUG->timestamp();
 
        return true;
 }
@@ -123,17 +123,17 @@ bool RS_FilterDXF::fileImport(Drawing & g, const QString & file, RS2::FormatType
 /**
  * Implementation of the method which handles layers.
  */
-void RS_FilterDXF::addLayer(const DL_LayerData& data) {
-    RS_DEBUG->print("RS_FilterDXF::addLayer");
-    RS_DEBUG->print("  adding layer: %s", data.name.c_str());
+void FilterDXF::addLayer(const DL_LayerData& data) {
+    DEBUG->print("FilterDXF::addLayer");
+    DEBUG->print("  adding layer: %s", data.name.c_str());
 
-    RS_DEBUG->print("RS_FilterDXF::addLayer: creating layer");
-    RS_Layer* layer = new RS_Layer(data.name.c_str());
-    RS_DEBUG->print("RS_FilterDXF::addLayer: set pen");
+    DEBUG->print("FilterDXF::addLayer: creating layer");
+    Layer* layer = new Layer(data.name.c_str());
+    DEBUG->print("FilterDXF::addLayer: set pen");
     layer->setPen(attributesToPen(attributes));
     //layer->setFlags(data.flags&0x07);
 
-    RS_DEBUG->print("RS_FilterDXF::addLayer: flags");
+    DEBUG->print("FilterDXF::addLayer: flags");
     if (data.flags&0x01) {
         layer->freeze(true);
     }
@@ -141,9 +141,9 @@ void RS_FilterDXF::addLayer(const DL_LayerData& data) {
         layer->lock(true);
     }
 
-    RS_DEBUG->print("RS_FilterDXF::addLayer: add layer to graphic");
+    DEBUG->print("FilterDXF::addLayer: add layer to graphic");
     graphic->addLayer(layer);
-    RS_DEBUG->print("RS_FilterDXF::addLayer: OK");
+    DEBUG->print("FilterDXF::addLayer: OK");
 }
 
 /**
@@ -151,10 +151,10 @@ void RS_FilterDXF::addLayer(const DL_LayerData& data) {
  *
  * @todo Adding blocks to blocks (stack for currentContainer)
  */
-void RS_FilterDXF::addBlock(const DL_BlockData & data)
+void FilterDXF::addBlock(const DL_BlockData & data)
 {
-       RS_DEBUG->print("RS_FilterDXF::addBlock");
-       RS_DEBUG->print("  adding block: %s", data.name.c_str());
+       DEBUG->print("FilterDXF::addBlock");
+       DEBUG->print("  adding block: %s", data.name.c_str());
 
        // Prevent special blocks (paper_space, model_space) from being added:
        if (QString(data.name.c_str()).toLower() != "*paper_space0"
@@ -168,7 +168,7 @@ void RS_FilterDXF::addBlock(const DL_BlockData & data)
 #ifndef RS_NO_COMPLEX_ENTITIES
                if (QString(data.name.c_str()).startsWith("__CE"))
                {
-                       RS_EntityContainer * ec = new RS_EntityContainer();
+                       EntityContainer * ec = new EntityContainer();
                        ec->setLayer("0");
                        currentContainer = ec;
                        graphic->addEntity(ec);
@@ -178,7 +178,7 @@ void RS_FilterDXF::addBlock(const DL_BlockData & data)
                {
 #endif
                        Vector bp(data.bpx, data.bpy);
-                       RS_Block * block = new RS_Block(graphic, RS_BlockData(data.name.c_str(), bp, false));
+                       Block * block = new Block(graphic, BlockData(data.name.c_str(), bp, false));
                        //block->setFlags(flags);
 
                        if (graphic->addBlock(block))
@@ -192,7 +192,7 @@ void RS_FilterDXF::addBlock(const DL_BlockData & data)
 /**
  * Implementation of the method which closes blocks.
  */
-void RS_FilterDXF::endBlock()
+void FilterDXF::endBlock()
 {
        currentContainer = graphic;
 }
@@ -200,10 +200,10 @@ void RS_FilterDXF::endBlock()
 /**
  * Implementation of the method which handles point entities.
  */
-void RS_FilterDXF::addPoint(const DL_PointData & data)
+void FilterDXF::addPoint(const DL_PointData & data)
 {
        Vector v(data.x, data.y);
-       RS_Point * entity = new RS_Point(currentContainer, RS_PointData(v));
+       Point * entity = new Point(currentContainer, PointData(v));
        setEntityAttributes(entity, attributes);
        currentContainer->addEntity(entity);
 }
@@ -211,27 +211,27 @@ void RS_FilterDXF::addPoint(const DL_PointData & data)
 /**
  * Implementation of the method which handles line entities.
  */
-void RS_FilterDXF::addLine(const DL_LineData & data)
+void FilterDXF::addLine(const DL_LineData & data)
 {
-       RS_DEBUG->print("RS_FilterDXF::addLine");
+       DEBUG->print("FilterDXF::addLine");
 
        Vector v1(data.x1, data.y1);
        Vector v2(data.x2, data.y2);
 
-       RS_DEBUG->print("RS_FilterDXF::addLine: create line");
+       DEBUG->print("FilterDXF::addLine: create line");
 
        if (currentContainer == NULL)
-               RS_DEBUG->print("RS_FilterDXF::addLine: currentContainer is NULL");
+               DEBUG->print("FilterDXF::addLine: currentContainer is NULL");
 
-       RS_Line * entity = new RS_Line(currentContainer, RS_LineData(v1, v2));
-       RS_DEBUG->print("RS_FilterDXF::addLine: set attributes");
+       Line * entity = new Line(currentContainer, LineData(v1, v2));
+       DEBUG->print("FilterDXF::addLine: set attributes");
        setEntityAttributes(entity, attributes);
 
-       RS_DEBUG->print("RS_FilterDXF::addLine: add entity");
+       DEBUG->print("FilterDXF::addLine: add entity");
 
        currentContainer->addEntity(entity);
 
-       RS_DEBUG->print("RS_FilterDXF::addLine: OK");
+       DEBUG->print("FilterDXF::addLine: OK");
 }
 
 /**
@@ -240,17 +240,17 @@ void RS_FilterDXF::addLine(const DL_LineData & data)
  * @param angle1 Start angle in deg (!)
  * @param angle2 End angle in deg (!)
  */
-void RS_FilterDXF::addArc(const DL_ArcData& data) {
-    RS_DEBUG->print("RS_FilterDXF::addArc");
+void FilterDXF::addArc(const DL_ArcData& data) {
+    DEBUG->print("FilterDXF::addArc");
     //printf("LINE     (%12.6f, %12.6f, %12.6f) (%12.6f, %12.6f, %12.6f)\n",
     //       p1[0], p1[1], p1[2],
     //       p2[0], p2[1], p2[2]);
     Vector v(data.cx, data.cy);
-    RS_ArcData d(v, data.radius,
+    ArcData d(v, data.radius,
                  data.angle1/ARAD,
                  data.angle2/ARAD,
                  false);
-    RS_Arc* entity = new RS_Arc(currentContainer, d);
+    Arc* entity = new Arc(currentContainer, d);
     setEntityAttributes(entity, attributes);
 
     currentContainer->addEntity(entity);
@@ -264,18 +264,18 @@ void RS_FilterDXF::addArc(const DL_ArcData& data) {
  * @param angle1 Start angle in rad (!)
  * @param angle2 End angle in rad (!)
  */
-void RS_FilterDXF::addEllipse(const DL_EllipseData& data) {
-    RS_DEBUG->print("RS_FilterDXF::addEllipse");
+void FilterDXF::addEllipse(const DL_EllipseData& data) {
+    DEBUG->print("FilterDXF::addEllipse");
 
     Vector v1(data.cx, data.cy);
     Vector v2(data.mx, data.my);
 
-    RS_EllipseData ed(v1, v2,
+    EllipseData ed(v1, v2,
                       data.ratio,
                       data.angle1,
                       data.angle2,
                       false);
-    RS_Ellipse* entity = new RS_Ellipse(currentContainer, ed);
+    Ellipse* entity = new Ellipse(currentContainer, ed);
     setEntityAttributes(entity, attributes);
 
     currentContainer->addEntity(entity);
@@ -286,15 +286,15 @@ void RS_FilterDXF::addEllipse(const DL_EllipseData& data) {
 /**
  * Implementation of the method which handles circle entities.
  */
-void RS_FilterDXF::addCircle(const DL_CircleData& data) {
-    RS_DEBUG->print("RS_FilterDXF::addCircle");
+void FilterDXF::addCircle(const DL_CircleData& data) {
+    DEBUG->print("FilterDXF::addCircle");
     //printf("LINE     (%12.6f, %12.6f, %12.6f) (%12.6f, %12.6f, %12.6f)\n",
     //       p1[0], p1[1], p1[2],
     //       p2[0], p2[1], p2[2]);
 
     Vector v(data.cx, data.cy);
-    RS_CircleData d(v, data.radius);
-    RS_Circle* entity = new RS_Circle(currentContainer, d);
+    CircleData d(v, data.radius);
+    Circle* entity = new Circle(currentContainer, d);
     setEntityAttributes(entity, attributes);
 
     currentContainer->addEntity(entity);
@@ -305,13 +305,13 @@ void RS_FilterDXF::addCircle(const DL_CircleData& data) {
 /**
  * Implementation of the method which handles polyline entities.
  */
-void RS_FilterDXF::addPolyline(const DL_PolylineData& data) {
-    RS_DEBUG->print("RS_FilterDXF::addPolyline");
-    //RS_DEBUG->print("RS_FilterDXF::addPolyline()");
-    RS_PolylineData d(Vector(false),
+void FilterDXF::addPolyline(const DL_PolylineData& data) {
+    DEBUG->print("FilterDXF::addPolyline");
+    //DEBUG->print("FilterDXF::addPolyline()");
+    PolylineData d(Vector(false),
                       Vector(false),
                       data.flags&0x1);
-    polyline = new RS_Polyline(currentContainer, d);
+    polyline = new Polyline(currentContainer, d);
     setEntityAttributes(polyline, attributes);
 
     currentContainer->addEntity(polyline);
@@ -322,8 +322,8 @@ void RS_FilterDXF::addPolyline(const DL_PolylineData& data) {
 /**
  * Implementation of the method which handles polyline vertices.
  */
-void RS_FilterDXF::addVertex(const DL_VertexData& data) {
-    RS_DEBUG->print("RS_FilterDXF::addVertex(): %f/%f bulge: %f",
+void FilterDXF::addVertex(const DL_VertexData& data) {
+    DEBUG->print("FilterDXF::addVertex(): %f/%f bulge: %f",
                     data.x, data.y, data.bulge);
 
     Vector v(data.x, data.y);
@@ -338,32 +338,32 @@ void RS_FilterDXF::addVertex(const DL_VertexData& data) {
 /**
  * Implementation of the method which handles splines.
  */
-void RS_FilterDXF::addSpline(const DL_SplineData& data) {
-    RS_DEBUG->print("RS_FilterDXF::addSpline: degree: %d", data.degree);
+void FilterDXF::addSpline(const DL_SplineData& data) {
+    DEBUG->print("FilterDXF::addSpline: degree: %d", data.degree);
 
     if (data.degree>=1 && data.degree<=3) {
-        RS_SplineData d(data.degree, ((data.flags&0x1)==0x1));
-        spline = new RS_Spline(currentContainer, d);
+        SplineData d(data.degree, ((data.flags&0x1)==0x1));
+        spline = new Spline(currentContainer, d);
         setEntityAttributes(spline, attributes);
 
         currentContainer->addEntity(spline);
     } else {
-        RS_DEBUG->print(RS_Debug::D_WARNING,
-                       "RS_FilterDXF::addSpline: Invalid degree for spline: %d. "
+        DEBUG->print(Debug::D_WARNING,
+                       "FilterDXF::addSpline: Invalid degree for spline: %d. "
                        "Accepted values are 1..3.", data.degree);
     }
 }
 
-/*virtual*/ void RS_FilterDXF::addKnot(const DL_KnotData &)
+/*virtual*/ void FilterDXF::addKnot(const DL_KnotData &)
 {
 }
 
 /**
  * Implementation of the method which handles spline control points.
  */
-void RS_FilterDXF::addControlPoint(const DL_ControlPointData & data)
+void FilterDXF::addControlPoint(const DL_ControlPointData & data)
 {
-       RS_DEBUG->print("RS_FilterDXF::addControlPoint: %f/%f", data.x, data.y);
+       DEBUG->print("FilterDXF::addControlPoint: %f/%f", data.x, data.y);
 
        Vector v(data.x, data.y);
 
@@ -377,9 +377,9 @@ void RS_FilterDXF::addControlPoint(const DL_ControlPointData & data)
 /**
  * Implementation of the method which handles inserts.
  */
-void RS_FilterDXF::addInsert(const DL_InsertData & data)
+void FilterDXF::addInsert(const DL_InsertData & data)
 {
-       RS_DEBUG->print("RS_FilterDXF::addInsert");
+       DEBUG->print("FilterDXF::addInsert");
 
        if (QString(data.name.c_str()).left(3) == "A$C")
                return;
@@ -390,20 +390,20 @@ void RS_FilterDXF::addInsert(const DL_InsertData & data)
 
        //cout << "Insert: " << name << " " << ip << " " << cols << "/" << rows << endl;
 
-       RS_InsertData d(data.name.c_str(), ip, sc, data.angle / ARAD, data.cols, data.rows,
+       InsertData d(data.name.c_str(), ip, sc, data.angle / ARAD, data.cols, data.rows,
                sp, NULL, RS2::NoUpdate);
-       RS_Insert * entity = new RS_Insert(currentContainer, d);
+       Insert * entity = new Insert(currentContainer, d);
        setEntityAttributes(entity, attributes);
-       RS_DEBUG->print("  id: %d", entity->getId());
+       DEBUG->print("  id: %d", entity->getId());
        //entity->update();
        currentContainer->addEntity(entity);
 }
 
-/*virtual*/ void RS_FilterDXF::addTrace(const DL_TraceData &)
+/*virtual*/ void FilterDXF::addTrace(const DL_TraceData &)
 {
 }
 
-/*virtual*/ void RS_FilterDXF::addSolid(const DL_SolidData &)
+/*virtual*/ void FilterDXF::addSolid(const DL_SolidData &)
 {
 }
 
@@ -411,15 +411,15 @@ void RS_FilterDXF::addInsert(const DL_InsertData & data)
  * Implementation of the method which handles text
  * chunks for MText entities.
  */
-void RS_FilterDXF::addMTextChunk(const char * text)
+void FilterDXF::addMTextChunk(const char * text)
 {
-       RS_DEBUG->print("RS_FilterDXF::addMTextChunk: %s", text);
+       DEBUG->print("FilterDXF::addMTextChunk: %s", text);
        //mtext += text;
        //mtext += QString::fromUtf8(text);
 
        /*
        QCString locallyEncoded = text;
-       QString enc = RS_System::getEncoding(variables.getString("$DWGCODEPAGE", "ANSI_1252"));
+       QString enc = System::getEncoding(variables.getString("$DWGCODEPAGE", "ANSI_1252"));
        QTextCodec *codec = QTextCodec::codecForName(enc); // get the codec for Japanese
        if (codec!=NULL) {
                mtext += codec->toUnicode(toNativeString(locallyEncoded));
@@ -434,9 +434,9 @@ void RS_FilterDXF::addMTextChunk(const char * text)
  * Implementation of the method which handles
  * multi texts (MTEXT).
  */
-void RS_FilterDXF::addMText(const DL_MTextData & data)
+void FilterDXF::addMText(const DL_MTextData & data)
 {
-       RS_DEBUG->print("RS_FilterDXF::addMText: %s", data.text.c_str());
+       DEBUG->print("FilterDXF::addMText: %s", data.text.c_str());
 
        Vector ip(data.ipx, data.ipy);
        RS2::VAlign valign;
@@ -474,7 +474,7 @@ void RS_FilterDXF::addMText(const DL_MTextData & data)
        mtext += QString(data.text.c_str());
 
        QString locallyEncoded = mtext;
-       QString enc = RS_System::getEncoding(variables.getString("$DWGCODEPAGE", "ANSI_1252"));
+       QString enc = System::getEncoding(variables.getString("$DWGCODEPAGE", "ANSI_1252"));
        // get the codec for Japanese
        QTextCodec * codec = QTextCodec::codecForName(enc.toAscii());
 
@@ -495,12 +495,12 @@ void RS_FilterDXF::addMText(const DL_MTextData & data)
                        sty = variables.getString("$TEXTSTYLE", "Standard");
        }
 
-       RS_DEBUG->print("Text as unicode:");
-       RS_DEBUG->printUnicode(mtext);
+       DEBUG->print("Text as unicode:");
+       DEBUG->printUnicode(mtext);
 
-       RS_TextData d(ip, data.height, data.width, valign, halign, dir, lss,
+       TextData d(ip, data.height, data.width, valign, halign, dir, lss,
                data.lineSpacingFactor, mtext, sty, data.angle, RS2::NoUpdate);
-       RS_Text * entity = new RS_Text(currentContainer, d);
+       Text * entity = new Text(currentContainer, d);
 
        setEntityAttributes(entity, attributes);
        entity->update();
@@ -515,8 +515,8 @@ void RS_FilterDXF::addMText(const DL_MTextData & data)
  * Implementation of the method which handles
  * texts (TEXT).
  */
-void RS_FilterDXF::addText(const DL_TextData& data) {
-    RS_DEBUG->print("RS_FilterDXF::addText");
+void FilterDXF::addText(const DL_TextData& data) {
+    DEBUG->print("FilterDXF::addText");
     int attachmentPoint;
     Vector refPoint;
     double angle = data.angle;
@@ -604,7 +604,7 @@ void RS_FilterDXF::addText(const DL_TextData& data) {
  * Implementation of the method which handles
  * dimensions (DIMENSION).
  */
-RS_DimensionData RS_FilterDXF::convDimensionData(
+DimensionData FilterDXF::convDimensionData(
     const DL_DimensionData& data) {
 
     Vector defP(data.dpx, data.dpy);
@@ -650,11 +650,11 @@ RS_DimensionData RS_FilterDXF::convDimensionData(
         sty = variables.getString("$DIMSTYLE", "Standard");
     }
 
-    RS_DEBUG->print("Text as unicode:");
-    RS_DEBUG->printUnicode(t);
+    DEBUG->print("Text as unicode:");
+    DEBUG->printUnicode(t);
 
     // data needed to add the actual dimension entity
-    return RS_DimensionData(defP, midP,
+    return DimensionData(defP, midP,
                             valign, halign,
                             lss,
                             data.lineSpacingFactor,
@@ -667,18 +667,18 @@ RS_DimensionData RS_FilterDXF::convDimensionData(
  * Implementation of the method which handles
  * aligned dimensions (DIMENSION).
  */
-void RS_FilterDXF::addDimAlign(const DL_DimensionData& data,
+void FilterDXF::addDimAlign(const DL_DimensionData& data,
                                const DL_DimAlignedData& edata) {
-    RS_DEBUG->print("RS_FilterDXF::addDimAligned");
+    DEBUG->print("FilterDXF::addDimAligned");
 
-    RS_DimensionData dimensionData = convDimensionData(data);
+    DimensionData dimensionData = convDimensionData(data);
 
     Vector ext1(edata.epx1, edata.epy1);
     Vector ext2(edata.epx2, edata.epy2);
 
-    RS_DimAlignedData d(ext1, ext2);
+    DimAlignedData d(ext1, ext2);
 
-    RS_DimAligned* entity = new RS_DimAligned(currentContainer,
+    DimAligned* entity = new DimAligned(currentContainer,
                             dimensionData, d);
     setEntityAttributes(entity, attributes);
     entity->update();
@@ -691,19 +691,19 @@ void RS_FilterDXF::addDimAlign(const DL_DimensionData& data,
  * Implementation of the method which handles
  * linear dimensions (DIMENSION).
  */
-void RS_FilterDXF::addDimLinear(const DL_DimensionData& data,
+void FilterDXF::addDimLinear(const DL_DimensionData& data,
                                 const DL_DimLinearData& edata) {
-    RS_DEBUG->print("RS_FilterDXF::addDimLinear");
+    DEBUG->print("FilterDXF::addDimLinear");
 
-    RS_DimensionData dimensionData = convDimensionData(data);
+    DimensionData dimensionData = convDimensionData(data);
 
     Vector dxt1(edata.dpx1, edata.dpy1);
     Vector dxt2(edata.dpx2, edata.dpy2);
 
-    RS_DimLinearData d(dxt1, dxt2, RS_Math::deg2rad(edata.angle),
-                       RS_Math::deg2rad(edata.oblique));
+    DimLinearData d(dxt1, dxt2, Math::deg2rad(edata.angle),
+                       Math::deg2rad(edata.oblique));
 
-    RS_DimLinear* entity = new RS_DimLinear(currentContainer,
+    DimLinear* entity = new DimLinear(currentContainer,
                                             dimensionData, d);
     setEntityAttributes(entity, attributes);
     entity->update();
@@ -716,16 +716,16 @@ void RS_FilterDXF::addDimLinear(const DL_DimensionData& data,
  * Implementation of the method which handles
  * radial dimensions (DIMENSION).
  */
-void RS_FilterDXF::addDimRadial(const DL_DimensionData& data,
+void FilterDXF::addDimRadial(const DL_DimensionData& data,
                                 const DL_DimRadialData& edata) {
-    RS_DEBUG->print("RS_FilterDXF::addDimRadial");
+    DEBUG->print("FilterDXF::addDimRadial");
 
-    RS_DimensionData dimensionData = convDimensionData(data);
+    DimensionData dimensionData = convDimensionData(data);
     Vector dp(edata.dpx, edata.dpy);
 
-    RS_DimRadialData d(dp, edata.leader);
+    DimRadialData d(dp, edata.leader);
 
-    RS_DimRadial* entity = new RS_DimRadial(currentContainer,
+    DimRadial* entity = new DimRadial(currentContainer,
                                             dimensionData, d);
 
     setEntityAttributes(entity, attributes);
@@ -739,16 +739,16 @@ void RS_FilterDXF::addDimRadial(const DL_DimensionData& data,
  * Implementation of the method which handles
  * diametric dimensions (DIMENSION).
  */
-void RS_FilterDXF::addDimDiametric(const DL_DimensionData& data,
+void FilterDXF::addDimDiametric(const DL_DimensionData& data,
                                    const DL_DimDiametricData& edata) {
-    RS_DEBUG->print("RS_FilterDXF::addDimDiametric");
+    DEBUG->print("FilterDXF::addDimDiametric");
 
-    RS_DimensionData dimensionData = convDimensionData(data);
+    DimensionData dimensionData = convDimensionData(data);
     Vector dp(edata.dpx, edata.dpy);
 
-    RS_DimDiametricData d(dp, edata.leader);
+    DimDiametricData d(dp, edata.leader);
 
-    RS_DimDiametric* entity = new RS_DimDiametric(currentContainer,
+    DimDiametric* entity = new DimDiametric(currentContainer,
                               dimensionData, d);
 
     setEntityAttributes(entity, attributes);
@@ -762,19 +762,19 @@ void RS_FilterDXF::addDimDiametric(const DL_DimensionData& data,
  * Implementation of the method which handles
  * angular dimensions (DIMENSION).
  */
-void RS_FilterDXF::addDimAngular(const DL_DimensionData& data,
+void FilterDXF::addDimAngular(const DL_DimensionData& data,
                                  const DL_DimAngularData& edata) {
-    RS_DEBUG->print("RS_FilterDXF::addDimAngular");
+    DEBUG->print("FilterDXF::addDimAngular");
 
-    RS_DimensionData dimensionData = convDimensionData(data);
+    DimensionData dimensionData = convDimensionData(data);
     Vector dp1(edata.dpx1, edata.dpy1);
     Vector dp2(edata.dpx2, edata.dpy2);
     Vector dp3(edata.dpx3, edata.dpy3);
     Vector dp4(edata.dpx4, edata.dpy4);
 
-    RS_DimAngularData d(dp1, dp2, dp3, dp4);
+    DimAngularData d(dp1, dp2, dp3, dp4);
 
-    RS_DimAngular* entity = new RS_DimAngular(currentContainer,
+    DimAngular* entity = new DimAngular(currentContainer,
                             dimensionData, d);
 
     setEntityAttributes(entity, attributes);
@@ -788,20 +788,20 @@ void RS_FilterDXF::addDimAngular(const DL_DimensionData& data,
  * Implementation of the method which handles
  * angular dimensions (DIMENSION).
  */
-void RS_FilterDXF::addDimAngular3P(const DL_DimensionData& data,
+void FilterDXF::addDimAngular3P(const DL_DimensionData& data,
                                    const DL_DimAngular3PData& edata) {
-    RS_DEBUG->print("RS_FilterDXF::addDimAngular3P");
+    DEBUG->print("FilterDXF::addDimAngular3P");
 
-    RS_DimensionData dimensionData = convDimensionData(data);
+    DimensionData dimensionData = convDimensionData(data);
     Vector dp1(edata.dpx3, edata.dpy3);
     Vector dp2(edata.dpx1, edata.dpy1);
     Vector dp3(edata.dpx3, edata.dpy3);
     Vector dp4 = dimensionData.definitionPoint;
     dimensionData.definitionPoint = Vector(edata.dpx2, edata.dpy2);
 
-    RS_DimAngularData d(dp1, dp2, dp3, dp4);
+    DimAngularData d(dp1, dp2, dp3, dp4);
 
-    RS_DimAngular* entity = new RS_DimAngular(currentContainer,
+    DimAngular* entity = new DimAngular(currentContainer,
                             dimensionData, d);
 
     setEntityAttributes(entity, attributes);
@@ -814,11 +814,11 @@ void RS_FilterDXF::addDimAngular3P(const DL_DimensionData& data,
 /**
  * Implementation of the method which handles leader entities.
  */
-void RS_FilterDXF::addLeader(const DL_LeaderData& data) {
-    RS_DEBUG->print("RS_FilterDXF::addDimLeader");
-    //RS_DEBUG->print("RS_FilterDXF::addPolyline()");
-    RS_LeaderData d(data.arrowHeadFlag==1);
-    leader = new RS_Leader(currentContainer, d);
+void FilterDXF::addLeader(const DL_LeaderData& data) {
+    DEBUG->print("FilterDXF::addDimLeader");
+    //DEBUG->print("FilterDXF::addPolyline()");
+    LeaderData d(data.arrowHeadFlag==1);
+    leader = new Leader(currentContainer, d);
     setEntityAttributes(leader, attributes);
 
     currentContainer->addEntity(leader);
@@ -829,9 +829,9 @@ void RS_FilterDXF::addLeader(const DL_LeaderData& data) {
 /**
  * Implementation of the method which handles leader vertices.
  */
-void RS_FilterDXF::addLeaderVertex(const DL_LeaderVertexData& data) {
-    RS_DEBUG->print("RS_FilterDXF::addLeaderVertex");
-    //RS_DEBUG->print("RS_FilterDXF::addVertex() bulge: %f", bulge);
+void FilterDXF::addLeaderVertex(const DL_LeaderVertexData& data) {
+    DEBUG->print("FilterDXF::addLeaderVertex");
+    //DEBUG->print("FilterDXF::addVertex() bulge: %f", bulge);
 
     Vector v(data.x, data.y);
 
@@ -845,11 +845,11 @@ void RS_FilterDXF::addLeaderVertex(const DL_LeaderVertexData& data) {
 /**
  * Implementation of the method which handles hatch entities.
  */
-void RS_FilterDXF::addHatch(const DL_HatchData& data) {
-    RS_DEBUG->print("RS_FilterDXF::addHatch()");
+void FilterDXF::addHatch(const DL_HatchData& data) {
+    DEBUG->print("FilterDXF::addHatch()");
 
-    hatch = new RS_Hatch(currentContainer,
-                         RS_HatchData(data.solid,
+    hatch = new Hatch(currentContainer,
+                         HatchData(data.solid,
                                       data.scale,
                                       data.angle,
                                       QString(data.pattern.c_str())));
@@ -863,10 +863,10 @@ void RS_FilterDXF::addHatch(const DL_HatchData& data) {
 /**
  * Implementation of the method which handles hatch loops.
  */
-void RS_FilterDXF::addHatchLoop(const DL_HatchLoopData& /*data*/) {
-    RS_DEBUG->print("RS_FilterDXF::addHatchLoop()");
+void FilterDXF::addHatchLoop(const DL_HatchLoopData& /*data*/) {
+    DEBUG->print("FilterDXF::addHatchLoop()");
     if (hatch!=NULL) {
-        hatchLoop = new RS_EntityContainer(hatch);
+        hatchLoop = new EntityContainer(hatch);
         hatchLoop->setLayer(NULL);
         hatch->addEntity(hatchLoop);
     }
@@ -877,41 +877,41 @@ void RS_FilterDXF::addHatchLoop(const DL_HatchLoopData& /*data*/) {
 /**
  * Implementation of the method which handles hatch edge entities.
  */
-void RS_FilterDXF::addHatchEdge(const DL_HatchEdgeData& data) {
-    RS_DEBUG->print("RS_FilterDXF::addHatchEdge()");
+void FilterDXF::addHatchEdge(const DL_HatchEdgeData& data) {
+    DEBUG->print("FilterDXF::addHatchEdge()");
 
     if (hatchLoop!=NULL) {
-        RS_Entity* e = NULL;
+        Entity* e = NULL;
         switch (data.type) {
         case 1:
-            RS_DEBUG->print("RS_FilterDXF::addHatchEdge(): "
+            DEBUG->print("FilterDXF::addHatchEdge(): "
                             "line: %f,%f %f,%f",
                             data.x1, data.y1, data.x2, data.y2);
-            e = new RS_Line(hatchLoop,
-                            RS_LineData(Vector(data.x1, data.y1),
+            e = new Line(hatchLoop,
+                            LineData(Vector(data.x1, data.y1),
                                         Vector(data.x2, data.y2)));
             break;
         case 2:
             if (data.ccw && data.angle1<1.0e-6 && data.angle2>2*M_PI-1.0e-6) {
-                e = new RS_Circle(hatchLoop,
-                                  RS_CircleData(Vector(data.cx, data.cy),
+                e = new Circle(hatchLoop,
+                                  CircleData(Vector(data.cx, data.cy),
                                                 data.radius));
             } else {
                 if (data.ccw) {
-                    e = new RS_Arc(
+                    e = new Arc(
                             hatchLoop,
-                            RS_ArcData(Vector(data.cx, data.cy),
+                            ArcData(Vector(data.cx, data.cy),
                                        data.radius,
-                                       RS_Math::correctAngle(data.angle1),
-                                       RS_Math::correctAngle(data.angle2),
+                                       Math::correctAngle(data.angle1),
+                                       Math::correctAngle(data.angle2),
                                        false));
                 } else {
-                    e = new RS_Arc(
+                    e = new Arc(
                             hatchLoop,
-                            RS_ArcData(Vector(data.cx, data.cy),
+                            ArcData(Vector(data.cx, data.cy),
                                        data.radius,
-                                       RS_Math::correctAngle(2*M_PI-data.angle1),
-                                       RS_Math::correctAngle(2*M_PI-data.angle2),
+                                       Math::correctAngle(2*M_PI-data.angle1),
+                                       Math::correctAngle(2*M_PI-data.angle2),
                                        true));
                 }
             }
@@ -932,18 +932,18 @@ void RS_FilterDXF::addHatchEdge(const DL_HatchEdgeData& data) {
 /**
  * Implementation of the method which handles image entities.
  */
-void RS_FilterDXF::addImage(const DL_ImageData& data) {
-    RS_DEBUG->print("RS_FilterDXF::addImage");
+void FilterDXF::addImage(const DL_ImageData& data) {
+    DEBUG->print("FilterDXF::addImage");
 
     Vector ip(data.ipx, data.ipy);
     Vector uv(data.ux, data.uy);
     Vector vv(data.vx, data.vy);
     Vector size(data.width, data.height);
 
-    RS_Image* image =
-        new RS_Image(
+    Image* image =
+        new Image(
             currentContainer,
-            RS_ImageData(QString(data.ref.c_str()).toInt(NULL, 16),
+            ImageData(QString(data.ref.c_str()).toInt(NULL, 16),
                          ip, uv, vv,
                          size,
                          QString(""),
@@ -958,9 +958,9 @@ void RS_FilterDXF::addImage(const DL_ImageData& data) {
 /**
  * Implementation of the method which links image entities to image files.
  */
-void RS_FilterDXF::linkImage(const DL_ImageDefData & data)
+void FilterDXF::linkImage(const DL_ImageDefData & data)
 {
-       RS_DEBUG->print("RS_FilterDXF::linkImage");
+       DEBUG->print("FilterDXF::linkImage");
 
        int handle = QString(data.ref.c_str()).toInt(NULL, 16);
        QString sfile(data.file.c_str());
@@ -972,7 +972,7 @@ void RS_FilterDXF::linkImage(const DL_ImageDefData & data)
        // first: absolute path:
        if (!fiBitmap.exists())
        {
-               RS_DEBUG->print("File %s doesn't exist.", (const char *)QFile::encodeName(sfile));
+               DEBUG->print("File %s doesn't exist.", (const char *)QFile::encodeName(sfile));
                // try relative path:
 //             QString f1 = fiDxf.dirPath(true) + "/" + sfile;
                QString f1 = fiDxf.absolutePath() + "/" + sfile;
@@ -981,7 +981,7 @@ void RS_FilterDXF::linkImage(const DL_ImageDefData & data)
                        sfile = f1;
                else
                {
-                       RS_DEBUG->print("File %s doesn't exist.", (const char *)QFile::encodeName(f1));
+                       DEBUG->print("File %s doesn't exist.", (const char *)QFile::encodeName(f1));
                        // try drawing path:
 //                     QString f2 = fiDxf.dirPath(true) + "/" + fiBitmap.fileName();
                        QString f2 = fiDxf.absolutePath() + "/" + fiBitmap.fileName();
@@ -992,23 +992,23 @@ void RS_FilterDXF::linkImage(const DL_ImageDefData & data)
                        }
                        else
                        {
-                               RS_DEBUG->print("File %s doesn't exist.", (const char *)QFile::encodeName(f2));
+                               DEBUG->print("File %s doesn't exist.", (const char *)QFile::encodeName(f2));
                        }
                }
        }
 
        // Also link images in subcontainers (e.g. inserts):
-       for(RS_Entity * e=graphic->firstEntity(RS2::ResolveNone); e!=NULL;
+       for(Entity * e=graphic->firstEntity(RS2::ResolveNone); e!=NULL;
                e=graphic->nextEntity(RS2::ResolveNone))
        {
                if (e->rtti() == RS2::EntityImage)
                {
-                       RS_Image * img = (RS_Image *)e;
+                       Image * img = (Image *)e;
 
                        if (img->getHandle() == handle)
                        {
                                img->setFile(sfile);
-                               RS_DEBUG->print("image found: %s", (const char *)QFile::encodeName(img->getFile()));
+                               DEBUG->print("image found: %s", (const char *)QFile::encodeName(img->getFile()));
                                img->update();
                        }
                }
@@ -1017,18 +1017,18 @@ void RS_FilterDXF::linkImage(const DL_ImageDefData & data)
        // update images in blocks:
        for(uint i=0; i<graphic->countBlocks(); ++i)
        {
-               RS_Block * b = graphic->blockAt(i);
+               Block * b = graphic->blockAt(i);
 
-               for(RS_Entity * e=b->firstEntity(RS2::ResolveNone); e!=NULL; e=b->nextEntity(RS2::ResolveNone))
+               for(Entity * e=b->firstEntity(RS2::ResolveNone); e!=NULL; e=b->nextEntity(RS2::ResolveNone))
                {
                        if (e->rtti() == RS2::EntityImage)
                        {
-                               RS_Image * img = (RS_Image *)e;
+                               Image * img = (Image *)e;
 
                                if (img->getHandle() == handle)
                                {
                                        img->setFile(sfile);
-                                       RS_DEBUG->print("image in block found: %s",
+                                       DEBUG->print("image in block found: %s",
                                                (const char*)QFile::encodeName(img->getFile()));
                                        img->update();
                                }
@@ -1036,42 +1036,42 @@ void RS_FilterDXF::linkImage(const DL_ImageDefData & data)
                }
        }
 
-       RS_DEBUG->print("linking image: OK");
+       DEBUG->print("linking image: OK");
 }
 
 /**
  * Finishes a hatch entity.
  */
-void RS_FilterDXF::endEntity()
+void FilterDXF::endEntity()
 {
-       RS_DEBUG->print("RS_FilterDXF::endEntity");
+       DEBUG->print("FilterDXF::endEntity");
 
        if (hatch != NULL)
        {
-               RS_DEBUG->print("hatch->update()");
+               DEBUG->print("hatch->update()");
 
                if (hatch->validate())
                        hatch->update();
                else
                {
                        graphic->removeEntity(hatch);
-                       RS_DEBUG->print(RS_Debug::D_ERROR, "RS_FilterDXF::endEntity(): updating hatch failed: invalid hatch area");
+                       DEBUG->print(Debug::D_ERROR, "FilterDXF::endEntity(): updating hatch failed: invalid hatch area");
                }
 
                hatch = NULL;
        }
 }
 
-/*virtual*/ void RS_FilterDXF::endSequence()
+/*virtual*/ void FilterDXF::endSequence()
 {
 }
 
 /**
  * Sets a vector variable from the DXF file.
  */
-void RS_FilterDXF::setVariableVector(const char * key, double v1, double v2, double v3, int code)
+void FilterDXF::setVariableVector(const char * key, double v1, double v2, double v3, int code)
 {
-       RS_DEBUG->print("RS_FilterDXF::setVariableVector");
+       DEBUG->print("FilterDXF::setVariableVector");
 
        // update document's variable list:
        if (currentContainer->rtti() == RS2::EntityGraphic)
@@ -1081,9 +1081,9 @@ void RS_FilterDXF::setVariableVector(const char * key, double v1, double v2, dou
 /**
  * Sets a string variable from the DXF file.
  */
-void RS_FilterDXF::setVariableString(const char * key, const char * value, int code)
+void FilterDXF::setVariableString(const char * key, const char * value, int code)
 {
-    RS_DEBUG->print("RS_FilterDXF::setVariableString");
+    DEBUG->print("FilterDXF::setVariableString");
 
     // update local DXF variable list:
     variables.add(QString(key), QString(value), code);
@@ -1100,8 +1100,8 @@ void RS_FilterDXF::setVariableString(const char * key, const char * value, int c
 /**
  * Sets an int variable from the DXF file.
  */
-void RS_FilterDXF::setVariableInt(const char* key, int value, int code) {
-    RS_DEBUG->print("RS_FilterDXF::setVariableInt");
+void FilterDXF::setVariableInt(const char* key, int value, int code) {
+    DEBUG->print("FilterDXF::setVariableInt");
 
     // update document's variable list:
     if (currentContainer->rtti()==RS2::EntityGraphic) {
@@ -1115,8 +1115,8 @@ void RS_FilterDXF::setVariableInt(const char* key, int value, int code) {
 /**
  * Sets a double variable from the DXF file.
  */
-void RS_FilterDXF::setVariableDouble(const char* key, double value, int code) {
-    RS_DEBUG->print("RS_FilterDXF::setVariableDouble");
+void FilterDXF::setVariableDouble(const char* key, double value, int code) {
+    DEBUG->print("FilterDXF::setVariableDouble");
 
     // update document's variable list:
     if (currentContainer->rtti() == RS2::EntityGraphic)
@@ -1131,11 +1131,11 @@ void RS_FilterDXF::setVariableDouble(const char* key, double value, int code) {
  *
  * @param file Full path to the DXF file that will be written.
  */
-bool RS_FilterDXF::fileExport(Drawing & g, const QString & file, RS2::FormatType type)
+bool FilterDXF::fileExport(Drawing & g, const QString & file, RS2::FormatType type)
 {
-       RS_DEBUG->print("RS_FilterDXF::fileExport: exporting file '%s'...",
+       DEBUG->print("FilterDXF::fileExport: exporting file '%s'...",
                (const char *)QFile::encodeName(file));
-       RS_DEBUG->print("RS_FilterDXF::fileExport: file type '%d'", (int)type);
+       DEBUG->print("FilterDXF::fileExport: file type '%d'", (int)type);
 
        this->graphic = &g;
 
@@ -1146,7 +1146,7 @@ bool RS_FilterDXF::fileExport(Drawing & g, const QString & file, RS2::FormatType
 
        if (QFileInfo(path).isWritable() == false)
        {
-               RS_DEBUG->print("RS_FilterDXF::fileExport: can't write file: no permission");
+               DEBUG->print("FilterDXF::fileExport: can't write file: no permission");
                return false;
        }
        //
@@ -1169,27 +1169,27 @@ bool RS_FilterDXF::fileExport(Drawing & g, const QString & file, RS2::FormatType
 
        if (dw == NULL)
        {
-               RS_DEBUG->print("RS_FilterDXF::fileExport: can't write file");
+               DEBUG->print("FilterDXF::fileExport: can't write file");
                return false;
        }
 
        // Header
-       RS_DEBUG->print("writing headers...");
+       DEBUG->print("writing headers...");
        dxf.writeHeader(*dw);
 
        // Variables
-       RS_DEBUG->print("writing variables...");
+       DEBUG->print("writing variables...");
        writeVariables(*dw);
 
        // Section TABLES
-       RS_DEBUG->print("writing tables...");
+       DEBUG->print("writing tables...");
        dw->sectionTables();
 
        // VPORT:
        dxf.writeVPort(*dw);
 
        // Line types:
-       RS_DEBUG->print("writing line types...");
+       DEBUG->print("writing line types...");
        int numLT = (int)RS2::BorderLineX2 - (int)RS2::LineByBlock;
 
        if (type == RS2::FormatDXF12)
@@ -1206,37 +1206,37 @@ bool RS_FilterDXF::fileExport(Drawing & g, const QString & file, RS2::FormatType
        dw->tableEnd();
 
        // Layers:
-       RS_DEBUG->print("writing layers...");
+       DEBUG->print("writing layers...");
        dw->tableLayers(graphic->countLayers());
 
        for(uint i=0; i<graphic->countLayers(); ++i)
        {
-               RS_Layer * l = graphic->layerAt(i);
+               Layer * l = graphic->layerAt(i);
                writeLayer(*dw, l);
        }
 
        dw->tableEnd();
 
        // STYLE:
-       RS_DEBUG->print("writing styles...");
+       DEBUG->print("writing styles...");
        dxf.writeStyle(*dw);
 
        // VIEW:
-       RS_DEBUG->print("writing views...");
+       DEBUG->print("writing views...");
        dxf.writeView(*dw);
 
        // UCS:
-       RS_DEBUG->print("writing ucs...");
+       DEBUG->print("writing ucs...");
        dxf.writeUcs(*dw);
 
        // Appid:
-       RS_DEBUG->print("writing appid...");
+       DEBUG->print("writing appid...");
        dw->tableAppid(1);
        writeAppid(*dw, "ACAD");
        dw->tableEnd();
 
        // DIMSTYLE:
-       RS_DEBUG->print("writing dim styles...");
+       DEBUG->print("writing dim styles...");
        dxf.writeDimStyle(*dw,
                graphic->getVariableDouble("$DIMASZ", 2.5),
                graphic->getVariableDouble("$DIMEXE", 1.25),
@@ -1247,12 +1247,12 @@ bool RS_FilterDXF::fileExport(Drawing & g, const QString & file, RS2::FormatType
        // BLOCK_RECORD:
        if (type == RS2::FormatDXF)
        {
-               RS_DEBUG->print("writing block records...");
+               DEBUG->print("writing block records...");
                dxf.writeBlockRecord(*dw);
 
                for(uint i=0; i<graphic->countBlocks(); ++i)
                {
-                       RS_Block * blk = graphic->blockAt(i);
+                       Block * blk = graphic->blockAt(i);
                        dxf.writeBlockRecord(*dw, std::string((const char *)blk->getName().toLocal8Bit()));
                        /*
                        // v2.0.4.9..:
@@ -1272,26 +1272,26 @@ bool RS_FilterDXF::fileExport(Drawing & g, const QString & file, RS2::FormatType
        }
 
        // end of tables:
-       RS_DEBUG->print("writing end of section TABLES...");
+       DEBUG->print("writing end of section TABLES...");
        dw->sectionEnd();
 
        // Section BLOCKS:
-       RS_DEBUG->print("writing blocks...");
+       DEBUG->print("writing blocks...");
        dw->sectionBlocks();
 
        if (type == RS2::FormatDXF)
        {
-               RS_Block b1(graphic, RS_BlockData("*Model_Space", Vector(0.0, 0.0), false));
+               Block b1(graphic, BlockData("*Model_Space", Vector(0.0, 0.0), false));
                writeBlock(*dw, &b1);
-               RS_Block b2(graphic, RS_BlockData("*Paper_Space", Vector(0.0, 0.0), false));
+               Block b2(graphic, BlockData("*Paper_Space", Vector(0.0, 0.0), false));
                writeBlock(*dw, &b2);
-               RS_Block b3(graphic, RS_BlockData("*Paper_Space0", Vector(0.0, 0.0), false));
+               Block b3(graphic, BlockData("*Paper_Space0", Vector(0.0, 0.0), false));
                writeBlock(*dw, &b3);
        }
 
        for(uint i=0; i<graphic->countBlocks(); ++i)
        {
-               RS_Block * blk = graphic->blockAt(i);
+               Block * blk = graphic->blockAt(i);
 
                // Save block if it's not a model or paper space:
                // Careful: other blocks with * / $ exist
@@ -1304,21 +1304,21 @@ bool RS_FilterDXF::fileExport(Drawing & g, const QString & file, RS2::FormatType
        dw->sectionEnd();
 
        // Section ENTITIES:
-       RS_DEBUG->print("writing section ENTITIES...");
+       DEBUG->print("writing section ENTITIES...");
        dw->sectionEntities();
 
-       for(RS_Entity * e=graphic->firstEntity(RS2::ResolveNone); e!=NULL;
+       for(Entity * e=graphic->firstEntity(RS2::ResolveNone); e!=NULL;
                e=graphic->nextEntity(RS2::ResolveNone))
        {
                writeEntity(*dw, e);
        }
 
-       RS_DEBUG->print("writing end of section ENTITIES...");
+       DEBUG->print("writing end of section ENTITIES...");
        dw->sectionEnd();
 
        if (type == RS2::FormatDXF)
        {
-               RS_DEBUG->print("writing section OBJECTS...");
+               DEBUG->print("writing section OBJECTS...");
                dxf.writeObjects(*dw);
 
                // IMAGEDEF's from images in entities and images in blocks
@@ -1326,14 +1326,14 @@ bool RS_FilterDXF::fileExport(Drawing & g, const QString & file, RS2::FormatType
 
                for(uint i=0; i<graphic->countBlocks(); ++i)
                {
-                       RS_Block * block = graphic->blockAt(i);
+                       Block * block = graphic->blockAt(i);
 
-                       for(RS_Entity * e=block->firstEntity(RS2::ResolveAll); e!=NULL;
+                       for(Entity * e=block->firstEntity(RS2::ResolveAll); e!=NULL;
                                e=block->nextEntity(RS2::ResolveAll))
                        {
                                if (e->rtti() == RS2::EntityImage)
                                {
-                                       RS_Image * img = ((RS_Image *)e);
+                                       Image * img = ((Image *)e);
 
                                        if (written.contains(file) == 0 && img->getHandle() != 0)
                                        {
@@ -1344,12 +1344,12 @@ bool RS_FilterDXF::fileExport(Drawing & g, const QString & file, RS2::FormatType
                        }
                }
 
-               for(RS_Entity * e=graphic->firstEntity(RS2::ResolveNone); e!=NULL;
+               for(Entity * e=graphic->firstEntity(RS2::ResolveNone); e!=NULL;
                        e=graphic->nextEntity(RS2::ResolveNone))
                {
                        if (e->rtti() == RS2::EntityImage)
                        {
-                               RS_Image * img = ((RS_Image *)e);
+                               Image * img = ((Image *)e);
 
                                if (written.contains(file) == 0 && img->getHandle() != 0)
                                {
@@ -1358,14 +1358,14 @@ bool RS_FilterDXF::fileExport(Drawing & g, const QString & file, RS2::FormatType
                                }
                        }
                }
-               RS_DEBUG->print("writing end of section OBJECTS...");
+               DEBUG->print("writing end of section OBJECTS...");
                dxf.writeObjectsEnd(*dw);
        }
 
-       RS_DEBUG->print("writing EOF...");
+       DEBUG->print("writing EOF...");
        dw->dxfEOF();
 
-       RS_DEBUG->print("close..");
+       DEBUG->print("close..");
        dw->close();
 
        delete dw;
@@ -1373,7 +1373,7 @@ bool RS_FilterDXF::fileExport(Drawing & g, const QString & file, RS2::FormatType
        // check if file was actually written (strange world of windoze xp):
        if (QFileInfo(file).exists() == false)
        {
-               RS_DEBUG->print("RS_FilterDXF::fileExport: file could not be written");
+               DEBUG->print("FilterDXF::fileExport: file could not be written");
                return false;
        }
 
@@ -1383,10 +1383,10 @@ bool RS_FilterDXF::fileExport(Drawing & g, const QString & file, RS2::FormatType
 /**
  * Writes all known variable settings to the DXF file.
  */
-void RS_FilterDXF::writeVariables(DL_WriterA & dw)
+void FilterDXF::writeVariables(DL_WriterA & dw)
 {
-//    Q3DictIterator<RS_Variable> it(graphic->getVariableDict());
-       QHashIterator<QString, RS_Variable *> it(graphic->getVariableDict());
+//    Q3DictIterator<Variable> it(graphic->getVariableDict());
+       QHashIterator<QString, Variable *> it(graphic->getVariableDict());
 
 //     for (; it.current(); ++it)
        while (it.hasNext())
@@ -1434,28 +1434,28 @@ void RS_FilterDXF::writeVariables(DL_WriterA & dw)
  *
  * @todo Add support for unicode layer names
  */
-void RS_FilterDXF::writeLayer(DL_WriterA & dw, RS_Layer * l)
+void FilterDXF::writeLayer(DL_WriterA & dw, Layer * l)
 {
        if (l == NULL)
        {
-               RS_DEBUG->print(RS_Debug::D_WARNING, "RS_FilterDXF::writeLayer: layer is NULL");
+               DEBUG->print(Debug::D_WARNING, "FilterDXF::writeLayer: layer is NULL");
                return;
        }
 
-       RS_DEBUG->print("RS_FilterDXF::writeLayer %s", l->getName().toLatin1().data());
+       DEBUG->print("FilterDXF::writeLayer %s", l->getName().toLatin1().data());
 
        dxf.writeLayer(dw, DL_LayerData((const char *)l->getName().toLocal8Bit(),
                l->isFrozen() + (l->isLocked() << 2)), DL_Attributes(std::string(""),
                colorToNumber(l->getPen().getColor()), widthToNumber(l->getPen().getWidth()),
                (const char *)lineTypeToName(l->getPen().getLineType()).toLocal8Bit()));
 
-       RS_DEBUG->print("RS_FilterDXF::writeLayer end");
+       DEBUG->print("FilterDXF::writeLayer end");
 }
 
 /**
  * Writes a line type to the DXF file.
  */
-void RS_FilterDXF::writeLineType(DL_WriterA & dw, RS2::LineType t)
+void FilterDXF::writeLineType(DL_WriterA & dw, RS2::LineType t)
 {
     dxf.writeLineType(dw, DL_LineTypeData((const char *)lineTypeToName(t).toLocal8Bit(), 0));
 }
@@ -1467,7 +1467,7 @@ void RS_FilterDXF::writeLineType(DL_WriterA & dw, RS2::LineType t)
  *
  * @param appid Application ID (e.g. "QCad").
  */
-void RS_FilterDXF::writeAppid(DL_WriterA& dw, const char* appid) {
+void FilterDXF::writeAppid(DL_WriterA& dw, const char* appid) {
     dxf.writeAppid(dw, appid);
 }
 
@@ -1476,21 +1476,21 @@ void RS_FilterDXF::writeAppid(DL_WriterA& dw, const char* appid) {
 /**
  * Writes a block (just the definition, not the entities in it).
  */
-void RS_FilterDXF::writeBlock(DL_WriterA& dw, RS_Block* blk) {
+void FilterDXF::writeBlock(DL_WriterA& dw, Block* blk) {
     if (blk==NULL) {
-        RS_DEBUG->print(RS_Debug::D_WARNING,
-                       "RS_FilterDXF::writeBlock: Block is NULL");
+        DEBUG->print(Debug::D_WARNING,
+                       "FilterDXF::writeBlock: Block is NULL");
         return;
     }
 
-    RS_DEBUG->print("writing block: %s", (const char*)blk->getName().toLocal8Bit());
+    DEBUG->print("writing block: %s", (const char*)blk->getName().toLocal8Bit());
 
     dxf.writeBlock(dw,
                    DL_BlockData((const char*)blk->getName().toLocal8Bit(), 0,
                                 blk->getBasePoint().x,
                                 blk->getBasePoint().y,
                                 blk->getBasePoint().z));
-    for (RS_Entity* e=blk->firstEntity(RS2::ResolveNone);
+    for (Entity* e=blk->firstEntity(RS2::ResolveNone);
             e!=NULL;
             e=blk->nextEntity(RS2::ResolveNone)) {
         writeEntity(dw, e);
@@ -1503,7 +1503,7 @@ void RS_FilterDXF::writeBlock(DL_WriterA& dw, RS_Block* blk) {
 /**
  * Writes the given entity to the DXF file.
  */
-void RS_FilterDXF::writeEntity(DL_WriterA& dw, RS_Entity* e) {
+void FilterDXF::writeEntity(DL_WriterA& dw, Entity* e) {
     writeEntity(dw, e, getEntityAttributes(e));
 }
 
@@ -1511,43 +1511,43 @@ void RS_FilterDXF::writeEntity(DL_WriterA& dw, RS_Entity* e) {
 /**
  * Writes the given entity to the DXF file.
  */
-void RS_FilterDXF::writeEntity(DL_WriterA& dw, RS_Entity* e,
+void FilterDXF::writeEntity(DL_WriterA& dw, Entity* e,
                                const DL_Attributes& attrib) {
 
     if (e==NULL || e->getFlag(RS2::FlagUndone)) {
         return;
     }
-    RS_DEBUG->print("writing Entity");
+    DEBUG->print("writing Entity");
 
     switch (e->rtti()) {
     case RS2::EntityPoint:
-        writePoint(dw, (RS_Point*)e, attrib);
+        writePoint(dw, (Point*)e, attrib);
         break;
     case RS2::EntityLine:
-        writeLine(dw, (RS_Line*)e, attrib);
+        writeLine(dw, (Line*)e, attrib);
         break;
     case RS2::EntityPolyline:
-        writePolyline(dw, (RS_Polyline*)e, attrib);
+        writePolyline(dw, (Polyline*)e, attrib);
         break;
     case RS2::EntitySpline:
-        writeSpline(dw, (RS_Spline*)e, attrib);
+        writeSpline(dw, (Spline*)e, attrib);
         break;
     case RS2::EntityVertex:
         break;
     case RS2::EntityCircle:
-        writeCircle(dw, (RS_Circle*)e, attrib);
+        writeCircle(dw, (Circle*)e, attrib);
         break;
     case RS2::EntityArc:
-        writeArc(dw, (RS_Arc*)e, attrib);
+        writeArc(dw, (Arc*)e, attrib);
         break;
     case RS2::EntityEllipse:
-        writeEllipse(dw, (RS_Ellipse*)e, attrib);
+        writeEllipse(dw, (Ellipse*)e, attrib);
         break;
     case RS2::EntityInsert:
-        writeInsert(dw, (RS_Insert*)e, attrib);
+        writeInsert(dw, (Insert*)e, attrib);
         break;
     case RS2::EntityText:
-        writeText(dw, (RS_Text*)e, attrib);
+        writeText(dw, (Text*)e, attrib);
         break;
 
     case RS2::EntityDimAligned:
@@ -1555,25 +1555,25 @@ void RS_FilterDXF::writeEntity(DL_WriterA& dw, RS_Entity* e,
     case RS2::EntityDimLinear:
     case RS2::EntityDimRadial:
     case RS2::EntityDimDiametric:
-        writeDimension(dw, (RS_Dimension*)e, attrib);
+        writeDimension(dw, (Dimension*)e, attrib);
         break;
     case RS2::EntityDimLeader:
-        writeLeader(dw, (RS_Leader*)e, attrib);
+        writeLeader(dw, (Leader*)e, attrib);
         break;
     case RS2::EntityHatch:
-        writeHatch(dw, (RS_Hatch*)e, attrib);
+        writeHatch(dw, (Hatch*)e, attrib);
         break;
     case RS2::EntityImage:
-        writeImage(dw, (RS_Image*)e, attrib);
+        writeImage(dw, (Image*)e, attrib);
         break;
     case RS2::EntitySolid:
-        writeSolid(dw, (RS_Solid*)e, attrib);
+        writeSolid(dw, (Solid*)e, attrib);
         break;
 
 #ifndef RS_NO_COMPLEX_ENTITIES
 
     case RS2::EntityContainer:
-        writeEntityContainer(dw, (RS_EntityContainer*)e, attrib);
+        writeEntityContainer(dw, (EntityContainer*)e, attrib);
         break;
 #endif
 
@@ -1587,7 +1587,7 @@ void RS_FilterDXF::writeEntity(DL_WriterA& dw, RS_Entity* e,
 /**
  * Writes the given Point entity to the file.
  */
-void RS_FilterDXF::writePoint(DL_WriterA& dw, RS_Point* p,
+void FilterDXF::writePoint(DL_WriterA& dw, Point* p,
                               const DL_Attributes& attrib) {
     dxf.writePoint(
         dw,
@@ -1601,7 +1601,7 @@ void RS_FilterDXF::writePoint(DL_WriterA& dw, RS_Point* p,
 /**
  * Writes the given Line( entity to the file.
  */
-void RS_FilterDXF::writeLine(DL_WriterA& dw, RS_Line* l,
+void FilterDXF::writeLine(DL_WriterA& dw, Line* l,
                              const DL_Attributes& attrib) {
     dxf.writeLine(
         dw,
@@ -1619,8 +1619,8 @@ void RS_FilterDXF::writeLine(DL_WriterA& dw, RS_Line* l,
 /**
  * Writes the given polyline entity to the file.
  */
-void RS_FilterDXF::writePolyline(DL_WriterA& dw,
-                                 RS_Polyline* l,
+void FilterDXF::writePolyline(DL_WriterA& dw,
+                                 Polyline* l,
                                  const DL_Attributes& attrib) {
 
        int count = l->count();
@@ -1635,10 +1635,10 @@ void RS_FilterDXF::writePolyline(DL_WriterA& dw,
                         l->isClosed()*0x1),
         attrib);
     bool first = true;
-    RS_Entity* nextEntity = 0;
-    RS_AtomicEntity* ae = NULL;
-       RS_Entity* lastEntity = l->lastEntity(RS2::ResolveNone);
-    for (RS_Entity* v=l->firstEntity(RS2::ResolveNone);
+    Entity* nextEntity = 0;
+    AtomicEntity* ae = NULL;
+       Entity* lastEntity = l->lastEntity(RS2::ResolveNone);
+    for (Entity* v=l->firstEntity(RS2::ResolveNone);
             v!=NULL;
             v=nextEntity) {
 
@@ -1648,13 +1648,13 @@ void RS_FilterDXF::writePolyline(DL_WriterA& dw,
             continue;
         }
 
-        ae = (RS_AtomicEntity*)v;
+        ae = (AtomicEntity*)v;
         double bulge=0.0;
 
                // Write vertex:
         if (first) {
             if (v->rtti()==RS2::EntityArc) {
-                bulge = ((RS_Arc*)v)->getBulge();
+                bulge = ((Arc*)v)->getBulge();
             }
             dxf.writeVertex(dw,
                             DL_VertexData(ae->getStartpoint().x,
@@ -1667,7 +1667,7 @@ void RS_FilterDXF::writePolyline(DL_WriterA& dw,
         //if (dxf.getVersion()==VER_R12) {
             if (nextEntity!=NULL) {
                 if (nextEntity->rtti()==RS2::EntityArc) {
-                    bulge = ((RS_Arc*)nextEntity)->getBulge();
+                    bulge = ((Arc*)nextEntity)->getBulge();
                 }
                                else {
                                        bulge = 0.0;
@@ -1675,7 +1675,7 @@ void RS_FilterDXF::writePolyline(DL_WriterA& dw,
             }
         /*} else {
             if (v->rtti()==RS2::EntityArc) {
-                bulge = ((RS_Arc*)v)->getBulge();
+                bulge = ((Arc*)v)->getBulge();
             }
         }*/
 
@@ -1696,7 +1696,7 @@ void RS_FilterDXF::writePolyline(DL_WriterA& dw,
 /**
  * Writes the given spline entity to the file.
  */
-void RS_FilterDXF::writeSpline(DL_WriterA & dw, RS_Spline * s, const DL_Attributes & attrib)
+void FilterDXF::writeSpline(DL_WriterA & dw, Spline * s, const DL_Attributes & attrib)
 {
        // split spline into atomic entities for DXF R12:
        if (dxf.getVersion() == VER_R12)
@@ -1707,7 +1707,7 @@ void RS_FilterDXF::writeSpline(DL_WriterA & dw, RS_Spline * s, const DL_Attribut
 
        if (s->getNumberOfControlPoints() < s->getDegree() + 1)
        {
-               RS_DEBUG->print(RS_Debug::D_ERROR, "RS_FilterDXF::writeSpline: "
+               DEBUG->print(Debug::D_ERROR, "FilterDXF::writeSpline: "
                        "Discarding spline: not enough control points given.");
                return;
        }
@@ -1757,7 +1757,7 @@ void RS_FilterDXF::writeSpline(DL_WriterA & dw, RS_Spline * s, const DL_Attribut
 /**
  * Writes the given circle entity to the file.
  */
-void RS_FilterDXF::writeCircle(DL_WriterA& dw, RS_Circle* c,
+void FilterDXF::writeCircle(DL_WriterA& dw, Circle* c,
                                const DL_Attributes& attrib) {
     dxf.writeCircle(
         dw,
@@ -1771,7 +1771,7 @@ void RS_FilterDXF::writeCircle(DL_WriterA& dw, RS_Circle* c,
 
 
 
-void RS_FilterDXF::writeArc(DL_WriterA& dw, RS_Arc* a,
+void FilterDXF::writeArc(DL_WriterA& dw, Arc* a,
                             const DL_Attributes& attrib) {
     double a1, a2;
     if (a->isReversed()) {
@@ -1792,7 +1792,7 @@ void RS_FilterDXF::writeArc(DL_WriterA& dw, RS_Arc* a,
 }
 
 
-void RS_FilterDXF::writeEllipse(DL_WriterA& dw, RS_Ellipse* s,
+void FilterDXF::writeEllipse(DL_WriterA& dw, Ellipse* s,
                                 const DL_Attributes& attrib) {
     if (s->isReversed()) {
         dxf.writeEllipse(
@@ -1823,7 +1823,7 @@ void RS_FilterDXF::writeEllipse(DL_WriterA& dw, RS_Ellipse* s,
     }
 }
 
-void RS_FilterDXF::writeInsert(DL_WriterA & dw, RS_Insert * i, const DL_Attributes & attrib)
+void FilterDXF::writeInsert(DL_WriterA & dw, Insert * i, const DL_Attributes & attrib)
 {
        dxf.writeInsert(dw, DL_InsertData(i->getName().toLatin1().data(),
                i->getInsertionPoint().x, i->getInsertionPoint().y, 0.0,
@@ -1833,7 +1833,7 @@ void RS_FilterDXF::writeInsert(DL_WriterA & dw, RS_Insert * i, const DL_Attribut
                attrib);
 }
 
-void RS_FilterDXF::writeText(DL_WriterA & dw, RS_Text * t, const DL_Attributes & attrib)
+void FilterDXF::writeText(DL_WriterA & dw, Text * t, const DL_Attributes & attrib)
 {
     if (dxf.getVersion()==VER_R12)
        {
@@ -1915,7 +1915,7 @@ void RS_FilterDXF::writeText(DL_WriterA & dw, RS_Text * t, const DL_Attributes &
 
 
 
-void RS_FilterDXF::writeDimension(DL_WriterA& dw, RS_Dimension* d,
+void FilterDXF::writeDimension(DL_WriterA& dw, Dimension* d,
                                   const DL_Attributes& attrib) {
 
     // split hatch into atomic entities:
@@ -1975,7 +1975,7 @@ void RS_FilterDXF::writeDimension(DL_WriterA& dw, RS_Dimension* d,
                              d->getAngle());
 
     if (d->rtti()==RS2::EntityDimAligned) {
-        RS_DimAligned* da = (RS_DimAligned*)d;
+        DimAligned* da = (DimAligned*)d;
 
         DL_DimAlignedData dimAlignedData(da->getExtensionPoint1().x,
                                          da->getExtensionPoint1().y,
@@ -1986,7 +1986,7 @@ void RS_FilterDXF::writeDimension(DL_WriterA& dw, RS_Dimension* d,
 
         dxf.writeDimAligned(dw, dimData, dimAlignedData, attrib);
     } else if (d->rtti()==RS2::EntityDimLinear) {
-        RS_DimLinear* dl = (RS_DimLinear*)d;
+        DimLinear* dl = (DimLinear*)d;
 
         DL_DimLinearData dimLinearData(dl->getExtensionPoint1().x,
                                        dl->getExtensionPoint1().y,
@@ -1999,7 +1999,7 @@ void RS_FilterDXF::writeDimension(DL_WriterA& dw, RS_Dimension* d,
 
         dxf.writeDimLinear(dw, dimData, dimLinearData, attrib);
     } else if (d->rtti()==RS2::EntityDimRadial) {
-        RS_DimRadial* dr = (RS_DimRadial*)d;
+        DimRadial* dr = (DimRadial*)d;
 
         DL_DimRadialData dimRadialData(dr->getDefinitionPoint().x,
                                        dr->getDefinitionPoint().y,
@@ -2008,7 +2008,7 @@ void RS_FilterDXF::writeDimension(DL_WriterA& dw, RS_Dimension* d,
 
         dxf.writeDimRadial(dw, dimData, dimRadialData, attrib);
     } else if (d->rtti()==RS2::EntityDimDiametric) {
-        RS_DimDiametric* dr = (RS_DimDiametric*)d;
+        DimDiametric* dr = (DimDiametric*)d;
 
         DL_DimDiametricData dimDiametricData(dr->getDefinitionPoint().x,
                                              dr->getDefinitionPoint().y,
@@ -2017,7 +2017,7 @@ void RS_FilterDXF::writeDimension(DL_WriterA& dw, RS_Dimension* d,
 
         dxf.writeDimDiametric(dw, dimData, dimDiametricData, attrib);
     } else if (d->rtti()==RS2::EntityDimAngular) {
-        RS_DimAngular* da = (RS_DimAngular*)d;
+        DimAngular* da = (DimAngular*)d;
 
         DL_DimAngularData dimAngularData(da->getDefinitionPoint1().x,
                                          da->getDefinitionPoint1().y,
@@ -2038,7 +2038,7 @@ void RS_FilterDXF::writeDimension(DL_WriterA& dw, RS_Dimension* d,
 }
 
 
-void RS_FilterDXF::writeLeader(DL_WriterA& dw, RS_Leader* l,
+void FilterDXF::writeLeader(DL_WriterA& dw, Leader* l,
                                const DL_Attributes& attrib) {
     if (l->count()>0) {
         dxf.writeLeader(
@@ -2053,13 +2053,13 @@ void RS_FilterDXF::writeLeader(DL_WriterA& dw, RS_Leader* l,
                           l->count()),
             attrib);
         bool first = true;
-        for (RS_Entity* v=l->firstEntity(RS2::ResolveNone);
+        for (Entity* v=l->firstEntity(RS2::ResolveNone);
                 v!=NULL;
                 v=l->nextEntity(RS2::ResolveNone)) {
 
             // Write line verties:
             if (v->rtti()==RS2::EntityLine) {
-                RS_Line* l = (RS_Line*)v;
+                Line* l = (Line*)v;
                 if (first) {
                     dxf.writeLeaderVertex(
                         dw,
@@ -2076,13 +2076,13 @@ void RS_FilterDXF::writeLeader(DL_WriterA& dw, RS_Leader* l,
             }
         }
     } else {
-        RS_DEBUG->print(RS_Debug::D_WARNING,
+        DEBUG->print(Debug::D_WARNING,
                        "dropping leader with no vertices");
     }
 }
 
 
-void RS_FilterDXF::writeHatch(DL_WriterA& dw, RS_Hatch* h,
+void FilterDXF::writeHatch(DL_WriterA& dw, Hatch* h,
                               const DL_Attributes& attrib) {
 
     // split hatch into atomic entities:
@@ -2094,7 +2094,7 @@ void RS_FilterDXF::writeHatch(DL_WriterA& dw, RS_Hatch* h,
     bool writeIt = true;
     if (h->countLoops()>0) {
         // check if all of the loops contain entities:
-        for (RS_Entity* l=h->firstEntity(RS2::ResolveNone);
+        for (Entity* l=h->firstEntity(RS2::ResolveNone);
                 l!=NULL;
                 l=h->nextEntity(RS2::ResolveNone)) {
 
@@ -2109,8 +2109,8 @@ void RS_FilterDXF::writeHatch(DL_WriterA& dw, RS_Hatch* h,
     }
 
     if (!writeIt) {
-        RS_DEBUG->print(RS_Debug::D_WARNING,
-                       "RS_FilterDXF::writeHatch: Dropping Hatch");
+        DEBUG->print(Debug::D_WARNING,
+                       "FilterDXF::writeHatch: Dropping Hatch");
     } else {
         DL_HatchData data(h->countLoops(),
                           h->isSolid(),
@@ -2119,23 +2119,23 @@ void RS_FilterDXF::writeHatch(DL_WriterA& dw, RS_Hatch* h,
                           (const char*)h->getPattern().toLocal8Bit());
         dxf.writeHatch1(dw, data, attrib);
 
-        for (RS_Entity* l=h->firstEntity(RS2::ResolveNone);
+        for (Entity* l=h->firstEntity(RS2::ResolveNone);
                 l!=NULL;
                 l=h->nextEntity(RS2::ResolveNone)) {
 
             // Write hatch loops:
             if (l->isContainer() && !l->getFlag(RS2::FlagTemp)) {
-                RS_EntityContainer* loop = (RS_EntityContainer*)l;
+                EntityContainer* loop = (EntityContainer*)l;
                 DL_HatchLoopData lData(loop->count());
                 dxf.writeHatchLoop1(dw, lData);
 
-                for (RS_Entity* ed=loop->firstEntity(RS2::ResolveNone);
+                for (Entity* ed=loop->firstEntity(RS2::ResolveNone);
                         ed!=NULL;
                         ed=loop->nextEntity(RS2::ResolveNone)) {
 
                     // Write hatch loop edges:
                     if (ed->rtti()==RS2::EntityLine) {
-                        RS_Line* ln = (RS_Line*)ed;
+                        Line* ln = (Line*)ed;
                         dxf.writeHatchEdge(
                             dw,
                             DL_HatchEdgeData(ln->getStartpoint().x,
@@ -2143,7 +2143,7 @@ void RS_FilterDXF::writeHatch(DL_WriterA& dw, RS_Hatch* h,
                                              ln->getEndpoint().x,
                                              ln->getEndpoint().y));
                     } else if (ed->rtti()==RS2::EntityArc) {
-                        RS_Arc* ar = (RS_Arc*)ed;
+                        Arc* ar = (Arc*)ed;
                         if (!ar->isReversed()) {
                             dxf.writeHatchEdge(
                                 dw,
@@ -2164,7 +2164,7 @@ void RS_FilterDXF::writeHatch(DL_WriterA& dw, RS_Hatch* h,
                                                  false));
                         }
                     } else if (ed->rtti()==RS2::EntityCircle) {
-                        RS_Circle* ci = (RS_Circle*)ed;
+                        Circle* ci = (Circle*)ed;
                         dxf.writeHatchEdge(
                             dw,
                             DL_HatchEdgeData(ci->getCenter().x,
@@ -2185,7 +2185,7 @@ void RS_FilterDXF::writeHatch(DL_WriterA& dw, RS_Hatch* h,
 
 
 
-void RS_FilterDXF::writeSolid(DL_WriterA& dw, RS_Solid* s,
+void FilterDXF::writeSolid(DL_WriterA& dw, Solid* s,
                               const DL_Attributes& attrib) {
 
     // split solid into line entities:
@@ -2206,7 +2206,7 @@ void RS_FilterDXF::writeSolid(DL_WriterA& dw, RS_Solid* s,
 }
 
 
-void RS_FilterDXF::writeImage(DL_WriterA& dw, RS_Image* i,
+void FilterDXF::writeImage(DL_WriterA& dw, Image* i,
                               const DL_Attributes& attrib) {
     int handle = dxf.writeImage(
                      dw,
@@ -2231,7 +2231,7 @@ void RS_FilterDXF::writeImage(DL_WriterA& dw, RS_Image* i,
 
 
 
-void RS_FilterDXF::writeEntityContainer(DL_WriterA& dw, RS_EntityContainer* con,
+void FilterDXF::writeEntityContainer(DL_WriterA& dw, EntityContainer* con,
                                         const DL_Attributes& /*attrib*/) {
     QString blkName;
     blkName = "__CE";
@@ -2263,11 +2263,11 @@ void RS_FilterDXF::writeEntityContainer(DL_WriterA& dw, RS_EntityContainer* con,
     dw.dxfString(0, "ENDTAB");
 
     //Block creation
-    RS_BlockData blkdata(blkName, Vector(0,0), false);
+    BlockData blkdata(blkName, Vector(0,0), false);
 
-    RS_Block* blk = new RS_Block(graphic, blkdata);
+    Block* blk = new Block(graphic, blkdata);
 
-    for (RS_Entity* e1 = con->firstEntity(); e1 != NULL;
+    for (Entity* e1 = con->firstEntity(); e1 != NULL;
             e1 = con->nextEntity() ) {
         blk->addEntity(e1);
     }
@@ -2281,11 +2281,11 @@ void RS_FilterDXF::writeEntityContainer(DL_WriterA& dw, RS_EntityContainer* con,
 /**
  * Writes the atomic entities of the given cotnainer to the file.
  */
-void RS_FilterDXF::writeAtomicEntities(DL_WriterA& dw, RS_EntityContainer* c,
+void FilterDXF::writeAtomicEntities(DL_WriterA& dw, EntityContainer* c,
                                        const DL_Attributes& attrib,
                                        RS2::ResolveLevel level) {
 
-    for (RS_Entity* e=c->firstEntity(level);
+    for (Entity* e=c->firstEntity(level);
             e!=NULL;
             e=c->nextEntity(level)) {
 
@@ -2296,7 +2296,7 @@ void RS_FilterDXF::writeAtomicEntities(DL_WriterA& dw, RS_EntityContainer* c,
 /**
  * Writes an IMAGEDEF object into an OBJECT section.
  */
-void RS_FilterDXF::writeImageDef(DL_WriterA& dw, RS_Image* i) {
+void FilterDXF::writeImageDef(DL_WriterA& dw, Image* i) {
     if (i==NULL || i->getFlag(RS2::FlagUndone)) {
         return;
     }
@@ -2327,11 +2327,11 @@ void RS_FilterDXF::writeImageDef(DL_WriterA& dw, RS_Image* i) {
  * Sets the entities attributes according to the attributes
  * that come from a DXF file.
  */
-void RS_FilterDXF::setEntityAttributes(RS_Entity* entity,
+void FilterDXF::setEntityAttributes(Entity* entity,
                                        const DL_Attributes& attrib) {
-    RS_DEBUG->print("RS_FilterDXF::setEntityAttributes");
+    DEBUG->print("FilterDXF::setEntityAttributes");
 
-    RS_Pen pen;
+    Pen pen;
     pen.setColor(Qt::black);
     pen.setLineType(RS2::SolidLine);
 
@@ -2356,16 +2356,16 @@ void RS_FilterDXF::setEntityAttributes(RS_Entity* entity,
     pen.setWidth(numberToWidth(attrib.getWidth()));
 
     entity->setPen(pen);
-    RS_DEBUG->print("RS_FilterDXF::setEntityAttributes: OK");
+    DEBUG->print("FilterDXF::setEntityAttributes: OK");
 }
 
 /**
  * Gets the entities attributes as a DL_Attributes object.
  */
-DL_Attributes RS_FilterDXF::getEntityAttributes(RS_Entity * entity)
+DL_Attributes FilterDXF::getEntityAttributes(Entity * entity)
 {
        // Layer:
-       RS_Layer * layer = entity->getLayer();
+       Layer * layer = entity->getLayer();
        QString layerName;
 
        if (layer != NULL)
@@ -2373,7 +2373,7 @@ DL_Attributes RS_FilterDXF::getEntityAttributes(RS_Entity * entity)
        else
                layerName = "NULL";
 
-       RS_Pen pen = entity->getPen(false);
+       Pen pen = entity->getPen(false);
 
        // Color:
        int color = colorToNumber(pen.getColor());
@@ -2393,14 +2393,14 @@ DL_Attributes RS_FilterDXF::getEntityAttributes(RS_Entity * entity)
 /**
  * @return Pen with the same attributes as 'attrib'.
  */
-RS_Pen RS_FilterDXF::attributesToPen(const DL_Attributes & attrib) const
+Pen FilterDXF::attributesToPen(const DL_Attributes & attrib) const
 {
     /*
     printf("converting Color %d to %s\n",
        attrib.getColor(), numberToColor(attrib.getColor()).name().toLatin1());
     */
 
-    RS_Pen pen(numberToColor(attrib.getColor()),
+    Pen pen(numberToColor(attrib.getColor()),
                numberToWidth(attrib.getWidth()),
                nameToLineType(attrib.getLineType().c_str()));
     return pen;
@@ -2409,13 +2409,13 @@ RS_Pen RS_FilterDXF::attributesToPen(const DL_Attributes & attrib) const
 
 
 /**
- * Converts a color index (num) into a RS_Color object.
+ * Converts a color index (num) into a Color object.
  * Please refer to the dxflib documentation for details.
  *
  * @param num Color number.
  * @param comp Compatibility with older QCad versions (1.5.3 and older)
  */
-RS_Color RS_FilterDXF::numberToColor(int num, bool comp) {
+Color FilterDXF::numberToColor(int num, bool comp) {
     // Compatibility with QCad 1.5.3 and older:
     if (comp) {
         switch(num) {
@@ -2472,20 +2472,20 @@ RS_Color RS_FilterDXF::numberToColor(int num, bool comp) {
         }
     } else {
         if (num==0) {
-            return RS_Color(RS2::FlagByBlock);
+            return Color(RS2::FlagByBlock);
         } else if (num==256) {
-            return RS_Color(RS2::FlagByLayer);
+            return Color(RS2::FlagByLayer);
         } else if (num<=255 && num>=0) {
-            return RS_Color((int)(dxfColors[num][0]*255),
+            return Color((int)(dxfColors[num][0]*255),
                             (int)(dxfColors[num][1]*255),
                             (int)(dxfColors[num][2]*255));
         } else {
-            RS_DEBUG->print(RS_Debug::D_WARNING,
-                               "RS_FilterDXF::numberToColor: Invalid color number given.");
-            return RS_Color(RS2::FlagByLayer);
+            DEBUG->print(Debug::D_WARNING,
+                               "FilterDXF::numberToColor: Invalid color number given.");
+            return Color(RS2::FlagByLayer);
         }
     }
-    return RS_Color();
+    return Color();
 }
 
 
@@ -2494,7 +2494,7 @@ RS_Color RS_FilterDXF::numberToColor(int num, bool comp) {
  * Converts a color into a color number in the DXF palette.
  * The color that fits best is chosen.
  */
-int RS_FilterDXF::colorToNumber(const RS_Color& col) {
+int FilterDXF::colorToNumber(const Color& col) {
 
     //printf("Searching color for %s\n", col.name().toLatin1());
 
@@ -2548,7 +2548,7 @@ int RS_FilterDXF::colorToNumber(const RS_Color& col) {
  * Converts a line type name (e.g. "CONTINUOUS") into a RS2::LineType
  * object.
  */
-RS2::LineType RS_FilterDXF::nameToLineType(const QString & name)
+RS2::LineType FilterDXF::nameToLineType(const QString & name)
 {
        QString uName = name.toUpper();
 
@@ -2601,9 +2601,9 @@ RS2::LineType RS_FilterDXF::nameToLineType(const QString & name)
 }
 
 /**
- * Converts a RS_LineType into a name for a line type.
+ * Converts a LineType into a name for a line type.
  */
-QString RS_FilterDXF::lineTypeToName(RS2::LineType lineType)
+QString FilterDXF::lineTypeToName(RS2::LineType lineType)
 {
     // Standard linetypes for QCad II / AutoCAD
     switch (lineType)
@@ -2689,9 +2689,9 @@ QString RS_FilterDXF::lineTypeToName(RS2::LineType lineType)
 
 
 /**
- * Converts a RS_LineType into a name for a line type.
+ * Converts a LineType into a name for a line type.
  */
-/*QString RS_FilterDXF::lineTypeToDescription(RS2::LineType lineType) {
+/*QString FilterDXF::lineTypeToDescription(RS2::LineType lineType) {
 
     // Standard linetypes for QCad II / AutoCAD
     switch (lineType) {
@@ -2721,7 +2721,7 @@ QString RS_FilterDXF::lineTypeToName(RS2::LineType lineType)
 /**
  * Converts a line width number (e.g. 1) into a RS2::LineWidth.
  */
-RS2::LineWidth RS_FilterDXF::numberToWidth(int num) {
+RS2::LineWidth FilterDXF::numberToWidth(int num) {
     switch (num) {
     case -1:
         return RS2::WidthByLayer;
@@ -2792,7 +2792,7 @@ RS2::LineWidth RS_FilterDXF::numberToWidth(int num) {
 /**
  * Converts a RS2::LineWidth into an int width.
  */
-int RS_FilterDXF::widthToNumber(RS2::LineWidth width) {
+int FilterDXF::widthToNumber(RS2::LineWidth width) {
     switch (width) {
     case RS2::WidthByLayer:
         return -1;
@@ -2818,7 +2818,7 @@ int RS_FilterDXF::widthToNumber(RS2::LineWidth width) {
  * - %%%d for a degree sign
  * - %%%p for a plus/minus sign
  */
-QString RS_FilterDXF::toDxfString(const QString & string)
+QString FilterDXF::toDxfString(const QString & string)
 {
        /*
        QString res = string;
@@ -2880,7 +2880,7 @@ QString RS_FilterDXF::toDxfString(const QString & string)
 /**
  * Converts a DXF encoded string into a native Unicode string.
  */
-QString RS_FilterDXF::toNativeString(const QString & string)
+QString FilterDXF::toNativeString(const QString & string)
 {
        QString res = string;
        // Line feed:
@@ -2952,8 +2952,8 @@ QString RS_FilterDXF::toNativeString(const QString & string)
        res = res.replace("}", "");
        res = res.replace("#curly#", "}");
 
-       RS_DEBUG->print("RS_FilterDXF::toNativeString:");
-       RS_DEBUG->printUnicode(res);
+       DEBUG->print("FilterDXF::toNativeString:");
+       DEBUG->printUnicode(res);
        return res;
 }
 
@@ -2965,7 +2965,7 @@ QString RS_FilterDXF::toNativeString(const QString & string)
  *
  * @ret Matching AngleFormat enum value.
  */
-RS2::AngleFormat RS_FilterDXF::numberToAngleFormat(int num) {
+RS2::AngleFormat FilterDXF::numberToAngleFormat(int num) {
 
     RS2::AngleFormat af;
 
@@ -2995,7 +2995,7 @@ RS2::AngleFormat RS_FilterDXF::numberToAngleFormat(int num) {
 /**
  * Converts AngleFormat enum to DXF number.
  */
-int RS_FilterDXF::angleFormatToNumber(RS2::AngleFormat af) {
+int FilterDXF::angleFormatToNumber(RS2::AngleFormat af) {
 
     int num;
 
@@ -3026,7 +3026,7 @@ int RS_FilterDXF::angleFormatToNumber(RS2::AngleFormat af) {
 /**
  * converts a DXF unit setting (e.g. INSUNITS) to a unit enum.
  */
-RS2::Unit RS_FilterDXF::numberToUnit(int num) {
+RS2::Unit FilterDXF::numberToUnit(int num) {
     switch (num) {
     default:
     case  0:
@@ -3102,7 +3102,7 @@ RS2::Unit RS_FilterDXF::numberToUnit(int num) {
 /**
  * Converst a unit enum into a DXF unit number e.g. for INSUNITS.
  */
-int RS_FilterDXF::unitToNumber(RS2::Unit unit) {
+int FilterDXF::unitToNumber(RS2::Unit unit) {
     switch (unit) {
     default:
     case RS2::None:
@@ -3178,7 +3178,7 @@ int RS_FilterDXF::unitToNumber(RS2::Unit unit) {
 /**
  * Checks if the given variable is two-dimensional (e.g. $LIMMIN).
  */
-bool RS_FilterDXF::isVariableTwoDimensional(const QString& var) {
+bool FilterDXF::isVariableTwoDimensional(const QString& var) {
     if (var=="$LIMMIN" ||
             var=="$LIMMAX" ||
             var=="$PLIMMIN" ||
index 1287da10d6e6afccb8cc13ecd77655e1e091a1e1..70801e049b83149ab0b3cd589e1d3ad10ca1d610 100644 (file)
@@ -28,11 +28,11 @@ class DL_WriterA;
  *
  * @author Andrew Mustun
  */
-class RS_FilterDXF: public RS_FilterInterface, DL_CreationInterface
+class FilterDXF: public FilterInterface, DL_CreationInterface
 {
        public:
-               RS_FilterDXF();
-               ~RS_FilterDXF();
+               FilterDXF();
+               ~FilterDXF();
 
                /**
                * @return RS2::FormatDXF.
@@ -74,7 +74,7 @@ class RS_FilterDXF: public RS_FilterInterface, DL_CreationInterface
                virtual void addMText(const DL_MTextData & data);
                virtual void addText(const DL_TextData & data);
                //virtual void addDimension(const DL_DimensionData& data);
-               RS_DimensionData convDimensionData(const DL_DimensionData & data);
+               DimensionData convDimensionData(const DL_DimensionData & data);
                virtual void addDimAlign(const DL_DimensionData & data, const DL_DimAlignedData & edata);
                virtual void addDimLinear(const DL_DimensionData & data, const DL_DimLinearData & edata);
                virtual void addDimRadial(const DL_DimensionData & data, const DL_DimRadialData & edata);
@@ -100,44 +100,44 @@ class RS_FilterDXF: public RS_FilterInterface, DL_CreationInterface
                virtual bool fileExport(Drawing & g, const QString & file, RS2::FormatType type);
 
                void writeVariables(DL_WriterA & dw);
-               void writeLayer(DL_WriterA & dw, RS_Layer * l);
+               void writeLayer(DL_WriterA & dw, Layer * l);
                void writeLineType(DL_WriterA & dw, RS2::LineType t);
                void writeAppid(DL_WriterA & dw, const char * appid);
-               void writeBlock(DL_WriterA & dw, RS_Block * blk);
-               void writeEntity(DL_WriterA & dw, RS_Entity * e);
-               void writeEntity(DL_WriterA & dw, RS_Entity * e, const DL_Attributes & attrib);
-               void writePoint(DL_WriterA & dw, RS_Point * p, const DL_Attributes & attrib);
-               void writeLine(DL_WriterA & dw, RS_Line * l, const DL_Attributes & attrib);
-               void writePolyline(DL_WriterA & dw, RS_Polyline * l, const DL_Attributes & attrib);
-               void writeSpline(DL_WriterA & dw, RS_Spline * s, const DL_Attributes & attrib);
-               void writeCircle(DL_WriterA & dw, RS_Circle * c, const DL_Attributes & attrib);
-               void writeArc(DL_WriterA & dw, RS_Arc * a, const DL_Attributes & attrib);
-               void writeEllipse(DL_WriterA & dw, RS_Ellipse * s, const DL_Attributes & attrib);
-               void writeInsert(DL_WriterA & dw, RS_Insert * i, const DL_Attributes & attrib);
-               void writeText(DL_WriterA & dw, RS_Text * t, const DL_Attributes & attrib);
-               void writeDimension(DL_WriterA & dw, RS_Dimension * d, const DL_Attributes & attrib);
-               void writeLeader(DL_WriterA & dw, RS_Leader * l, const DL_Attributes & attrib);
-               void writeHatch(DL_WriterA & dw, RS_Hatch * h, const DL_Attributes & attrib);
-               void writeSolid(DL_WriterA & dw, RS_Solid * s, const DL_Attributes & attrib);
-               void writeImage(DL_WriterA & dw, RS_Image * i, const DL_Attributes & attrib);
-               void writeEntityContainer(DL_WriterA & dw, RS_EntityContainer * con,
+               void writeBlock(DL_WriterA & dw, Block * blk);
+               void writeEntity(DL_WriterA & dw, Entity * e);
+               void writeEntity(DL_WriterA & dw, Entity * e, const DL_Attributes & attrib);
+               void writePoint(DL_WriterA & dw, Point * p, const DL_Attributes & attrib);
+               void writeLine(DL_WriterA & dw, Line * l, const DL_Attributes & attrib);
+               void writePolyline(DL_WriterA & dw, Polyline * l, const DL_Attributes & attrib);
+               void writeSpline(DL_WriterA & dw, Spline * s, const DL_Attributes & attrib);
+               void writeCircle(DL_WriterA & dw, Circle * c, const DL_Attributes & attrib);
+               void writeArc(DL_WriterA & dw, Arc * a, const DL_Attributes & attrib);
+               void writeEllipse(DL_WriterA & dw, Ellipse * s, const DL_Attributes & attrib);
+               void writeInsert(DL_WriterA & dw, Insert * i, const DL_Attributes & attrib);
+               void writeText(DL_WriterA & dw, Text * t, const DL_Attributes & attrib);
+               void writeDimension(DL_WriterA & dw, Dimension * d, const DL_Attributes & attrib);
+               void writeLeader(DL_WriterA & dw, Leader * l, const DL_Attributes & attrib);
+               void writeHatch(DL_WriterA & dw, Hatch * h, const DL_Attributes & attrib);
+               void writeSolid(DL_WriterA & dw, Solid * s, const DL_Attributes & attrib);
+               void writeImage(DL_WriterA & dw, Image * i, const DL_Attributes & attrib);
+               void writeEntityContainer(DL_WriterA & dw, EntityContainer * con,
                        const DL_Attributes & attrib);
-               void writeAtomicEntities(DL_WriterA & dw, RS_EntityContainer * c,
+               void writeAtomicEntities(DL_WriterA & dw, EntityContainer * c,
                        const DL_Attributes & attrib, RS2::ResolveLevel level);
 
-               void writeImageDef(DL_WriterA & dw, RS_Image * i);
+               void writeImageDef(DL_WriterA & dw, Image * i);
 
-               void setEntityAttributes(RS_Entity * entity, const DL_Attributes& attrib);
-               DL_Attributes getEntityAttributes(RS_Entity * entity);
+               void setEntityAttributes(Entity * entity, const DL_Attributes& attrib);
+               DL_Attributes getEntityAttributes(Entity * entity);
 
                static QString toDxfString(const QString & string);
                static QString toNativeString(const QString & string);
 
        public:
-               RS_Pen attributesToPen(const DL_Attributes & attrib) const;
+               Pen attributesToPen(const DL_Attributes & attrib) const;
 
-               static RS_Color numberToColor(int num, bool comp = false);
-               static int colorToNumber(const RS_Color & col);
+               static Color numberToColor(int num, bool comp = false);
+               static int colorToNumber(const Color & col);
 
                static RS2::LineType nameToLineType(const QString& name);
                static QString lineTypeToName(RS2::LineType lineType);
@@ -162,21 +162,21 @@ class RS_FilterDXF: public RS_FilterInterface, DL_CreationInterface
                /** string for concatinating text parts of MTEXT entities. */
                QString mtext;
                /** Pointer to current polyline entity we're adding vertices to. */
-               RS_Polyline * polyline;
+               Polyline * polyline;
                /** Pointer to current spline entity we're adding control points to. */
-               RS_Spline * spline;
+               Spline * spline;
                /** Pointer to current leader entity we're adding vertices to. */
-               RS_Leader * leader;
+               Leader * leader;
                /** Pointer to current entity container (either block or graphic) */
-               RS_EntityContainer * currentContainer;
+               EntityContainer * currentContainer;
 
                /** Pointer to current hatch or NULL. */
-               RS_Hatch * hatch;
+               Hatch * hatch;
                /** Pointer to current hatch loop or NULL. */
-               RS_EntityContainer * hatchLoop;
+               EntityContainer * hatchLoop;
 
                DL_Dxf dxf;
-               RS_VariableDict variables;
+               VariableDict variables;
 };
 
 #endif // __FILTERDXF_H__
index 4a03ad5a4eb765df7c6a088fb7da6fe1de6bfd98..75dbbafc60fef9fa4ad66af813602e78ac9e5de4 100644 (file)
@@ -31,9 +31,9 @@
 /**
  * Default constructor.
  */
-RS_FilterDXF1::RS_FilterDXF1(): RS_FilterInterface()
+FilterDXF1::FilterDXF1(): FilterInterface()
 {
-       RS_DEBUG->print("Setting up DXF 1 filter...");
+       DEBUG->print("Setting up DXF 1 filter...");
        graphic = NULL;
        addImportFormat(RS2::FormatDXF1);
 }
@@ -46,9 +46,9 @@ RS_FilterDXF1::RS_FilterDXF1(): RS_FilterInterface()
  * will be created or the graphics from which the entities are
  * taken to be stored in a file.
  */
-bool RS_FilterDXF1::fileImport(Drawing& g, const QString& file, RS2::FormatType /*type*/)
+bool FilterDXF1::fileImport(Drawing& g, const QString& file, RS2::FormatType /*type*/)
 {
-       RS_DEBUG->print("DXF1 Filter: importing file '%s'...", file.toLatin1().data());
+       DEBUG->print("DXF1 Filter: importing file '%s'...", file.toLatin1().data());
 
        this->graphic = &g;
 
@@ -73,9 +73,9 @@ bool RS_FilterDXF1::fileImport(Drawing& g, const QString& file, RS2::FormatType
 /**
  * Reads a dxf1 file from buffer.
  */
-bool RS_FilterDXF1::readFromBuffer()
+bool FilterDXF1::readFromBuffer()
 {
-       RS_DEBUG->print("\nDXF: Read from buffer");
+       DEBUG->print("\nDXF: Read from buffer");
 
        bool      ret;                    // returned value
        QString dxfLine;                // A line in the dxf file
@@ -93,38 +93,38 @@ bool RS_FilterDXF1::readFromBuffer()
        QString lastLayer;              // Last used layer name (test adding only
        //   if the new layer!=lastLayer)
        //int       currentLayerNum=0;      // Current layer number
-       RS_Layer * currentLayer = 0;         // Pointer to current layer
+       Layer * currentLayer = 0;         // Pointer to current layer
        //QList<RGraphic> blockList;        // List of blocks
        //blockList.setAutoDelete( true );
        //bool      oldColorNumbers=false;  // use old color numbers (qcad<1.5.3)
-       RS_Pen pen;
+       Pen pen;
 
        ///if(!add) graphic->clearLayers();
 
        //graphic->addLayer(DEF_DEFAULTLAYER);
 
-       //RS_DEBUG->print( "\nDefault layer added" );
+       //DEBUG->print( "\nDefault layer added" );
 
        // Loaded graphics without unit information: load as unit less:
        //graphic->setUnit( None );
 
-       RS_DEBUG->print("\nUnit set");
+       DEBUG->print("\nUnit set");
 
        resetBufP();
 
        if (fBuf)
        {
-               RS_DEBUG->print("\nBuffer OK");
-               RS_DEBUG->print("\nBuffer: ");
-               RS_DEBUG->print(fBuf);
+               DEBUG->print("\nBuffer OK");
+               DEBUG->print("\nBuffer: ");
+               DEBUG->print(fBuf);
 
                do
                {
                        dxfLine = getBufLine();
-                       pen = RS_Pen(RS_Color(RS2::FlagByLayer), RS2::WidthByLayer, RS2::LineByLayer);
+                       pen = Pen(Color(RS2::FlagByLayer), RS2::WidthByLayer, RS2::LineByLayer);
 
-                       RS_DEBUG->print("\ndxfLine: ");
-                       RS_DEBUG->print(dxfLine.toAscii().data());
+                       DEBUG->print("\ndxfLine: ");
+                       DEBUG->print(dxfLine.toAscii().data());
 
                        // $-Setting in the header of DXF found
                        //
@@ -374,7 +374,7 @@ bool RS_FilterDXF1::readFromBuffer()
                                                        if (!dxfLine.isEmpty())
                                                        {
                                                                graphic->addVariable("$DIMADEC", dxfLine, 70);
-                                                               //graphic->setAngleDimensionExactness( RS_Math::pow(0.1, dxfLine.toInt()) );
+                                                               //graphic->setAngleDimensionExactness( Math::pow(0.1, dxfLine.toInt()) );
                                                        }
                                                }
                                }
@@ -520,7 +520,7 @@ bool RS_FilterDXF1::readFromBuffer()
                                                                        if (dxfLine=="(null)" || dxfLine=="default") {
                                                                                dxfLine = "0";
                                                                        }
-                                                                       graphic->addLayer(new RS_Layer(dxfLine));
+                                                                       graphic->addLayer(new Layer(dxfLine));
                                                                        graphic->activateLayer(dxfLine);
                                                                        currentLayer = graphic->getActiveLayer();
                                                                        lastLayer=dxfLine;
@@ -537,14 +537,14 @@ bool RS_FilterDXF1::readFromBuffer()
                                                                case  6:  // style
                                                                        //if(currentLayer)
                                                                        //currentLayer->setStyle( graphic->nameToStyle(dxfLine) );
-                                                                       pen.setLineType(RS_FilterDXF::nameToLineType(dxfLine));
+                                                                       pen.setLineType(FilterDXF::nameToLineType(dxfLine));
                                                                        break;
                                                                case 39:  // Thickness
                                                                        //if(currentLayer) currentLayer->setWidth(dxfLine.toInt());
-                                                                       pen.setWidth(RS_FilterDXF::numberToWidth(dxfLine.toInt()));
+                                                                       pen.setWidth(FilterDXF::numberToWidth(dxfLine.toInt()));
                                                                        break;
                                                                case 62:  // Color
-                                                                       pen.setColor(RS_FilterDXF::numberToColor(dxfLine.toInt()));
+                                                                       pen.setColor(FilterDXF::numberToColor(dxfLine.toInt()));
                                                                        //if(currentLayer) {
                                                                        //      currentLayer->setColor( graphic->numberToColor(dxfLine.toInt(), !oldColorNumbers));
                                                                        //}
@@ -579,7 +579,7 @@ bool RS_FilterDXF1::readFromBuffer()
                                                        if(!dxfLine.isEmpty()) {
                                                                switch(code) {
                                                                case  6:  // style
-                                                                       pen.setLineType(RS_FilterDXF::nameToLineType(dxfLine));
+                                                                       pen.setLineType(FilterDXF::nameToLineType(dxfLine));
                                                                        break;
                                                                case  8:  // Layer
                                                                        //if(dxfLine!=lastLayer) {
@@ -599,10 +599,10 @@ bool RS_FilterDXF1::readFromBuffer()
                                                                        vy1 = dxfLine.toDouble();
                                                                        break;
                                                                case 39:  // Thickness
-                                                                       pen.setWidth(RS_FilterDXF::numberToWidth(dxfLine.toInt()));
+                                                                       pen.setWidth(FilterDXF::numberToWidth(dxfLine.toInt()));
                                                                        break;
                                                                case 62:  // Color
-                                                                       pen.setColor(RS_FilterDXF::numberToColor(dxfLine.toInt()));
+                                                                       pen.setColor(FilterDXF::numberToColor(dxfLine.toInt()));
                                                                        break;
                                                                default:
                                                                        break;
@@ -613,8 +613,8 @@ bool RS_FilterDXF1::readFromBuffer()
                                        while(!dxfCode.isEmpty() && code != 0);
 
                                        graphic->setActivePen(pen);
-                                       graphic->addEntity(new RS_Point(graphic,
-                                                                                                       RS_PointData(Vector(vx1, vy1))));
+                                       graphic->addEntity(new Point(graphic,
+                                                                                                       PointData(Vector(vx1, vy1))));
                                }
 
                                // -----
@@ -633,7 +633,7 @@ bool RS_FilterDXF1::readFromBuffer()
                                                        if(!dxfLine.isEmpty()) {
                                                                switch(code) {
                                                                case  6:  // style
-                                                                       pen.setLineType(RS_FilterDXF::nameToLineType(dxfLine));
+                                                                       pen.setLineType(FilterDXF::nameToLineType(dxfLine));
                                                                        break;
                                                                case  8:  // Layer
                                                                        //if(dxfLine!=lastLayer) {
@@ -661,10 +661,10 @@ bool RS_FilterDXF1::readFromBuffer()
                                                                        vy2 = dxfLine.toDouble();
                                                                        break;
                                                                case 39:  // Thickness
-                                                                       pen.setWidth(RS_FilterDXF::numberToWidth(dxfLine.toInt()));
+                                                                       pen.setWidth(FilterDXF::numberToWidth(dxfLine.toInt()));
                                                                        break;
                                                                case 62:  // Color
-                                                                       pen.setColor(RS_FilterDXF::numberToColor(dxfLine.toInt()));
+                                                                       pen.setColor(FilterDXF::numberToColor(dxfLine.toInt()));
                                                                        break;
                                                                default:
                                                                        break;
@@ -676,8 +676,8 @@ bool RS_FilterDXF1::readFromBuffer()
                                        //if(!mtCompFloat(vx1, vx2) || !mtCompFloat(vy1, vy2)) {
                                        //graphic->addLine(vx1, vy1, vx2, vy2, currentLayerNum, add);
                                        graphic->setActivePen(pen);
-                                       graphic->addEntity(new RS_Line(graphic,
-                                                                                               RS_LineData(Vector(vx1, vy1), Vector(vx2, vy2))));
+                                       graphic->addEntity(new Line(graphic,
+                                                                                               LineData(Vector(vx1, vy1), Vector(vx2, vy2))));
                                        //}
                                }
 
@@ -695,7 +695,7 @@ bool RS_FilterDXF1::readFromBuffer()
                                                        if(!dxfLine.isEmpty()) {
                                                                switch(code) {
                                                                case  6:  // style
-                                                                       pen.setLineType(RS_FilterDXF::nameToLineType(dxfLine));
+                                                                       pen.setLineType(FilterDXF::nameToLineType(dxfLine));
                                                                        break;
                                                                case  8:  // Layer
                                                                        //if(dxfLine!=lastLayer) {
@@ -720,17 +720,17 @@ bool RS_FilterDXF1::readFromBuffer()
                                                                        break;
                                                                case 50:  // Start Angle
                                                                        dxfLine.replace( QRegExp(","), "." );
-                                                                       va1 = RS_Math::correctAngle(dxfLine.toDouble()/ARAD);
+                                                                       va1 = Math::correctAngle(dxfLine.toDouble()/ARAD);
                                                                        break;
                                                                case 51:  // End Angle
                                                                        dxfLine.replace( QRegExp(","), "." );
-                                                                       va2 = RS_Math::correctAngle(dxfLine.toDouble()/ARAD);
+                                                                       va2 = Math::correctAngle(dxfLine.toDouble()/ARAD);
                                                                        break;
                                                                case 39:  // Thickness
-                                                                       pen.setWidth(RS_FilterDXF::numberToWidth(dxfLine.toInt()));
+                                                                       pen.setWidth(FilterDXF::numberToWidth(dxfLine.toInt()));
                                                                        break;
                                                                case 62:  // Color
-                                                                       pen.setColor(RS_FilterDXF::numberToColor(dxfLine.toInt()));
+                                                                       pen.setColor(FilterDXF::numberToColor(dxfLine.toInt()));
                                                                        break;
                                                                default:
                                                                        break;
@@ -742,8 +742,8 @@ bool RS_FilterDXF1::readFromBuffer()
                                        //  graphic->addArc(vcx, vcy, vcr, va1, va2, false, currentLayerNum, add);
                                        //}
                                        graphic->setActivePen(pen);
-                                       graphic->addEntity(new RS_Arc(graphic,
-                                                                                               RS_ArcData(Vector(vcx, vcy),
+                                       graphic->addEntity(new Arc(graphic,
+                                                                                               ArcData(Vector(vcx, vcy),
                                                                                                                        vcr, va1, va2, false)));
                                }
 
@@ -760,7 +760,7 @@ bool RS_FilterDXF1::readFromBuffer()
                                                        if(!dxfLine.isEmpty()) {
                                                                switch(code) {
                                                                case  6:  // style
-                                                                       pen.setLineType(RS_FilterDXF::nameToLineType(dxfLine));
+                                                                       pen.setLineType(FilterDXF::nameToLineType(dxfLine));
                                                                        break;
                                                                case  8:  // Layer
                                                                        //if(dxfLine!=lastLayer) {
@@ -784,10 +784,10 @@ bool RS_FilterDXF1::readFromBuffer()
                                                                        vcr = dxfLine.toDouble();
                                                                        break;
                                                                case 39:  // Thickness
-                                                                       pen.setWidth(RS_FilterDXF::numberToWidth(dxfLine.toInt()));
+                                                                       pen.setWidth(FilterDXF::numberToWidth(dxfLine.toInt()));
                                                                        break;
                                                                case 62:  // Color
-                                                                       pen.setColor(RS_FilterDXF::numberToColor(dxfLine.toInt()));
+                                                                       pen.setColor(FilterDXF::numberToColor(dxfLine.toInt()));
                                                                        break;
                                                                default:
                                                                        break;
@@ -799,8 +799,8 @@ bool RS_FilterDXF1::readFromBuffer()
                                        graphic->addCircle(vcx, vcy, vcr, 0.0, 360.0, false, currentLayerNum, add);
                                }*/
                                        graphic->setActivePen(pen);
-                                       graphic->addEntity(new RS_Circle(graphic,
-                                                                                                       RS_CircleData(Vector(vcx, vcy),
+                                       graphic->addEntity(new Circle(graphic,
+                                                                                                       CircleData(Vector(vcx, vcy),
                                                                                                                                vcr)));
                                }
 
@@ -905,7 +905,7 @@ bool RS_FilterDXF1::readFromBuffer()
                                                                        break;
 
                                                                case  6:  // style
-                                                                       pen.setLineType(RS_FilterDXF::nameToLineType(dxfLine));
+                                                                       pen.setLineType(FilterDXF::nameToLineType(dxfLine));
                                                                        break;
 
                                                                case  7:
@@ -1018,10 +1018,10 @@ bool RS_FilterDXF1::readFromBuffer()
                                                                        }
                                                                        break;
                                                                case 39:  // Thickness
-                                                                       pen.setWidth(RS_FilterDXF::numberToWidth(dxfLine.toInt()));
+                                                                       pen.setWidth(FilterDXF::numberToWidth(dxfLine.toInt()));
                                                                        break;
                                                                case 62:  // Color
-                                                                       pen.setColor(RS_FilterDXF::numberToColor(dxfLine.toInt()));
+                                                                       pen.setColor(FilterDXF::numberToColor(dxfLine.toInt()));
                                                                        break;
                                                                default:
                                                                        break;
@@ -1039,8 +1039,8 @@ bool RS_FilterDXF1::readFromBuffer()
                                        }
 
                                        graphic->addEntity(
-                                               new RS_Text(graphic,
-                                                                       RS_TextData(
+                                               new Text(graphic,
+                                                                       TextData(
                                                                                Vector(vx1, vy1),
                                                                                vheight,
                                                                                100.0,
@@ -1090,7 +1090,7 @@ bool RS_FilterDXF1::readFromBuffer()
                                                                                strDecodeDxfString(dimText);
                                                                        break;
                                                                case  6:  // style
-                                                                       pen.setLineType(RS_FilterDXF::nameToLineType(dxfLine));
+                                                                       pen.setLineType(FilterDXF::nameToLineType(dxfLine));
                                                                        break;
                                                                case  8:  // Layer
                                                                        //if(dxfLine!=lastLayer) {
@@ -1153,10 +1153,10 @@ bool RS_FilterDXF1::readFromBuffer()
                                                                        typ = dxfLine.toInt();
                                                                        break;
                                                                case 39:  // Thickness
-                                                                       pen.setWidth(RS_FilterDXF::numberToWidth(dxfLine.toInt()));
+                                                                       pen.setWidth(FilterDXF::numberToWidth(dxfLine.toInt()));
                                                                        break;
                                                                case 62:  // Color
-                                                                       pen.setColor(RS_FilterDXF::numberToColor(dxfLine.toInt()));
+                                                                       pen.setColor(FilterDXF::numberToColor(dxfLine.toInt()));
                                                                        break;
 
                                                                default:
@@ -1179,10 +1179,10 @@ bool RS_FilterDXF1::readFromBuffer()
                                        switch(typ) {
                                                // Horiz. / vert.:
                                        case 0: {
-                                                       RS_DimLinear* d =
-                                                               new RS_DimLinear(
+                                                       DimLinear* d =
+                                                               new DimLinear(
                                                                        graphic,
-                                                                       RS_DimensionData(
+                                                                       DimensionData(
                                                                                Vector(v10, v20),
                                                                                Vector(0.0, 0.0),
                                                                                RS2::VAlignBottom,
@@ -1193,7 +1193,7 @@ bool RS_FilterDXF1::readFromBuffer()
                                                                                "ISO-25",
                                                                                0.0
                                                                        ),
-                                                                       RS_DimLinearData(
+                                                                       DimLinearData(
                                                                                Vector(v13, v23),
                                                                                Vector(v14, v24),
                                                                                v50/ARAD,
@@ -1216,10 +1216,10 @@ bool RS_FilterDXF1::readFromBuffer()
                                                        defP.setPolar(dist, angle);
                                                        defP+=Vector(v14, v24);
 
-                                                       RS_DimAligned* d =
-                                                               new RS_DimAligned(
+                                                       DimAligned* d =
+                                                               new DimAligned(
                                                                        graphic,
-                                                                       RS_DimensionData(
+                                                                       DimensionData(
                                                                                defP,
                                                                                Vector(0.0, 0.0),
                                                                                RS2::VAlignBottom,
@@ -1230,7 +1230,7 @@ bool RS_FilterDXF1::readFromBuffer()
                                                                                "ISO-25",
                                                                                0.0
                                                                        ),
-                                                                       RS_DimAlignedData(
+                                                                       DimAlignedData(
                                                                                Vector(v13, v23),
                                                                                Vector(v14, v24)
                                                                        )
@@ -1242,18 +1242,18 @@ bool RS_FilterDXF1::readFromBuffer()
 
                                                // Angle:
                                        case 2: {
-                                                       RS_Line tl1(NULL,
-                                                                               RS_LineData(Vector(v13, v23),
+                                                       Line tl1(NULL,
+                                                                               LineData(Vector(v13, v23),
                                                                                                        Vector(v14, v24)));
-                                                       RS_Line tl2(NULL,
-                                                                               RS_LineData(Vector(v10, v20),
+                                                       Line tl2(NULL,
+                                                                               LineData(Vector(v10, v20),
                                                                                                        Vector(v15, v25)));
 
                                                        VectorSolutions s;
                                                        //bool inters=false;
                                                        //tmpEl1.getIntersection(&tmpEl2,
                                                        //                       &inters, &vcx, &vcy, 0,0,0,0, false);
-                                                       s = RS_Information::getIntersection(
+                                                       s = Information::getIntersection(
                                                                        &tl1, &tl2, false);
 
                                                        if (s.get(0).valid) {
@@ -1284,10 +1284,10 @@ bool RS_FilterDXF1::readFromBuffer()
                                                                */
                                                                //Vector dp4;
                                                                //dp4.setPolar();
-                                                               RS_DimAngular* d =
-                                                                       new RS_DimAngular(
+                                                               DimAngular* d =
+                                                                       new DimAngular(
                                                                                graphic,
-                                                                               RS_DimensionData(
+                                                                               DimensionData(
                                                                                        Vector(v10, v20),
                                                                                        Vector(0.0, 0.0),
                                                                                        RS2::VAlignBottom,
@@ -1298,7 +1298,7 @@ bool RS_FilterDXF1::readFromBuffer()
                                                                                        "ISO-25",
                                                                                        0.0
                                                                                ),
-                                                                               RS_DimAngularData(
+                                                                               DimAngularData(
                                                                                        Vector(v13, v23),
                                                                                        Vector(vcx, vcy),
                                                                                        Vector(vcx, vcy),
@@ -1327,10 +1327,10 @@ bool RS_FilterDXF1::readFromBuffer()
                                                                .angleTo(Vector(v15, v25));
                                                        Vector v2;
                                                        v2.setPolar(v40, ang);
-                                                       RS_DimRadial* d =
-                                                               new RS_DimRadial(
+                                                       DimRadial* d =
+                                                               new DimRadial(
                                                                        graphic,
-                                                                       RS_DimensionData(
+                                                                       DimensionData(
                                                                                Vector(v10, v20),
                                                                                Vector(0.0, 0.0),
                                                                                RS2::VAlignBottom,
@@ -1341,7 +1341,7 @@ bool RS_FilterDXF1::readFromBuffer()
                                                                                "ISO-25",
                                                                                0.0
                                                                        ),
-                                                                       RS_DimRadialData(
+                                                                       DimRadialData(
                                                                                Vector(v10, v20) + v2,
                                                                                0.0
                                                                        )
@@ -1366,10 +1366,10 @@ bool RS_FilterDXF1::readFromBuffer()
                                                                .angleTo(Vector(v15, v25));
                                                        Vector v2;
                                                        v2.setPolar(v40, ang);
-                                                       RS_DimDiametric* d =
-                                                               new RS_DimDiametric(
+                                                       DimDiametric* d =
+                                                               new DimDiametric(
                                                                        graphic,
-                                                                       RS_DimensionData(
+                                                                       DimensionData(
                                                                                Vector(v10, v20),
                                                                                Vector(0.0, 0.0),
                                                                                RS2::VAlignBottom,
@@ -1380,7 +1380,7 @@ bool RS_FilterDXF1::readFromBuffer()
                                                                                "ISO-25",
                                                                                0.0
                                                                        ),
-                                                                       RS_DimDiametricData(
+                                                                       DimDiametricData(
                                                                                Vector(v10, v20) + v2,
                                                                                0.0
                                                                        )
@@ -1388,9 +1388,9 @@ bool RS_FilterDXF1::readFromBuffer()
                                                        d->update();
                                                        graphic->addEntity(d);
                                                        */
-                                                       RS_LeaderData data(true);
-                                                       RS_Leader* d =
-                                                               new RS_Leader(graphic, data);
+                                                       LeaderData data(true);
+                                                       Leader* d =
+                                                               new Leader(graphic, data);
                                                        d->addVertex(Vector(v14, v24));
                                                        d->addVertex(Vector(v10, v20));
                                                        d->update();
@@ -1428,7 +1428,7 @@ bool RS_FilterDXF1::readFromBuffer()
                                                                patternName = dxfLine;
                                                                break;
                                                                case  6:  // style
-                                                               pen.setLineType(RS_FilterDXF::nameToLineType(dxfLine));
+                                                               pen.setLineType(FilterDXF::nameToLineType(dxfLine));
                                                                break;
                                                                case  8:  // Layer
                                                                //  if(dxfLine!=lastLayer) {
@@ -1497,10 +1497,10 @@ bool RS_FilterDXF1::readFromBuffer()
 
                                                                break;
                                                                case 39:  // Thickness
-                                                               pen.setWidth(RS_FilterDXF::numberToWidth(dxfLine.toInt()));
+                                                               pen.setWidth(FilterDXF::numberToWidth(dxfLine.toInt()));
                                                                break;
                                                                case 62:  // Color
-                                                               pen.setColor(RS_FilterDXF::numberToColor(dxfLine.toInt()));
+                                                               pen.setColor(FilterDXF::numberToColor(dxfLine.toInt()));
                                                                break;
                                                                case 91:  // Number of boundary paths (loops)
                                                                //numPaths=dxfLine.toInt();
@@ -1559,7 +1559,7 @@ bool RS_FilterDXF1::readFromBuffer()
  * Resets  the whole object
  *   (base class too)
  */
-void RS_FilterDXF1::reset()
+void FilterDXF1::reset()
 {
        file.reset();
 
@@ -1577,7 +1577,7 @@ void RS_FilterDXF1::reset()
 /**
  * Reset buffer pointer to the beginning of the buffer:
  */
-void RS_FilterDXF1::resetBufP()
+void FilterDXF1::resetBufP()
 {
        fBufP = 0;
 }
@@ -1585,7 +1585,7 @@ void RS_FilterDXF1::resetBufP()
 /**
  * Set buffer pointer to the given index:
  */
-void RS_FilterDXF1::setBufP(int _fBufP)
+void FilterDXF1::setBufP(int _fBufP)
 {
        if (_fBufP < (int)fSize)
                fBufP = _fBufP;
@@ -1594,7 +1594,7 @@ void RS_FilterDXF1::setBufP(int _fBufP)
 /**
  * delete buffer:
  */
-void RS_FilterDXF1::delBuffer()
+void FilterDXF1::delBuffer()
 {
        if (fBuf)
        {
@@ -1606,7 +1606,7 @@ void RS_FilterDXF1::delBuffer()
 /**
  * Remove any 13-characters in the buffer:
  */
-void RS_FilterDXF1::dos2unix()
+void FilterDXF1::dos2unix()
 {
        char * src = fBuf, * dst = fBuf;
 
@@ -1632,7 +1632,7 @@ void RS_FilterDXF1::dos2unix()
 // return:  -Null-string: end of buffer
 //          -String which is the next line in buffer
 //
-QString RS_FilterDXF1::getBufLine()
+QString FilterDXF1::getBufLine()
 {
        char * ret;
        QString str;
@@ -1666,7 +1666,7 @@ QString RS_FilterDXF1::getBufLine()
 // return:  -Null-string: end of buffer
 //          -String which is the next line in buffer
 //
-char * RS_FilterDXF1::getBufLineCh()
+char * FilterDXF1::getBufLineCh()
 {
     char * ret;
 
@@ -1694,7 +1694,7 @@ char * RS_FilterDXF1::getBufLineCh()
 
 // Copy buffer from a given string:
 //
-void RS_FilterDXF1::copyBufFrom(const char * _buf)
+void FilterDXF1::copyBufFrom(const char * _buf)
 {
     if (_buf)
     {
@@ -1709,7 +1709,7 @@ void RS_FilterDXF1::copyBufFrom(const char * _buf)
 // return: true:  line found
 //         false: end of buffer
 //
-bool RS_FilterDXF1::gotoBufLine(char * _lstr)
+bool FilterDXF1::gotoBufLine(char * _lstr)
 {
     QString l;
 
@@ -1732,7 +1732,7 @@ bool RS_FilterDXF1::gotoBufLine(char * _lstr)
 //         false: end of buffer
 //
 //
-bool RS_FilterDXF1::gotoBufLineString(char * _lstr)
+bool FilterDXF1::gotoBufLineString(char * _lstr)
 {
     QString l;
 
@@ -1751,7 +1751,7 @@ bool RS_FilterDXF1::gotoBufLineString(char * _lstr)
 
 // Replace bynary Bytes (<32) by an other (given) byte:
 //
-void RS_FilterDXF1::replaceBinaryBytesBy(char _c)
+void FilterDXF1::replaceBinaryBytesBy(char _c)
 {
     int bc;
 
@@ -1767,7 +1767,7 @@ void RS_FilterDXF1::replaceBinaryBytesBy(char _c)
 
 // Separate buffer (change chars sc1 and sc2 in '\0'
 //
-void RS_FilterDXF1::separateBuf(char _c1,
+void FilterDXF1::separateBuf(char _c1,
                                 char _c2,
                                 char _c3,
                                 char _c4)
@@ -1786,7 +1786,7 @@ void RS_FilterDXF1::separateBuf(char _c1,
 // remove comment between '_fc' and '_lc'
 //   comments get replaced by '\0'
 //
-void RS_FilterDXF1::removeComment(char _fc, char _lc)
+void FilterDXF1::removeComment(char _fc, char _lc)
 {
     bool rem = false;   // Are we removing currrently?
     int bc;           // counter
@@ -1814,7 +1814,7 @@ void RS_FilterDXF1::removeComment(char _fc, char _lc)
 // return: true: successful
 //         false: file not found
 //
-bool RS_FilterDXF1::readFileInBuffer(char * _name, int _bNum)
+bool FilterDXF1::readFileInBuffer(char * _name, int _bNum)
 {
 //    file.setName(_name);
     file.setFileName(_name);
@@ -1828,7 +1828,7 @@ bool RS_FilterDXF1::readFileInBuffer(char * _name, int _bNum)
 // return: true: successful
 //         false: file not found
 //
-bool RS_FilterDXF1::readFileInBuffer(int _bNum)
+bool FilterDXF1::readFileInBuffer(int _bNum)
 {
        fPointer = fopen(name.toAscii().data(), "rb");
 
@@ -1865,7 +1865,7 @@ bool RS_FilterDXF1::readFileInBuffer(int _bNum)
 
 // Decode a DXF string to the C-convention (special character \P is a \n)
 //
-void RS_FilterDXF1::strDecodeDxfString(QString & str)
+void FilterDXF1::strDecodeDxfString(QString & str)
 {
     if (str.isEmpty())
         return;
@@ -1882,7 +1882,7 @@ void RS_FilterDXF1::strDecodeDxfString(QString & str)
 // return: true: values are equal
 //         false: values are not equal
 //
-bool RS_FilterDXF1::mtCompFloat(double _v1, double _v2, double _tol)
+bool FilterDXF1::mtCompFloat(double _v1, double _v2, double _tol)
 {
     double delta = _v2 - _v1;
 
index 422fa2c98e661bf56b56d89f3a9741434b318768..1deea27e6f331c1d4d736a6fcd43bb7933272699 100644 (file)
  *
  * @author Andrew Mustun
  */
-class RS_FilterDXF1 : public RS_FilterInterface
+class FilterDXF1 : public FilterInterface
 {
 public:
-    RS_FilterDXF1();
-    ~RS_FilterDXF1() {}
+    FilterDXF1();
+    ~FilterDXF1() {}
 
        /**
         * @return RS2::FormatDXF1.
@@ -40,7 +40,7 @@ public:
 
     virtual bool fileExport(Drawing& /*g*/, const QString& /*file*/,
                RS2::FormatType /*type*/) {
-        RS_DEBUG->print(RS_Debug::D_WARNING,
+        DEBUG->print(Debug::D_WARNING,
                         "Exporting of QCad 1.x file not implemented");
                return false;
     }
index 4b7a09151c1ba28693074ccd993205c94c441b28..3259794a437cc78efab2ad4700abf60b9239a804 100644 (file)
 /**
  * Constructor.
  */
-RS_FilterInterface::RS_FilterInterface()
+FilterInterface::FilterInterface()
 {
-       //std::cout << "RS_FilterInterface\n";
+       //std::cout << "FilterInterface\n";
        //graphic = NULL;
 }
 
 /**
  * Destructor.
  */
-/*virtual*/ RS_FilterInterface::~RS_FilterInterface()
+/*virtual*/ FilterInterface::~FilterInterface()
 {
 }
 
@@ -40,7 +40,7 @@ RS_FilterInterface::RS_FilterInterface()
  * @retval true if the filter can import the file type
  * @retval false otherwise.
  */
-/*virtual*/ bool RS_FilterInterface::canImport(RS2::FormatType t)
+/*virtual*/ bool FilterInterface::canImport(RS2::FormatType t)
 {
 //     return !(importFormats.find(t) == importFormats.end());
        return (importFormats.indexOf(t) != -1);
@@ -52,7 +52,7 @@ RS_FilterInterface::RS_FilterInterface()
  * @return true if the filter can export the file type,
  *         false otherwise.
  */
-/*virtual*/ bool RS_FilterInterface::canExport(RS2::FormatType t)
+/*virtual*/ bool FilterInterface::canExport(RS2::FormatType t)
 {
 //     return !(exportFormats.find(t) == exportFormats.end());
        return (exportFormats.indexOf(t) != -1);
@@ -61,17 +61,17 @@ RS_FilterInterface::RS_FilterInterface()
 /**
  * Adds a file extension which can be imported by this filter.
  */
-void RS_FilterInterface::addImportFormat(RS2::FormatType type)
+void FilterInterface::addImportFormat(RS2::FormatType type)
 {
-       RS_DEBUG->print("Filter can import %d", (int)type);
+       DEBUG->print("Filter can import %d", (int)type);
        importFormats += type;
 }
 
 /**
  * Adds a file extension which can be exported by this filter.
  */
-void RS_FilterInterface::addExportFormat(RS2::FormatType type)
+void FilterInterface::addExportFormat(RS2::FormatType type)
 {
-       RS_DEBUG->print("Filter can export %d", (int)type);
+       DEBUG->print("Filter can export %d", (int)type);
        exportFormats += type;
 }
index 7addd6eb064ea66d32e4e3cbd99e8abd910a45ef..3150eea970581500e108f4e7365b79d5d81250d0 100644 (file)
@@ -6,20 +6,20 @@
 
 /**
  * This is the interface that must be implemented for all
- * format filter classes. The RS_FileIO class
+ * format filter classes. The FileIO class
  * uses the methods defined in here to interact with the format
  * filter classes.
  *
  * @author Andrew Mustun
  */
-class RS_FilterInterface
+class FilterInterface
 {
        public:
                /**
                * Constructor.
                */
-               RS_FilterInterface();
-               virtual ~RS_FilterInterface();
+               FilterInterface();
+               virtual ~FilterInterface();
 
                virtual bool canImport(RS2::FormatType t);
                virtual bool canExport(RS2::FormatType t);
index 32617955a2f58e97b538a39f56dd315c88c6e905..d5b4dd5c2bbcfac85ce9779f804c117aa3417bc2 100644 (file)
 #include "flags.h"
 
 /** Default constructor. Resets all flags to 0. */
-RS_Flags::RS_Flags()
+Flags::Flags()
 {
        flags = 0;
 }
 
 /** Constructor with initialisation to the given flags. */
-RS_Flags::RS_Flags(unsigned int f)
+Flags::Flags(unsigned int f)
 {
        flags = f;
 }
 
-/*virtual*/ RS_Flags::~RS_Flags()
+/*virtual*/ Flags::~Flags()
 {
 }
 
-unsigned int RS_Flags::getFlags() const
+unsigned int Flags::getFlags() const
 {
        return flags;
 }
 
-void RS_Flags::resetFlags()
+void Flags::resetFlags()
 {
        flags = 0;
 }
 
-void RS_Flags::setFlags(unsigned int f)
+void Flags::setFlags(unsigned int f)
 {
        flags = f;
 }
 
-void RS_Flags::setFlag(unsigned int f)
+void Flags::setFlag(unsigned int f)
 {
        flags = flags | f;
 }
 
-void RS_Flags::delFlag(unsigned int f)
+void Flags::delFlag(unsigned int f)
 {
        flags = flags & (~f);
 }
 
-void RS_Flags::toggleFlag(unsigned int f)
+void Flags::toggleFlag(unsigned int f)
 {
        flags = flags ^ f;
 }
 
-bool RS_Flags::getFlag(unsigned int f) const
+bool Flags::getFlag(unsigned int f) const
 {
        return (flags & f ? true : false);
 }
index d8a7133eb7c43bab29a76e39b4d4314197a78341..29ab0e02bb238fff8adf73a83dd95bff9f50cd14 100644 (file)
@@ -6,12 +6,12 @@
  *
  * @author Andrew Mustun
  */
-class RS_Flags
+class Flags
 {
        public:
-               RS_Flags();
-               RS_Flags(unsigned int f);
-               virtual ~RS_Flags();
+               Flags();
+               Flags(unsigned int f);
+               virtual ~Flags();
 
                unsigned int getFlags() const;
                void resetFlags();
index b5a13035fccabd6bba9d9b56109cc26ad21ebc9a..33c37d536cc81638326ee30b73df816d9235929e 100644 (file)
  * @param owner true if the font owns the letters (blocks). Otherwise
  *              the letters will be deleted when the font is deleted.
  */
-RS_Font::RS_Font(const QString & fn, bool owner): letterList(owner), fileName(fn),
+Font::Font(const QString & fn, bool owner): letterList(owner), fileName(fn),
        encoding(""), loaded(false), letterSpacing(3.0), wordSpacing(6.75),
        lineSpacingFactor(1.0)
 {
 }
 
 /** @return the fileName of this font. */
-QString RS_Font::getFileName() const
+QString Font::getFileName() const
 {
        return fileName;
 }
 
 /** @return the encoding of this font. */
-QString RS_Font::getEncoding() const
+QString Font::getEncoding() const
 {
        return encoding;
 }
 
 /** @return the alternative names of this font. */
-const QStringList & RS_Font::getNames() const
+const QStringList & Font::getNames() const
 {
        return names;
 }
 
 /** @return the author(s) of this font. */
-const QStringList & RS_Font::getAuthors() const
+const QStringList & Font::getAuthors() const
 {
        return authors;
 }
 
 /** @return Default letter spacing for this font */
-double RS_Font::getLetterSpacing()
+double Font::getLetterSpacing()
 {
        return letterSpacing;
 }
 
 /** @return Default word spacing for this font */
-double RS_Font::getWordSpacing()
+double Font::getWordSpacing()
 {
        return wordSpacing;
 }
 
 /** @return Default line spacing factor for this font */
-double RS_Font::getLineSpacingFactor()
+double Font::getLineSpacingFactor()
 {
        return lineSpacingFactor;
 }
@@ -81,9 +81,9 @@ double RS_Font::getLineSpacingFactor()
  * @retval true font was already loaded or is loaded now.
  * @retval false font could not be loaded.
  */
-bool RS_Font::loadFont()
+bool Font::loadFont()
 {
-       RS_DEBUG->print("RS_Font::loadFont");
+       DEBUG->print("Font::loadFont");
 
        if (loaded)
                return true;
@@ -93,7 +93,7 @@ bool RS_Font::loadFont()
        // Search for the appropriate font if we have only the name of the font:
        if (!fileName.toLower().contains(".cxf"))
        {
-               QStringList fonts = RS_SYSTEM->getFontList();
+               QStringList fonts = SYSTEM->getFontList();
                QFileInfo file;
 
                for(QStringList::Iterator it=fonts.begin(); it!=fonts.end(); it++)
@@ -112,7 +112,7 @@ bool RS_Font::loadFont()
        // No font paths found:
        if (path.isEmpty())
        {
-               RS_DEBUG->print(RS_Debug::D_WARNING, "RS_Font::loadFont: No fonts available.");
+               DEBUG->print(Debug::D_WARNING, "Font::loadFont: No fonts available.");
                return false;
        }
 
@@ -121,12 +121,12 @@ bool RS_Font::loadFont()
 
        if (!file.open(QIODevice::ReadOnly | QIODevice::Text))
        {
-               RS_DEBUG->print(RS_Debug::D_WARNING, "RS_Font::loadFont: Cannot open font file: %s",
+               DEBUG->print(Debug::D_WARNING, "Font::loadFont: Cannot open font file: %s",
                        path.toAscii().data());
                return false;
        }
 
-       RS_DEBUG->print("RS_Font::loadFont: Successfully opened font file: %s", path.toAscii().data());
+       DEBUG->print("Font::loadFont: Successfully opened font file: %s", path.toAscii().data());
 
        QTextStream ts(&file);
 
@@ -151,12 +151,12 @@ bool RS_Font::loadFont()
 
        file.close();
        loaded = true;
-       RS_DEBUG->print("RS_Font::loadFont OK");
+       DEBUG->print("Font::loadFont OK");
 
        return true;
 }
 
-void RS_Font::ParseIdentifier(QTextStream & ts, QString line)
+void Font::ParseIdentifier(QTextStream & ts, QString line)
 {
        QStringList list = line.mid(1).split(":");
        QString identifier = "", value = "";
@@ -184,7 +184,7 @@ void RS_Font::ParseIdentifier(QTextStream & ts, QString line)
        }
 }
 
-void RS_Font::ParseCharacter(QTextStream & ts, QString line)
+void Font::ParseCharacter(QTextStream & ts, QString line)
 {
        // Unicode character:
        QChar ch;
@@ -213,7 +213,7 @@ void RS_Font::ParseCharacter(QTextStream & ts, QString line)
        }
 
        // Create new letter:
-       RS_FontChar * letter = new RS_FontChar(NULL, ch, Vector(0.0, 0.0));
+       FontChar * letter = new FontChar(NULL, ch, Vector(0.0, 0.0));
        // Read entities of this letter:
        line = ts.readLine();
 
@@ -229,9 +229,9 @@ void RS_Font::ParseCharacter(QTextStream & ts, QString line)
                        double x2 = (*it2++).toDouble();
                        double y2 = (*it2).toDouble();
 
-                       RS_LineData ld(Vector(x1, y1), Vector(x2, y2));
-                       RS_Line * line = new RS_Line(letter, ld);
-                       line->setPen(RS_Pen(RS2::FlagInvalid));
+                       LineData ld(Vector(x1, y1), Vector(x2, y2));
+                       Line * line = new Line(letter, ld);
+                       line->setPen(Pen(RS2::FlagInvalid));
                        line->setLayer(NULL);
                        letter->addEntity(line);
                }
@@ -244,9 +244,9 @@ void RS_Font::ParseCharacter(QTextStream & ts, QString line)
                        double a2 = (*it2).toDouble() / ARAD;
                        bool reversed = (line.at(1) == 'R');
 
-                       RS_ArcData ad(Vector(cx, cy), r, a1, a2, reversed);
-                       RS_Arc * arc = new RS_Arc(letter, ad);
-                       arc->setPen(RS_Pen(RS2::FlagInvalid));
+                       ArcData ad(Vector(cx, cy), r, a1, a2, reversed);
+                       Arc * arc = new Arc(letter, ad);
+                       arc->setPen(Pen(RS2::FlagInvalid));
                        arc->setLayer(NULL);
                        letter->addEntity(arc);
                }
@@ -259,22 +259,22 @@ void RS_Font::ParseCharacter(QTextStream & ts, QString line)
 }
 
 // Wrappers for block list (letters) functions
-RS_BlockList * RS_Font::getLetterList()
+BlockList * Font::getLetterList()
 {
        return &letterList;
 }
 
-RS_Block * RS_Font::findLetter(const QString & name)
+Block * Font::findLetter(const QString & name)
 {
        return letterList.find(name);
 }
 
-uint RS_Font::countLetters()
+uint Font::countLetters()
 {
        return letterList.count();
 }
 
-RS_Block * RS_Font::letterAt(uint i)
+Block * Font::letterAt(uint i)
 {
        return letterList.at(i);
 }
@@ -282,9 +282,9 @@ RS_Block * RS_Font::letterAt(uint i)
 /**
  * Dumps the fonts data to stdout.
  */
-std::ostream & operator<<(std::ostream & os, const RS_Font & f)
+std::ostream & operator<<(std::ostream & os, const Font & f)
 {
     os << " Font file name: " << f.getFileName().toLatin1().data() << "\n";
-    //<< (RS_BlockList&)f << "\n";
+    //<< (BlockList&)f << "\n";
     return os;
 }
index f47d0cf949a9e9a18cca18bd2ea9d3e3dbce6560..f2e1bbfc8dabfab3404b399de4564871b7751a27 100644 (file)
  *
  * @author Andrew Mustun
  */
-class RS_Font
+class Font
 {
-    friend class RS_FontList;
+    friend class FontList;
 
        public:
-               RS_Font(const QString & name, bool owner = true);
+               Font(const QString & name, bool owner = true);
 
                QString getFileName() const;
                QString getEncoding() const;
@@ -29,12 +29,12 @@ class RS_Font
                bool loadFont();
 
                // Wrappers for block list (letters) functions
-               RS_BlockList * getLetterList();
-               RS_Block * findLetter(const QString & name);
+               BlockList * getLetterList();
+               Block * findLetter(const QString & name);
                uint countLetters();
-               RS_Block * letterAt(uint i);
+               Block * letterAt(uint i);
 
-               friend std::ostream & operator<<(std::ostream & os, const RS_Font & l);
+               friend std::ostream & operator<<(std::ostream & os, const Font & l);
 
 #if 1
        private:
@@ -44,7 +44,7 @@ class RS_Font
 
        private:
                //! block list (letters)
-               RS_BlockList letterList;
+               BlockList letterList;
                //! Font file name
                QString fileName;
                //! Font encoding (see docu for QTextCodec)
index df74ae57d40bf3e6dfd58e4c22300dbfc15998c8..40b84ea616f4f3883c9a45b87bf329d4d78bd5da 100644 (file)
@@ -8,7 +8,7 @@
  *
  * @author Andrew Mustun
  */
-class RS_FontChar: public RS_Block
+class FontChar: public Block
 {
 public:
     /**
@@ -17,10 +17,10 @@ public:
      *        an identifier.
      * @param basePoint Base point (offset) of the letter (usually 0/0).
      */
-       RS_FontChar(RS_EntityContainer * parent, const QString & name, Vector basePoint):
-               RS_Block(parent, RS_BlockData(name, basePoint, false)) {}
+       FontChar(EntityContainer * parent, const QString & name, Vector basePoint):
+               Block(parent, BlockData(name, basePoint, false)) {}
 
-       virtual ~RS_FontChar() {}
+       virtual ~FontChar() {}
 
        /** @return RS2::EntityFontChar */
        virtual RS2::EntityType rtti() const
@@ -28,9 +28,9 @@ public:
                return RS2::EntityFontChar;
        }
 
-    /*friend std::ostream& operator << (std::ostream& os, const RS_FontChar& b) {
+    /*friend std::ostream& operator << (std::ostream& os, const FontChar& b) {
                os << " name: " << b.getName().latin1() << "\n";
-       os << " entities: " << (RS_EntityContainer&)b << "\n";
+       os << " entities: " << (EntityContainer&)b << "\n";
                return os;
 }*/
 protected:
index 80527a48738f59f2986c34c46f7f3b916735e4a3..2c1b7423c4d46f24c3eeb748e021af5e4750602e 100644 (file)
 
 //[DONE] #warning "!!! NEED TO FIX ITERATORS IN THIS CLASS !!!"
 
-RS_FontList * RS_FontList::uniqueInstance = NULL;
+FontList * FontList::uniqueInstance = NULL;
 
 /**
  * Default constructor.
  */
-RS_FontList::RS_FontList(): fontIterator(fonts)
+FontList::FontList(): fontIterator(fonts)
 {
 //Dealt with here...
 //#warning "!!! Need to deal with setAutoDelete() Qt3->Qt4 !!!"
@@ -35,61 +35,61 @@ RS_FontList::RS_FontList(): fontIterator(fonts)
        //fontListListeners.setAutoDelete(false);
 }
 
-/*static*/ RS_FontList * RS_FontList::instance()
+/*static*/ FontList * FontList::instance()
 {
        if (uniqueInstance == NULL)
-               uniqueInstance = new RS_FontList();
+               uniqueInstance = new FontList();
 
        return uniqueInstance;
 }
 
-RS_FontList::~RS_FontList()
+FontList::~FontList()
 {
        clearFonts();
 }
 
 /**
- * Initializes the font list by creating empty RS_Font
+ * Initializes the font list by creating empty Font
  * objects, one for each font that could be found.
  */
-void RS_FontList::init()
+void FontList::init()
 {
-       RS_DEBUG->print("RS_FontList::initFonts");
+       DEBUG->print("FontList::initFonts");
 
-       QStringList list = RS_SYSTEM->getFontList();
+       QStringList list = SYSTEM->getFontList();
 //     Q3Dict<char> added; //used to remeber added fonts (avoid duplication)
        QMultiHash<QString, char *> added; //used to remeber added fonts (avoid duplication)
 
        for(QStringList::Iterator it=list.begin(); it!=list.end(); ++it)
        {
-               RS_DEBUG->print("font: %s:", (*it).toLatin1().data());
-//printf("RS_FontList::init(): font: %s:\n", (*it).toLatin1().data());
+               DEBUG->print("font: %s:", (*it).toLatin1().data());
+//printf("FontList::init(): font: %s:\n", (*it).toLatin1().data());
 
                QFileInfo fi(*it);
 
 //             if (!added[fi.baseName()])
                if (added.value(fi.baseName()) == 0)
                {
-                       RS_Font * font = new RS_Font(fi.baseName());
+                       Font * font = new Font(fi.baseName());
                        fonts.append(font);
                        added.insert(fi.baseName(), (char *)1);
                }
 
-               RS_DEBUG->print("base: %s", fi.baseName().toLatin1().data());
+               DEBUG->print("base: %s", fi.baseName().toLatin1().data());
        }
 }
 
 /**
  * Removes all fonts in the fontlist.
  */
-void RS_FontList::clearFonts()
+void FontList::clearFonts()
 {
 //     fonts.clear();
        while (!fonts.isEmpty())
                delete fonts.takeFirst();
 }
 
-int RS_FontList::countFonts()
+int FontList::countFonts()
 {
        return fonts.count();
 }
@@ -99,9 +99,9 @@ int RS_FontList::countFonts()
  * Listeners are notified after the font was removed from
  * the list but before it gets deleted.
  */
-void RS_FontList::removeFont(RS_Font * font)
+void FontList::removeFont(Font * font)
 {
-       RS_DEBUG->print("RS_FontList::removeFont()");
+       DEBUG->print("FontList::removeFont()");
 
        // here the font is removed from the list but not deleted
 //     fonts.remove(font);
@@ -113,7 +113,7 @@ void RS_FontList::removeFont(RS_Font * font)
                delete fonts.takeAt(i);
 
        //for (uint i=0; i<fontListListeners.count(); ++i) {
-       //    RS_FontListListener* l = fontListListeners.at(i);
+       //    FontListListener* l = fontListListeners.at(i);
        //    l->fontRemoved(font);
        //}
 }
@@ -123,12 +123,12 @@ void RS_FontList::removeFont(RS_Font * font)
  * \p NULL if no such font was found. The font will be loaded into
  * memory if it's not already.
  */
-RS_Font * RS_FontList::requestFont(const QString & name)
+Font * FontList::requestFont(const QString & name)
 {
-       RS_DEBUG->print("RS_FontList::requestFont %s",  name.toLatin1().data());
+       DEBUG->print("FontList::requestFont %s",  name.toLatin1().data());
 
        QString name2 = name.toLower();
-       RS_Font * foundFont = NULL;
+       Font * foundFont = NULL;
 
        // QCad 1 compatibility:
        if (name2.contains('#') && name2.contains('_'))
@@ -138,13 +138,13 @@ RS_Font * RS_FontList::requestFont(const QString & name)
 //             name2 = name2.left(name2.find('#'));
                name2 = name2.left(name2.indexOf('#'));
 
-       RS_DEBUG->print("name2: %s", name2.toLatin1().data());
+       DEBUG->print("name2: %s", name2.toLatin1().data());
 
        // Search our list of available fonts:
-//     for(RS_Font * f=fonts.first(); f!=NULL; f=fonts.next())
+//     for(Font * f=fonts.first(); f!=NULL; f=fonts.next())
        for(int i=0; i<fonts.size(); i++)
        {
-               RS_Font * f = fonts[i];
+               Font * f = fonts[i];
 
                if (f->getFileName() == name2)
                {
@@ -162,7 +162,7 @@ RS_Font * RS_FontList::requestFont(const QString & name)
 }
 
 //! @return First font of the list.
-RS_Font * RS_FontList::firstFont()
+Font * FontList::firstFont()
 {
 //     return fonts.first();
 //     fontIterator.toFront();
@@ -176,7 +176,7 @@ RS_Font * RS_FontList::firstFont()
  * @return Next font from the list after
  * calling firstFont() or nextFont().
  */
-RS_Font * RS_FontList::nextFont()
+Font * FontList::nextFont()
 {
 //     return fonts.next();
 //     return fontIterator.next();
@@ -186,11 +186,11 @@ RS_Font * RS_FontList::nextFont()
 /**
  * Dumps the fonts to stdout.
  */
-std::ostream & operator<<(std::ostream & os, RS_FontList & l)
+std::ostream & operator<<(std::ostream & os, FontList & l)
 {
        os << "Fontlist: \n";
 
-       for(RS_Font * f=l.firstFont(); f!=NULL; f=l.nextFont())
+       for(Font * f=l.firstFont(); f!=NULL; f=l.nextFont())
                os << *f << "\n";
 
        return os;
index 403049365dd3b923fb8845f063aad573117e90b9..29d1dc0f4264a6f934d607b72c07cfebd47c3652 100644 (file)
@@ -3,47 +3,47 @@
 
 #include <QtCore>
 
-#define RS_FONTLIST RS_FontList::instance()
+#define FONTLIST FontList::instance()
 
-class RS_Font;
+class Font;
 
 /**
  * The global list of fonts. This is implemented as a singleton.
- * Use RS_FontList::instance() to get a pointer to the object.
+ * Use FontList::instance() to get a pointer to the object.
  *
  * @author James Hammons
  * @author Andrew Mustun
  */
-class RS_FontList
+class FontList
 {
        protected:
-               RS_FontList();
+               FontList();
 
        public:
                /**
                 * @return Instance to the unique font list.
                 */
-               static RS_FontList * instance();
+               static FontList * instance();
 
-               virtual ~RS_FontList();
+               virtual ~FontList();
 
                void init();
                void clearFonts();
                int countFonts();
-               virtual void removeFont(RS_Font * font);
-               RS_Font * requestFont(const QString & name);
-               RS_Font * firstFont();
-               RS_Font * nextFont();
+               virtual void removeFont(Font * font);
+               Font * requestFont(const QString & name);
+               Font * firstFont();
+               Font * nextFont();
 
-               friend std::ostream & operator<<(std::ostream & os, RS_FontList & l);
+               friend std::ostream & operator<<(std::ostream & os, FontList & l);
 
        protected:
-               static RS_FontList * uniqueInstance;
+               static FontList * uniqueInstance;
 
        private:
                //! fonts in the graphic
-               QList<RS_Font *> fonts;
-               QListIterator<RS_Font *> fontIterator;
+               QList<Font *> fonts;
+               QListIterator<Font *> fontIterator;
 };
 
 #endif // __FONTLIST_H__
index d6e5fbd719b8ec52270d3a58896ae43a21de60f0..163a12bdb9b0071e1f4f810ca38f9332b78eb9e0 100644 (file)
 
 #include "drawing.h"
 #include "graphicview.h"
-//#include "graphicview.h"
 #include "settings.h"
 #include "units.h"
 #include "vector.h"
 
 #warning "!!! Clean out all references to RS_GraphicView here and in header !!!"
-#if 0
 /**
  * Constructor.
  */
-RS_Grid::RS_Grid(RS_GraphicView * gv): graphicView(gv), pt(NULL), number(0),
-       metaX(NULL), numMetaX(0), metaY(NULL), numMetaY(0)
-{
-}
-#endif
-
-/**
- * Constructor II.
- */
-RS_Grid::RS_Grid(GraphicView * gv): graphicView(gv), pt(NULL), number(0),
+Grid::Grid(GraphicView * gv): graphicView(gv), pt(NULL), number(0),
        metaX(NULL), numMetaX(0), metaY(NULL), numMetaY(0)
 {
 }
@@ -45,7 +34,7 @@ RS_Grid::RS_Grid(GraphicView * gv): graphicView(gv), pt(NULL), number(0),
 /**
  * Destructor.
  */
-RS_Grid::~RS_Grid()
+Grid::~Grid()
 {
        if (pt != NULL)
                delete[] pt;
@@ -60,9 +49,9 @@ RS_Grid::~RS_Grid()
 /**
  * Updates the grid point array.
  */
-void RS_Grid::update()
+void Grid::update()
 {
-       RS_DEBUG->print("RS_Grid::update");
+       DEBUG->print("Grid::update");
 
        if (!graphicView->isGridOn())
                return;
@@ -104,7 +93,7 @@ void RS_Grid::update()
        numMetaX = 0;
        numMetaY = 0;
 
-       RS_DEBUG->print("RS_Grid::update: 001");
+       DEBUG->print("Grid::update: 001");
 
        // find out unit:
        RS2::Unit unit = RS2::None;
@@ -119,11 +108,11 @@ void RS_Grid::update()
        Vector gridWidth;
        Vector metaGridWidth;
 
-       RS_DEBUG->print("RS_Grid::update: 002");
+       DEBUG->print("Grid::update: 002");
 
        // init grid spacing:
        // metric grid:
-       if (RS_Units::isMetric(unit) || unit == RS2::None
+       if (Units::isMetric(unit) || unit == RS2::None
                || format == RS2::Decimal || format == RS2::Engineering)
        {
                if (userGrid.x > 0.0)
@@ -136,7 +125,7 @@ void RS_Grid::update()
                else
                        gridWidth.y = 0.000001;
 
-               RS_DEBUG->print("RS_Grid::update: 003");
+               DEBUG->print("Grid::update: 003");
 
                // auto scale grid
                if (scaleGrid)
@@ -151,12 +140,12 @@ void RS_Grid::update()
                metaGridWidth.x = gridWidth.x * 10;
                metaGridWidth.y = gridWidth.y * 10;
 
-               RS_DEBUG->print("RS_Grid::update: 004");
+               DEBUG->print("Grid::update: 004");
        }
        // imperial grid:
        else
        {
-               RS_DEBUG->print("RS_Grid::update: 005");
+               DEBUG->print("Grid::update: 005");
 
                if (userGrid.x > 0.0)
                        gridWidth.x = userGrid.x;
@@ -168,30 +157,30 @@ void RS_Grid::update()
                else
                        gridWidth.y = 1.0 / 1024.0;
 
-               RS_DEBUG->print("RS_Grid::update: 006");
+               DEBUG->print("Grid::update: 006");
 
                if (unit == RS2::Inch)
                {
-                       RS_DEBUG->print("RS_Grid::update: 007");
+                       DEBUG->print("Grid::update: 007");
 
                        // auto scale grid
                        if (scaleGrid)
                        {
                                while (graphicView->toGuiDX(gridWidth.x) < minGridSpacing)
                                {
-                                       if (RS_Math::round(gridWidth.x) >= 36)
+                                       if (Math::round(gridWidth.x) >= 36)
                                        {
                                                gridWidth.x *= 2;
                                        }
-                                       else if (RS_Math::round(gridWidth.x) >= 12)
+                                       else if (Math::round(gridWidth.x) >= 12)
                                        {
                                                gridWidth.x *= 3;
                                        }
-                                       else if (RS_Math::round(gridWidth.x) >= 4)
+                                       else if (Math::round(gridWidth.x) >= 4)
                                        {
                                                gridWidth.x *= 3;
                                        }
-                                       else if (RS_Math::round(gridWidth.x) >= 1)
+                                       else if (Math::round(gridWidth.x) >= 1)
                                        {
                                                gridWidth.x *= 2;
                                        }
@@ -203,19 +192,19 @@ void RS_Grid::update()
 
                                while (graphicView->toGuiDY(gridWidth.y) < minGridSpacing)
                                {
-                                       if (RS_Math::round(gridWidth.y) >= 36)
+                                       if (Math::round(gridWidth.y) >= 36)
                                        {
                                                gridWidth.y *= 2;
                                        }
-                                       else if (RS_Math::round(gridWidth.y) >= 12)
+                                       else if (Math::round(gridWidth.y) >= 12)
                                        {
                                                gridWidth.y *= 3;
                                        }
-                                       else if (RS_Math::round(gridWidth.y) >= 4)
+                                       else if (Math::round(gridWidth.y) >= 4)
                                        {
                                                gridWidth.y *= 3;
                                        }
-                                       else if (RS_Math::round(gridWidth.y) >= 1)
+                                       else if (Math::round(gridWidth.y) >= 1)
                                        {
                                                gridWidth.y *= 2;
                                        }
@@ -226,7 +215,7 @@ void RS_Grid::update()
                                }
                        }
 
-                       RS_DEBUG->print("RS_Grid::update: 008");
+                       DEBUG->print("Grid::update: 008");
 
                        // metagrid X shows inches..
                        metaGridWidth.x = 1.0;
@@ -253,7 +242,7 @@ void RS_Grid::update()
                                }
                        }
 
-                       RS_DEBUG->print("RS_Grid::update: 009");
+                       DEBUG->print("Grid::update: 009");
 
                        // metagrid Y shows inches..
                        metaGridWidth.y = 1.0;
@@ -282,11 +271,11 @@ void RS_Grid::update()
                                }
                        }
 
-                       RS_DEBUG->print("RS_Grid::update: 010");
+                       DEBUG->print("Grid::update: 010");
                }
                else
                {
-                       RS_DEBUG->print("RS_Grid::update: 011");
+                       DEBUG->print("Grid::update: 011");
 
                        if (scaleGrid)
                        {
@@ -304,13 +293,13 @@ void RS_Grid::update()
 
                                metaGridWidth.y = -1.0;
                        }
-                       RS_DEBUG->print("RS_Grid::update: 012");
+                       DEBUG->print("Grid::update: 012");
                }
                //gridWidth.y = gridWidth.x;
                //metaGridWidth.y = metaGridWidth.x;
        }
 
-       RS_DEBUG->print("RS_Grid::update: 013");
+       DEBUG->print("Grid::update: 013");
 
        // for grid info:
        spacing = gridWidth.x;
@@ -338,11 +327,11 @@ void RS_Grid::update()
                bottom -= gridWidth.y;
 
                // calculate number of visible grid points
-               int numberX = (RS_Math::round((right-left) / gridWidth.x) + 1);
-               int numberY = (RS_Math::round((top-bottom) / gridWidth.y) + 1);
+               int numberX = (Math::round((right-left) / gridWidth.x) + 1);
+               int numberY = (Math::round((top-bottom) / gridWidth.y) + 1);
                number = numberX * numberY;
 
-               RS_DEBUG->print("RS_Grid::update: 014");
+               DEBUG->print("Grid::update: 014");
 
                // create grid array:
                if (number > 0 && number < 1000000)
@@ -364,7 +353,7 @@ void RS_Grid::update()
                        pt = NULL;
                }
 
-               RS_DEBUG->print("RS_Grid::update: 015");
+               DEBUG->print("Grid::update: 015");
        }
 
        // find meta grid boundaries
@@ -387,8 +376,8 @@ void RS_Grid::update()
                mbottom -= metaGridWidth.y;
 
                // calculate number of visible meta grid lines:
-               numMetaX = (RS_Math::round((mright - mleft) / metaGridWidth.x) + 1);
-               numMetaY = (RS_Math::round((mtop - mbottom) / metaGridWidth.y) + 1);
+               numMetaX = (Math::round((mright - mleft) / metaGridWidth.x) + 1);
+               numMetaY = (Math::round((mtop - mbottom) / metaGridWidth.y) + 1);
 
                if (numMetaX > 0 && numMetaY > 0)
                {
@@ -415,13 +404,13 @@ void RS_Grid::update()
                }
        }
 
-       RS_DEBUG->print("RS_Grid::update: OK");
+       DEBUG->print("Grid::update: OK");
 }
 
 /**
  * @return Array of all visible grid points.
  */
-Vector * RS_Grid::getPoints()
+Vector * Grid::getPoints()
 {
        return pt;
 }
@@ -429,7 +418,7 @@ Vector * RS_Grid::getPoints()
 /**
  * @return Number of visible grid points.
  */
-int RS_Grid::count()
+int Grid::count()
 {
        return number;
 }
@@ -437,7 +426,7 @@ int RS_Grid::count()
 /**
  * @return Grid info for status widget.
  */
-QString RS_Grid::getInfo()
+QString Grid::getInfo()
 {
        return QString("%1 / %2").arg(spacing).arg(metaSpacing);
 }
@@ -445,7 +434,7 @@ QString RS_Grid::getInfo()
 /**
  * @return Meta grid positions in X.
  */
-double * RS_Grid::getMetaX()
+double * Grid::getMetaX()
 {
        return metaX;
 }
@@ -453,7 +442,7 @@ double * RS_Grid::getMetaX()
 /**
  * @return Number of visible meta grid lines in X.
  */
-int RS_Grid::countMetaX()
+int Grid::countMetaX()
 {
        return numMetaX;
 }
@@ -461,7 +450,7 @@ int RS_Grid::countMetaX()
 /**
 * @return Meta grid positions in Y.
 */
-double * RS_Grid::getMetaY()
+double * Grid::getMetaY()
 {
        return metaY;
 }
@@ -469,7 +458,7 @@ double * RS_Grid::getMetaY()
 /**
 * @return Number of visible meta grid lines in Y.
 */
-int RS_Grid::countMetaY()
+int Grid::countMetaY()
 {
        return numMetaY;
 }
index 62c28086f43d43bd337b4ac433bdf3271f301454..b037bf0553a60bb89bd9bcca56286386adc98360 100644 (file)
@@ -13,12 +13,12 @@ class Vector;
  *
  * @author Andrew Mustun
  */
-class RS_Grid
+class Grid
 {
        public:
-//             RS_Grid(RS_GraphicView *);
-               RS_Grid(GraphicView *);
-               ~RS_Grid();
+//             Grid(RS_GraphicView *);
+               Grid(GraphicView *);
+               ~Grid();
 
                void update();
 
index 1ff09027d1520d598dd7fa39c4b03ce25c335482..f7442deb5eb6e5658f421713be0c67e820558e5c 100644 (file)
 /**
  * Constructor.
  */
-RS_Hatch::RS_Hatch(RS_EntityContainer * parent, const RS_HatchData & d):
-       RS_EntityContainer(parent), data(d)
+Hatch::Hatch(EntityContainer * parent, const HatchData & d):
+       EntityContainer(parent), data(d)
 {
        hatch = NULL;
        updateRunning = false;
        needOptimization = true;
 }
 
-/*virtual*/ RS_Hatch::~RS_Hatch()
+/*virtual*/ Hatch::~Hatch()
 {
 }
 
-RS_Entity * RS_Hatch::clone()
+Entity * Hatch::clone()
 {
-       RS_Hatch * t = new RS_Hatch(*this);
+       Hatch * t = new Hatch(*this);
 #warning "!!! Need to deal with setAutoDelete() Qt3->Qt4 !!!"
 //     t->entities.setAutoDelete(entities.autoDelete());
        t->initId();
@@ -51,7 +51,7 @@ RS_Entity * RS_Hatch::clone()
 }
 
 /**    @return RS2::EntityHatch */
-/*virtual*/ RS2::EntityType RS_Hatch::rtti() const
+/*virtual*/ RS2::EntityType Hatch::rtti() const
 {
        return RS2::EntityHatch;
 }
@@ -60,7 +60,7 @@ RS_Entity * RS_Hatch::clone()
  * @return true: if this is a hatch with lines (hatch pattern),
  *         false: if this is filled with a solid color.
  */
-/*virtual*/ bool RS_Hatch::isContainer() const
+/*virtual*/ bool Hatch::isContainer() const
 {
        if (isSolid())
                return false;
@@ -69,7 +69,7 @@ RS_Entity * RS_Hatch::clone()
 }
 
 /** @return Copy of data that defines the hatch. */
-RS_HatchData RS_Hatch::getData() const
+HatchData Hatch::getData() const
 {
        return data;
 }
@@ -77,16 +77,16 @@ RS_HatchData RS_Hatch::getData() const
 /**
  * Validates the hatch.
  */
-bool RS_Hatch::validate()
+bool Hatch::validate()
 {
        bool ret = true;
 
        // loops:
-       for(RS_Entity * l=firstEntity(RS2::ResolveNone); l!=NULL; l=nextEntity(RS2::ResolveNone))
+       for(Entity * l=firstEntity(RS2::ResolveNone); l!=NULL; l=nextEntity(RS2::ResolveNone))
        {
                if (l->rtti() == RS2::EntityContainer)
                {
-                       RS_EntityContainer * loop = (RS_EntityContainer *)l;
+                       EntityContainer * loop = (EntityContainer *)l;
                        ret = loop->optimizeContours() && ret;
                }
        }
@@ -97,7 +97,7 @@ bool RS_Hatch::validate()
 /**
  * @return Number of loops.
  */
-int RS_Hatch::countLoops()
+int Hatch::countLoops()
 {
        if (data.solid)
                return count();
@@ -106,42 +106,42 @@ int RS_Hatch::countLoops()
 }
 
 /** @return true if this is a solid fill. false if it is a pattern hatch. */
-bool RS_Hatch::isSolid() const
+bool Hatch::isSolid() const
 {
        return data.solid;
 }
 
-void RS_Hatch::setSolid(bool solid)
+void Hatch::setSolid(bool solid)
 {
        data.solid = solid;
 }
 
-QString RS_Hatch::getPattern()
+QString Hatch::getPattern()
 {
        return data.pattern;
 }
 
-void RS_Hatch::setPattern(const QString & pattern)
+void Hatch::setPattern(const QString & pattern)
 {
        data.pattern = pattern;
 }
 
-double RS_Hatch::getScale()
+double Hatch::getScale()
 {
        return data.scale;
 }
 
-void RS_Hatch::setScale(double scale)
+void Hatch::setScale(double scale)
 {
        data.scale = scale;
 }
 
-double RS_Hatch::getAngle()
+double Hatch::getAngle()
 {
        return data.angle;
 }
 
-void RS_Hatch::setAngle(double angle)
+void Hatch::setAngle(double angle)
 {
        data.angle = angle;
 }
@@ -149,14 +149,14 @@ void RS_Hatch::setAngle(double angle)
 /**
  * Recalculates the borders of this hatch.
  */
-void RS_Hatch::calculateBorders()
+void Hatch::calculateBorders()
 {
-       RS_DEBUG->print("RS_Hatch::calculateBorders");
+       DEBUG->print("Hatch::calculateBorders");
 
        activateContour(true);
-       RS_EntityContainer::calculateBorders();
+       EntityContainer::calculateBorders();
 
-       RS_DEBUG->print("RS_Hatch::calculateBorders: size: %f,%f", getSize().x, getSize().y);
+       DEBUG->print("Hatch::calculateBorders: size: %f,%f", getSize().x, getSize().y);
 
        activateContour(false);
 }
@@ -165,10 +165,10 @@ void RS_Hatch::calculateBorders()
  * Updates the Hatch. Called when the
  * hatch or it's data, position, alignment, .. changes.
  */
-void RS_Hatch::update()
+void Hatch::update()
 {
-       RS_DEBUG->print("RS_Hatch::update");
-       RS_DEBUG->print("RS_Hatch::update: contour has %d loops", count());
+       DEBUG->print("Hatch::update");
+       DEBUG->print("Hatch::update: contour has %d loops", count());
 
        if (updateRunning)
                return;
@@ -179,7 +179,7 @@ void RS_Hatch::update()
        if (data.solid == true)
                return;
 
-       RS_DEBUG->print("RS_Hatch::update");
+       DEBUG->print("Hatch::update");
        updateRunning = true;
 
        // delete old hatch:
@@ -197,39 +197,39 @@ void RS_Hatch::update()
 
        if (!validate())
        {
-               RS_DEBUG->print(RS_Debug::D_WARNING, "RS_Hatch::update: invalid contour in hatch found");
+               DEBUG->print(Debug::D_WARNING, "Hatch::update: invalid contour in hatch found");
                updateRunning = false;
                return;
        }
 
        // search pattern:
-       RS_DEBUG->print("RS_Hatch::update: requesting pattern");
-       RS_Pattern * pat = RS_PATTERNLIST->requestPattern(data.pattern);
+       DEBUG->print("Hatch::update: requesting pattern");
+       Pattern * pat = PATTERNLIST->requestPattern(data.pattern);
 
        if (pat == NULL)
        {
                updateRunning = false;
-               RS_DEBUG->print("RS_Hatch::update: requesting pattern: not found");
+               DEBUG->print("Hatch::update: requesting pattern: not found");
                return;
        }
 
-       RS_DEBUG->print("RS_Hatch::update: requesting pattern: OK");
+       DEBUG->print("Hatch::update: requesting pattern: OK");
 
-       RS_DEBUG->print("RS_Hatch::update: cloning pattern");
-       pat = (RS_Pattern*)pat->clone();
-       RS_DEBUG->print("RS_Hatch::update: cloning pattern: OK");
+       DEBUG->print("Hatch::update: cloning pattern");
+       pat = (Pattern*)pat->clone();
+       DEBUG->print("Hatch::update: cloning pattern: OK");
 
        // scale pattern
-       RS_DEBUG->print("RS_Hatch::update: scaling pattern");
+       DEBUG->print("Hatch::update: scaling pattern");
        pat->scale(Vector(0.0,0.0), Vector(data.scale, data.scale));
        pat->calculateBorders();
        forcedCalculateBorders();
-       RS_DEBUG->print("RS_Hatch::update: scaling pattern: OK");
+       DEBUG->print("Hatch::update: scaling pattern: OK");
 
        // find out how many pattern-instances we need in x/y:
        int px1, py1, px2, py2;
        double f;
-       RS_Hatch * copy = (RS_Hatch *)this->clone();
+       Hatch * copy = (Hatch *)this->clone();
        copy->rotate(Vector(0.0, 0.0), -data.angle);
        copy->forcedCalculateBorders();
 
@@ -238,8 +238,8 @@ void RS_Hatch::update()
        Vector cPos = getMin();
        Vector cSize = getSize();
 
-       RS_DEBUG->print("RS_Hatch::update: pattern size: %f/%f", pSize.x, pSize.y);
-       RS_DEBUG->print("RS_Hatch::update: contour size: %f/%f", cSize.x, cSize.y);
+       DEBUG->print("Hatch::update: pattern size: %f/%f", pSize.x, pSize.y);
+       DEBUG->print("Hatch::update: contour size: %f/%f", cSize.x, cSize.y);
 
        if (cSize.x < 1.0e-6 || cSize.y < 1.0e-6 || pSize.x < 1.0e-6 || pSize.y < 1.0e-6
                || cSize.x > RS_MAXDOUBLE - 1 || cSize.y > RS_MAXDOUBLE - 1
@@ -248,13 +248,13 @@ void RS_Hatch::update()
                delete pat;
                delete copy;
                updateRunning = false;
-               RS_DEBUG->print("RS_Hatch::update: contour size or pattern size too small");
+               DEBUG->print("Hatch::update: contour size or pattern size too small");
                return;
        }
        // avoid huge memory consumption:
        else if (cSize.x / pSize.x > 100 || cSize.y / pSize.y > 100)
        {
-               RS_DEBUG->print("RS_Hatch::update: contour size too large or pattern size too small");
+               DEBUG->print("Hatch::update: contour size too large or pattern size too small");
                return;
        }
 
@@ -267,18 +267,18 @@ void RS_Hatch::update()
        f = copy->getMax().y/pat->getSize().y;
        py2 = (int)ceil(f) - 1;
 
-       RS_EntityContainer tmp;   // container for untrimmed lines
+       EntityContainer tmp;   // container for untrimmed lines
 
        // adding array of patterns to tmp:
-       RS_DEBUG->print("RS_Hatch::update: creating pattern carpet");
+       DEBUG->print("Hatch::update: creating pattern carpet");
 
        for(int px=px1; px<=px2; px++)
        {
                for(int py=py1; py<=py2; py++)
                {
-                       for(RS_Entity * e=pat->firstEntity(); e!=NULL; e=pat->nextEntity())
+                       for(Entity * e=pat->firstEntity(); e!=NULL; e=pat->nextEntity())
                        {
-                               RS_Entity * te = e->clone();
+                               Entity * te = e->clone();
                                te->rotate(Vector(0.0, 0.0), data.angle);
                                Vector v1, v2;
                                v1.setPolar(px * pSize.x, data.angle);
@@ -291,16 +291,16 @@ void RS_Hatch::update()
 
        delete pat;
        pat = NULL;
-       RS_DEBUG->print("RS_Hatch::update: creating pattern carpet: OK");
+       DEBUG->print("Hatch::update: creating pattern carpet: OK");
 
-       RS_DEBUG->print("RS_Hatch::update: cutting pattern carpet");
+       DEBUG->print("Hatch::update: cutting pattern carpet");
        // cut pattern to contour shape:
-       RS_EntityContainer tmp2;   // container for small cut lines
-       RS_Line * line = NULL;
-       RS_Arc * arc = NULL;
-       RS_Circle * circle = NULL;
+       EntityContainer tmp2;   // container for small cut lines
+       Line * line = NULL;
+       Arc * arc = NULL;
+       Circle * circle = NULL;
 
-       for(RS_Entity * e=tmp.firstEntity(); e!=NULL; e=tmp.nextEntity())
+       for(Entity * e=tmp.firstEntity(); e!=NULL; e=tmp.nextEntity())
        {
                Vector startPoint;
                Vector endPoint;
@@ -309,7 +309,7 @@ void RS_Hatch::update()
 
                if (e->rtti() == RS2::EntityLine)
                {
-                       line = (RS_Line *)e;
+                       line = (Line *)e;
                        arc = NULL;
                        circle = NULL;
                        startPoint = line->getStartpoint();
@@ -319,7 +319,7 @@ void RS_Hatch::update()
                }
                else if (e->rtti() == RS2::EntityArc)
                {
-                       arc = (RS_Arc *)e;
+                       arc = (Arc *)e;
                        line = NULL;
                        circle = NULL;
                        startPoint = arc->getStartpoint();
@@ -329,7 +329,7 @@ void RS_Hatch::update()
                }
                else if (e->rtti() == RS2::EntityCircle)
                {
-                       circle = (RS_Circle *)e;
+                       circle = (Circle *)e;
                        line = NULL;
                        arc = NULL;
                        startPoint = circle->getCenter() + Vector(circle->getRadius(), 0.0);
@@ -348,20 +348,20 @@ void RS_Hatch::update()
 //        is.setAutoDelete(true);
                is.append(new Vector(startPoint));
 
-               for(RS_Entity * loop=firstEntity(); loop!=NULL; loop=nextEntity())
+               for(Entity * loop=firstEntity(); loop!=NULL; loop=nextEntity())
                {
                        if (loop->isContainer())
                        {
-                               for(RS_Entity * p=((RS_EntityContainer *)loop)->firstEntity(); p!=NULL; p=((RS_EntityContainer*)loop)->nextEntity())
+                               for(Entity * p=((EntityContainer *)loop)->firstEntity(); p!=NULL; p=((EntityContainer*)loop)->nextEntity())
                                {
-                                       VectorSolutions sol = RS_Information::getIntersection(e, p, true);
+                                       VectorSolutions sol = Information::getIntersection(e, p, true);
 
                                        for(int i=0; i<=1; ++i)
                                        {
                                                if (sol.get(i).valid)
                                                {
                                                        is.append(new Vector(sol.get(i)));
-                                                       RS_DEBUG->print("  pattern line intersection: %f/%f", sol.get(i).x, sol.get(i).y);
+                                                       DEBUG->print("  pattern line intersection: %f/%f", sol.get(i).x, sol.get(i).y);
                                                }
                                        }
                                }
@@ -469,11 +469,11 @@ void RS_Hatch::update()
                        {
                                if (line != NULL)
                                {
-                                       tmp2.addEntity(new RS_Line(&tmp2, RS_LineData(*v1, *v2)));
+                                       tmp2.addEntity(new Line(&tmp2, LineData(*v1, *v2)));
                                }
                                else if (arc != NULL || circle != NULL)
                                {
-                                       tmp2.addEntity(new RS_Arc(&tmp2, RS_ArcData(center, center.distanceTo(*v1),
+                                       tmp2.addEntity(new Arc(&tmp2, ArcData(center, center.distanceTo(*v1),
                                                center.angleTo(*v1), center.angleTo(*v2), reversed)));
                                }
                        }
@@ -483,30 +483,30 @@ void RS_Hatch::update()
        }
 
        // updating hatch / adding entities that are inside
-       RS_DEBUG->print("RS_Hatch::update: cutting pattern carpet: OK");
+       DEBUG->print("Hatch::update: cutting pattern carpet: OK");
 
        // the hatch pattern entities:
-       hatch = new RS_EntityContainer(this);
-       hatch->setPen(RS_Pen(RS2::FlagInvalid));
+       hatch = new EntityContainer(this);
+       hatch->setPen(Pen(RS2::FlagInvalid));
        hatch->setLayer(NULL);
        hatch->setFlag(RS2::FlagTemp);
 
        //calculateBorders();
 
-       for(RS_Entity * e=tmp2.firstEntity(); e!=NULL; e=tmp2.nextEntity())
+       for(Entity * e=tmp2.firstEntity(); e!=NULL; e=tmp2.nextEntity())
        {
                Vector middlePoint;
                Vector middlePoint2;
 
                if (e->rtti() == RS2::EntityLine)
                {
-                       RS_Line * line = (RS_Line *)e;
+                       Line * line = (Line *)e;
                        middlePoint = line->getMiddlepoint();
                        middlePoint2 = line->getNearestDist(line->getLength() / 2.1, line->getStartpoint());
                }
                else if (e->rtti() == RS2::EntityArc)
                {
-                       RS_Arc * arc = (RS_Arc *)e;
+                       Arc * arc = (Arc *)e;
                        middlePoint = arc->getMiddlepoint();
                        middlePoint2 = arc->getNearestDist(arc->getLength() / 2.1, arc->getStartpoint());
                }
@@ -520,11 +520,11 @@ void RS_Hatch::update()
                {
                        bool onContour = false;
 
-                       if (RS_Information::isPointInsideContour(middlePoint, this, &onContour)
-                               || RS_Information::isPointInsideContour(middlePoint2, this))
+                       if (Information::isPointInsideContour(middlePoint, this, &onContour)
+                               || Information::isPointInsideContour(middlePoint2, this))
                        {
-                               RS_Entity * te = e->clone();
-                               te->setPen(RS_Pen(RS2::FlagInvalid));
+                               Entity * te = e->clone();
+                               te->setPen(Pen(RS2::FlagInvalid));
                                te->setLayer(NULL);
                                te->reparent(hatch);
                                hatch->addEntity(te);
@@ -542,47 +542,47 @@ void RS_Hatch::update()
 
        updateRunning = false;
 
-       RS_DEBUG->print("RS_Hatch::update: OK");
+       DEBUG->print("Hatch::update: OK");
 }
 
 /**
  * Activates of deactivates the hatch boundary.
  */
-void RS_Hatch::activateContour(bool on)
+void Hatch::activateContour(bool on)
 {
-       RS_DEBUG->print("RS_Hatch::activateContour: %d", (int)on);
+       DEBUG->print("Hatch::activateContour: %d", (int)on);
 
-       for(RS_Entity * e=firstEntity(); e!=NULL; e=nextEntity())
+       for(Entity * e=firstEntity(); e!=NULL; e=nextEntity())
        {
                if (!e->isUndone())
                {
                        if (!e->getFlag(RS2::FlagTemp))
                        {
-                               RS_DEBUG->print("RS_Hatch::activateContour: set visible");
+                               DEBUG->print("Hatch::activateContour: set visible");
                                e->setVisible(on);
                        }
                        else
                        {
-                               RS_DEBUG->print("RS_Hatch::activateContour: entity temp");
+                               DEBUG->print("Hatch::activateContour: entity temp");
                        }
                }
                else
                {
-                       RS_DEBUG->print("RS_Hatch::activateContour: entity undone");
+                       DEBUG->print("Hatch::activateContour: entity undone");
                }
        }
 
-       RS_DEBUG->print("RS_Hatch::activateContour: OK");
+       DEBUG->print("Hatch::activateContour: OK");
 }
 
 /**
  * Overrides drawing of subentities. This is only ever called for solid fills.
  */
-void RS_Hatch::draw(PaintInterface * painter, GraphicView * view, double /*patternOffset*/)
+void Hatch::draw(PaintInterface * painter, GraphicView * view, double /*patternOffset*/)
 {
        if (!data.solid)
        {
-               for(RS_Entity * se=firstEntity(); se!=NULL; se = nextEntity())
+               for(Entity * se=firstEntity(); se!=NULL; se = nextEntity())
                        view->drawEntity(se);
 
                return;
@@ -601,11 +601,11 @@ void RS_Hatch::draw(PaintInterface * painter, GraphicView * view, double /*patte
        // loops:
        if (needOptimization == true)
        {
-               for(RS_Entity * l=firstEntity(RS2::ResolveNone); l!=NULL; l=nextEntity(RS2::ResolveNone))
+               for(Entity * l=firstEntity(RS2::ResolveNone); l!=NULL; l=nextEntity(RS2::ResolveNone))
                {
                        if (l->rtti() == RS2::EntityContainer)
                        {
-                               RS_EntityContainer * loop = (RS_EntityContainer *)l;
+                               EntityContainer * loop = (EntityContainer *)l;
                                loop->optimizeContours();
                        }
                }
@@ -614,16 +614,16 @@ void RS_Hatch::draw(PaintInterface * painter, GraphicView * view, double /*patte
        }
 
        // loops:
-       for(RS_Entity * l=firstEntity(RS2::ResolveNone); l!=NULL; l=nextEntity(RS2::ResolveNone))
+       for(Entity * l=firstEntity(RS2::ResolveNone); l!=NULL; l=nextEntity(RS2::ResolveNone))
        {
                l->setLayer(getLayer());
 
                if (l->rtti() == RS2::EntityContainer)
                {
-                       RS_EntityContainer * loop = (RS_EntityContainer *)l;
+                       EntityContainer * loop = (EntityContainer *)l;
 
                        // edges:
-                       for(RS_Entity * e=loop->firstEntity(RS2::ResolveNone); e!=NULL; e=loop->nextEntity(RS2::ResolveNone))
+                       for(Entity * e=loop->firstEntity(RS2::ResolveNone); e!=NULL; e=loop->nextEntity(RS2::ResolveNone))
                        {
                                e->setLayer(getLayer());
 
@@ -631,12 +631,12 @@ void RS_Hatch::draw(PaintInterface * painter, GraphicView * view, double /*patte
                                {
                                case RS2::EntityLine:
                                {
-                                       RS_Line * line = (RS_Line *)e;
+                                       Line * line = (Line *)e;
 
-                                       int x1 = RS_Math::round(view->toGuiX(line->getStartpoint().x));
-                                       int y1 = RS_Math::round(view->toGuiY(line->getStartpoint().y));
-                                       int x2 = RS_Math::round(view->toGuiX(line->getEndpoint().x));
-                                       int y2 = RS_Math::round(view->toGuiY(line->getEndpoint().y));
+                                       int x1 = Math::round(view->toGuiX(line->getStartpoint().x));
+                                       int y1 = Math::round(view->toGuiY(line->getStartpoint().y));
+                                       int x2 = Math::round(view->toGuiX(line->getEndpoint().x));
+                                       int y2 = Math::round(view->toGuiY(line->getEndpoint().y));
 
                                        if (lastValid && (lastX != x1 || lastY != y1))
                                        {
@@ -658,12 +658,12 @@ void RS_Hatch::draw(PaintInterface * painter, GraphicView * view, double /*patte
 
                                case RS2::EntityArc:
                                {
-                                       RS_Arc * arc = (RS_Arc *)e;
+                                       Arc * arc = (Arc *)e;
 
-                                       int x1 = RS_Math::round(view->toGuiX(arc->getStartpoint().x));
-                                       int y1 = RS_Math::round(view->toGuiY(arc->getStartpoint().y));
-                                       int x2 = RS_Math::round(view->toGuiX(arc->getEndpoint().x));
-                                       int y2 = RS_Math::round(view->toGuiY(arc->getEndpoint().y));
+                                       int x1 = Math::round(view->toGuiX(arc->getStartpoint().x));
+                                       int y1 = Math::round(view->toGuiY(arc->getStartpoint().y));
+                                       int x2 = Math::round(view->toGuiX(arc->getEndpoint().x));
+                                       int y2 = Math::round(view->toGuiY(arc->getEndpoint().y));
 
                                        if (lastValid && (lastX != x1 || lastY != y1))
                                        {
@@ -695,10 +695,10 @@ void RS_Hatch::draw(PaintInterface * painter, GraphicView * view, double /*patte
 
                                case RS2::EntityCircle:
                                {
-                                       RS_Circle * circle = (RS_Circle *)e;
+                                       Circle * circle = (Circle *)e;
 
-                                       int x1 = RS_Math::round(view->toGuiX(circle->getCenter().x + circle->getRadius()));
-                                       int y1 = RS_Math::round(view->toGuiY(circle->getCenter().y));
+                                       int x1 = Math::round(view->toGuiX(circle->getCenter().x + circle->getRadius()));
+                                       int y1 = Math::round(view->toGuiY(circle->getCenter().y));
                                        int x2 = x1;
                                        int y2 = y1;
 
@@ -747,12 +747,12 @@ void RS_Hatch::draw(PaintInterface * painter, GraphicView * view, double /*patte
        painter->drawPolygon(pa);
 }
 
-/*virtual*/ double RS_Hatch::getLength()
+/*virtual*/ double Hatch::getLength()
 {
        return -1.0;
 }
 
-double RS_Hatch::getDistanceToPoint(const Vector & coord, RS_Entity ** entity,
+double Hatch::getDistanceToPoint(const Vector & coord, Entity ** entity,
        RS2::ResolveLevel level, double solidDist)
 {
        if (data.solid == true)
@@ -762,7 +762,7 @@ double RS_Hatch::getDistanceToPoint(const Vector & coord, RS_Entity ** entity,
 
                bool onContour;
 
-               if (RS_Information::isPointInsideContour(coord, this, &onContour))
+               if (Information::isPointInsideContour(coord, this, &onContour))
                        // distance is the snap range:
                        return solidDist;
 
@@ -770,48 +770,48 @@ double RS_Hatch::getDistanceToPoint(const Vector & coord, RS_Entity ** entity,
        }
        else
        {
-               return RS_EntityContainer::getDistanceToPoint(coord, entity, level, solidDist);
+               return EntityContainer::getDistanceToPoint(coord, entity, level, solidDist);
        }
 }
 
-void RS_Hatch::move(Vector offset)
+void Hatch::move(Vector offset)
 {
-       RS_EntityContainer::move(offset);
+       EntityContainer::move(offset);
        update();
 }
 
-void RS_Hatch::rotate(Vector center, double angle)
+void Hatch::rotate(Vector center, double angle)
 {
-       RS_EntityContainer::rotate(center, angle);
-       data.angle = RS_Math::correctAngle(data.angle + angle);
+       EntityContainer::rotate(center, angle);
+       data.angle = Math::correctAngle(data.angle + angle);
        update();
 }
 
-void RS_Hatch::scale(Vector center, Vector factor)
+void Hatch::scale(Vector center, Vector factor)
 {
-       RS_EntityContainer::scale(center, factor);
+       EntityContainer::scale(center, factor);
        data.scale *= factor.x;
        update();
 }
 
-void RS_Hatch::mirror(Vector axisPoint1, Vector axisPoint2)
+void Hatch::mirror(Vector axisPoint1, Vector axisPoint2)
 {
-       RS_EntityContainer::mirror(axisPoint1, axisPoint2);
+       EntityContainer::mirror(axisPoint1, axisPoint2);
        double ang = axisPoint1.angleTo(axisPoint2);
-       data.angle = RS_Math::correctAngle(data.angle + ang*2.0);
+       data.angle = Math::correctAngle(data.angle + ang*2.0);
        update();
 }
 
-void RS_Hatch::stretch(Vector firstCorner, Vector secondCorner, Vector offset)
+void Hatch::stretch(Vector firstCorner, Vector secondCorner, Vector offset)
 {
-       RS_EntityContainer::stretch(firstCorner, secondCorner, offset);
+       EntityContainer::stretch(firstCorner, secondCorner, offset);
        update();
 }
 
 /**
  * Dumps the point's data to stdout.
  */
-std::ostream & operator<<(std::ostream & os, const RS_Hatch & p)
+std::ostream & operator<<(std::ostream & os, const Hatch & p)
 {
        os << " Hatch: " << p.getData() << "\n";
        return os;
index 298f38c8fee13c2deaa4e5d7957fe35225fc2f57..6d1959b39868a0d04298ce88757240a8a476c2ef 100644 (file)
@@ -7,20 +7,20 @@
 /**
  * Holds the data that defines a hatch entity.
  */
-class RS_HatchData
+class HatchData
 {
        public:
                /**
                 * Default constructor. Leaves the data object uninitialized.
                 */
-               RS_HatchData() {}
+               HatchData() {}
 
                /**
                 * @param solid true: solid fill, false: pattern.
                 * @param scale Pattern scale or spacing.
                 * @param pattern Pattern name.
                 */
-               RS_HatchData(bool solid, double scale, double angle, const QString & pattern)
+               HatchData(bool solid, double scale, double angle, const QString & pattern)
                {
                        this->solid = solid;
                        this->scale = scale;
@@ -30,7 +30,7 @@ class RS_HatchData
                        //std::cout << "RS_H__atchData: " << pattern.latin1() << "\n";
                }
 
-               friend std::ostream & operator<<(std::ostream & os, const RS_HatchData & td)
+               friend std::ostream & operator<<(std::ostream & os, const HatchData & td)
                {
                        os << "(" << td.pattern.toAscii().data() << ")";
                        return os;
@@ -49,16 +49,16 @@ class RS_HatchData
  * @author James Hammons
  * @author Andrew Mustun
  */
-class RS_Hatch: public RS_EntityContainer
+class Hatch: public EntityContainer
 {
        public:
-               RS_Hatch(RS_EntityContainer * parent, const RS_HatchData & d);
-               virtual ~RS_Hatch();
+               Hatch(EntityContainer * parent, const HatchData & d);
+               virtual ~Hatch();
 
-               virtual RS_Entity * clone();
+               virtual Entity * clone();
                virtual RS2::EntityType rtti() const;
                virtual bool isContainer() const;
-               RS_HatchData getData() const;
+               HatchData getData() const;
                bool validate();
                int countLoops();
 
@@ -77,7 +77,7 @@ class RS_Hatch: public RS_EntityContainer
                void activateContour(bool on);
                virtual void draw(PaintInterface * painter, GraphicView * view, double patternOffset = 0.0);
                virtual double getLength();
-               virtual double getDistanceToPoint(const Vector & coord, RS_Entity ** entity = NULL,
+               virtual double getDistanceToPoint(const Vector & coord, Entity ** entity = NULL,
                        RS2::ResolveLevel level = RS2::ResolveNone, double solidDist = RS_MAXDOUBLE);
                virtual void move(Vector offset);
                virtual void rotate(Vector center, double angle);
@@ -85,11 +85,11 @@ class RS_Hatch: public RS_EntityContainer
                virtual void mirror(Vector axisPoint1, Vector axisPoint2);
                virtual void stretch(Vector firstCorner, Vector secondCorner, Vector offset);
 
-               friend std::ostream & operator<<(std::ostream & os, const RS_Hatch & p);
+               friend std::ostream & operator<<(std::ostream & os, const Hatch & p);
 
        protected:
-               RS_HatchData data;
-               RS_EntityContainer * hatch;
+               HatchData data;
+               EntityContainer * hatch;
                bool updateRunning;
                bool needOptimization;
 };
index fa493ecde6a963cf707f3c7bcc47a805eb0049de..202bd9af62b91d044223747e648b54bb3614af98 100644 (file)
@@ -25,8 +25,8 @@
 /**
  * Constructor.
  */
-RS_Image::RS_Image(RS_EntityContainer * parent, const RS_ImageData & d):
-       RS_AtomicEntity(parent), data(d)
+Image::Image(EntityContainer * parent, const ImageData & d):
+       AtomicEntity(parent), data(d)
 {
        update();
        calculateBorders();
@@ -35,16 +35,16 @@ RS_Image::RS_Image(RS_EntityContainer * parent, const RS_ImageData & d):
 /**
  * Destructor.
  */
-RS_Image::~RS_Image()
+Image::~Image()
 {
        /*if (img!=NULL) {
                delete[] img;
           }*/
 }
 
-RS_Entity * RS_Image::clone()
+Entity * Image::clone()
 {
-       RS_Image * i = new RS_Image(*this);
+       Image * i = new Image(*this);
        i->setHandle(getHandle());
        i->initId();
        i->update();
@@ -52,14 +52,14 @@ RS_Entity * RS_Image::clone()
 }
 
 /**    @return RS2::EntityImage */
-/*virtual*/ RS2::EntityType RS_Image::rtti() const
+/*virtual*/ RS2::EntityType Image::rtti() const
 {
        return RS2::EntityImage;
 }
 
-void RS_Image::update()
+void Image::update()
 {
-       RS_DEBUG->print("RS_Image::update");
+       DEBUG->print("Image::update");
 
        // the whole image:
        //QImage image = QImage(data.file);
@@ -68,7 +68,7 @@ void RS_Image::update()
        if (!img.isNull())
                data.size = Vector(img.width(), img.height());
 
-       RS_DEBUG->print("RS_Image::update: OK");
+       DEBUG->print("Image::update: OK");
 
        /*
           // number of small images:
@@ -106,101 +106,101 @@ void RS_Image::update()
 }
 
 /** @return Copy of data that defines the image. */
-RS_ImageData RS_Image::getData() const
+ImageData Image::getData() const
 {
        return data;
 }
 
 /** @return Insertion point of the entity */
-/*virtual*/ Vector RS_Image::getInsertionPoint() const
+/*virtual*/ Vector Image::getInsertionPoint() const
 {
        return data.insertionPoint;
 }
 
 /** Sets the insertion point for the image. */
-void RS_Image::setInsertionPoint(Vector ip)
+void Image::setInsertionPoint(Vector ip)
 {
        data.insertionPoint = ip;
        calculateBorders();
 }
 
 /** @return File name of the image. */
-QString RS_Image::getFile() const
+QString Image::getFile() const
 {
        return data.file;
 }
 
 /** Sets the file name of the image.  */
-void RS_Image::setFile(const QString & file)
+void Image::setFile(const QString & file)
 {
        data.file = file;
 }
 
 /** @return u Vector. Points along bottom, 1 pixel long. */
-Vector RS_Image::getUVector() const
+Vector Image::getUVector() const
 {
        return data.uVector;
 }
 
 /** @return v Vector. Points along left, 1 pixel long. */
-Vector RS_Image::getVVector() const
+Vector Image::getVVector() const
 {
        return data.vVector;
 }
 
 /** @return Width of image in pixels. */
-int RS_Image::getWidth() const
+int Image::getWidth() const
 {
        return (int)data.size.x;
 }
 
 /** @return Height of image in pixels. */
-int RS_Image::getHeight() const
+int Image::getHeight() const
 {
        return (int)data.size.y;
 }
 
 /** @return Brightness. */
-int RS_Image::getBrightness() const
+int Image::getBrightness() const
 {
        return data.brightness;
 }
 
 /** @return Contrast. */
-int RS_Image::getContrast() const
+int Image::getContrast() const
 {
        return data.contrast;
 }
 
 /** @return Fade. */
-int RS_Image::getFade() const
+int Image::getFade() const
 {
        return data.fade;
 }
 
 /** @return Image definition handle. */
-int RS_Image::getHandle() const
+int Image::getHandle() const
 {
        return data.handle;
 }
 
 /** Sets the image definition handle. */
-void RS_Image::setHandle(int h)
+void Image::setHandle(int h)
 {
        data.handle = h;
 }
 
 /** @return The four corners. **/
-VectorSolutions RS_Image::getCorners()
+VectorSolutions Image::getCorners()
 {
        VectorSolutions sol(4);
 
        sol.set(0, data.insertionPoint);
        sol.set(1,
-               data.insertionPoint + data.uVector * RS_Math::round(data.size.x));
+               data.insertionPoint + data.uVector * Math::round(data.size.x));
        sol.set(3,
-               data.insertionPoint + data.vVector * RS_Math::round(data.size.y));
-       sol.set(2, sol.get(3) + data.uVector * RS_Math::round(data.size.x));
+               data.insertionPoint + data.vVector * Math::round(data.size.y));
+       sol.set(2, sol.get(3) + data.uVector * Math::round(data.size.x));
 
        return sol;
 }
@@ -208,7 +208,7 @@ VectorSolutions RS_Image::getCorners()
 /**
  * @return image with in graphic units.
  */
-double RS_Image::getImageWidth()
+double Image::getImageWidth()
 {
        return data.size.x * data.uVector.magnitude();
 }
@@ -216,12 +216,12 @@ double RS_Image::getImageWidth()
 /**
  * @return image height in graphic units.
  */
-double RS_Image::getImageHeight()
+double Image::getImageHeight()
 {
        return data.size.y * data.vVector.magnitude();
 }
 
-void RS_Image::calculateBorders()
+void Image::calculateBorders()
 {
        resetBorders();
        VectorSolutions sol = getCorners();
@@ -233,13 +233,13 @@ void RS_Image::calculateBorders()
        }
 }
 
-Vector RS_Image::getNearestEndpoint(const Vector & coord, double * dist)
+Vector Image::getNearestEndpoint(const Vector & coord, double * dist)
 {
        VectorSolutions corners = getCorners();
        return corners.getClosest(coord, dist);
 }
 
-Vector RS_Image::getNearestPointOnEntity(const Vector & coord, bool onEntity, double * dist, RS_Entity * * entity)
+Vector Image::getNearestPointOnEntity(const Vector & coord, bool onEntity, double * dist, Entity * * entity)
 {
        if (entity != NULL)
                *entity = this;
@@ -247,11 +247,11 @@ Vector RS_Image::getNearestPointOnEntity(const Vector & coord, bool onEntity, do
        VectorSolutions corners = getCorners();
        VectorSolutions points(4);
 
-       RS_Line l[] = {
-               RS_Line(NULL, RS_LineData(corners.get(0), corners.get(1))),
-               RS_Line(NULL, RS_LineData(corners.get(1), corners.get(2))),
-               RS_Line(NULL, RS_LineData(corners.get(2), corners.get(3))),
-               RS_Line(NULL, RS_LineData(corners.get(3), corners.get(0)))
+       Line l[] = {
+               Line(NULL, LineData(corners.get(0), corners.get(1))),
+               Line(NULL, LineData(corners.get(1), corners.get(2))),
+               Line(NULL, LineData(corners.get(2), corners.get(3))),
+               Line(NULL, LineData(corners.get(3), corners.get(0)))
        };
 
        for (int i = 0; i < 4; ++i)
@@ -260,7 +260,7 @@ Vector RS_Image::getNearestPointOnEntity(const Vector & coord, bool onEntity, do
        return points.getClosest(coord, dist);
 }
 
-Vector RS_Image::getNearestCenter(const Vector & coord, double * dist)
+Vector Image::getNearestCenter(const Vector & coord, double * dist)
 {
        VectorSolutions points(4);
        VectorSolutions corners = getCorners();
@@ -273,22 +273,22 @@ Vector RS_Image::getNearestCenter(const Vector & coord, double * dist)
        return points.getClosest(coord, dist);
 }
 
-Vector RS_Image::getNearestMiddle(const Vector & coord, double * dist)
+Vector Image::getNearestMiddle(const Vector & coord, double * dist)
 {
        return getNearestCenter(coord, dist);
 }
 
-Vector RS_Image::getNearestDist(double distance, const Vector & coord, double * dist)
+Vector Image::getNearestDist(double distance, const Vector & coord, double * dist)
 {
        VectorSolutions corners = getCorners();
        VectorSolutions points(4);
 
-       RS_Line l[] =
+       Line l[] =
        {
-               RS_Line(NULL, RS_LineData(corners.get(0), corners.get(1))),
-               RS_Line(NULL, RS_LineData(corners.get(1), corners.get(2))),
-               RS_Line(NULL, RS_LineData(corners.get(2), corners.get(3))),
-               RS_Line(NULL, RS_LineData(corners.get(3), corners.get(0)))
+               Line(NULL, LineData(corners.get(0), corners.get(1))),
+               Line(NULL, LineData(corners.get(1), corners.get(2))),
+               Line(NULL, LineData(corners.get(2), corners.get(3))),
+               Line(NULL, LineData(corners.get(3), corners.get(0)))
        };
 
        for (int i = 0; i < 4; ++i)
@@ -297,7 +297,7 @@ Vector RS_Image::getNearestDist(double distance, const Vector & coord, double *
        return points.getClosest(coord, dist);
 }
 
-double RS_Image::getDistanceToPoint(const Vector & coord, RS_Entity * * entity, RS2::ResolveLevel /*level*/,        double /*solidDist*/)
+double Image::getDistanceToPoint(const Vector & coord, Entity * * entity, RS2::ResolveLevel /*level*/,        double /*solidDist*/)
 {
        if (entity != NULL)
                *entity = this;
@@ -306,12 +306,12 @@ double RS_Image::getDistanceToPoint(const Vector & coord, RS_Entity * * entity,
        double dist;
        double minDist = RS_MAXDOUBLE;
 
-       RS_Line l[] =
+       Line l[] =
        {
-               RS_Line(NULL, RS_LineData(corners.get(0), corners.get(1))),
-               RS_Line(NULL, RS_LineData(corners.get(1), corners.get(2))),
-               RS_Line(NULL, RS_LineData(corners.get(2), corners.get(3))),
-               RS_Line(NULL, RS_LineData(corners.get(3), corners.get(0)))
+               Line(NULL, LineData(corners.get(0), corners.get(1))),
+               Line(NULL, LineData(corners.get(1), corners.get(2))),
+               Line(NULL, LineData(corners.get(2), corners.get(3))),
+               Line(NULL, LineData(corners.get(3), corners.get(0)))
        };
 
        for (int i = 0; i < 4; ++i)
@@ -325,18 +325,18 @@ double RS_Image::getDistanceToPoint(const Vector & coord, RS_Entity * * entity,
        return minDist;
 }
 
-/*virtual*/ double RS_Image::getLength()
+/*virtual*/ double Image::getLength()
 {
        return -1.0;
 }
 
-void RS_Image::move(Vector offset)
+void Image::move(Vector offset)
 {
        data.insertionPoint.move(offset);
        calculateBorders();
 }
 
-void RS_Image::rotate(Vector center, double angle)
+void Image::rotate(Vector center, double angle)
 {
        data.insertionPoint.rotate(center, angle);
        data.uVector.rotate(angle);
@@ -344,7 +344,7 @@ void RS_Image::rotate(Vector center, double angle)
        calculateBorders();
 }
 
-void RS_Image::scale(Vector center, Vector factor)
+void Image::scale(Vector center, Vector factor)
 {
        data.insertionPoint.scale(center, factor);
        data.uVector.scale(factor);
@@ -352,7 +352,7 @@ void RS_Image::scale(Vector center, Vector factor)
        calculateBorders();
 }
 
-void RS_Image::mirror(Vector axisPoint1, Vector axisPoint2)
+void Image::mirror(Vector axisPoint1, Vector axisPoint2)
 {
        data.insertionPoint.mirror(axisPoint1, axisPoint2);
        data.uVector.mirror(Vector(0.0, 0.0), axisPoint2 - axisPoint1);
@@ -360,7 +360,7 @@ void RS_Image::mirror(Vector axisPoint1, Vector axisPoint2)
        calculateBorders();
 }
 
-void RS_Image::draw(PaintInterface * painter, GraphicView * view, double /*patternOffset*/)
+void Image::draw(PaintInterface * painter, GraphicView * view, double /*patternOffset*/)
 {
        if (painter == NULL || view == NULL || img.isNull())
                return;
@@ -431,7 +431,7 @@ void RS_Image::draw(PaintInterface * painter, GraphicView * view, double /*patte
 /**
  * Dumps the point's data to stdout.
  */
-std::ostream & operator<<(std::ostream & os, const RS_Image & i)
+std::ostream & operator<<(std::ostream & os, const Image & i)
 {
        os << " Image: " << i.getData() << "\n";
        return os;
index 082c26cef336e8841a489e61f440aa77ca4cdde4..54fa790bdfd153a755ea0f720b2dced56fe326fe 100644 (file)
@@ -7,17 +7,17 @@
 /**
  * Holds the data that defines a line.
  */
-class RS_ImageData
+class ImageData
 {
        public:
                /**
                 * Default constructor. Leaves the data object uninitialized.
                 */
-               RS_ImageData()
+               ImageData()
                {
                }
 
-               RS_ImageData(int handle,    const Vector & insertionPoint, const Vector & uVector, const Vector & vVector, const Vector & size, const QString & file, int brightness, int contrast, int fade)
+               ImageData(int handle,    const Vector & insertionPoint, const Vector & uVector, const Vector & vVector, const Vector & size, const QString & file, int brightness, int contrast, int fade)
                {
                        this->handle = handle;
                        this->insertionPoint = insertionPoint;
@@ -30,7 +30,7 @@ class RS_ImageData
                        this->fade = fade;
                }
 
-               friend std::ostream & operator<<(std::ostream & os, const RS_ImageData & ld)
+               friend std::ostream & operator<<(std::ostream & os, const ImageData & ld)
                {
                        os << "(" << ld.insertionPoint << ")";
                        return os;
@@ -62,16 +62,16 @@ class RS_ImageData
  *
  * @author Andrew Mustun
  */
-class RS_Image: public RS_AtomicEntity
+class Image: public AtomicEntity
 {
        public:
-               RS_Image(RS_EntityContainer * parent, const RS_ImageData & d);
-               virtual ~RS_Image();
+               Image(EntityContainer * parent, const ImageData & d);
+               virtual ~Image();
 
-               virtual RS_Entity * clone();
+               virtual Entity * clone();
                virtual RS2::EntityType rtti() const;
                virtual void update();
-               RS_ImageData getData() const;
+               ImageData getData() const;
                virtual Vector getInsertionPoint() const;
                void setInsertionPoint(Vector ip);
                QString getFile() const;
@@ -90,11 +90,11 @@ class RS_Image: public RS_AtomicEntity
                double getImageHeight();
 
                virtual Vector getNearestEndpoint(const Vector & coord, double * dist = NULL);
-               virtual Vector getNearestPointOnEntity(const Vector & coord, bool onEntity = true, double * dist = NULL, RS_Entity * * entity = NULL);
+               virtual Vector getNearestPointOnEntity(const Vector & coord, bool onEntity = true, double * dist = NULL, Entity * * entity = NULL);
                virtual Vector getNearestCenter(const Vector & coord, double * dist = NULL);
                virtual Vector getNearestMiddle(const Vector & coord, double * dist = NULL);
                virtual Vector getNearestDist(double distance, const Vector & coord, double * dist = NULL);
-               virtual double getDistanceToPoint(const Vector & coord, RS_Entity * * entity = NULL, RS2::ResolveLevel level = RS2::ResolveNone, double solidDist = RS_MAXDOUBLE);
+               virtual double getDistanceToPoint(const Vector & coord, Entity * * entity = NULL, RS2::ResolveLevel level = RS2::ResolveNone, double solidDist = RS_MAXDOUBLE);
                virtual double getLength();
                virtual void move(Vector offset);
                virtual void rotate(Vector center, double angle);
@@ -103,12 +103,12 @@ class RS_Image: public RS_AtomicEntity
                /*virtual void stretch(Vector firstCorner,Vector secondCorner, Vector offset);*/
                virtual void draw(PaintInterface * painter, GraphicView * view, double patternOffset = 0.0);
 
-               friend std::ostream & operator<<(std::ostream & os, const RS_Image & l);
+               friend std::ostream & operator<<(std::ostream & os, const Image & l);
 
                virtual void calculateBorders();
 
        protected:
-               RS_ImageData data;
+               ImageData data;
                QImage img;
 };
 
index 1046349d95ef72f22fee3e817cc244ff114e763e..9309d60cc20e387b86fed7a16f1a9f1c15c13ac0 100644 (file)
 /**
  * Constructor.
  */
-RS_InfoArea::RS_InfoArea()
+InfoArea::InfoArea()
 {
 }
 
 /**
  * Destructor.
  */
-RS_InfoArea::~RS_InfoArea()
+InfoArea::~InfoArea()
 {
 }
 
@@ -38,7 +38,7 @@ RS_InfoArea::~RS_InfoArea()
  *
  * @param p co-ordinate of the point
  */
-void RS_InfoArea::addPoint(const Vector & p)
+void InfoArea::addPoint(const Vector & p)
 {
        if (thePoints.empty())
                baseY = p.y;
@@ -49,7 +49,7 @@ void RS_InfoArea::addPoint(const Vector & p)
 /**
  * Resets the points.
  */
-void RS_InfoArea::reset()
+void InfoArea::reset()
 {
        thePoints.clear();
        area = 0.0;
@@ -59,13 +59,13 @@ void RS_InfoArea::reset()
 /**
  * Closes the polygon if it is not closed already.
  */
-void RS_InfoArea::close()
+void InfoArea::close()
 {
        if (isValid() && isClosed() == false)
        {
                thePoints.append(thePoints.first());
 
-               RS_DEBUG->print("RS_InfoArea::close: closed");
+               DEBUG->print("InfoArea::close: closed");
        }
 }
 
@@ -74,7 +74,7 @@ void RS_InfoArea::close()
  *   identical)
  * @retval false Otherwise.
  */
-bool RS_InfoArea::isClosed()
+bool InfoArea::isClosed()
 {
        return (thePoints.first().distanceTo(thePoints.last()) < 1.0e-4);
 }
@@ -83,16 +83,16 @@ bool RS_InfoArea::isClosed()
  * @retval true If the area is defined (i.e. there are at least 3 points)
  * @retval false If there are only two or less points.
  */
-bool RS_InfoArea::isValid()
+bool InfoArea::isValid()
 {
-       RS_DEBUG->print("RS_InfoArea::isValid: count: %d", thePoints.count());
+       DEBUG->print("InfoArea::isValid: count: %d", thePoints.count());
        return (thePoints.count() > 2);
 }
 
 /**
  * Calculates the area and the circumference of the area.
  */
-void RS_InfoArea::calculate()
+void InfoArea::calculate()
 {
        area = 0.0;
        circumference = 0.0;
@@ -131,17 +131,17 @@ void RS_InfoArea::calculate()
        area = fabs(area);
 }
 
-double RS_InfoArea::getArea()
+double InfoArea::getArea()
 {
        return area;
 }
 
-double RS_InfoArea::getCircumference()
+double InfoArea::getCircumference()
 {
        return circumference;
 }
 
-int RS_InfoArea::count()
+int InfoArea::count()
 {
        return thePoints.count();
 }
@@ -152,7 +152,7 @@ int RS_InfoArea::count()
  * @param p1 first point
  * @param p2 second point
  */
-double RS_InfoArea::calcSubArea(const Vector & p1, const Vector & p2)
+double InfoArea::calcSubArea(const Vector & p1, const Vector & p2)
 {
        double width = p2.x - p1.x;
        double height = (p1.y - baseY) + (p2.y - baseY);
@@ -165,7 +165,7 @@ double RS_InfoArea::calcSubArea(const Vector & p1, const Vector & p2)
     \param _p2 second point
 */
 /*double
-RS_InfoArea::calcDistance(Vector *_p1, Vector *_p2)
+InfoArea::calcDistance(Vector *_p1, Vector *_p2)
 {
        return mtGetDistance(_p1->getX(), _p1->getY(), _p2->getX(), _p2->getY());
 }*/
index 607a5c75aad30a2edbd26fa1d41571aef28f9d9b..0f1e5f5c57507c85a1b3e42332de63a4be4c1a48 100644 (file)
@@ -9,11 +9,11 @@
  *
  * @author Andrew Mustun
  */
-class RS_InfoArea
+class InfoArea
 {
        public:
-               RS_InfoArea();
-               ~RS_InfoArea();
+               InfoArea();
+               ~InfoArea();
 
                void reset();
                void addPoint(const Vector & p);
index ee95485fc182ed8b18d973061628af4c6a3109d1..6c63857d2d584b6e636fbd4a9ba4bcb354740d1f 100644 (file)
@@ -26,7 +26,7 @@
  *        entities. Usually that's an Drawing entity but
  *        it can also be a polyline, text, ...
  */
-RS_Information::RS_Information(RS_EntityContainer& container)
+Information::Information(EntityContainer& container)
 {
        this->container = &container;
 }
@@ -35,7 +35,7 @@ RS_Information::RS_Information(RS_EntityContainer& container)
  * @return true: if the entity is a dimensioning enity.
  *         false: otherwise
  */
-bool RS_Information::isDimension(RS2::EntityType type)
+bool Information::isDimension(RS2::EntityType type)
 {
        if (type == RS2::EntityDimAligned || type == RS2::EntityDimLinear
                || type == RS2::EntityDimRadial || type == RS2::EntityDimDiametric
@@ -53,7 +53,7 @@ bool RS_Information::isDimension(RS2::EntityType type)
  * @retval true the entity can be trimmed.
  * i.e. it is in a graphic or in a polyline.
  */
-bool RS_Information::isTrimmable(RS_Entity * e)
+bool Information::isTrimmable(Entity * e)
 {
        if (e)
        {
@@ -80,7 +80,7 @@ bool RS_Information::isTrimmable(RS_Entity * e)
  * @retval true the two entities can be trimmed to each other;
  * i.e. they are in a graphic or in the same polyline.
  */
-bool RS_Information::isTrimmable(RS_Entity * e1, RS_Entity * e2)
+bool Information::isTrimmable(Entity * e1, Entity * e2)
 {
        if (e1 && e2)
        {
@@ -91,10 +91,10 @@ bool RS_Information::isTrimmable(RS_Entity * e1, RS_Entity * e2)
                                && e1->getParent()==e2->getParent())
                        {
                                // in the same polyline
-                               RS_EntityContainer * pl = e1->getParent();
+                               EntityContainer * pl = e1->getParent();
                                int idx1 = pl->findEntity(e1);
                                int idx2 = pl->findEntity(e2);
-                               RS_DEBUG->print("RS_Information::isTrimmable: idx1: %d, idx2: %d", idx1, idx2);
+                               DEBUG->print("Information::isTrimmable: idx1: %d, idx2: %d", idx1, idx2);
 
                                if (abs(idx1 - idx2) == 1 || abs(idx1 - idx2) == pl->count() - 1)
                                {
@@ -137,7 +137,7 @@ bool RS_Information::isTrimmable(RS_Entity * e1, RS_Entity * e2)
  * if there are no elements at all in this graphics
  * container.
  */
-Vector RS_Information::getNearestEndpoint(const Vector & coord, double * dist) const
+Vector Information::getNearestEndpoint(const Vector & coord, double * dist) const
 {
        return container->getNearestEndpoint(coord, dist);
 }
@@ -155,8 +155,8 @@ Vector RS_Information::getNearestEndpoint(const Vector & coord, double * dist) c
  * if there are no elements at all in this graphics
  * container.
  */
-Vector RS_Information::getNearestPointOnEntity(const Vector & coord,
-       bool onEntity, double * dist, RS_Entity ** entity) const
+Vector Information::getNearestPointOnEntity(const Vector & coord,
+       bool onEntity, double * dist, Entity ** entity) const
 {
        return container->getNearestPointOnEntity(coord, onEntity, dist, entity);
 }
@@ -172,7 +172,7 @@ Vector RS_Information::getNearestPointOnEntity(const Vector & coord,
  * @return the entity found or NULL if there are no elements
  * at all in this graphics container.
  */
-RS_Entity * RS_Information::getNearestEntity(const Vector & coord,
+Entity * Information::getNearestEntity(const Vector & coord,
        double * dist, RS2::ResolveLevel level) const
 {
        return container->getNearestEntity(coord, dist, level);
@@ -190,8 +190,8 @@ RS_Entity * RS_Information::getNearestEntity(const Vector & coord,
  * @return All intersections of the two entities. The tangent flag in
  * VectorSolutions is set if one intersection is a tangent point.
  */
-VectorSolutions RS_Information::getIntersection(RS_Entity * e1,
-       RS_Entity * e2, bool onEntities)
+VectorSolutions Information::getIntersection(Entity * e1,
+       Entity * e2, bool onEntities)
 {
        VectorSolutions ret;
        double tol = 1.0e-4;
@@ -212,15 +212,15 @@ VectorSolutions RS_Information::getIntersection(RS_Entity * e1,
        {
                if (e2->rtti() == RS2::EntityEllipse)
                {
-                       RS_Entity * tmp = e1;
+                       Entity * tmp = e1;
                        e1 = e2;
                        e2 = tmp;
                }
 
                if (e2->rtti() == RS2::EntityLine)
                {
-                       RS_Ellipse * ellipse = (RS_Ellipse *)e1;
-                       ret = getIntersectionLineEllipse((RS_Line *)e2, ellipse);
+                       Ellipse * ellipse = (Ellipse *)e1;
+                       ret = getIntersectionLineEllipse((Line *)e2, ellipse);
                        tol = 1.0e-1;
                }
                // ellipse / arc, ellipse / ellipse: not supported:
@@ -231,20 +231,20 @@ VectorSolutions RS_Information::getIntersection(RS_Entity * e1,
        }
        else
        {
-               RS_Entity * te1 = e1;
-               RS_Entity * te2 = e2;
+               Entity * te1 = e1;
+               Entity * te2 = e2;
 
                // entity copies - so we only have to deal with lines and arcs
-               RS_Line l1(NULL, RS_LineData(Vector(0.0, 0.0), Vector(0.0, 0.0)));
-               RS_Line l2(NULL, RS_LineData(Vector(0.0, 0.0), Vector(0.0, 0.0)));
+               Line l1(NULL, LineData(Vector(0.0, 0.0), Vector(0.0, 0.0)));
+               Line l2(NULL, LineData(Vector(0.0, 0.0), Vector(0.0, 0.0)));
 
-               RS_Arc a1(NULL, RS_ArcData(Vector(0.0, 0.0), 1.0, 0.0, 2 * M_PI, false));
-               RS_Arc a2(NULL, RS_ArcData(Vector(0.0, 0.0), 1.0, 0.0, 2 * M_PI, false));
+               Arc a1(NULL, ArcData(Vector(0.0, 0.0), 1.0, 0.0, 2 * M_PI, false));
+               Arc a2(NULL, ArcData(Vector(0.0, 0.0), 1.0, 0.0, 2 * M_PI, false));
 
                // convert construction lines to lines:
                if (e1->rtti() == RS2::EntityConstructionLine)
                {
-                       RS_ConstructionLine * cl = (RS_ConstructionLine *)e1;
+                       ConstructionLine * cl = (ConstructionLine *)e1;
                        l1.setStartpoint(cl->getPoint1());
                        l1.setEndpoint(cl->getPoint2());
                        te1 = &l1;
@@ -252,7 +252,7 @@ VectorSolutions RS_Information::getIntersection(RS_Entity * e1,
 
                if (e2->rtti() == RS2::EntityConstructionLine)
                {
-                       RS_ConstructionLine * cl = (RS_ConstructionLine *)e2;
+                       ConstructionLine * cl = (ConstructionLine *)e2;
                        l2.setStartpoint(cl->getPoint1());
                        l2.setEndpoint(cl->getPoint2());
                        te2 = &l2;
@@ -261,16 +261,16 @@ VectorSolutions RS_Information::getIntersection(RS_Entity * e1,
                // convert circles to arcs:
                if (e1->rtti() == RS2::EntityCircle)
                {
-                       RS_Circle * c = (RS_Circle *)e1;
-                       RS_ArcData data(c->getCenter(), c->getRadius(), 0.0, 2 * M_PI, false);
+                       Circle * c = (Circle *)e1;
+                       ArcData data(c->getCenter(), c->getRadius(), 0.0, 2 * M_PI, false);
                        a1.setData(data);
                        te1 = &a1;
                }
 
                if (e2->rtti() == RS2::EntityCircle)
                {
-                       RS_Circle * c = (RS_Circle *)e2;
-                       RS_ArcData data(c->getCenter(), c->getRadius(), 0.0, 2 * M_PI, false);
+                       Circle * c = (Circle *)e2;
+                       ArcData data(c->getCenter(), c->getRadius(), 0.0, 2 * M_PI, false);
                        a2.setData(data);
                        te2 = &a2;
                }
@@ -280,37 +280,37 @@ VectorSolutions RS_Information::getIntersection(RS_Entity * e1,
                //else
                if (te1->rtti() == RS2::EntityLine && te2->rtti() == RS2::EntityLine)
                {
-                       RS_Line * line1 = (RS_Line *)te1;
-                       RS_Line * line2 = (RS_Line *)te2;
+                       Line * line1 = (Line *)te1;
+                       Line * line2 = (Line *)te2;
                        ret = getIntersectionLineLine(line1, line2);
                }
                // line / arc:
                //
                else if (te1->rtti() == RS2::EntityLine && te2->rtti() == RS2::EntityArc)
                {
-                       RS_Line * line = (RS_Line *)te1;
-                       RS_Arc * arc = (RS_Arc *)te2;
+                       Line * line = (Line *)te1;
+                       Arc * arc = (Arc *)te2;
                        ret = getIntersectionLineArc(line, arc);
                }
                // arc / line:
                //
                else if (te1->rtti() == RS2::EntityArc && te2->rtti() == RS2::EntityLine)
                {
-                       RS_Arc * arc = (RS_Arc *)te1;
-                       RS_Line * line = (RS_Line *)te2;
+                       Arc * arc = (Arc *)te1;
+                       Line * line = (Line *)te2;
                        ret = getIntersectionLineArc(line, arc);
                }
                // arc / arc:
                //
                else if (te1->rtti() == RS2::EntityArc && te2->rtti() == RS2::EntityArc)
                {
-                       RS_Arc * arc1 = (RS_Arc *)te1;
-                       RS_Arc * arc2 = (RS_Arc *)te2;
+                       Arc * arc1 = (Arc *)te1;
+                       Arc * arc2 = (Arc *)te2;
                        ret = getIntersectionArcArc(arc1, arc2);
                }
                else
                {
-                       RS_DEBUG->print("RS_Information::getIntersection:: Unsupported entity type.");
+                       DEBUG->print("Information::getIntersection:: Unsupported entity type.");
                }
        }
 
@@ -360,7 +360,7 @@ VectorSolutions RS_Information::getIntersection(RS_Entity * e1,
 /**
  * @return Intersection between two lines.
  */
-VectorSolutions RS_Information::getIntersectionLineLine(RS_Line * e1, RS_Line * e2)
+VectorSolutions Information::getIntersectionLineLine(Line * e1, Line * e2)
 {
        VectorSolutions ret;
 
@@ -392,7 +392,7 @@ VectorSolutions RS_Information::getIntersectionLineLine(RS_Line * e1, RS_Line *
 /**
  * @return One or two intersection points between given entities.
  */
-VectorSolutions RS_Information::getIntersectionLineArc(RS_Line * line, RS_Arc * arc)
+VectorSolutions Information::getIntersectionLineArc(Line * line, Arc * arc)
 {
        VectorSolutions ret;
 
@@ -422,9 +422,9 @@ VectorSolutions RS_Information::getIntersectionLineArc(RS_Line * line, RS_Arc *
        Vector delta = p - c;
 
        // root term:
-       double term = RS_Math::pow(Vector::dotP(d, delta), 2.0)
-                               - RS_Math::pow(d.magnitude(), 2.0)
-                               * (RS_Math::pow(delta.magnitude(), 2.0) - RS_Math::pow(r, 2.0));
+       double term = Math::pow(Vector::dotP(d, delta), 2.0)
+                               - Math::pow(d.magnitude(), 2.0)
+                               * (Math::pow(delta.magnitude(), 2.0) - Math::pow(r, 2.0));
 
        // no intersection:
        if (term<0.0) {
@@ -435,7 +435,7 @@ VectorSolutions RS_Information::getIntersectionLineArc(RS_Line * line, RS_Arc *
        // one or two intersections:
        else {
                double t1 = (- Vector::dotP(d, delta) + sqrt(term))
-                                       / RS_Math::pow(d.magnitude(), 2.0);
+                                       / Math::pow(d.magnitude(), 2.0);
                double t2;
                bool tangent = false;
 
@@ -448,7 +448,7 @@ VectorSolutions RS_Information::getIntersectionLineArc(RS_Line * line, RS_Arc *
                // two intersections
                else {
                        t2 = (-Vector::dotP(d, delta) - sqrt(term))
-                               / RS_Math::pow(d.magnitude(), 2.0);
+                               / Math::pow(d.magnitude(), 2.0);
                }
 
                Vector sol1;
@@ -470,7 +470,7 @@ VectorSolutions RS_Information::getIntersectionLineArc(RS_Line * line, RS_Arc *
 /**
  * @return One or two intersection points between given entities.
  */
-VectorSolutions RS_Information::getIntersectionArcArc(RS_Arc * e1, RS_Arc * e2)
+VectorSolutions Information::getIntersectionArcArc(Arc * e1, Arc * e2)
 {
        VectorSolutions ret;
 
@@ -495,9 +495,9 @@ VectorSolutions RS_Information::getIntersectionArcArc(RS_Arc * e1, RS_Arc * e2)
 
        double s, t1, t2, term;
 
-       s = 1.0/2.0 * ((r1*r1 - r2*r2)/(RS_Math::pow(u.magnitude(), 2.0)) + 1.0);
+       s = 1.0/2.0 * ((r1*r1 - r2*r2)/(Math::pow(u.magnitude(), 2.0)) + 1.0);
 
-       term = (r1*r1)/(RS_Math::pow(u.magnitude(), 2.0)) - s*s;
+       term = (r1*r1)/(Math::pow(u.magnitude(), 2.0)) - s*s;
 
        // no intersection:
        if (term<0.0) {
@@ -530,7 +530,7 @@ VectorSolutions RS_Information::getIntersectionArcArc(RS_Arc * e1, RS_Arc * e2)
 /**
  * @return One or two intersection points between given entities.
  */
-VectorSolutions RS_Information::getIntersectionLineEllipse(RS_Line * line, RS_Ellipse * ellipse)
+VectorSolutions Information::getIntersectionLineEllipse(Line * line, Ellipse * ellipse)
 {
        VectorSolutions ret;
 
@@ -558,7 +558,7 @@ VectorSolutions RS_Information::getIntersectionLineEllipse(RS_Line * line, RS_El
        double d = b*b - a*c;
 
        if (d < 0) {
-               RS_DEBUG->print("RS_Information::getIntersectionLineEllipse: outside 0");
+               DEBUG->print("Information::getIntersectionLineEllipse: outside 0");
        } else if ( d > 0 ) {
                double root = sqrt(d);
                double t_a = (-b - root) / a;
@@ -566,24 +566,24 @@ VectorSolutions RS_Information::getIntersectionLineEllipse(RS_Line * line, RS_El
 
                /*if ( (t_a < 0 || 1 < t_a) && (t_b < 0 || 1 < t_b) ) {
                        if ( (t_a < 0 && t_b < 0) || (t_a > 1 && t_b > 1) ) {
-                               RS_DEBUG->print("RS_Information::getIntersectionLineEllipse: outside 1");
+                               DEBUG->print("Information::getIntersectionLineEllipse: outside 1");
                        }
                        else {
-                               RS_DEBUG->print("RS_Information::getIntersectionLineEllipse: inside 1");
+                               DEBUG->print("Information::getIntersectionLineEllipse: inside 1");
                        }
                } else {*/
-                       RS_DEBUG->print("RS_Information::getIntersectionLineEllipse: intersection 1");
+                       DEBUG->print("Information::getIntersectionLineEllipse: intersection 1");
                        Vector ret1(false);
                        Vector ret2(false);
                        //if ( 0 <= t_a && t_a <= 1 ) {
-                               //RS_DEBUG->print("RS_Information::getIntersectionLineEllipse: 0<=t_a<=1");
+                               //DEBUG->print("Information::getIntersectionLineEllipse: 0<=t_a<=1");
                                ret1 = a1.lerp(a2, t_a);
-                               RS_DEBUG->print("RS_Information::getIntersectionLineEllipse: ret1: %f/%f", ret1.x, ret1.y);
+                               DEBUG->print("Information::getIntersectionLineEllipse: ret1: %f/%f", ret1.x, ret1.y);
                        //}
                        //if ( 0 <= t_b && t_b <= 1 ) {
-                               //RS_DEBUG->print("RS_Information::getIntersectionLineEllipse: 0<=t_b<=1");
+                               //DEBUG->print("Information::getIntersectionLineEllipse: 0<=t_b<=1");
                                ret2 = a1.lerp(a2, t_b);
-                               RS_DEBUG->print("RS_Information::getIntersectionLineEllipse: ret2: %f/%f", ret2.x, ret2.y);
+                               DEBUG->print("Information::getIntersectionLineEllipse: ret2: %f/%f", ret2.x, ret2.y);
                        //}
                        if (ret1.valid && ret2.valid) {
                                ret = VectorSolutions(ret1, ret2);
@@ -600,12 +600,12 @@ VectorSolutions RS_Information::getIntersectionLineEllipse(RS_Line * line, RS_El
        } else {
                double t = -b/a;
                if ( 0 <= t && t <= 1 ) {
-                       RS_DEBUG->print("RS_Information::getIntersectionLineEllipse: 0<=t<=1");
-                       RS_DEBUG->print("RS_Information::getIntersectionLineEllipse: intersection 2");
+                       DEBUG->print("Information::getIntersectionLineEllipse: 0<=t<=1");
+                       DEBUG->print("Information::getIntersectionLineEllipse: intersection 2");
                        ret = VectorSolutions(a1.lerp(a2, t));
-                       RS_DEBUG->print("RS_Information::getIntersectionLineEllipse: ret1: %f/%f", ret.get(0).x, ret.get(0).y);
+                       DEBUG->print("Information::getIntersectionLineEllipse: ret1: %f/%f", ret.get(0).x, ret.get(0).y);
                } else {
-                       RS_DEBUG->print("RS_Information::getIntersectionLineEllipse: outside 2");
+                       DEBUG->print("Information::getIntersectionLineEllipse: outside 2");
                }
        }
 
@@ -615,13 +615,13 @@ VectorSolutions RS_Information::getIntersectionLineEllipse(RS_Line * line, RS_El
 
 
        /*
-       RS_Arc* arc = new RS_Arc(NULL,
-                                                       RS_ArcData(ellipse->getCenter(),
+       Arc* arc = new Arc(NULL,
+                                                       ArcData(ellipse->getCenter(),
                                                                                ellipse->getMajorRadius(),
                                                                                ellipse->getAngle1(),
                                                                                ellipse->getAngle2(),
                                                                                false));
-       RS_Line* other = (RS_Line*)line->clone();
+       Line* other = (Line*)line->clone();
        double angle = ellipse->getAngle();
        //double ratio = ellipse->getRatio();
 
@@ -651,12 +651,12 @@ VectorSolutions RS_Information::getIntersectionLineEllipse(RS_Line * line, RS_El
  * @param onContour Will be set to true if the given point it exactly
  *         on the contour.
  */
-bool RS_Information::isPointInsideContour(const Vector & point,
-       RS_EntityContainer * contour, bool * onContour)
+bool Information::isPointInsideContour(const Vector & point,
+       EntityContainer * contour, bool * onContour)
 {
        if (contour==NULL) {
-               RS_DEBUG->print(RS_Debug::D_WARNING,
-                       "RS_Information::isPointInsideContour: contour is NULL");
+               DEBUG->print(Debug::D_WARNING,
+                       "Information::isPointInsideContour: contour is NULL");
                return false;
        }
 
@@ -677,18 +677,18 @@ bool RS_Information::isPointInsideContour(const Vector & point,
                // create ray:
                Vector v;
                v.setPolar(width*10.0, rayAngle);
-               RS_Line ray(NULL, RS_LineData(point, point+v));
+               Line ray(NULL, LineData(point, point+v));
                counter = 0;
                VectorSolutions sol;
 
                if (onContour)
                        *onContour = false;
 
-               for(RS_Entity * e=contour->firstEntity(RS2::ResolveAll); e!=NULL;
+               for(Entity * e=contour->firstEntity(RS2::ResolveAll); e!=NULL;
                        e=contour->nextEntity(RS2::ResolveAll))
                {
                        // intersection(s) from ray with contour entity:
-                       sol = RS_Information::getIntersection(&ray, e, true);
+                       sol = Information::getIntersection(&ray, e, true);
 
                        for(int i=0; i<=1; ++i)
                        {
@@ -708,12 +708,12 @@ bool RS_Information::isPointInsideContour(const Vector & point,
                                        {
                                                if (e->rtti() == RS2::EntityLine)
                                                {
-                                                       RS_Line * line = (RS_Line *)e;
+                                                       Line * line = (Line *)e;
 
                                                        // ray goes through startpoint of line:
                                                        if (p.distanceTo(line->getStartpoint()) < 1.0e-4)
                                                        {
-                                                               if (RS_Math::correctAngle(line->getAngle1()) < M_PI)
+                                                               if (Math::correctAngle(line->getAngle1()) < M_PI)
                                                                {
                                                                        counter++;
                                                                        sure = false;
@@ -722,7 +722,7 @@ bool RS_Information::isPointInsideContour(const Vector & point,
                                                        // ray goes through endpoint of line:
                                                        else if (p.distanceTo(line->getEndpoint()) < 1.0e-4)
                                                        {
-                                                               if (RS_Math::correctAngle(line->getAngle2()) < M_PI)
+                                                               if (Math::correctAngle(line->getAngle2()) < M_PI)
                                                                {
                                                                        counter++;
                                                                        sure = false;
@@ -736,7 +736,7 @@ bool RS_Information::isPointInsideContour(const Vector & point,
                                                }
                                                else if (e->rtti() == RS2::EntityArc)
                                                {
-                                                       RS_Arc * arc = (RS_Arc *)e;
+                                                       Arc * arc = (Arc *)e;
 
                                                        if (p.distanceTo(arc->getStartpoint()) < 1.0e-4)
                                                        {
index 4af79949024416d953a9c2c395b4ced58e16ab00..36829776954360da6f226c588e9e3d8605d4c0ce 100644 (file)
  *
  * @author Andrew Mustun
  */
-class RS_Information
+class Information
 {
        public:
-               RS_Information(RS_EntityContainer & entityContainer);
+               Information(EntityContainer & entityContainer);
 
                static bool isDimension(RS2::EntityType type);
-               static bool isTrimmable(RS_Entity * e);
-               static bool isTrimmable(RS_Entity * e1, RS_Entity * e2);
+               static bool isTrimmable(Entity * e);
+               static bool isTrimmable(Entity * e1, Entity * e2);
                Vector getNearestEndpoint(const Vector & point, double * dist = NULL) const;
                Vector getNearestPointOnEntity(const Vector & point, bool onEntity = true,
-                       double * dist = NULL, RS_Entity ** entity = NULL) const;
-               RS_Entity * getNearestEntity(const Vector & point, double * dist = NULL,
+                       double * dist = NULL, Entity ** entity = NULL) const;
+               Entity * getNearestEntity(const Vector & point, double * dist = NULL,
                        RS2::ResolveLevel level = RS2::ResolveAll) const;
-               static VectorSolutions getIntersection(RS_Entity * e1, RS_Entity * e2, bool onEntities = false);
-               static VectorSolutions getIntersectionLineLine(RS_Line * e1, RS_Line * e2);
-               static VectorSolutions getIntersectionLineArc(RS_Line * line, RS_Arc * arc);
-               static VectorSolutions getIntersectionArcArc(RS_Arc * e1, RS_Arc * e2);
-               static VectorSolutions getIntersectionLineEllipse(RS_Line * line, RS_Ellipse * ellipse);
-               static bool isPointInsideContour(const Vector & point, RS_EntityContainer * contour,
+               static VectorSolutions getIntersection(Entity * e1, Entity * e2, bool onEntities = false);
+               static VectorSolutions getIntersectionLineLine(Line * e1, Line * e2);
+               static VectorSolutions getIntersectionLineArc(Line * line, Arc * arc);
+               static VectorSolutions getIntersectionArcArc(Arc * e1, Arc * e2);
+               static VectorSolutions getIntersectionLineEllipse(Line * line, Ellipse * ellipse);
+               static bool isPointInsideContour(const Vector & point, EntityContainer * contour,
                        bool * onContour = NULL);
 
        protected:
-               RS_EntityContainer * container;
+               EntityContainer * container;
 };
 
 #endif
index 5365b008d0e11bc00b40fc4a089607bdb3830d00..c6b9ea170d5d45a25ff35451a86827d40b1e6ec6 100644 (file)
@@ -22,8 +22,8 @@
 /**
  * @param parent The graphic this block belongs to.
  */
-RS_Insert::RS_Insert(RS_EntityContainer * parent, const RS_InsertData & d):
-       RS_EntityContainer(parent), data(d)
+Insert::Insert(EntityContainer * parent, const InsertData & d):
+       EntityContainer(parent), data(d)
 {
        block = NULL;
 
@@ -37,13 +37,13 @@ RS_Insert::RS_Insert(RS_EntityContainer * parent, const RS_InsertData & d):
 /**
  * Destructor.
  */
-RS_Insert::~RS_Insert()
+Insert::~Insert()
 {
 }
 
-/*virtual*/ RS_Entity * RS_Insert::clone()
+/*virtual*/ Entity * Insert::clone()
 {
-       RS_Insert * i = new RS_Insert(*this);
+       Insert * i = new Insert(*this);
 #warning "!!! Need to deal with setAutoDelete() Qt3->Qt4 !!!"
 //     i->entities.setAutoDelete(entities.autoDelete());
        i->initId();
@@ -52,13 +52,13 @@ RS_Insert::~RS_Insert()
 }
 
 /** @return RS2::EntityInsert */
-/*virtual*/ RS2::EntityType RS_Insert::rtti() const
+/*virtual*/ RS2::EntityType Insert::rtti() const
 {
        return RS2::EntityInsert;
 }
 
 /** @return Copy of data that defines the insert. **/
-RS_InsertData RS_Insert::getData() const
+InsertData Insert::getData() const
 {
        return data;
 }
@@ -66,9 +66,9 @@ RS_InsertData RS_Insert::getData() const
 /**
  * Reimplementation of reparent. Invalidates block cache pointer.
  */
-/*virtual*/ void RS_Insert::reparent(RS_EntityContainer * parent)
+/*virtual*/ void Insert::reparent(EntityContainer * parent)
 {
-       RS_Entity::reparent(parent);
+       Entity::reparent(parent);
        block = NULL;
 }
 
@@ -78,12 +78,12 @@ RS_InsertData RS_Insert::getData() const
  *   from the blockSource if one was supplied and otherwise from
  *   the closest parent graphic.
  */
-RS_Block * RS_Insert::getBlockForInsert()
+Block * Insert::getBlockForInsert()
 {
        if (block)
                return block;
 
-       RS_BlockList * blkList;
+       BlockList * blkList;
 
        if (!data.blockSource)
        {
@@ -94,7 +94,7 @@ RS_Block * RS_Insert::getBlockForInsert()
                blkList = data.blockSource;
        }
 
-       RS_Block * blk = NULL;
+       Block * blk = NULL;
 
        if (blkList)
                blk = blkList->find(data.name);
@@ -114,75 +114,75 @@ RS_Block * RS_Insert::getBlockForInsert()
  * Updates the entity buffer of this insert entity. This method
  * needs to be called whenever the block this insert is based on changes.
  */
-void RS_Insert::update()
+void Insert::update()
 {
-       RS_DEBUG->print("RS_Insert::update");
-       RS_DEBUG->print("RS_Insert::update: name: %s", data.name.toLatin1().data());
-       RS_DEBUG->print("RS_Insert::update: insertionPoint: %f/%f",
+       DEBUG->print("Insert::update");
+       DEBUG->print("Insert::update: name: %s", data.name.toLatin1().data());
+       DEBUG->print("Insert::update: insertionPoint: %f/%f",
                data.insertionPoint.x, data.insertionPoint.y);
 
        if (!updateEnabled)
                return;
 
        clear();
-       RS_Block * blk = getBlockForInsert();
+       Block * blk = getBlockForInsert();
 
        if (!blk)
        {
-               RS_DEBUG->print("RS_Insert::update: Block is NULL");
+               DEBUG->print("Insert::update: Block is NULL");
                return;
        }
 
        if (isUndone())
        {
-               RS_DEBUG->print("RS_Insert::update: Insert is in undo list");
+               DEBUG->print("Insert::update: Insert is in undo list");
                return;
        }
 
        if (fabs(data.scaleFactor.x) < 1.0e-6 || fabs(data.scaleFactor.y) < 1.0e-6)
        {
-               RS_DEBUG->print("RS_Insert::update: scale factor is 0");
+               DEBUG->print("Insert::update: scale factor is 0");
                return;
        }
 
-       RS_Pen tmpPen;
+       Pen tmpPen;
 
-       /*Q3PtrListIterator<RS_Entity> it = createIterator();
-       RS_Entity* e;
+       /*Q3PtrListIterator<Entity> it = createIterator();
+       Entity* e;
        while ( (e = it.current()) != NULL ) {
                ++it;*/
 
-       RS_DEBUG->print("RS_Insert::update: cols: %d, rows: %d", data.cols, data.rows);
-       RS_DEBUG->print("RS_Insert::update: block has %d entities", blk->count());
+       DEBUG->print("Insert::update: cols: %d, rows: %d", data.cols, data.rows);
+       DEBUG->print("Insert::update: block has %d entities", blk->count());
 
-       for(RS_Entity * e=blk->firstEntity(); e!=NULL; e=blk->nextEntity())
+       for(Entity * e=blk->firstEntity(); e!=NULL; e=blk->nextEntity())
        {
                for(int c=0; c<data.cols; ++c)
                {
-                       RS_DEBUG->print("RS_Insert::update: col %d", c);
+                       DEBUG->print("Insert::update: col %d", c);
 
                        for(int r=0; r<data.rows; ++r)
                        {
-                               RS_DEBUG->print("RS_Insert::update: row %d", r);
+                               DEBUG->print("Insert::update: row %d", r);
 
                                if (e->rtti() == RS2::EntityInsert && data.updateMode != RS2::PreviewUpdate)
                                {
-                                       RS_DEBUG->print("RS_Insert::update: updating sub-insert");
-                                       ((RS_Insert *)e)->update();
+                                       DEBUG->print("Insert::update: updating sub-insert");
+                                       ((Insert *)e)->update();
                                }
 
-                               RS_DEBUG->print("RS_Insert::update: cloning entity");
+                               DEBUG->print("Insert::update: cloning entity");
 
-                               RS_Entity * ne = e->clone();
+                               Entity * ne = e->clone();
                                ne->initId();
                                ne->setUpdateEnabled(false);
                                ne->setParent(this);
                                ne->setVisible(getFlag(RS2::FlagVisible));
 
-                               RS_DEBUG->print("RS_Insert::update: transforming entity");
+                               DEBUG->print("Insert::update: transforming entity");
 
                                // Move:
-                               RS_DEBUG->print("RS_Insert::update: move 1");
+                               DEBUG->print("Insert::update: move 1");
                                if (fabs(data.scaleFactor.x) > 1.0e-6 && fabs(data.scaleFactor.y) > 1.0e-6)
                                {
                                        ne->move(data.insertionPoint + Vector(data.spacing.x / data.scaleFactor.x * c, data.spacing.y / data.scaleFactor.y * r));
@@ -193,13 +193,13 @@ void RS_Insert::update()
                                }
 
                                // Move because of block base point:
-                               RS_DEBUG->print("RS_Insert::update: move 2");
+                               DEBUG->print("Insert::update: move 2");
                                ne->move(blk->getBasePoint() * -1);
                                // Scale:
-                               RS_DEBUG->print("RS_Insert::update: scale");
+                               DEBUG->print("Insert::update: scale");
                                ne->scale(data.insertionPoint, data.scaleFactor);
                                // Rotate:
-                               RS_DEBUG->print("RS_Insert::update: rotate");
+                               DEBUG->print("Insert::update: rotate");
                                ne->rotate(data.insertionPoint, data.angle);
                                // Select:
                                ne->setSelected(isSelected());
@@ -208,7 +208,7 @@ void RS_Insert::update()
                                tmpPen = ne->getPen(false);
 
                                // color from block (free floating):
-                               if (tmpPen.getColor() == RS_Color(RS2::FlagByBlock))
+                               if (tmpPen.getColor() == Color(RS2::FlagByBlock))
                                        tmpPen.setColor(getPen().getColor());
 
                                // line width from block (free floating):
@@ -229,11 +229,11 @@ void RS_Insert::update()
 
                                if (data.updateMode != RS2::PreviewUpdate)
                                {
-                                       RS_DEBUG->print("RS_Insert::update: updating new entity");
+                                       DEBUG->print("Insert::update: updating new entity");
                                        ne->update();
                                }
 
-                               RS_DEBUG->print("RS_Insert::update: adding new entity");
+                               DEBUG->print("Insert::update: adding new entity");
                                addEntity(ne);
                        }
                }
@@ -241,82 +241,82 @@ void RS_Insert::update()
 
        calculateBorders();
 
-       RS_DEBUG->print("RS_Insert::update: OK");
+       DEBUG->print("Insert::update: OK");
 }
 
-QString RS_Insert::getName() const
+QString Insert::getName() const
 {
        return data.name;
 }
 
-void RS_Insert::setName(const QString & newName)
+void Insert::setName(const QString & newName)
 {
        data.name = newName;
        update();
 }
 
-Vector RS_Insert::getInsertionPoint() const
+Vector Insert::getInsertionPoint() const
 {
        return data.insertionPoint;
 }
 
-void RS_Insert::setInsertionPoint(const Vector & i)
+void Insert::setInsertionPoint(const Vector & i)
 {
        data.insertionPoint = i;
 }
 
-Vector RS_Insert::getScale() const
+Vector Insert::getScale() const
 {
        return data.scaleFactor;
 }
 
-void RS_Insert::setScale(const Vector & s)
+void Insert::setScale(const Vector & s)
 {
        data.scaleFactor = s;
 }
 
-double RS_Insert::getAngle() const
+double Insert::getAngle() const
 {
        return data.angle;
 }
 
-void RS_Insert::setAngle(double a)
+void Insert::setAngle(double a)
 {
        data.angle = a;
 }
 
-int RS_Insert::getCols() const
+int Insert::getCols() const
 {
        return data.cols;
 }
 
-void RS_Insert::setCols(int c)
+void Insert::setCols(int c)
 {
        data.cols = c;
 }
 
-int RS_Insert::getRows() const
+int Insert::getRows() const
 {
        return data.rows;
 }
 
-void RS_Insert::setRows(int r)
+void Insert::setRows(int r)
 {
        data.rows = r;
 }
 
-Vector RS_Insert::getSpacing() const
+Vector Insert::getSpacing() const
 {
        return data.spacing;
 }
 
-void RS_Insert::setSpacing(const Vector & s)
+void Insert::setSpacing(const Vector & s)
 {
        data.spacing = s;
 }
 
 /**
- * Is this insert visible? (re-implementation from RS_Entity)
+ * Is this insert visible? (re-implementation from Entity)
  *
  * @return true Only if the entity and the block and the layer it is on
  * are visible.
@@ -325,9 +325,9 @@ void RS_Insert::setSpacing(const Vector & s)
  * The Block might also be NULL. In that case the block visiblity
  * is ignored.
  */
-bool RS_Insert::isVisible()
+bool Insert::isVisible()
 {
-       RS_Block * blk = getBlockForInsert();
+       Block * blk = getBlockForInsert();
 
        if (blk != NULL)
        {
@@ -337,58 +337,58 @@ bool RS_Insert::isVisible()
                }
        }
 
-       return RS_Entity::isVisible();
+       return Entity::isVisible();
 }
 
-VectorSolutions RS_Insert::getRefPoints()
+VectorSolutions Insert::getRefPoints()
 {
        VectorSolutions ret(data.insertionPoint);
        return ret;
 }
 
-Vector RS_Insert::getNearestRef(const Vector & coord, double * dist)
+Vector Insert::getNearestRef(const Vector & coord, double * dist)
 {
        return getRefPoints().getClosest(coord, dist);
 }
 
-void RS_Insert::move(Vector offset)
+void Insert::move(Vector offset)
 {
-       RS_DEBUG->print("RS_Insert::move: offset: %f/%f",
+       DEBUG->print("Insert::move: offset: %f/%f",
                offset.x, offset.y);
-       RS_DEBUG->print("RS_Insert::move1: insertionPoint: %f/%f",
+       DEBUG->print("Insert::move1: insertionPoint: %f/%f",
                data.insertionPoint.x, data.insertionPoint.y);
     data.insertionPoint.move(offset);
-       RS_DEBUG->print("RS_Insert::move2: insertionPoint: %f/%f",
+       DEBUG->print("Insert::move2: insertionPoint: %f/%f",
                data.insertionPoint.x, data.insertionPoint.y);
     update();
 }
 
-void RS_Insert::rotate(Vector center, double angle)
+void Insert::rotate(Vector center, double angle)
 {
-       RS_DEBUG->print("RS_Insert::rotate1: insertionPoint: %f/%f "
+       DEBUG->print("Insert::rotate1: insertionPoint: %f/%f "
            "/ center: %f/%f",
                data.insertionPoint.x, data.insertionPoint.y,
                center.x, center.y);
     data.insertionPoint.rotate(center, angle);
-    data.angle = RS_Math::correctAngle(data.angle + angle);
-       RS_DEBUG->print("RS_Insert::rotate2: insertionPoint: %f/%f",
+    data.angle = Math::correctAngle(data.angle + angle);
+       DEBUG->print("Insert::rotate2: insertionPoint: %f/%f",
                data.insertionPoint.x, data.insertionPoint.y);
     update();
 }
 
-void RS_Insert::scale(Vector center, Vector factor)
+void Insert::scale(Vector center, Vector factor)
 {
-       RS_DEBUG->print("RS_Insert::scale1: insertionPoint: %f/%f",
+       DEBUG->print("Insert::scale1: insertionPoint: %f/%f",
                data.insertionPoint.x, data.insertionPoint.y);
     data.insertionPoint.scale(center, factor);
     data.scaleFactor.scale(Vector(0.0, 0.0), factor);
     data.spacing.scale(Vector(0.0, 0.0), factor);
-       RS_DEBUG->print("RS_Insert::scale2: insertionPoint: %f/%f",
+       DEBUG->print("Insert::scale2: insertionPoint: %f/%f",
                data.insertionPoint.x, data.insertionPoint.y);
     update();
 }
 
-void RS_Insert::mirror(Vector axisPoint1, Vector axisPoint2)
+void Insert::mirror(Vector axisPoint1, Vector axisPoint2)
 {
        data.insertionPoint.mirror(axisPoint1, axisPoint2);
 
@@ -402,7 +402,7 @@ void RS_Insert::mirror(Vector axisPoint1, Vector axisPoint2)
     update();
 }
 
-std::ostream & operator<<(std::ostream & os, const RS_Insert & i)
+std::ostream & operator<<(std::ostream & os, const Insert & i)
 {
     os << " Insert: " << i.getData() << std::endl;
     return os;
index b6e17ae1971b9845ad6b6bdbaa8c3d9f4aa68a4b..a9fbe65356981deb88364fe46709ba4550ab504d 100644 (file)
@@ -8,13 +8,13 @@
 /**
  * Holds the data that defines an insert.
  */
-class RS_InsertData
+class InsertData
 {
        public:
                /**
                 * Default constructor.
                 */
-               RS_InsertData() {}
+               InsertData() {}
 
                /**
                 * @param name The name of the block used as an identifier.
@@ -26,7 +26,7 @@ class RS_InsertData
                 * @param spacing Spacing between rows and cols.
                 * @param blockSource Source for the block to insert if other than parent.
                 *    Normally blocks are requested from the entity's parent but the
-                *    block can also come from another resource. RS_Text uses that
+                *    block can also come from another resource. Text uses that
                 *    to share the blocks (letters) from a font.
                 * @param updateMode RS2::Update will update the insert entity instantly
                 *    RS2::NoUpdate will not update the insert. You can update
@@ -34,8 +34,8 @@ class RS_InsertData
                 *    often the case since you might want to adjust attributes
                 *    after creating an insert entity.
                 */
-               RS_InsertData(const QString & name, Vector insertionPoint, Vector scaleFactor,
-                       double angle, int cols, int rows, Vector spacing, RS_BlockList * blockSource = NULL,
+               InsertData(const QString & name, Vector insertionPoint, Vector scaleFactor,
+                       double angle, int cols, int rows, Vector spacing, BlockList * blockSource = NULL,
                        RS2::UpdateMode updateMode = RS2::Update)
                {
                        this->name = name;
@@ -49,9 +49,9 @@ class RS_InsertData
                        this->updateMode = updateMode;
                }
 
-               friend class RS_Insert;
+               friend class Insert;
 
-               friend std::ostream & operator<<(std::ostream & os, const RS_InsertData & d)
+               friend std::ostream & operator<<(std::ostream & os, const InsertData & d)
                {
                        os << "(" << d.name.toLatin1().data() << ")";
                        return os;
@@ -63,7 +63,7 @@ class RS_InsertData
                double angle;
                int cols, rows;
                Vector spacing;
-               RS_BlockList * blockSource;
+               BlockList * blockSource;
                RS2::UpdateMode updateMode;
 };
 
@@ -76,18 +76,18 @@ class RS_InsertData
  *
  * @author Andrew Mustun
  */
-class RS_Insert: public RS_EntityContainer
+class Insert: public EntityContainer
 {
        public:
-               RS_Insert(RS_EntityContainer * parent, const RS_InsertData & d);
-               virtual ~RS_Insert();
+               Insert(EntityContainer * parent, const InsertData & d);
+               virtual ~Insert();
 
-               virtual RS_Entity * clone();
+               virtual Entity * clone();
                virtual RS2::EntityType rtti() const;
-               RS_InsertData getData() const;
-               virtual void reparent(RS_EntityContainer * parent);
+               InsertData getData() const;
+               virtual void reparent(EntityContainer * parent);
 
-               RS_Block * getBlockForInsert();
+               Block * getBlockForInsert();
                virtual void update();
 
                QString getName() const;
@@ -114,11 +114,11 @@ class RS_Insert: public RS_EntityContainer
                virtual void scale(Vector center, Vector factor);
                virtual void mirror(Vector axisPoint1, Vector axisPoint2);
 
-               friend std::ostream & operator<<(std::ostream & os, const RS_Insert & i);
+               friend std::ostream & operator<<(std::ostream & os, const Insert & i);
 
        protected:
-               RS_InsertData data;
-               RS_Block * block;
+               InsertData data;
+               Block * block;
 };
 
 #endif
index 4146aa2efaaedb481d72aacc137602ff719eba43..986616df83f866abf059b5f7e3e27c0d65c4b19d 100644 (file)
@@ -22,7 +22,7 @@
 /**
  * Constructor.
  */
-RS_Layer::RS_Layer(const QString & name)
+Layer::Layer(const QString & name)
 {
        setName(name);
 
@@ -33,31 +33,31 @@ RS_Layer::RS_Layer(const QString & name)
        data.locked = false;
 }
 
-RS_Layer * RS_Layer::clone()
+Layer * Layer::clone()
 {
-       return new RS_Layer(*this);
+       return new Layer(*this);
 }
 
 /** sets a new name for this layer. */
-void RS_Layer::setName(const QString & name)
+void Layer::setName(const QString & name)
 {
        data.name = name;
 }
 
 /** @return the name of this layer. */
-QString RS_Layer::getName() const
+QString Layer::getName() const
 {
        return data.name;
 }
 
 /** sets the default pen for this layer. */
-void RS_Layer::setPen(const RS_Pen & pen)
+void Layer::setPen(const Pen & pen)
 {
        data.pen = pen;
 }
 
 /** @return default pen for this layer. */
-RS_Pen RS_Layer::getPen() const
+Pen Layer::getPen() const
 {
        return data.pen;
 }
@@ -66,7 +66,7 @@ RS_Pen RS_Layer::getPen() const
  * @retval true if this layer is frozen (invisible)
  * @retval false if this layer isn't frozen (visible)
  */
-bool RS_Layer::isFrozen() const
+bool Layer::isFrozen() const
 {
        return data.frozen;
        //getFlag(RS2::FlagFrozen);
@@ -76,7 +76,7 @@ bool RS_Layer::isFrozen() const
  * @retval true the layer has been converted already
  * @retval false the layer still needs to be converted
  */
-bool RS_Layer::isConverted() const
+bool Layer::isConverted() const
 {
        return data.converted;
 }
@@ -84,7 +84,7 @@ bool RS_Layer::isConverted() const
 /**
  * Sets the converted flag
  */
-void RS_Layer::setConverted(bool c)
+void Layer::setConverted(bool c)
 {
        data.converted = c;
 }
@@ -93,7 +93,7 @@ void RS_Layer::setConverted(bool c)
  * Toggles the visibility of this layer.
  * Freezes the layer if it's not frozen, thaws the layer otherwise
  */
-void RS_Layer::toggle()
+void Layer::toggle()
 {
        //toggleFlag(RS2::FlagFrozen);
        data.frozen = !data.frozen;
@@ -104,7 +104,7 @@ void RS_Layer::toggle()
  *
  * @param freeze true: freeze, false: defreeze
  */
-void RS_Layer::freeze(bool freeze)
+void Layer::freeze(bool freeze)
 {
        data.frozen = freeze;
        /*if (freeze) {
@@ -117,7 +117,7 @@ void RS_Layer::freeze(bool freeze)
 /**
  * Toggles the lock of this layer.
  */
-void RS_Layer::toggleLock()
+void Layer::toggleLock()
 {
        //toggleFlag(RS2::FlagFrozen);
        data.locked = !data.locked;
@@ -128,7 +128,7 @@ void RS_Layer::toggleLock()
  *
  * @param l true: lock, false: unlock
  */
-void RS_Layer::lock(bool l)
+void Layer::lock(bool l)
 {
        data.locked = l;
 }
@@ -136,7 +136,7 @@ void RS_Layer::lock(bool l)
 /**
  * return the LOCK state of the Layer
  */
-bool RS_Layer::isLocked()
+bool Layer::isLocked()
 {
        return data.locked;
 }
@@ -145,7 +145,7 @@ bool RS_Layer::isLocked()
  * Copies all attributes (pen) and the name of the layer.
  */
 /*
-RS_Layer & RS_Layer::operator=(const RS_Layer & l)
+Layer & Layer::operator=(const Layer & l)
 {
        setName(l.getName());
        setPen(l.getPen());
@@ -157,7 +157,7 @@ RS_Layer & RS_Layer::operator=(const RS_Layer & l)
 /**
  * Dumps the layers data to stdout.
  */
-std::ostream & operator<<(std::ostream & os, const RS_Layer & l)
+std::ostream & operator<<(std::ostream & os, const Layer & l)
 {
        os << " name: " << l.getName().toLatin1().data()
                << " pen: " << l.getPen()
index 187b675e0cf5d01c5924e64e0ea8703dcfa4bf10..249fc73a56c9edb208891c5c5ffe3f1b919d9978 100644 (file)
 /**
  * Holds the data that defines a layer.
  */
-class RS_LayerData
+class LayerData
 {
        public:
-               RS_LayerData() {}
+               LayerData() {}
 
-               RS_LayerData(const QString & name, const RS_Pen & pen, bool frozen, bool locked)
+               LayerData(const QString & name, const Pen & pen, bool frozen, bool locked)
                {
                        this->name = name;
                        this->pen = pen;
@@ -33,7 +33,7 @@ class RS_LayerData
                QString name;
 
                //! default pen for this layer
-               RS_Pen pen;
+               Pen pen;
 
                //! Frozen flag
                bool frozen;
@@ -50,17 +50,17 @@ class RS_LayerData
  *
  * @author Andrew Mustun
  */
-class RS_Layer
+class Layer
 {
        public:
-               explicit RS_Layer(const QString & name);
-               //RS_Layer(const char* name);
+               explicit Layer(const QString & name);
+               //Layer(const char* name);
 
-               RS_Layer * clone();
+               Layer * clone();
                void setName(const QString & name);
                QString getName() const;
-               void setPen(const RS_Pen & pen);
-               RS_Pen getPen() const;
+               void setPen(const Pen & pen);
+               Pen getPen() const;
                bool isFrozen() const;
                bool isConverted() const;
                void setConverted(bool c);
@@ -69,15 +69,15 @@ class RS_Layer
                void toggleLock();
                void lock(bool l);
                bool isLocked();
-               //RS_Layer & operator=(const RS_Layer & l);
+               //Layer & operator=(const Layer & l);
 
-               friend std::ostream & operator<<(std::ostream & os, const RS_Layer & l);
+               friend std::ostream & operator<<(std::ostream & os, const Layer & l);
 
-               //friend class RS_LayerList;
+               //friend class LayerList;
 
        private:
                //! Layer data
-               RS_LayerData data;
+               LayerData data;
 };
 
 #endif
index d46890488f44866ff582ae957493765151b10596..4196381092c7df92657e5d868ddb174502d8917f 100644 (file)
@@ -24,7 +24,7 @@
 /**
  * Default constructor.
  */
-RS_LayerList::RS_LayerList()
+LayerList::LayerList()
 {
 // Good news, we don't have to screw with this shit
 //     layers.setAutoDelete(false);
@@ -33,14 +33,14 @@ RS_LayerList::RS_LayerList()
        setModified(false);
 }
 
-/*virtual*/ RS_LayerList::~RS_LayerList()
+/*virtual*/ LayerList::~LayerList()
 {
 }
 
 /**
  * Removes all layers in the layerlist.
  */
-void RS_LayerList::clear()
+void LayerList::clear()
 {
        layers.clear();
        setModified(true);
@@ -49,7 +49,7 @@ void RS_LayerList::clear()
 /**
  * @return Number of layers in the list.
  */
-uint RS_LayerList::count() const
+uint LayerList::count() const
 {
        return layers.count();
 }
@@ -57,7 +57,7 @@ uint RS_LayerList::count() const
 /**
  * @return Layer at given position or NULL if i is out of range.
  */
-RS_Layer * RS_LayerList::at(uint i)
+Layer * LayerList::at(uint i)
 {
        return layers.at(i);
 }
@@ -67,20 +67,20 @@ RS_Layer * RS_LayerList::at(uint i)
  *
  * @param notify Notify listeners.
  */
-void RS_LayerList::activate(const QString & name, bool notify)
+void LayerList::activate(const QString & name, bool notify)
 {
-       RS_DEBUG->print("RS_LayerList::activate: %s, notify: %d begin", name.toLatin1().data(), notify);
+       DEBUG->print("LayerList::activate: %s, notify: %d begin", name.toLatin1().data(), notify);
 
        activate(find(name), notify);
        /*
        if (activeLayer==NULL) {
-               RS_DEBUG->print("activeLayer is NULL");
+               DEBUG->print("activeLayer is NULL");
 } else {
-               RS_DEBUG->print("activeLayer is %s", activeLayer->getName().latin1());
+               DEBUG->print("activeLayer is %s", activeLayer->getName().latin1());
 }
        */
 
-       RS_DEBUG->print("RS_LayerList::activate: %s end", name.toLatin1().data());
+       DEBUG->print("LayerList::activate: %s end", name.toLatin1().data());
 }
 
 /**
@@ -88,15 +88,15 @@ void RS_LayerList::activate(const QString & name, bool notify)
  *
  * @param notify Notify listeners.
  */
-void RS_LayerList::activate(RS_Layer * layer, bool notify)
+void LayerList::activate(Layer * layer, bool notify)
 {
-       RS_DEBUG->print("RS_LayerList::activate notify: %d begin", notify);
+       DEBUG->print("LayerList::activate notify: %d begin", notify);
 
        /*if (layer!=NULL) {
-               RS_DEBUG->print("RS_LayerList::activate: %s",
+               DEBUG->print("LayerList::activate: %s",
                                                layer->getName().latin1());
 } else {
-               RS_DEBUG->print("RS_LayerList::activate: NULL");
+               DEBUG->print("LayerList::activate: NULL");
 }*/
 
        activeLayer = layer;
@@ -106,18 +106,18 @@ void RS_LayerList::activate(RS_Layer * layer, bool notify)
        {
                for(int i=0; i<layerListListeners.count(); ++i)
                {
-                       RS_LayerListListener * l = layerListListeners.at(i);
+                       LayerListListener * l = layerListListeners.at(i);
                        l->layerActivated(activeLayer);
-                       RS_DEBUG->print("RS_LayerList::activate listener notified");
+                       DEBUG->print("LayerList::activate listener notified");
                }
        }
 #endif
 
-       RS_DEBUG->print("RS_LayerList::activate end");
+       DEBUG->print("LayerList::activate end");
 }
 
 //! @return The active layer of NULL if no layer is activated.
-RS_Layer * RS_LayerList::getActive()
+Layer * LayerList::getActive()
 {
        return activeLayer;
 }
@@ -130,15 +130,15 @@ RS_Layer * RS_LayerList::getActive()
  *
  * Listeners are notified.
  */
-void RS_LayerList::add(RS_Layer * layer)
+void LayerList::add(Layer * layer)
 {
-       RS_DEBUG->print("RS_LayerList::addLayer()");
+       DEBUG->print("LayerList::addLayer()");
 
        if (layer == NULL)
                return;
 
        // check if layer already exists:
-       RS_Layer * l = find(layer->getName());
+       Layer * l = find(layer->getName());
 
        if (l == NULL)
        {
@@ -148,7 +148,7 @@ void RS_LayerList::add(RS_Layer * layer)
                // notify listeners
                for(int i=0; i<layerListListeners.count(); ++i)
                {
-                       RS_LayerListListener * l = layerListListeners.at(i);
+                       LayerListListener * l = layerListListeners.at(i);
                        l->layerAdded(layer);
                }
 #endif
@@ -177,9 +177,9 @@ void RS_LayerList::add(RS_Layer * layer)
  * Listeners are notified after the layer was removed from
  * the list but before it gets deleted.
  */
-void RS_LayerList::remove(RS_Layer * layer)
+void LayerList::remove(Layer * layer)
 {
-       RS_DEBUG->print("RS_LayerList::removeLayer()");
+       DEBUG->print("LayerList::removeLayer()");
 
        if (layer == NULL)
                return;
@@ -194,7 +194,7 @@ void RS_LayerList::remove(RS_Layer * layer)
 #if 0
        for(int i=0; i<layerListListeners.count(); ++i)
        {
-               RS_LayerListListener * l = layerListListeners.at(i);
+               LayerListListener * l = layerListListeners.at(i);
                l->layerRemoved(layer);
        }
 #endif
@@ -214,7 +214,7 @@ void RS_LayerList::remove(RS_Layer * layer)
  * are copied from layer 'source'.
  * Listeners are notified.
  */
-void RS_LayerList::edit(RS_Layer * layer, const RS_Layer & source)
+void LayerList::edit(Layer * layer, const Layer & source)
 {
        if (!layer)
                return;
@@ -224,7 +224,7 @@ void RS_LayerList::edit(RS_Layer * layer, const RS_Layer & source)
 #if 0
        for(int i=0; i<layerListListeners.count(); ++i)
        {
-               RS_LayerListListener * l = layerListListeners.at(i);
+               LayerListListener * l = layerListListeners.at(i);
                l->layerEdited(layer);
        }
 #endif
@@ -236,21 +236,21 @@ void RS_LayerList::edit(RS_Layer * layer, const RS_Layer & source)
  * @return Pointer to the layer with the given name or
  * \p NULL if no such layer was found.
  */
-RS_Layer * RS_LayerList::find(const QString & name)
+Layer * LayerList::find(const QString & name)
 {
-       //RS_DEBUG->print("RS_LayerList::find begin");
+       //DEBUG->print("LayerList::find begin");
 
-       RS_Layer * ret = NULL;
+       Layer * ret = NULL;
 
        for(int i=0; i<layers.size(); i++)
        {
-               RS_Layer * l = layers[i];
+               Layer * l = layers[i];
 
                if (l->getName() == name)
                        ret = l;
        }
 
-       //RS_DEBUG->print("RS_LayerList::find end");
+       //DEBUG->print("LayerList::find end");
 
        return ret;
 }
@@ -259,15 +259,15 @@ RS_Layer * RS_LayerList::find(const QString & name)
  * @return Index of the given layer in the layer list or -1 if the layer
  * was not found.
  */
-int RS_LayerList::getIndex(const QString & name)
+int LayerList::getIndex(const QString & name)
 {
 #if 0
-       //RS_DEBUG->print("RS_LayerList::find begin");
+       //DEBUG->print("LayerList::find begin");
 
        int ret = -1;
        int i = 0;
 
-       for(RS_Layer * l=layers.first(); l!=NULL; l=layers.next())
+       for(Layer * l=layers.first(); l!=NULL; l=layers.next())
        {
                if (l->getName() == name)
                {
@@ -278,13 +278,13 @@ int RS_LayerList::getIndex(const QString & name)
                i++;
        }
 
-       //RS_DEBUG->print("RS_LayerList::find end");
+       //DEBUG->print("LayerList::find end");
 
        return ret;
 #else
        for(int i=0; i<layers.size(); i++)
        {
-               RS_Layer * l = layers[i];
+               Layer * l = layers[i];
 
                if (l->getName() == name)
                        return i;
@@ -298,15 +298,15 @@ int RS_LayerList::getIndex(const QString & name)
  * @return Index of the given layer in the layer list or -1 if the layer
  * was not found.
  */
-int RS_LayerList::getIndex(RS_Layer * layer)
+int LayerList::getIndex(Layer * layer)
 {
 #if 0
-       //RS_DEBUG->print("RS_LayerList::find begin");
+       //DEBUG->print("LayerList::find begin");
 
        int ret = -1;
        int i = 0;
 
-       for(RS_Layer* l=layers.first(); l!=NULL; l=layers.next())
+       for(Layer* l=layers.first(); l!=NULL; l=layers.next())
        {
                if (l == layer)
                {
@@ -317,7 +317,7 @@ int RS_LayerList::getIndex(RS_Layer * layer)
                i++;
        }
 
-       //RS_DEBUG->print("RS_LayerList::find end");
+       //DEBUG->print("LayerList::find end");
 
        return ret;
 #else
@@ -329,7 +329,7 @@ int RS_LayerList::getIndex(RS_Layer * layer)
  * Switches on / off the given layer.
  * Listeners are notified.
  */
-void RS_LayerList::toggle(const QString & name)
+void LayerList::toggle(const QString & name)
 {
        toggle(find(name));
 }
@@ -338,7 +338,7 @@ void RS_LayerList::toggle(const QString & name)
  * Switches on / off the given layer.
  * Listeners are notified.
  */
-void RS_LayerList::toggle(RS_Layer * layer)
+void LayerList::toggle(Layer * layer)
 {
        if (!layer)
                return;
@@ -349,7 +349,7 @@ void RS_LayerList::toggle(RS_Layer * layer)
        // Notify listeners:
        for(int i=0; i < layerListListeners.count(); ++i)
        {
-               RS_LayerListListener * l = layerListListeners.at(i);
+               LayerListListener * l = layerListListeners.at(i);
                l->layerToggled(layer);
        }
 #endif
@@ -359,7 +359,7 @@ void RS_LayerList::toggle(RS_Layer * layer)
  * Locks or unlocks the given layer.
  * Listeners are notified.
  */
-void RS_LayerList::toggleLock(RS_Layer * layer)
+void LayerList::toggleLock(Layer * layer)
 {
        if (!layer)
                return;
@@ -370,7 +370,7 @@ void RS_LayerList::toggleLock(RS_Layer * layer)
        // Notify listeners:
        for(int i=0; i<layerListListeners.count(); ++i)
        {
-               RS_LayerListListener * l = layerListListeners.at(i);
+               LayerListListener * l = layerListListeners.at(i);
                l->layerToggled(layer);
        }
 #endif
@@ -381,7 +381,7 @@ void RS_LayerList::toggleLock(RS_Layer * layer)
  *
  * @param freeze true: freeze, false: defreeze
  */
-void RS_LayerList::freezeAll(bool freeze)
+void LayerList::freezeAll(bool freeze)
 {
        for(uint l=0; l<count(); l++)
                at(l)->freeze(freeze);
@@ -389,7 +389,7 @@ void RS_LayerList::freezeAll(bool freeze)
 #if 0
        for(int i=0; i<layerListListeners.count(); ++i)
        {
-               RS_LayerListListener * l = layerListListeners.at(i);
+               LayerListListener * l = layerListListeners.at(i);
                l->layerToggled(NULL);
        }
 #endif
@@ -402,7 +402,7 @@ void RS_LayerList::freezeAll(bool freeze)
  *
  * Typical listeners are: layer list widgets, pen toolbar, graphic view
  */
-void RS_LayerList::addListener(RS_LayerListListener * listener)
+void LayerList::addListener(LayerListListener * listener)
 {
        layerListListeners.append(listener);
 }
@@ -410,7 +410,7 @@ void RS_LayerList::addListener(RS_LayerListListener * listener)
 /**
  * removes a LayerListListener from the list of listeners.
  */
-void RS_LayerList::removeListener(RS_LayerListListener * listener)
+void LayerList::removeListener(LayerListListener * listener)
 {
 //     layerListListeners.remove(listener);
 
@@ -424,7 +424,7 @@ void RS_LayerList::removeListener(RS_LayerListListener * listener)
 /**
  * Sets the layer lists modified status to 'm'.
  */
-void RS_LayerList::setModified(bool m)
+void LayerList::setModified(bool m)
 {
        modified = m;
 }
@@ -433,7 +433,7 @@ void RS_LayerList::setModified(bool m)
  * @retval true The layer list has been modified.
  * @retval false The layer list has not been modified.
  */
-/*virtual*/ bool RS_LayerList::isModified() const
+/*virtual*/ bool LayerList::isModified() const
 {
        return modified;
 }
@@ -441,7 +441,7 @@ void RS_LayerList::setModified(bool m)
 /**
  * Dumps the layers to stdout.
  */
-std::ostream & operator<<(std::ostream & os, RS_LayerList & l)
+std::ostream & operator<<(std::ostream & os, LayerList & l)
 {
        os << "Layerlist: \n";
 
index 2ee231e3832a0b316879a6425c499c8ca528cf8b..9886a43fe24e2a6adefd9218796c01c4d36cefc9 100644 (file)
@@ -4,50 +4,50 @@
 #include <iostream>
 #include <QtCore>
 
-class RS_Layer;
-//class RS_LayerListListener;
+class Layer;
+//class LayerListListener;
 
 /**
  * A list of layers.
  *
  * @author Andrew Mustun
  */
-class RS_LayerList
+class LayerList
 {
        public:
-               RS_LayerList();
-               virtual ~RS_LayerList();
+               LayerList();
+               virtual ~LayerList();
 
                void clear();
                uint count() const;
-               RS_Layer * at(uint i);
+               Layer * at(uint i);
                void activate(const QString & name, bool notify = false);
-               void activate(RS_Layer * layer, bool notify = false);
-               RS_Layer * getActive();
-               virtual void add(RS_Layer * layer);
-               virtual void remove(RS_Layer * layer);
-               virtual void edit(RS_Layer * layer, const RS_Layer & source);
-               RS_Layer * find(const QString & name);
+               void activate(Layer * layer, bool notify = false);
+               Layer * getActive();
+               virtual void add(Layer * layer);
+               virtual void remove(Layer * layer);
+               virtual void edit(Layer * layer, const Layer & source);
+               Layer * find(const QString & name);
                int getIndex(const QString & name);
-               int getIndex(RS_Layer * layer);
+               int getIndex(Layer * layer);
                void toggle(const QString & name);
-               void toggle(RS_Layer * layer);
-               void toggleLock(RS_Layer * layer);
+               void toggle(Layer * layer);
+               void toggleLock(Layer * layer);
                void freezeAll(bool freeze);
-//             void addListener(RS_LayerListListener * listener);
-//             void removeListener(RS_LayerListListener * listener);
+//             void addListener(LayerListListener * listener);
+//             void removeListener(LayerListListener * listener);
                void setModified(bool m);
                virtual bool isModified() const;
 
-               friend std::ostream & operator<<(std::ostream & os, RS_LayerList & l);
+               friend std::ostream & operator<<(std::ostream & os, LayerList & l);
 
        private:
                //! layers in the graphic
-               QList<RS_Layer *> layers;
+               QList<Layer *> layers;
                //! List of registered LayerListListeners
-//             QList<RS_LayerListListener *> layerListListeners;
+//             QList<LayerListListener *> layerListListeners;
                //! Currently active layer
-               RS_Layer * activeLayer;
+               Layer * activeLayer;
                /** Flag set if the layer list was modified and not yet saved. */
                bool modified;
 };
index 945e3df95b476f7049b5d0c572e969e377dfe114..995a21b9477dcd96c59d3f42bfc9b0ba36e89944 100644 (file)
@@ -23,7 +23,7 @@
 /**
  * Constructor.
  */
-RS_Leader::RS_Leader(RS_EntityContainer * parent): RS_EntityContainer(parent)
+Leader::Leader(EntityContainer * parent): EntityContainer(parent)
 {
     empty = true;
 }
@@ -32,8 +32,8 @@ RS_Leader::RS_Leader(RS_EntityContainer * parent): RS_EntityContainer(parent)
  * Constructor.
  * @param d Leader data
  */
-RS_Leader::RS_Leader(RS_EntityContainer * parent, const RS_LeaderData & d):
-       RS_EntityContainer(parent), data(d)
+Leader::Leader(EntityContainer * parent, const LeaderData & d):
+       EntityContainer(parent), data(d)
 {
     empty = true;
 }
@@ -41,13 +41,13 @@ RS_Leader::RS_Leader(RS_EntityContainer * parent, const RS_LeaderData & d):
 /**
  * Destructor
  */
-RS_Leader::~RS_Leader()
+Leader::~Leader()
 {
 }
 
-/*virtual*/ RS_Entity * RS_Leader::clone()
+/*virtual*/ Entity * Leader::clone()
 {
-       RS_Leader * p = new RS_Leader(*this);
+       Leader * p = new Leader(*this);
 #warning "!!! Need to deal with setAutoDelete() Qt3->Qt4 !!!"
 //     p->entities.setAutoDelete(entities.autoDelete());
        p->initId();
@@ -56,7 +56,7 @@ RS_Leader::~RS_Leader()
 }
 
 /**    @return RS2::EntityDimLeader */
-/*virtual*/ RS2::EntityType RS_Leader::rtti() const
+/*virtual*/ RS2::EntityType Leader::rtti() const
 {
        return RS2::EntityDimLeader;
 }
@@ -64,10 +64,10 @@ RS_Leader::~RS_Leader()
 /**
  * Implementation of update. Updates the arrow.
  */
-void RS_Leader::update()
+void Leader::update()
 {
        // find and delete arrow:
-       for(RS_Entity * e=firstEntity(); e!=NULL; e=nextEntity())
+       for(Entity * e=firstEntity(); e!=NULL; e=nextEntity())
        {
                if (e->rtti() == RS2::EntitySolid)
                {
@@ -82,33 +82,33 @@ void RS_Leader::update()
                return;
        }
 
-       RS_Entity * fe = firstEntity();
+       Entity * fe = firstEntity();
 
        if (fe != NULL && fe->isAtomic())
        {
-               Vector p1 = ((RS_AtomicEntity *)fe)->getStartpoint();
-               Vector p2 = ((RS_AtomicEntity *)fe)->getEndpoint();
+               Vector p1 = ((AtomicEntity *)fe)->getStartpoint();
+               Vector p2 = ((AtomicEntity *)fe)->getEndpoint();
 
                // first entity must be the line which gets the arrow:
                if (hasArrowHead())
                {
-                       RS_Solid * s = new RS_Solid(this, RS_SolidData());
+                       Solid * s = new Solid(this, SolidData());
                        s->shapeArrow(p1, p2.angleTo(p1), getGraphicVariableDouble("$DIMASZ", 2.5));
-                       s->setPen(RS_Pen(RS2::FlagInvalid));
+                       s->setPen(Pen(RS2::FlagInvalid));
                        s->setLayer(NULL);
-                       RS_EntityContainer::addEntity(s);
+                       EntityContainer::addEntity(s);
                }
        }
 }
 
 /** @return Copy of data that defines the leader. */
-RS_LeaderData RS_Leader::getData() const
+LeaderData Leader::getData() const
 {
        return data;
 }
 
 /** @return true: if this leader has an arrow at the beginning. */
-bool RS_Leader::hasArrowHead()
+bool Leader::hasArrowHead()
 {
        return data.arrowHead;
 }
@@ -124,9 +124,9 @@ bool RS_Leader::hasArrowHead()
  * @return Pointer to the entity that was addded or NULL if this
  *         was the first vertex added.
  */
-RS_Entity * RS_Leader::addVertex(const Vector & v)
+Entity * Leader::addVertex(const Vector & v)
 {
-       RS_Entity * entity = NULL;
+       Entity * entity = NULL;
        static Vector last = Vector(false);
 
        if (empty)
@@ -137,10 +137,10 @@ RS_Entity * RS_Leader::addVertex(const Vector & v)
        else
        {
                // add line to the leader:
-               entity = new RS_Line(this, RS_LineData(last, v));
-               entity->setPen(RS_Pen(RS2::FlagInvalid));
+               entity = new Line(this, LineData(last, v));
+               entity->setPen(Pen(RS2::FlagInvalid));
                entity->setLayer(NULL);
-               RS_EntityContainer::addEntity(entity);
+               EntityContainer::addEntity(entity);
 
                if (count() == 1 && hasArrowHead())
                        update();
@@ -157,9 +157,9 @@ RS_Entity * RS_Leader::addVertex(const Vector & v)
  *
  * To add entities use addVertex() instead.
  */
-void RS_Leader::addEntity(RS_Entity * entity)
+void Leader::addEntity(Entity * entity)
 {
-       RS_DEBUG->print(RS_Debug::D_WARNING, "RS_Leader::addEntity: should never be called");
+       DEBUG->print(Debug::D_WARNING, "Leader::addEntity: should never be called");
 
        if (entity == NULL)
                return;
@@ -167,48 +167,48 @@ void RS_Leader::addEntity(RS_Entity * entity)
        delete entity;
 }
 
-/*virtual*/ double RS_Leader::getLength()
+/*virtual*/ double Leader::getLength()
 {
        return -1.0;
 }
 
-void RS_Leader::move(Vector offset)
+void Leader::move(Vector offset)
 {
-       RS_EntityContainer::move(offset);
+       EntityContainer::move(offset);
        update();
 }
 
-void RS_Leader::rotate(Vector center, double angle)
+void Leader::rotate(Vector center, double angle)
 {
-       RS_EntityContainer::rotate(center, angle);
+       EntityContainer::rotate(center, angle);
        update();
 }
 
-void RS_Leader::scale(Vector center, Vector factor)
+void Leader::scale(Vector center, Vector factor)
 {
-       RS_EntityContainer::scale(center, factor);
+       EntityContainer::scale(center, factor);
        update();
 }
 
-void RS_Leader::mirror(Vector axisPoint1, Vector axisPoint2)
+void Leader::mirror(Vector axisPoint1, Vector axisPoint2)
 {
-       RS_EntityContainer::mirror(axisPoint1, axisPoint2);
+       EntityContainer::mirror(axisPoint1, axisPoint2);
        update();
 }
 
-void RS_Leader::stretch(Vector firstCorner, Vector secondCorner, Vector offset)
+void Leader::stretch(Vector firstCorner, Vector secondCorner, Vector offset)
 {
-       RS_EntityContainer::stretch(firstCorner, secondCorner, offset);
+       EntityContainer::stretch(firstCorner, secondCorner, offset);
        update();
 }
 
 /**
  * Dumps the leader's data to stdout.
  */
-std::ostream & operator<<(std::ostream & os, const RS_Leader & l)
+std::ostream & operator<<(std::ostream & os, const Leader & l)
 {
        os << " Leader: " << l.getData() << " {\n";
-       os << (RS_EntityContainer &)l;
+       os << (EntityContainer &)l;
        os << "\n}\n";
 
        return os;
index 521093eacd11138a274677fcfb747362cc2b9e28..9f14cf06f487fcef6ee2366ba57eb0bdd241ffe9 100644 (file)
@@ -7,16 +7,16 @@
 /**
  * Holds the data that defines a leader.
  */
-class RS_LeaderData
+class LeaderData
 {
        public:
-               RS_LeaderData() {}
-               RS_LeaderData(bool arrowHeadFlag)
+               LeaderData() {}
+               LeaderData(bool arrowHeadFlag)
                {
                        arrowHead = arrowHeadFlag;
                }
 
-               friend std::ostream & operator<<(std::ostream & os, const RS_LeaderData & /*ld*/)
+               friend std::ostream & operator<<(std::ostream & os, const LeaderData & /*ld*/)
                {
                        os << "(Leader)";
                        return os;
@@ -31,20 +31,20 @@ class RS_LeaderData
  *
  * @author Andrew Mustun
  */
-class RS_Leader: public RS_EntityContainer
+class Leader: public EntityContainer
 {
        public:
-               RS_Leader(RS_EntityContainer * parent = NULL);
-               RS_Leader(RS_EntityContainer * parent, const RS_LeaderData & d);
-               virtual ~RS_Leader();
+               Leader(EntityContainer * parent = NULL);
+               Leader(EntityContainer * parent, const LeaderData & d);
+               virtual ~Leader();
 
-               virtual RS_Entity * clone();
+               virtual Entity * clone();
                virtual RS2::EntityType rtti() const;
                virtual void update();
-               RS_LeaderData getData() const;
+               LeaderData getData() const;
                bool hasArrowHead();
-               virtual RS_Entity * addVertex(const Vector & v);
-               virtual void addEntity(RS_Entity * entity);
+               virtual Entity * addVertex(const Vector & v);
+               virtual void addEntity(Entity * entity);
                virtual double getLength();
                virtual void move(Vector offset);
                virtual void rotate(Vector center, double angle);
@@ -52,10 +52,10 @@ class RS_Leader: public RS_EntityContainer
                virtual void mirror(Vector axisPoint1, Vector axisPoint2);
                virtual void stretch(Vector firstCorner, Vector secondCorner, Vector offset);
 
-               friend std::ostream & operator<<(std::ostream & os, const RS_Leader & l);
+               friend std::ostream & operator<<(std::ostream & os, const Leader & l);
 
        protected:
-               RS_LeaderData data;
+               LeaderData data;
                bool empty;
 };
 
index 7b8404c2b46f9208268fb793a94bb7fced4620e0..918d6e7c0da31ee29c075e7fbc91289de71cc30f 100644 (file)
@@ -25,8 +25,8 @@
 /**
  * Constructor.
  */
-RS_Line::RS_Line(RS_EntityContainer * parent, const RS_LineData & d):
-       RS_AtomicEntity(parent), data(d)
+Line::Line(EntityContainer * parent, const LineData & d):
+       AtomicEntity(parent), data(d)
 {
        calculateBorders();
 }
@@ -34,68 +34,68 @@ RS_Line::RS_Line(RS_EntityContainer * parent, const RS_LineData & d):
 /**
  * Destructor.
  */
-RS_Line::~RS_Line()
+Line::~Line()
 {
 }
 
-RS_Entity * RS_Line::clone()
+Entity * Line::clone()
 {
-       RS_Line * l = new RS_Line(*this);
+       Line * l = new Line(*this);
        l->initId();
        return l;
 }
 
-void RS_Line::calculateBorders()
+void Line::calculateBorders()
 {
        minV = Vector::minimum(data.startpoint, data.endpoint);
        maxV = Vector::maximum(data.startpoint, data.endpoint);
 }
 
 /**    @return RS2::EntityLine */
-RS2::EntityType RS_Line::rtti() const
+RS2::EntityType Line::rtti() const
 {
        return RS2::EntityLine;
 }
 
 /** @return true */
-bool RS_Line::isEdge() const
+bool Line::isEdge() const
 {
        return true;
 }
 
 /** @return Copy of data that defines the line. */
-RS_LineData RS_Line::getData() const
+LineData Line::getData() const
 {
        return data;
 }
 
-VectorSolutions RS_Line::getRefPoints()
+VectorSolutions Line::getRefPoints()
 {
        VectorSolutions ret(data.startpoint, data.endpoint);
        return ret;
 }
 
 /** @return Start point of the entity */
-Vector RS_Line::getStartpoint() const
+Vector Line::getStartpoint() const
 {
        return data.startpoint;
 }
 
 /** @return End point of the entity */
-Vector RS_Line::getEndpoint() const
+Vector Line::getEndpoint() const
 {
        return data.endpoint;
 }
 
 /** Sets the startpoint */
-void RS_Line::setStartpoint(Vector s)
+void Line::setStartpoint(Vector s)
 {
        data.startpoint = s;
        calculateBorders();
 }
 
 /** Sets the endpoint */
-void RS_Line::setEndpoint(Vector e)
+void Line::setEndpoint(Vector e)
 {
        data.endpoint = e;
        calculateBorders();
@@ -105,7 +105,7 @@ void RS_Line::setEndpoint(Vector e)
 * @return Direction 1. The angle at which the line starts at
 * the startpoint.
 */
-double RS_Line::getDirection1() const
+double Line::getDirection1() const
 {
        return getAngle1();
 }
@@ -114,12 +114,12 @@ double RS_Line::getDirection1() const
 * @return Direction 2. The angle at which the line starts at
 * the endpoint.
 */
-double RS_Line::getDirection2() const
+double Line::getDirection2() const
 {
        return getAngle2();
 }
 
-Vector RS_Line::getNearestEndpoint(const Vector & coord, double * dist)
+Vector Line::getNearestEndpoint(const Vector & coord, double * dist)
 {
        double dist1, dist2;
        Vector * nearerPoint;
@@ -145,8 +145,8 @@ Vector RS_Line::getNearestEndpoint(const Vector & coord, double * dist)
        return *nearerPoint;
 }
 
-Vector RS_Line::getNearestPointOnEntity(const Vector & coord,
-       bool onEntity, double * dist, RS_Entity ** entity)
+Vector Line::getNearestPointOnEntity(const Vector & coord,
+       bool onEntity, double * dist, Entity ** entity)
 {
        if (entity != NULL)
                *entity = this;
@@ -182,7 +182,7 @@ Vector RS_Line::getNearestPointOnEntity(const Vector & coord,
        }
 }
 
-Vector RS_Line::getNearestCenter(const Vector & coord, double * dist)
+Vector Line::getNearestCenter(const Vector & coord, double * dist)
 {
        Vector p = (data.startpoint + data.endpoint) / 2.0;
 
@@ -192,12 +192,12 @@ Vector RS_Line::getNearestCenter(const Vector & coord, double * dist)
        return p;
 }
 
-Vector RS_Line::getNearestMiddle(const Vector & coord, double * dist)
+Vector Line::getNearestMiddle(const Vector & coord, double * dist)
 {
        return getNearestCenter(coord, dist);
 }
 
-Vector RS_Line::getNearestDist(double distance, const Vector & coord, double * dist)
+Vector Line::getNearestDist(double distance, const Vector & coord, double * dist)
 {
        double a1 = getAngle1();
 
@@ -235,7 +235,7 @@ Vector RS_Line::getNearestDist(double distance, const Vector & coord, double * d
        return *nearerPoint;
 }
 
-Vector RS_Line::getNearestDist(double distance, bool startp)
+Vector Line::getNearestDist(double distance, bool startp)
 {
        double a1 = getAngle1();
 
@@ -251,7 +251,7 @@ Vector RS_Line::getNearestDist(double distance, bool startp)
        return ret;
 }
 
-/*Vector RS_Line::getNearestRef(const Vector& coord, double* dist)
+/*Vector Line::getNearestRef(const Vector& coord, double* dist)
 {
        double d1, d2, d;
        Vector p;
@@ -273,10 +273,10 @@ Vector RS_Line::getNearestDist(double distance, bool startp)
        return p;
 }*/
 
-double RS_Line::getDistanceToPoint(const Vector & coord, RS_Entity ** entity,
+double Line::getDistanceToPoint(const Vector & coord, Entity ** entity,
        RS2::ResolveLevel /*level*/, double /*solidDist*/)
 {
-       RS_DEBUG->print("RS_Line::getDistanceToPoint");
+       DEBUG->print("Line::getDistanceToPoint");
 
        if (entity != NULL)
                *entity = this;
@@ -286,7 +286,7 @@ double RS_Line::getDistanceToPoint(const Vector & coord, RS_Entity ** entity,
 
        if (dist < 1.0e-4)
        {
-               RS_DEBUG->print("RS_Line::getDistanceToPoint: OK1");
+               DEBUG->print("Line::getDistanceToPoint: OK1");
                return dist;
        }
 
@@ -294,7 +294,7 @@ double RS_Line::getDistanceToPoint(const Vector & coord, RS_Entity ** entity,
 
        if (dist < 1.0e-4)
        {
-               RS_DEBUG->print("RS_Line::getDistanceToPoint: OK2");
+               DEBUG->print("Line::getDistanceToPoint: OK2");
                return dist;
        }
 
@@ -306,46 +306,46 @@ double RS_Line::getDistanceToPoint(const Vector & coord, RS_Entity ** entity,
 
        if (ae.magnitude() < 1.0e-6 || ea.magnitude() < 1.0e-6)
        {
-               RS_DEBUG->print("RS_Line::getDistanceToPoint: OK2a");
+               DEBUG->print("Line::getDistanceToPoint: OK2a");
                return dist;
        }
 
        // Orthogonal projection from both sides:
-       Vector ba = ae * Vector::dotP(ae, ap) / RS_Math::pow(ae.magnitude(), 2);
-       Vector be = ea * Vector::dotP(ea, ep) / RS_Math::pow(ea.magnitude(), 2);
+       Vector ba = ae * Vector::dotP(ae, ap) / Math::pow(ae.magnitude(), 2);
+       Vector be = ea * Vector::dotP(ea, ep) / Math::pow(ea.magnitude(), 2);
 
        // Check if the projection is outside this line:
        if (ba.magnitude() > ae.magnitude() || be.magnitude() > ea.magnitude())
        {
                // return distance to endpoint
                getNearestEndpoint(coord, &dist);
-               RS_DEBUG->print("RS_Line::getDistanceToPoint: OK3");
+               DEBUG->print("Line::getDistanceToPoint: OK3");
                return dist;
        }
-       //RS_DEBUG->print("ba: %f", ba.magnitude());
-       //RS_DEBUG->print("ae: %f", ae.magnitude());
+       //DEBUG->print("ba: %f", ba.magnitude());
+       //DEBUG->print("ae: %f", ae.magnitude());
 
        Vector cp = Vector::crossP(ap, ae);
        dist = cp.magnitude() / ae.magnitude();
 
-       RS_DEBUG->print("RS_Line::getDistanceToPoint: OK4");
+       DEBUG->print("Line::getDistanceToPoint: OK4");
 
        return dist;
 }
 
-void RS_Line::moveStartpoint(const Vector & pos)
+void Line::moveStartpoint(const Vector & pos)
 {
        data.startpoint = pos;
        calculateBorders();
 }
 
-void RS_Line::moveEndpoint(const Vector & pos)
+void Line::moveEndpoint(const Vector & pos)
 {
        data.endpoint = pos;
        calculateBorders();
 }
 
-RS2::Ending RS_Line::getTrimPoint(const Vector & coord, const Vector & trimPoint)
+RS2::Ending Line::getTrimPoint(const Vector & coord, const Vector & trimPoint)
 {
        double angEl = getAngle1();
        double angM = trimPoint.angleTo(coord);
@@ -363,7 +363,7 @@ RS2::Ending RS_Line::getTrimPoint(const Vector & coord, const Vector & trimPoint
                return RS2::EndingEnd;
 }
 
-void RS_Line::reverse()
+void Line::reverse()
 {
        Vector v = data.startpoint;
        data.startpoint = data.endpoint;
@@ -371,20 +371,20 @@ void RS_Line::reverse()
 }
 
 /** @return the center point of the line. */
-Vector RS_Line::getMiddlepoint()
+Vector Line::getMiddlepoint()
 {
        return (data.startpoint + data.endpoint) / 2.0;
 }
 
 /** Sets the y coordinate of the startpoint */
-void RS_Line::setStartpointY(double val)
+void Line::setStartpointY(double val)
 {
        data.startpoint.y = val;
        calculateBorders();
 }
 
 /** Sets the y coordinate of the endpoint */
-void RS_Line::setEndpointY(double val)
+void Line::setEndpointY(double val)
 {
        data.endpoint.y = val;
        calculateBorders();
@@ -393,7 +393,7 @@ void RS_Line::setEndpointY(double val)
 /**
  * @return The length of the line.
  */
-double RS_Line::getLength()
+double Line::getLength()
 {
        return data.startpoint.distanceTo(data.endpoint);
 }
@@ -401,7 +401,7 @@ double RS_Line::getLength()
 /**
  * @return The angle of the line (from start to endpoint).
  */
-double RS_Line::getAngle1() const
+double Line::getAngle1() const
 {
        return data.startpoint.angleTo(data.endpoint);
 }
@@ -409,12 +409,12 @@ double RS_Line::getAngle1() const
 /**
  * @return The angle of the line (from end to startpoint).
  */
-double RS_Line::getAngle2() const
+double Line::getAngle2() const
 {
        return data.endpoint.angleTo(data.startpoint);
 }
 
-bool RS_Line::hasEndpointsWithinWindow(Vector v1, Vector v2)
+bool Line::hasEndpointsWithinWindow(Vector v1, Vector v2)
 {
        if (data.startpoint.isInWindow(v1, v2) || data.endpoint.isInWindow(v1, v2))
                return true;
@@ -422,43 +422,43 @@ bool RS_Line::hasEndpointsWithinWindow(Vector v1, Vector v2)
        return false;
 }
 
-void RS_Line::move(Vector offset)
+void Line::move(Vector offset)
 {
-       RS_DEBUG->print("RS_Line::move1: sp: %f/%f, ep: %f/%f",
+       DEBUG->print("Line::move1: sp: %f/%f, ep: %f/%f",
                data.startpoint.x, data.startpoint.y, data.endpoint.x, data.endpoint.y);
-       RS_DEBUG->print("RS_Line::move1: offset: %f/%f", offset.x, offset.y);
+       DEBUG->print("Line::move1: offset: %f/%f", offset.x, offset.y);
        data.startpoint.move(offset);
        data.endpoint.move(offset);
        calculateBorders();
-       RS_DEBUG->print("RS_Line::move2: sp: %f/%f, ep: %f/%f",
+       DEBUG->print("Line::move2: sp: %f/%f, ep: %f/%f",
                data.startpoint.x, data.startpoint.y, data.endpoint.x, data.endpoint.y);
 }
 
-void RS_Line::rotate(Vector center, double angle)
+void Line::rotate(Vector center, double angle)
 {
-       RS_DEBUG->print("RS_Line::rotate");
-       RS_DEBUG->print("RS_Line::rotate1: sp: %f/%f, ep: %f/%f",
+       DEBUG->print("Line::rotate");
+       DEBUG->print("Line::rotate1: sp: %f/%f, ep: %f/%f",
                data.startpoint.x, data.startpoint.y, data.endpoint.x, data.endpoint.y);
        data.startpoint.rotate(center, angle);
        data.endpoint.rotate(center, angle);
-       RS_DEBUG->print("RS_Line::rotate2: sp: %f/%f, ep: %f/%f",
+       DEBUG->print("Line::rotate2: sp: %f/%f, ep: %f/%f",
                data.startpoint.x, data.startpoint.y, data.endpoint.x, data.endpoint.y);
        calculateBorders();
-       RS_DEBUG->print("RS_Line::rotate: OK");
+       DEBUG->print("Line::rotate: OK");
 }
 
-void RS_Line::scale(Vector center, Vector factor)
+void Line::scale(Vector center, Vector factor)
 {
-       RS_DEBUG->print("RS_Line::scale1: sp: %f/%f, ep: %f/%f",
+       DEBUG->print("Line::scale1: sp: %f/%f, ep: %f/%f",
                data.startpoint.x, data.startpoint.y, data.endpoint.x, data.endpoint.y);
        data.startpoint.scale(center, factor);
        data.endpoint.scale(center, factor);
-       RS_DEBUG->print("RS_Line::scale2: sp: %f/%f, ep: %f/%f",
+       DEBUG->print("Line::scale2: sp: %f/%f, ep: %f/%f",
                data.startpoint.x, data.startpoint.y, data.endpoint.x, data.endpoint.y);
        calculateBorders();
 }
 
-void RS_Line::mirror(Vector axisPoint1, Vector axisPoint2)
+void Line::mirror(Vector axisPoint1, Vector axisPoint2)
 {
        data.startpoint.mirror(axisPoint1, axisPoint2);
        data.endpoint.mirror(axisPoint1, axisPoint2);
@@ -468,7 +468,7 @@ void RS_Line::mirror(Vector axisPoint1, Vector axisPoint2)
 /**
  * Stretches the given range of the entity by the given offset.
  */
-void RS_Line::stretch(Vector firstCorner, Vector secondCorner, Vector offset)
+void Line::stretch(Vector firstCorner, Vector secondCorner, Vector offset)
 {
        if (getStartpoint().isInWindow(firstCorner, secondCorner))
                moveStartpoint(getStartpoint() + offset);
@@ -477,7 +477,7 @@ void RS_Line::stretch(Vector firstCorner, Vector secondCorner, Vector offset)
                moveEndpoint(getEndpoint() + offset);
 }
 
-void RS_Line::moveRef(const Vector& ref, const Vector& offset)
+void Line::moveRef(const Vector& ref, const Vector& offset)
 {
     if (ref.distanceTo(data.startpoint)<1.0e-4) {
         moveStartpoint(data.startpoint+offset);
@@ -487,11 +487,11 @@ void RS_Line::moveRef(const Vector& ref, const Vector& offset)
     }
 }
 
-void RS_Line::draw(PaintInterface * painter, GraphicView * view, double patternOffset)
+void Line::draw(PaintInterface * painter, GraphicView * view, double patternOffset)
 {
        if (!painter || !view)
 //{
-//printf("RS_Line::draw(): Bailing out!!! painter=%08X, view=%08X\n", painter, view);
+//printf("Line::draw(): Bailing out!!! painter=%08X, view=%08X\n", painter, view);
                return;
 //}
 
@@ -501,33 +501,33 @@ void RS_Line::draw(PaintInterface * painter, GraphicView * view, double patternO
                || view->getDrawingMode() == RS2::ModePreview
                || styleFactor < 0.0)
        {
-//printf("RS_Line::draw(): Drawing line...\n");
+//printf("Line::draw(): Drawing line...\n");
                painter->drawLine(view->toGui(getStartpoint()), view->toGui(getEndpoint()));
                return;
        }
 
        // Pattern:
 #if 0
-       RS_LineTypePattern * pat;
+       LineTypePattern * pat;
 
        if (isSelected())
                pat = &patternSelected;
        else
                pat = view->getPattern(getPen().getLineType());
 #else
-       RS_LineTypePattern * pat = (isSelected() ? &patternSelected : view->getPattern(getPen().getLineType()));
+       LineTypePattern * pat = (isSelected() ? &patternSelected : view->getPattern(getPen().getLineType()));
 #endif
 
        if (!pat)
        {
-//printf("RS_Line::draw(): Pattern == NULL!\n");
-               RS_DEBUG->print(RS_Debug::D_WARNING, "RS_Line::draw: Invalid line pattern");
+//printf("Line::draw(): Pattern == NULL!\n");
+               DEBUG->print(Debug::D_WARNING, "Line::draw: Invalid line pattern");
                return;
        }
 
-//printf("RS_Line::draw(): Drawing a patterned line...(?)\n");
+//printf("Line::draw(): Drawing a patterned line...(?)\n");
        // Pen to draw pattern is always solid:
-       RS_Pen pen = painter->getPen();
+       Pen pen = painter->getPen();
        pen.setLineType(RS2::SolidLine);
        painter->setPen(pen);
 
@@ -564,7 +564,7 @@ void RS_Line::draw(PaintInterface * painter, GraphicView * view, double patternO
        //if (patternOffset<0.0) {
        //      patternOffset+=patternSegmentLength;
        //}
-       //RS_DEBUG->print("pattern. offset: %f", patternOffset);
+       //DEBUG->print("pattern. offset: %f", patternOffset);
        Vector patternOffsetVec;
        patternOffsetVec.setPolar(patternOffset, angle);
 
@@ -616,7 +616,7 @@ void RS_Line::draw(PaintInterface * painter, GraphicView * view, double patternO
 
                curP += dp[i];
                tot += fabs(pat->pattern[i] * styleFactor);
-               //RS_DEBUG->print("pattern. tot: %f", tot);
+               //DEBUG->print("pattern. tot: %f", tot);
 
                i++;
 
@@ -633,7 +633,7 @@ void RS_Line::draw(PaintInterface * painter, GraphicView * view, double patternO
 /**
  * Dumps the point's data to stdout.
  */
-std::ostream & operator<<(std::ostream & os, const RS_Line & l)
+std::ostream & operator<<(std::ostream & os, const Line & l)
 {
        os << " Line: " << l.getData() << "\n";
        return os;
index 695bec7276ee79116c0f16aa6224572f246f9630..816472b49a58e4e2a35b8d3bcc1962fbba69d623 100644 (file)
@@ -6,24 +6,19 @@
 /**
  * Holds the data that defines a line.
  */
-class RS_LineData
+class LineData
 {
        public:
                /**
                * Default constructor. Leaves the data object uninitialized.
                */
-               RS_LineData() {}
+               LineData() {}
+               LineData(const Vector & start, const Vector & end): startpoint(start), endpoint(end) {}
 
-               RS_LineData(const Vector & start, const Vector & end): startpoint(start), endpoint(end)
-               {
-//                     this->startpoint = startpoint;
-//                     this->endpoint = endpoint;
-               }
-
-               friend class RS_Line;
-               friend class RS_ActionDrawLine;
+               friend class Line;
+               friend class ActionDrawLine;
 
-               friend std::ostream & operator<<(std::ostream & os, const RS_LineData & ld)
+               friend std::ostream & operator<<(std::ostream & os, const LineData & ld)
                {
                        os << "(" << ld.startpoint << "/" << ld.endpoint << ")";
                        return os;
@@ -39,18 +34,16 @@ class RS_LineData
  *
  * @author Andrew Mustun
  */
-class RS_Line: public RS_AtomicEntity
+class Line: public AtomicEntity
 {
        public:
-               //RS_Line(RS_EntityContainer* parent);
-               //RS_Line(const RS_Line& l);
-               RS_Line(RS_EntityContainer * parent, const RS_LineData & d);
-               virtual ~RS_Line();
+               Line(EntityContainer * parent, const LineData & d);
+               virtual ~Line();
 
-               virtual RS_Entity * clone();
+               virtual Entity * clone();
                virtual RS2::EntityType rtti() const;
                virtual bool isEdge() const;
-               RS_LineData getData() const;
+               LineData getData() const;
 
                virtual VectorSolutions getRefPoints();
                virtual Vector getStartpoint() const;
@@ -73,14 +66,14 @@ class RS_Line: public RS_AtomicEntity
 
                virtual Vector getNearestEndpoint(const Vector & coord, double * dist = NULL);
                virtual Vector getNearestPointOnEntity(const Vector & coord,
-                       bool onEntity = true, double * dist = NULL, RS_Entity ** entity = NULL);
+                       bool onEntity = true, double * dist = NULL, Entity ** entity = NULL);
                virtual Vector getNearestCenter(const Vector & coord, double * dist = NULL);
                virtual Vector getNearestMiddle(const Vector & coord, double * dist = NULL);
                virtual Vector getNearestDist(double distance, const Vector & coord, double * dist = NULL);
                virtual Vector getNearestDist(double distance, bool startp);
                //virtual Vector getNearestRef(const Vector& coord, double* dist = NULL);
                virtual double getDistanceToPoint(const Vector & coord,
-                       RS_Entity ** entity = NULL, RS2::ResolveLevel level = RS2::ResolveNone,
+                       Entity ** entity = NULL, RS2::ResolveLevel level = RS2::ResolveNone,
                        double solidDist = RS_MAXDOUBLE);
 
                virtual void move(Vector offset);
@@ -91,12 +84,12 @@ class RS_Line: public RS_AtomicEntity
                virtual void moveRef(const Vector & ref, const Vector & offset);
                virtual void draw(PaintInterface * painter, GraphicView * view, double patternOffset = 0.0);
 
-               friend std::ostream & operator<<(std::ostream & os, const RS_Line & l);
+               friend std::ostream & operator<<(std::ostream & os, const Line & l);
 
                virtual void calculateBorders();
 
        protected:
-               RS_LineData data;
+               LineData data;
 };
 
 #endif
index 8488a222701afad2a6377e8f2edaae7f64cb4e18..b7c3757c055a51ee199c8f88affadb56251a0088 100644 (file)
@@ -16,7 +16,7 @@
 
 #include "linetypepattern.h"
 
-RS_LineTypePattern::RS_LineTypePattern(int count ...)
+LineTypePattern::LineTypePattern(int count ...)
 {
        va_list ap;
        int i = 0;
@@ -31,7 +31,7 @@ RS_LineTypePattern::RS_LineTypePattern(int count ...)
        va_end(ap);
 }
 
-RS_LineTypePattern::~RS_LineTypePattern()
+LineTypePattern::~LineTypePattern()
 {
        delete[] pattern;
 }
index 767417737d5e92ada9fd5b77ef52be28cdad8486..1ce8e24af660eae0ff659f134a17c1ddde16a48a 100644 (file)
@@ -6,11 +6,11 @@
 /**
  * Stores a line type pattern.
  */
-class RS_LineTypePattern
+class LineTypePattern
 {
        public:
-               RS_LineTypePattern(int count ...);
-               ~RS_LineTypePattern();
+               LineTypePattern(int count ...);
+               ~LineTypePattern();
 
        public:
                double * pattern;
@@ -18,39 +18,39 @@ class RS_LineTypePattern
 };
 
 // Create line patterns
-static RS_LineTypePattern patternSolidLine(1, 10.0);
+static LineTypePattern patternSolidLine(1, 10.0);
 
-static RS_LineTypePattern patternDotLine(2, 0.1, -6.2);
-static RS_LineTypePattern patternDotLine2(2, 0.1, -3.1);
-static RS_LineTypePattern patternDotLineX2(2, 0.1, -12.4);
+static LineTypePattern patternDotLine(2, 0.1, -6.2);
+static LineTypePattern patternDotLine2(2, 0.1, -3.1);
+static LineTypePattern patternDotLineX2(2, 0.1, -12.4);
 
-static RS_LineTypePattern patternDashLine(2, 12.0, -6.0);
-static RS_LineTypePattern patternDashLine2(2, 6.0, -3.0);
-static RS_LineTypePattern patternDashLineX2(2, 24.0, -12.0);
+static LineTypePattern patternDashLine(2, 12.0, -6.0);
+static LineTypePattern patternDashLine2(2, 6.0, -3.0);
+static LineTypePattern patternDashLineX2(2, 24.0, -12.0);
 
-static RS_LineTypePattern patternDashDotLine(4, 12.0, -5.95, 0.1, -5.95);
-static RS_LineTypePattern patternDashDotLine2(4, 6.0, -2.95, 0.1, -2.95);
-static RS_LineTypePattern patternDashDotLineX2(4, 24.0, -11.95, 0.1, -11.95);
+static LineTypePattern patternDashDotLine(4, 12.0, -5.95, 0.1, -5.95);
+static LineTypePattern patternDashDotLine2(4, 6.0, -2.95, 0.1, -2.95);
+static LineTypePattern patternDashDotLineX2(4, 24.0, -11.95, 0.1, -11.95);
 
-static RS_LineTypePattern patternDivideLine(
+static LineTypePattern patternDivideLine(
     6, 12.0, -5.9, 0.15, -5.9, 0.15, -5.9);
-static RS_LineTypePattern patternDivideLine2(
+static LineTypePattern patternDivideLine2(
     6, 6.0, -2.9, 0.15, -2.9, 0.15, -2.9);
-static RS_LineTypePattern patternDivideLineX2(
+static LineTypePattern patternDivideLineX2(
     6, 24.0, -11.9, 0.15, -11.9, 0.15, -11.9);
 
-static RS_LineTypePattern patternCenterLine(4, 32.0, -6.0, 6.0, -6.0);
-static RS_LineTypePattern patternCenterLine2(4, 16.0, -3.0, 3.0, -3.0);
-static RS_LineTypePattern patternCenterLineX2(4, 64.0, -12.0, 12.0, -12.0);
+static LineTypePattern patternCenterLine(4, 32.0, -6.0, 6.0, -6.0);
+static LineTypePattern patternCenterLine2(4, 16.0, -3.0, 3.0, -3.0);
+static LineTypePattern patternCenterLineX2(4, 64.0, -12.0, 12.0, -12.0);
 
-static RS_LineTypePattern patternBorderLine(
+static LineTypePattern patternBorderLine(
        6, 12.0, -6.0, 12.0, -5.95, 0.1, -5.95);
-static RS_LineTypePattern patternBorderLine2(
+static LineTypePattern patternBorderLine2(
        6, 6.0, -3.0, 6.0, -2.95, 0.1, -2.95);
-static RS_LineTypePattern patternBorderLineX2(
+static LineTypePattern patternBorderLineX2(
        6, 24.0, -12.0, 24.0, -11.95, 0.1, -11.95);
 
-static RS_LineTypePattern patternBlockLine(2, 0.5, -0.5);
-static RS_LineTypePattern patternSelected(2, 1.0, -3.0);
+static LineTypePattern patternBlockLine(2, 0.5, -0.5);
+static LineTypePattern patternSelected(2, 1.0, -3.0);
 
 #endif
index eefd0e2b81a5ececc5ac6f4b27b51c57e866dd81..2fa4f7afdd5347774c8dd30fff8f5c89a607f817 100644 (file)
@@ -2,21 +2,21 @@
 #define __MAINWINDOWINTERFACE_H__
 
 class GraphicView;
-class RS_Document;
+class Document;
 
 /**
  * Interface for main application windows.
  */
-class RS_MainWindowInterface
+class MainWindowInterface
 {
 public:
-    RS_MainWindowInterface() {}
-    virtual ~RS_MainWindowInterface() {}
+    MainWindowInterface() {}
+    virtual ~MainWindowInterface() {}
 
     virtual GraphicView * getGraphicView() = 0;
-    virtual RS_Document * getDocument() = 0;
+    virtual Document * getDocument() = 0;
 
-       virtual void createNewDocument(const QString & fileName = QString::null, RS_Document * doc = NULL) = 0;
+       virtual void createNewDocument(const QString & fileName = QString::null, Document * doc = NULL) = 0;
        virtual void showSimulationControls() = 0;
 };
 
index 7646bf0291aedb1cf74beb63f3bd5396eb73c70b..65980308ebd935066ae20d4d1504d4785192969a 100644 (file)
@@ -25,7 +25,7 @@
 /**
  * Rounds the given double to the next int.
  */
-int RS_Math::round(double v)
+int Math::round(double v)
 {
        return (v - floor(v) < 0.5 ? (int)floor(v) : (int)ceil(v));
 }
@@ -33,19 +33,19 @@ int RS_Math::round(double v)
 /**
  * Save pow function
  */
-double RS_Math::pow(double x, double y)
+double Math::pow(double x, double y)
 {
        errno = 0;
        double ret = ::pow(x, y);
 
        if (errno == EDOM)
        {
-        RS_DEBUG->print(RS_Debug::D_ERROR, "RS_Math::pow: EDOM in pow");
+        DEBUG->print(Debug::D_ERROR, "Math::pow: EDOM in pow");
                ret = 0.0;
        }
        else if (errno == ERANGE)
        {
-        RS_DEBUG->print(RS_Debug::D_WARNING, "RS_Math::pow: ERANGE in pow");
+        DEBUG->print(Debug::D_WARNING, "Math::pow: ERANGE in pow");
                ret = 0.0;
        }
 
@@ -55,7 +55,7 @@ double RS_Math::pow(double x, double y)
 /**
  * Converts radians to degrees.
  */
-double RS_Math::rad2deg(double a)
+double Math::rad2deg(double a)
 {
        return (a / (2.0 * M_PI) * 360.0);
 }
@@ -63,7 +63,7 @@ double RS_Math::rad2deg(double a)
 /**
  * Converts degrees to radians.
  */
-double RS_Math::deg2rad(double a)
+double Math::deg2rad(double a)
 {
        return ((a / 360.0) * (2.0 * M_PI));
 }
@@ -71,7 +71,7 @@ double RS_Math::deg2rad(double a)
 /**
  * Converts radians to gradians.
  */
-double RS_Math::rad2gra(double a)
+double Math::rad2gra(double a)
 {
        return (a / (2.0 * M_PI) * 400.0);
 }
@@ -79,7 +79,7 @@ double RS_Math::rad2gra(double a)
 /**
  * Finds greatest common divider using Euclid's algorithm.
  */
-int RS_Math::findGCD(int a, int b)
+int Math::findGCD(int a, int b)
 {
        while (b != 0)
        {
@@ -99,7 +99,7 @@ int RS_Math::findGCD(int a, int b)
  * @param reversed true for clockwise testing. false for ccw testing.
  * @return true if the angle a is between a1 and a2.
  */
-bool RS_Math::isAngleBetween(double a, double a1, double a2, bool reversed)
+bool Math::isAngleBetween(double a, double a1, double a2, bool reversed)
 {
        bool ret = false;
 
@@ -121,7 +121,7 @@ bool RS_Math::isAngleBetween(double a, double a1, double a2, bool reversed)
                        ret = true;
        }
 
-       //RS_DEBUG->print("angle %f is %sbetween %f and %f",
+       //DEBUG->print("angle %f is %sbetween %f and %f",
        //                a, ret ? "" : "not ", a1, a2);
        return ret;
 }
@@ -129,7 +129,7 @@ bool RS_Math::isAngleBetween(double a, double a1, double a2, bool reversed)
 /**
  * Corrects the given angle to the range of 0-2*Pi.
  */
-double RS_Math::correctAngle(double a)
+double Math::correctAngle(double a)
 {
        while (a > 2 * M_PI)
                a -= 2 * M_PI;
@@ -144,7 +144,7 @@ double RS_Math::correctAngle(double a)
  * @return The angle that needs to be added to a1 to reach a2.
  *         Always positive and less than 2*pi.
  */
-double RS_Math::getAngleDifference(double a1, double a2)
+double Math::getAngleDifference(double a1, double a2)
 {
        double ret;
 
@@ -170,7 +170,7 @@ double RS_Math::getAngleDifference(double a1, double a2)
  * @return The given angle or the given angle+PI, depending which on
  * is readable from the bottom or right.
  */
-double RS_Math::makeAngleReadable(double angle, bool readable, bool * corrected)
+double Math::makeAngleReadable(double angle, bool readable, bool * corrected)
 {
        double ret;
        bool cor = isAngleReadable(angle) ^ readable;
@@ -192,7 +192,7 @@ double RS_Math::makeAngleReadable(double angle, bool readable, bool * corrected)
  * @return true: if the given angle is in a range that is readable
  * for texts created with that angle.
  */
-bool RS_Math::isAngleReadable(double angle)
+bool Math::isAngleReadable(double angle)
 {
        if (angle > M_PI /2.0 * 3.0 + 0.001 || angle < M_PI / 2.0 + 0.001)
                return true;
@@ -204,7 +204,7 @@ bool RS_Math::isAngleReadable(double angle)
  * @param tol Tolerance in rad.
  * @retval true The two angles point in the same direction.
  */
-bool RS_Math::isSameDirection(double dir1, double dir2, double tol)
+bool Math::isSameDirection(double dir1, double dir2, double tol)
 {
        double diff = fabs(dir1 - dir2);
 
@@ -217,7 +217,7 @@ bool RS_Math::isSameDirection(double dir1, double dir2, double tol)
 /**
  * Compares two double values with a tolerance.
  */
-bool RS_Math::cmpDouble(double v1, double v2, double tol)
+bool Math::cmpDouble(double v1, double v2, double tol)
 {
     return (fabs(v2 - v1) < tol);
 }
@@ -226,10 +226,10 @@ bool RS_Math::cmpDouble(double v1, double v2, double tol)
  * Evaluates a mathematical expression and returns the result.
  * If an error occured, the given default value 'def' will be returned.
  */
-double RS_Math::eval(const QString & expr, double def)
+double Math::eval(const QString & expr, double def)
 {
        bool ok;
-       double res = RS_Math::eval(expr, &ok);
+       double res = Math::eval(expr, &ok);
 
        if (!ok)
                return def;
@@ -241,7 +241,7 @@ double RS_Math::eval(const QString & expr, double def)
  * Evaluates a mathematical expression and returns the result.
  * If an error occured, ok will be set to false (if ok isn't NULL).
  */
-double RS_Math::eval(const QString & expr, bool * ok)
+double Math::eval(const QString & expr, bool * ok)
 {
        if (expr.isEmpty())
        {
@@ -299,26 +299,26 @@ double RS_Math::eval(const QString & expr, bool * ok)
  * @param prec Precision e.g. a precision of 1 would mean that a
  *     value of 2.12030 will be converted to "2.1". 2.000 is always just "2").
  */
-QString RS_Math::doubleToString(double value, double prec)
+QString Math::doubleToString(double value, double prec)
 {
        if (prec < 1.0e-12)
        {
-               std::cerr << "RS_Math::doubleToString: invalid precision\n";
+               std::cerr << "Math::doubleToString: invalid precision\n";
                return "";
        }
 
        QString ret;
-       int num = RS_Math::round(value / prec);
+       int num = Math::round(value / prec);
 
-       QString exaStr = RS_Math::doubleToString(prec, 10);
+       QString exaStr = Math::doubleToString(prec, 10);
        int dotPos = exaStr.indexOf('.');
 
        if (dotPos == -1)
-               ret.sprintf("%d", RS_Math::round(num * prec));
+               ret.sprintf("%d", Math::round(num * prec));
        else
        {
                int digits = exaStr.length() - dotPos - 1;
-               ret = RS_Math::doubleToString(num * prec, digits);
+               ret = Math::doubleToString(num * prec, digits);
        }
 
        return ret;
@@ -330,7 +330,7 @@ QString RS_Math::doubleToString(double value, double prec)
  * @param value The double value
  * @param prec Precision
  */
-QString RS_Math::doubleToString(double value, int prec)
+QString Math::doubleToString(double value, int prec)
 {
        QString valStr;
 
@@ -352,35 +352,35 @@ QString RS_Math::doubleToString(double value, int prec)
 /**
  * Performs some testing for the math class.
  */
-void RS_Math::test()
+void Math::test()
 {
-       std::cout << "RS_Math::test: doubleToString:\n";
+       std::cout << "Math::test: doubleToString:\n";
 
        double v = 0.1;
-       QString s = RS_Math::doubleToString(v, 0.1);
+       QString s = Math::doubleToString(v, 0.1);
        assert(s == "0.1");
-       s = RS_Math::doubleToString(v, 0.01);
+       s = Math::doubleToString(v, 0.01);
        assert(s == "0.1");
-       s = RS_Math::doubleToString(v, 0.0);
+       s = Math::doubleToString(v, 0.0);
        assert(s == "0");
 
        v = 0.01;
-       s = RS_Math::doubleToString(v, 0.1);
+       s = Math::doubleToString(v, 0.1);
        assert(s == "0");
-       s = RS_Math::doubleToString(v, 0.01);
+       s = Math::doubleToString(v, 0.01);
        assert(s == "0.01");
-       s = RS_Math::doubleToString(v, 0.0);
+       s = Math::doubleToString(v, 0.0);
        assert(s == "0");
 
        v = 0.001;
-       s = RS_Math::doubleToString(v, 0.1);
+       s = Math::doubleToString(v, 0.1);
        assert(s == "0");
-       s = RS_Math::doubleToString(v, 0.01);
+       s = Math::doubleToString(v, 0.01);
        assert(s == "0");
-       s = RS_Math::doubleToString(v, 0.001);
+       s = Math::doubleToString(v, 0.001);
        assert(s == "0.001");
-       s = RS_Math::doubleToString(v, 0.0);
+       s = Math::doubleToString(v, 0.0);
        assert(s == "0");
 
-       std::cout << "RS_Math::test: complete\n";
+       std::cout << "Math::test: complete\n";
 }
index eeb1ea62d97d777a2d540c82ed483f3b361f3941..d772b3fb3d97a01f874baa64332a0f25cce61eba 100644 (file)
 /**
  * Math functions.
  */
-class RS_Math
+class Math
 {
-public:
-       static int round(double v);
-       static double pow(double x, double y);
-       static double rad2deg(double a);
-       static double deg2rad(double a);
-       static double rad2gra(double a);
-       static int findGCD(int a, int b);
-       static bool isAngleBetween(double a, double a1, double a2, bool reversed);
-       static double correctAngle(double a);
-       static double getAngleDifference(double a1, double a2);
-       static double makeAngleReadable(double angle, bool readable = true, bool * corrected = NULL);
-       static bool isAngleReadable(double angle);
-       static bool isSameDirection(double dir1, double dir2, double tol);
-       static double eval(const QString & expr, double def = 0.0);
-       static bool cmpDouble(double v1, double v2, double tol = 0.001);
-       static double eval(const QString & expr, bool * ok);
-       static QString doubleToString(double value, double prec);
-       static QString doubleToString(double value, int prec);
+       public:
+               static int round(double v);
+               static double pow(double x, double y);
+               static double rad2deg(double a);
+               static double deg2rad(double a);
+               static double rad2gra(double a);
+               static int findGCD(int a, int b);
+               static bool isAngleBetween(double a, double a1, double a2, bool reversed);
+               static double correctAngle(double a);
+               static double getAngleDifference(double a1, double a2);
+               static double makeAngleReadable(double angle, bool readable = true, bool * corrected = NULL);
+               static bool isAngleReadable(double angle);
+               static bool isSameDirection(double dir1, double dir2, double tol);
+               static double eval(const QString & expr, double def = 0.0);
+               static bool cmpDouble(double v1, double v2, double tol = 0.001);
+               static double eval(const QString & expr, bool * ok);
+               static QString doubleToString(double value, double prec);
+               static QString doubleToString(double value, int prec);
 
-       static void test();
+               static void test();
 };
 
 #endif // __MATHEXTRA_H__
index c93ea261eebb0e9786df1add7941006b414ce6b3..9cac119726fc5d8492623222baefbff7462a269d 100644 (file)
@@ -36,7 +36,7 @@
  *        any views to be updated.
  * @param handleUndo true: Handle undo functionalitiy.
  */
-RS_Modification::RS_Modification(RS_EntityContainer & container,
+Modification::Modification(EntityContainer & container,
        GraphicView * graphicView, bool handleUndo)
 {
     this->container = &container;
@@ -49,31 +49,31 @@ RS_Modification::RS_Modification(RS_EntityContainer & container,
 /**
  * Deletes all selected entities.
  */
-void RS_Modification::remove()
+void Modification::remove()
 {
        if (container == NULL)
        {
-               RS_DEBUG->print("RS_Modification::remove: no valid container", RS_Debug::D_WARNING);
+               DEBUG->print("Modification::remove: no valid container", Debug::D_WARNING);
                return;
        }
 
-       if (document != NULL)
+       if (document)
                document->startUndoCycle();
 
        // not safe (?)
-       for(RS_Entity * e=container->firstEntity(); e!=NULL; e=container->nextEntity())
+       for(Entity * e=container->firstEntity(); e!=NULL; e=container->nextEntity())
        {
-               if (e != NULL && e->isSelected())
+               if (e && e->isSelected())
                {
                        e->setSelected(false);
                        e->changeUndoState();
 
-                       if (document != NULL)
+                       if (document)
                                document->addUndoable(e);
                }
        }
 
-       if (document != NULL)
+       if (document)
                document->endUndoCycle();
 
        graphicView->redraw();
@@ -82,29 +82,29 @@ void RS_Modification::remove()
 /**
  * Changes the attributes of all selected
  */
-bool RS_Modification::changeAttributes(RS_AttributesData & data)
+bool Modification::changeAttributes(AttributesData & data)
 {
        if (!container)
        {
-               RS_DEBUG->print("RS_Modification::changeAttributes: no valid container", RS_Debug::D_WARNING);
+               DEBUG->print("Modification::changeAttributes: no valid container", Debug::D_WARNING);
                return false;
        }
 
-       QList<RS_Entity *> addList;
+       QList<Entity *> addList;
 
        if (document)
                document->startUndoCycle();
 
-       for(RS_Entity * e=container->firstEntity(); e!=NULL; e=container->nextEntity())
+       for(Entity * e=container->firstEntity(); e!=NULL; e=container->nextEntity())
        {
                //for (uint i=0; i<container->count(); ++i) {
-               //RS_Entity* e = container->entityAt(i);
+               //Entity* e = container->entityAt(i);
                if (e && e->isSelected())
                {
-                       RS_Entity * ec = e->clone();
+                       Entity * ec = e->clone();
                        ec->setSelected(false);
 
-                       RS_Pen pen = ec->getPen(false);
+                       Pen pen = ec->getPen(false);
 
                        if (data.changeLayer == true)
                                ec->setLayer(data.layer);
@@ -127,7 +127,7 @@ bool RS_Modification::changeAttributes(RS_AttributesData & data)
                        //    ec->setPenToActive();
                        //}
                        //if (ec->rtti()==RS2::EntityInsert) {
-                       //    ((RS_Insert*)ec)->update();
+                       //    ((Insert*)ec)->update();
                        //}
                        ec->update();
                        addList.append(ec);
@@ -156,19 +156,19 @@ bool RS_Modification::changeAttributes(RS_AttributesData & data)
  * @param ref Reference point. The entities will be moved by -ref.
  * @param cut true: cut instead of copying, false: copy
  */
-void RS_Modification::copy(const Vector& ref, const bool cut) {
+void Modification::copy(const Vector& ref, const bool cut) {
 
     if (container==NULL) {
-        RS_DEBUG->print("RS_Modification::copy: no valid container",
-                        RS_Debug::D_WARNING);
+        DEBUG->print("Modification::copy: no valid container",
+                        Debug::D_WARNING);
         return;
     }
 
-    RS_CLIPBOARD->clear();
+    CLIPBOARD->clear();
     if (graphic!=NULL) {
-        RS_CLIPBOARD->getGraphic()->setUnit(graphic->getUnit());
+        CLIPBOARD->getGraphic()->setUnit(graphic->getUnit());
     } else {
-        RS_CLIPBOARD->getGraphic()->setUnit(RS2::None);
+        CLIPBOARD->getGraphic()->setUnit(RS2::None);
     }
 
     // start undo cycle for the container if we're cutting
@@ -177,10 +177,10 @@ void RS_Modification::copy(const Vector& ref, const bool cut) {
     }
 
     // copy entities / layers / blocks
-    for (RS_Entity* e=container->firstEntity(); e!=NULL;
+    for (Entity* e=container->firstEntity(); e!=NULL;
             e=container->nextEntity()) {
         //for (uint i=0; i<container->count(); ++i) {
-        //RS_Entity* e = container->entityAt(i);
+        //Entity* e = container->entityAt(i);
 
         if (e!=NULL && e->isSelected()) {
             copyEntity(e, ref, cut);
@@ -203,7 +203,7 @@ void RS_Modification::copy(const Vector& ref, const bool cut) {
  * @param ref Reference point. The entities will be moved by -ref.
  * @param cut true: cut instead of copying, false: copy
  */
-void RS_Modification::copyEntity(RS_Entity * e, const Vector & ref, const bool cut)
+void Modification::copyEntity(Entity * e, const Vector & ref, const bool cut)
 {
        if (e && e->isSelected())
        {
@@ -236,15 +236,15 @@ void RS_Modification::copyEntity(RS_Entity * e, const Vector & ref, const bool c
                }
 
                // add entity to clipboard:
-               RS_Entity * c = e->clone();
+               Entity * c = e->clone();
                c->move(-ref);
-               RS_CLIPBOARD->addEntity(c);
+               CLIPBOARD->addEntity(c);
 
                copyLayers(e);
                copyBlocks(e);
 
                // set layer to the layer clone:
-               RS_Layer * l = e->getLayer();
+               Layer * l = e->getLayer();
 
                if (l)
                        c->setLayer(l->getName());
@@ -252,13 +252,13 @@ void RS_Modification::copyEntity(RS_Entity * e, const Vector & ref, const bool c
                // make sure all sub entities point to layers of the clipboard
                if (c->isContainer())
                {
-                       RS_EntityContainer * ec = (RS_EntityContainer *)c;
+                       EntityContainer * ec = (EntityContainer *)c;
 
-                       for(RS_Entity * e2=ec->firstEntity(RS2::ResolveAll); e2!=NULL;
+                       for(Entity * e2=ec->firstEntity(RS2::ResolveAll); e2!=NULL;
                                e2=ec->nextEntity(RS2::ResolveAll))
                        {
-                               //RS_Entity* e2 = ec->entityAt(i);
-                               RS_Layer * l2 = e2->getLayer();
+                               //Entity* e2 = ec->entityAt(i);
+                               Layer * l2 = e2->getLayer();
 
                                if (l2)
                                        e2->setLayer(l2->getName());
@@ -280,7 +280,7 @@ void RS_Modification::copyEntity(RS_Entity * e, const Vector & ref, const bool c
 /**
  * Copies all layers of the given entity to the clipboard.
  */
-void RS_Modification::copyLayers(RS_Entity* e) {
+void Modification::copyLayers(Entity* e) {
 
     if (e==NULL) {
         return;
@@ -289,10 +289,10 @@ void RS_Modification::copyLayers(RS_Entity* e) {
     // add layer(s) of the entity if it's not an insert
     //  (inserts are on layer '0'):
     if (e->rtti()!=RS2::EntityInsert) {
-        RS_Layer* l = e->getLayer();
+        Layer* l = e->getLayer();
         if (l!=NULL) {
-            if (!RS_CLIPBOARD->hasLayer(l->getName())) {
-                RS_CLIPBOARD->addLayer(l->clone());
+            if (!CLIPBOARD->hasLayer(l->getName())) {
+                CLIPBOARD->addLayer(l->clone());
             }
         }
     }
@@ -300,12 +300,12 @@ void RS_Modification::copyLayers(RS_Entity* e) {
     // special handling of inserts:
     else {
         // insert: add layer(s) of subentities:
-        RS_Block* b = ((RS_Insert*)e)->getBlockForInsert();
+        Block* b = ((Insert*)e)->getBlockForInsert();
         if (b!=NULL) {
-            for (RS_Entity* e2=b->firstEntity(); e2!=NULL;
+            for (Entity* e2=b->firstEntity(); e2!=NULL;
                     e2=b->nextEntity()) {
                 //for (uint i=0; i<b->count(); ++i) {
-                //RS_Entity* e2 = b->entityAt(i);
+                //Entity* e2 = b->entityAt(i);
                 copyLayers(e2);
             }
         }
@@ -317,7 +317,7 @@ void RS_Modification::copyLayers(RS_Entity* e) {
 /**
  * Copies all blocks of the given entity to the clipboard.
  */
-void RS_Modification::copyBlocks(RS_Entity* e) {
+void Modification::copyBlocks(Entity* e) {
 
     if (e==NULL) {
         return;
@@ -325,17 +325,17 @@ void RS_Modification::copyBlocks(RS_Entity* e) {
 
     // add block of the entity if it's an insert
     if (e->rtti()==RS2::EntityInsert) {
-        RS_Block* b = ((RS_Insert*)e)->getBlockForInsert();
+        Block* b = ((Insert*)e)->getBlockForInsert();
         if (b!=NULL) {
             // add block of an insert:
-            if (!RS_CLIPBOARD->hasBlock(b->getName())) {
-                RS_CLIPBOARD->addBlock((RS_Block*)b->clone());
+            if (!CLIPBOARD->hasBlock(b->getName())) {
+                CLIPBOARD->addBlock((Block*)b->clone());
             }
 
-            for (RS_Entity* e2=b->firstEntity(); e2!=NULL;
+            for (Entity* e2=b->firstEntity(); e2!=NULL;
                     e2=b->nextEntity()) {
                 //for (uint i=0; i<b->count(); ++i) {
-                //RS_Entity* e2 = b->entityAt(i);
+                //Entity* e2 = b->entityAt(i);
                 copyBlocks(e2);
             }
         }
@@ -353,23 +353,23 @@ void RS_Modification::copyBlocks(RS_Entity* e) {
  * @param source The source from where to paste. NULL means the source
  *      is the clipboard.
  */
-void RS_Modification::paste(const RS_PasteData& data, Drawing* source) {
+void Modification::paste(const PasteData& data, Drawing* source) {
 
     if (graphic==NULL) {
-        RS_DEBUG->print(RS_Debug::D_WARNING,
-                        "RS_Modification::paste: Graphic is NULL");
+        DEBUG->print(Debug::D_WARNING,
+                        "Modification::paste: Graphic is NULL");
         return;
     }
 
     double factor = 1.0;
 
     if (source==NULL) {
-        source = RS_CLIPBOARD->getGraphic();
+        source = CLIPBOARD->getGraphic();
 
         // graphics from the clipboard need to be scaled. from the part lib not:
         RS2::Unit sourceUnit = source->getUnit();
         RS2::Unit targetUnit = graphic->getUnit();
-        factor = RS_Units::convert(1.0, sourceUnit, targetUnit);
+        factor = Units::convert(1.0, sourceUnit, targetUnit);
     }
 
     if (document!=NULL) {
@@ -379,9 +379,9 @@ void RS_Modification::paste(const RS_PasteData& data, Drawing* source) {
 
     // insert layers:
     if (graphic!=NULL) {
-        RS_Layer* layer = graphic->getActiveLayer();
+        Layer* layer = graphic->getActiveLayer();
         for(uint i=0; i<source->countLayers(); ++i) {
-            RS_Layer* l = source->layerAt(i);
+            Layer* l = source->layerAt(i);
             if (l!=NULL) {
                 if (graphic->findLayer(l->getName())==NULL) {
                     graphic->addLayer(l->clone());
@@ -394,24 +394,24 @@ void RS_Modification::paste(const RS_PasteData& data, Drawing* source) {
     // insert blocks:
     if (graphic!=NULL) {
         for(uint i=0; i<source->countBlocks(); ++i) {
-            RS_Block* b = source->blockAt(i);
+            Block* b = source->blockAt(i);
             if (b!=NULL) {
                 if (graphic->findBlock(b->getName())==NULL) {
-                    RS_Block* bc = (RS_Block*)b->clone();
+                    Block* bc = (Block*)b->clone();
                     bc->reparent(container);
                     //bc->scale(bc->getBasePoint(), Vector(factor, factor));
                     // scale block but don't scale inserts in block
                     //  (they already scale with their block)
                     for(uint i2=0; i2<bc->count(); ++i2) {
-                        RS_Entity* e = bc->entityAt(i2);
+                        Entity* e = bc->entityAt(i2);
                         if (e!=NULL && e->rtti()!=RS2::EntityInsert) {
                             e->scale(bc->getBasePoint(),
                                      Vector(factor, factor));
                         } else {
-                            Vector ip = ((RS_Insert*)e)->getInsertionPoint();
+                            Vector ip = ((Insert*)e)->getInsertionPoint();
                             ip.scale(bc->getBasePoint(),
                                      Vector(factor, factor));
-                            ((RS_Insert*)e)->setInsertionPoint(ip);
+                            ((Insert*)e)->setInsertionPoint(ip);
                             e->update();
                         }
                     }
@@ -423,19 +423,19 @@ void RS_Modification::paste(const RS_PasteData& data, Drawing* source) {
     }
 
     // add entities to this host (graphic or a new block)
-    RS_EntityContainer* host = container;
+    EntityContainer* host = container;
     QString blockName;
 
     // create new block:
     if (graphic!=NULL) {
         if (data.asInsert==true) {
-            RS_BlockList* blkList = graphic->getBlockList();
+            BlockList* blkList = graphic->getBlockList();
             if (blkList!=NULL) {
                 blockName = blkList->newName(data.blockName);
 
-                RS_Block* blk =
-                    new RS_Block(graphic,
-                                 RS_BlockData(blockName,
+                Block* blk =
+                    new Block(graphic,
+                                 BlockData(blockName,
                                               Vector(0.0,0.0), false));
                 graphic->addBlock(blk);
 
@@ -445,29 +445,29 @@ void RS_Modification::paste(const RS_PasteData& data, Drawing* source) {
     }
 
     // insert entities:
-    //for (uint i=0; i<((RS_EntityContainer*)source)->count(); ++i) {
-    //RS_Entity* e = source->entityAt(i);
-    for (RS_Entity* e=((RS_EntityContainer*)source)->firstEntity();
+    //for (uint i=0; i<((EntityContainer*)source)->count(); ++i) {
+    //Entity* e = source->entityAt(i);
+    for (Entity* e=((EntityContainer*)source)->firstEntity();
             e!=NULL;
-            e=((RS_EntityContainer*)source)->nextEntity()) {
+            e=((EntityContainer*)source)->nextEntity()) {
 
         if (e!=NULL) {
 
             QString layerName = "0";
-            RS_Layer* layer = e->getLayer();
+            Layer* layer = e->getLayer();
             if (layer!=NULL) {
                 layerName = layer->getName();
             }
-            RS_Entity* e2 = e->clone();
+            Entity* e2 = e->clone();
             e2->reparent(host);
             if (data.asInsert==false) {
                 e2->move(data.insertionPoint);
             }
             // don't adjust insert factor - block was already adjusted to unit
             if (e2->rtti()==RS2::EntityInsert) {
-                Vector ip = ((RS_Insert*)e2)->getInsertionPoint();
+                Vector ip = ((Insert*)e2)->getInsertionPoint();
                 ip.scale(data.insertionPoint, Vector(factor, factor));
-                ((RS_Insert*)e2)->setInsertionPoint(ip);
+                ((Insert*)e2)->setInsertionPoint(ip);
                 e2->update();
             } else {
                 e2->scale(data.insertionPoint, Vector(factor, factor));
@@ -477,13 +477,13 @@ void RS_Modification::paste(const RS_PasteData& data, Drawing* source) {
 
             // make sure all sub entities point to layers of the container
             if (e2->isContainer()) {
-                RS_EntityContainer* ec = (RS_EntityContainer*)e2;
+                EntityContainer* ec = (EntityContainer*)e2;
 
-                for (RS_Entity* e3 = ec->firstEntity(RS2::ResolveAll); e3!=NULL;
+                for (Entity* e3 = ec->firstEntity(RS2::ResolveAll); e3!=NULL;
                         e3 = ec->nextEntity(RS2::ResolveAll)) {
 
-                    //RS_Entity* e3 = ec->entityAt(i);
-                    RS_Layer* l2 = e3->getLayer();
+                    //Entity* e3 = ec->entityAt(i);
+                    Layer* l2 = e3->getLayer();
                     if (l2!=NULL) {
                         e3->setLayer(l2->getName());
                     }
@@ -497,9 +497,9 @@ void RS_Modification::paste(const RS_PasteData& data, Drawing* source) {
     }
 
     if (data.asInsert==true) {
-        RS_Insert* ins =
-            new RS_Insert(container,
-                          RS_InsertData(
+        Insert* ins =
+            new Insert(container,
+                          InsertData(
                               blockName,
                               data.insertionPoint,
                               Vector(data.factor, data.factor),
@@ -539,30 +539,30 @@ void RS_Modification::paste(const RS_PasteData& data, Drawing* source) {
  *
  * @return true
  */
-bool RS_Modification::splitPolyline(RS_Polyline& polyline,
-                                    RS_Entity& e1, Vector v1,
-                                    RS_Entity& e2, Vector v2,
-                                    RS_Polyline** polyline1,
-                                    RS_Polyline** polyline2) const {
+bool Modification::splitPolyline(Polyline& polyline,
+                                    Entity& e1, Vector v1,
+                                    Entity& e2, Vector v2,
+                                    Polyline** polyline1,
+                                    Polyline** polyline2) const {
 
     if (container==NULL) {
-        RS_DEBUG->print("RS_Modification::splitPolyline: no valid container",
-                        RS_Debug::D_WARNING);
+        DEBUG->print("Modification::splitPolyline: no valid container",
+                        Debug::D_WARNING);
         return false;
     }
 
-    RS_Entity* firstEntity = polyline.firstEntity();
+    Entity* firstEntity = polyline.firstEntity();
     Vector firstPoint(false);
     if (firstEntity->rtti()==RS2::EntityLine) {
-        firstPoint = ((RS_Line*)firstEntity)->getStartpoint();
+        firstPoint = ((Line*)firstEntity)->getStartpoint();
     }
-    RS_Polyline* pl1 =
-        new RS_Polyline(container,
-                        RS_PolylineData(firstPoint, Vector(0.0,0.0), 0));
-    RS_Polyline* pl2 = new RS_Polyline(container);
-    RS_Polyline* pl = pl1;     // Current polyline
-    RS_Line* line = NULL;
-    RS_Arc* arc = NULL;
+    Polyline* pl1 =
+        new Polyline(container,
+                        PolylineData(firstPoint, Vector(0.0,0.0), 0));
+    Polyline* pl2 = new Polyline(container);
+    Polyline* pl = pl1;        // Current polyline
+    Line* line = NULL;
+    Arc* arc = NULL;
 
     if (polyline1!=NULL) {
         *polyline1 = pl1;
@@ -571,15 +571,15 @@ bool RS_Modification::splitPolyline(RS_Polyline& polyline,
         *polyline2 = pl2;
     }
 
-    for (RS_Entity* e = polyline.firstEntity();
+    for (Entity* e = polyline.firstEntity();
             e != NULL;
             e = polyline.nextEntity()) {
 
         if (e->rtti()==RS2::EntityLine) {
-            line = (RS_Line*)e;
+            line = (Line*)e;
             arc = NULL;
         } else if (e->rtti()==RS2::EntityArc) {
-            arc = (RS_Arc*)e;
+            arc = (Arc*)e;
             line = NULL;
         } else {
             line = NULL;
@@ -638,25 +638,25 @@ bool RS_Modification::splitPolyline(RS_Polyline& polyline,
  * @return Pointer to the new polyline or NULL.
  */
 /*
-RS_Polyline* RS_Modification::addPolylineNode(RS_Polyline& polyline,
-        const RS_AtomicEntity& segment,
+Polyline* Modification::addPolylineNode(Polyline& polyline,
+        const AtomicEntity& segment,
         const Vector& node) {
-    RS_DEBUG->print("RS_Modification::addPolylineNode");
+    DEBUG->print("Modification::addPolylineNode");
 
     if (container==NULL) {
-        RS_DEBUG->print("RS_Modification::addPolylineNode: no valid container",
-                        RS_Debug::D_WARNING);
+        DEBUG->print("Modification::addPolylineNode: no valid container",
+                        Debug::D_WARNING);
         return NULL;
     }
 
     if (segment.getParent()!=&polyline) {
-        RS_DEBUG->print("RS_Modification::addPolylineNode: "
+        DEBUG->print("Modification::addPolylineNode: "
                         "segment not part of the polyline",
-                        RS_Debug::D_WARNING);
+                        Debug::D_WARNING);
         return NULL;
     }
 
-    RS_Polyline* newPolyline = new RS_Polyline(container);
+    Polyline* newPolyline = new Polyline(container);
     newPolyline->setClosed(polyline.isClosed());
     newPolyline->setSelected(polyline.isSelected());
     newPolyline->setLayer(polyline.getLayer());
@@ -664,23 +664,23 @@ RS_Polyline* RS_Modification::addPolylineNode(RS_Polyline& polyline,
 
     // copy polyline and add new node:
     bool first = true;
-    RS_Entity* lastEntity = polyline.lastEntity();
-    for (RS_Entity* e=polyline.firstEntity(); e!=NULL;
+    Entity* lastEntity = polyline.lastEntity();
+    for (Entity* e=polyline.firstEntity(); e!=NULL;
             e=polyline.nextEntity()) {
 
         if (e->isAtomic()) {
-            RS_AtomicEntity* ae = (RS_AtomicEntity*)e;
+            AtomicEntity* ae = (AtomicEntity*)e;
             double bulge = 0.0;
             if (ae->rtti()==RS2::EntityArc) {
-                RS_DEBUG->print("RS_Modification::addPolylineNode: arc segment");
-                bulge = ((RS_Arc*)ae)->getBulge();
+                DEBUG->print("Modification::addPolylineNode: arc segment");
+                bulge = ((Arc*)ae)->getBulge();
             } else {
-                RS_DEBUG->print("RS_Modification::addPolylineNode: line segment");
+                DEBUG->print("Modification::addPolylineNode: line segment");
                 bulge = 0.0;
             }
 
             if (first) {
-                RS_DEBUG->print("RS_Modification::addPolylineNode: first segment: %f/%f",
+                DEBUG->print("Modification::addPolylineNode: first segment: %f/%f",
                                 ae->getStartpoint().x, ae->getStartpoint().y);
 
                 newPolyline->setNextBulge(bulge);
@@ -690,15 +690,15 @@ RS_Polyline* RS_Modification::addPolylineNode(RS_Polyline& polyline,
 
             // segment to split:
             if (ae==&segment) {
-                RS_DEBUG->print("RS_Modification::addPolylineNode: split segment found");
+                DEBUG->print("Modification::addPolylineNode: split segment found");
 
-                RS_DEBUG->print("RS_Modification::addPolylineNode: node: %f/%f",
+                DEBUG->print("Modification::addPolylineNode: node: %f/%f",
                                 node.x, node.y);
 
                 newPolyline->setNextBulge(0.0);
                 newPolyline->addVertex(node);
 
-                RS_DEBUG->print("RS_Modification::addPolylineNode: after node: %f/%f",
+                DEBUG->print("Modification::addPolylineNode: after node: %f/%f",
                                 ae->getEndpoint().x, ae->getEndpoint().y);
 
                 if (ae!=lastEntity || polyline.isClosed()==false) {
@@ -706,7 +706,7 @@ RS_Polyline* RS_Modification::addPolylineNode(RS_Polyline& polyline,
                     newPolyline->addVertex(ae->getEndpoint());
                 }
             } else {
-                RS_DEBUG->print("RS_Modification::addPolylineNode: normal vertex found: %f/%f",
+                DEBUG->print("Modification::addPolylineNode: normal vertex found: %f/%f",
                                 ae->getEndpoint().x, ae->getEndpoint().y);
 
                 if (ae!=lastEntity || polyline.isClosed()==false) {
@@ -715,9 +715,9 @@ RS_Polyline* RS_Modification::addPolylineNode(RS_Polyline& polyline,
                 }
             }
         } else {
-            RS_DEBUG->print("RS_Modification::addPolylineNode: "
+            DEBUG->print("Modification::addPolylineNode: "
                             "Polyline contains non-atomic entities",
-                            RS_Debug::D_WARNING);
+                            Debug::D_WARNING);
         }
     }
 
@@ -755,29 +755,29 @@ RS_Polyline* RS_Modification::addPolylineNode(RS_Polyline& polyline,
  * @return Pointer to the new polyline or NULL.
  */
 /*
-RS_Polyline* RS_Modification::deletePolylineNode(RS_Polyline& polyline,
+Polyline* Modification::deletePolylineNode(Polyline& polyline,
         const Vector& node) {
 
-    RS_DEBUG->print("RS_Modification::deletePolylineNode");
+    DEBUG->print("Modification::deletePolylineNode");
 
     if (container==NULL) {
-        RS_DEBUG->print("RS_Modification::addPolylineNode: no valid container",
-                        RS_Debug::D_WARNING);
+        DEBUG->print("Modification::addPolylineNode: no valid container",
+                        Debug::D_WARNING);
         return NULL;
     }
 
     if (node.valid==false) {
-        RS_DEBUG->print("RS_Modification::deletePolylineNode: "
+        DEBUG->print("Modification::deletePolylineNode: "
                         "node not valid",
-                        RS_Debug::D_WARNING);
+                        Debug::D_WARNING);
         return NULL;
     }
 
     // check if the polyline is no longer there after deleting the node:
     if (polyline.count()==1) {
-        RS_Entity* e = polyline.firstEntity();
+        Entity* e = polyline.firstEntity();
         if (e!=NULL && e->isAtomic()) {
-            RS_AtomicEntity* ae = (RS_AtomicEntity*)e;
+            AtomicEntity* ae = (AtomicEntity*)e;
             if (node.distanceTo(ae->getStartpoint())<1.0e-6 ||
                     node.distanceTo(ae->getEndpoint())<1.0e-6) {
 
@@ -796,7 +796,7 @@ RS_Polyline* RS_Modification::deletePolylineNode(RS_Polyline& polyline,
         return NULL;
     }
 
-    RS_Polyline* newPolyline = new RS_Polyline(container);
+    Polyline* newPolyline = new Polyline(container);
     newPolyline->setClosed(polyline.isClosed());
     newPolyline->setSelected(polyline.isSelected());
     newPolyline->setLayer(polyline.getLayer());
@@ -805,18 +805,18 @@ RS_Polyline* RS_Modification::deletePolylineNode(RS_Polyline& polyline,
     // copy polyline and drop deleted node:
     bool first = true;
     bool lastDropped = false;
-    RS_Entity* lastEntity = polyline.lastEntity();
-    for (RS_Entity* e=polyline.firstEntity(); e!=NULL;
+    Entity* lastEntity = polyline.lastEntity();
+    for (Entity* e=polyline.firstEntity(); e!=NULL;
             e=polyline.nextEntity()) {
 
         if (e->isAtomic()) {
-            RS_AtomicEntity* ae = (RS_AtomicEntity*)e;
+            AtomicEntity* ae = (AtomicEntity*)e;
             double bulge = 0.0;
             if (ae->rtti()==RS2::EntityArc) {
-                RS_DEBUG->print("RS_Modification::deletePolylineNode: arc segment");
-                bulge = ((RS_Arc*)ae)->getBulge();
+                DEBUG->print("Modification::deletePolylineNode: arc segment");
+                bulge = ((Arc*)ae)->getBulge();
             } else {
-                RS_DEBUG->print("RS_Modification::deletePolylineNode: line segment");
+                DEBUG->print("Modification::deletePolylineNode: line segment");
                 bulge = 0.0;
             }
 
@@ -827,7 +827,7 @@ RS_Polyline* RS_Modification::deletePolylineNode(RS_Polyline& polyline,
 
             // first vertex (startpoint)
             if (first && node.distanceTo(ae->getStartpoint())>1.0e-6) {
-                RS_DEBUG->print("RS_Modification::deletePolylineNode: first node: %f/%f",
+                DEBUG->print("Modification::deletePolylineNode: first node: %f/%f",
                                 ae->getStartpoint().x, ae->getStartpoint().y);
 
                 newPolyline->setNextBulge(bulge);
@@ -837,7 +837,7 @@ RS_Polyline* RS_Modification::deletePolylineNode(RS_Polyline& polyline,
 
             // normal node (not deleted):
             if (first==false && node.distanceTo(ae->getEndpoint())>1.0e-6) {
-                RS_DEBUG->print("RS_Modification::deletePolylineNode: normal vertex found: %f/%f",
+                DEBUG->print("Modification::deletePolylineNode: normal vertex found: %f/%f",
                                 ae->getEndpoint().x, ae->getEndpoint().y);
                 if (lastDropped) {
                     //bulge = 0.0;
@@ -849,18 +849,18 @@ RS_Polyline* RS_Modification::deletePolylineNode(RS_Polyline& polyline,
 
             // drop deleted node:
             else {
-                RS_DEBUG->print("RS_Modification::deletePolylineNode: deleting vertex: %f/%f",
+                DEBUG->print("Modification::deletePolylineNode: deleting vertex: %f/%f",
                                 ae->getEndpoint().x, ae->getEndpoint().y);
                 lastDropped = true;
             }
         } else {
-            RS_DEBUG->print("RS_Modification::deletePolylineNode: "
+            DEBUG->print("Modification::deletePolylineNode: "
                             "Polyline contains non-atomic entities",
-                            RS_Debug::D_WARNING);
+                            Debug::D_WARNING);
         }
     }
 
-    RS_DEBUG->print("RS_Modification::deletePolylineNode: ending polyline");
+    DEBUG->print("Modification::deletePolylineNode: ending polyline");
     newPolyline->setNextBulge(polyline.getClosingBulge());
     newPolyline->endPolyline();
 
@@ -868,14 +868,14 @@ RS_Polyline* RS_Modification::deletePolylineNode(RS_Polyline& polyline,
     //}
 
     // add new polyline:
-    RS_DEBUG->print("RS_Modification::deletePolylineNode: adding new polyline");
+    DEBUG->print("Modification::deletePolylineNode: adding new polyline");
     container->addEntity(newPolyline);
     if (graphicView!=NULL) {
         graphicView->deleteEntity(&polyline);
         graphicView->drawEntity(newPolyline);
     }
 
-    RS_DEBUG->print("RS_Modification::deletePolylineNode: handling undo");
+    DEBUG->print("Modification::deletePolylineNode: handling undo");
     if (document!=NULL && handleUndo) {
         document->startUndoCycle();
 
@@ -901,46 +901,46 @@ RS_Polyline* RS_Modification::deletePolylineNode(RS_Polyline& polyline,
  * @return Pointer to the new polyline or NULL.
  */
 /*
-RS_Polyline* RS_Modification::deletePolylineNodesBetween(RS_Polyline& polyline,
-        RS_AtomicEntity& segment, const Vector& node1, const Vector& node2) {
+Polyline* Modification::deletePolylineNodesBetween(Polyline& polyline,
+        AtomicEntity& segment, const Vector& node1, const Vector& node2) {
 
-    RS_DEBUG->print("RS_Modification::deletePolylineNodesBetween");
+    DEBUG->print("Modification::deletePolylineNodesBetween");
 
     if (container==NULL) {
-        RS_DEBUG->print("RS_Modification::addPolylineNodesBetween: no valid container",
-                        RS_Debug::D_WARNING);
+        DEBUG->print("Modification::addPolylineNodesBetween: no valid container",
+                        Debug::D_WARNING);
         return NULL;
     }
 
     if (node1.valid==false || node2.valid==false) {
-        RS_DEBUG->print("RS_Modification::deletePolylineNodesBetween: "
+        DEBUG->print("Modification::deletePolylineNodesBetween: "
                         "node not valid",
-                        RS_Debug::D_WARNING);
+                        Debug::D_WARNING);
         return NULL;
     }
 
     if (node1.distanceTo(node2)<1.0e-6) {
-        RS_DEBUG->print("RS_Modification::deletePolylineNodesBetween: "
+        DEBUG->print("Modification::deletePolylineNodesBetween: "
                         "nodes are identical",
-                        RS_Debug::D_WARNING);
+                        Debug::D_WARNING);
         return NULL;
     }
 
     // check if there's nothing to delete:
-    for (RS_Entity* e=polyline.firstEntity(); e!=NULL;
+    for (Entity* e=polyline.firstEntity(); e!=NULL;
             e=polyline.nextEntity()) {
 
         if (e->isAtomic()) {
-            RS_AtomicEntity* ae = (RS_AtomicEntity*)e;
+            AtomicEntity* ae = (AtomicEntity*)e;
 
             if ((node1.distanceTo(ae->getStartpoint())<1.0e-6 &&
                     node2.distanceTo(ae->getEndpoint())<1.0e-6) ||
                     (node2.distanceTo(ae->getStartpoint())<1.0e-6 &&
                      node1.distanceTo(ae->getEndpoint())<1.0e-6)) {
 
-                RS_DEBUG->print("RS_Modification::deletePolylineNodesBetween: "
+                DEBUG->print("Modification::deletePolylineNodesBetween: "
                                 "nothing to delete",
-                                RS_Debug::D_WARNING);
+                                Debug::D_WARNING);
                 return NULL;
             }
         }
@@ -961,11 +961,11 @@ RS_Polyline* RS_Modification::deletePolylineNodesBetween(RS_Polyline& polyline,
         bool found = false;
         double length1 = 0.0;
         double length2 = 0.0;
-        RS_Entity* e=polyline.firstEntity();
+        Entity* e=polyline.firstEntity();
 
         if (startpointInvolved) {
             if (e->isAtomic()) {
-                RS_AtomicEntity* ae = (RS_AtomicEntity*)e;
+                AtomicEntity* ae = (AtomicEntity*)e;
                length1+=ae->getLength();
                        }
             e = polyline.nextEntity();
@@ -973,7 +973,7 @@ RS_Polyline* RS_Modification::deletePolylineNodesBetween(RS_Polyline& polyline,
         for (; e!=NULL; e=polyline.nextEntity()) {
 
             if (e->isAtomic()) {
-                RS_AtomicEntity* ae = (RS_AtomicEntity*)e;
+                AtomicEntity* ae = (AtomicEntity*)e;
 
                 if (node1.distanceTo(ae->getStartpoint())<1.0e-6 ||
                         node2.distanceTo(ae->getStartpoint())<1.0e-6) {
@@ -995,7 +995,7 @@ RS_Polyline* RS_Modification::deletePolylineNodesBetween(RS_Polyline& polyline,
         }
     }
 
-    RS_Polyline* newPolyline = new RS_Polyline(container);
+    Polyline* newPolyline = new Polyline(container);
     newPolyline->setClosed(polyline.isClosed());
     newPolyline->setSelected(polyline.isSelected());
     newPolyline->setLayer(polyline.getLayer());
@@ -1011,28 +1011,28 @@ RS_Polyline* RS_Modification::deletePolylineNodesBetween(RS_Polyline& polyline,
     bool removing = deleteStart;
     bool done = false;
     bool nextIsStraight = false;
-    RS_Entity* lastEntity = polyline.lastEntity();
+    Entity* lastEntity = polyline.lastEntity();
     int i=0;
     double bulge = 0.0;
-    for (RS_Entity* e=polyline.firstEntity(); e!=NULL;
+    for (Entity* e=polyline.firstEntity(); e!=NULL;
             e=polyline.nextEntity()) {
 
-        RS_DEBUG->print("RS_Modification::deletePolylineNodesBetween: entity: %d", i++);
-        RS_DEBUG->print("RS_Modification::deletePolylineNodesBetween: removing: %d", (int)removing);
+        DEBUG->print("Modification::deletePolylineNodesBetween: entity: %d", i++);
+        DEBUG->print("Modification::deletePolylineNodesBetween: removing: %d", (int)removing);
 
         if (e->isAtomic()) {
-            RS_AtomicEntity* ae = (RS_AtomicEntity*)e;
+            AtomicEntity* ae = (AtomicEntity*)e;
             if (ae->rtti()==RS2::EntityArc) {
-                RS_DEBUG->print("RS_Modification::deletePolylineNodesBetween: arc segment");
-                bulge = ((RS_Arc*)ae)->getBulge();
+                DEBUG->print("Modification::deletePolylineNodesBetween: arc segment");
+                bulge = ((Arc*)ae)->getBulge();
             } else {
-                RS_DEBUG->print("RS_Modification::deletePolylineNodesBetween: line segment");
+                DEBUG->print("Modification::deletePolylineNodesBetween: line segment");
                 bulge = 0.0;
             }
 
             // last entity is closing entity and will be added below with endPolyline()
             if (e==lastEntity && polyline.isClosed()) {
-                RS_DEBUG->print("RS_Modification::deletePolylineNodesBetween: "
+                DEBUG->print("Modification::deletePolylineNodesBetween: "
                                 "dropping last vertex of closed polyline");
                 continue;
             }
@@ -1040,7 +1040,7 @@ RS_Polyline* RS_Modification::deletePolylineNodesBetween(RS_Polyline& polyline,
             // first vertex (startpoint)
             if (first) {
                 if (!removing) {
-                    RS_DEBUG->print("RS_Modification::deletePolylineNodesBetween: first node: %f/%f",
+                    DEBUG->print("Modification::deletePolylineNodesBetween: first node: %f/%f",
                                     ae->getStartpoint().x, ae->getStartpoint().y);
                     newPolyline->setNextBulge(bulge);
                     newPolyline->addVertex(ae->getStartpoint());
@@ -1052,7 +1052,7 @@ RS_Polyline* RS_Modification::deletePolylineNodesBetween(RS_Polyline& polyline,
             if (removing==true &&
                     (node1.distanceTo(ae->getEndpoint())<1.0e-6 ||
                      node2.distanceTo(ae->getEndpoint())<1.0e-6)) {
-                RS_DEBUG->print("RS_Modification::deletePolylineNodesBetween: "
+                DEBUG->print("Modification::deletePolylineNodesBetween: "
                                 "stop removing at: %f/%f",
                                 ae->getEndpoint().x, ae->getEndpoint().y);
                 removing = false;
@@ -1064,7 +1064,7 @@ RS_Polyline* RS_Modification::deletePolylineNodesBetween(RS_Polyline& polyline,
 
             // normal node (not deleted):
             if (removing==false && (done==false || deleteStart==false)) {
-                RS_DEBUG->print("RS_Modification::deletePolylineNodesBetween: "
+                DEBUG->print("Modification::deletePolylineNodesBetween: "
                                 "normal vertex found: %f/%f",
                                 ae->getEndpoint().x, ae->getEndpoint().y);
                 if (nextIsStraight) {
@@ -1077,7 +1077,7 @@ RS_Polyline* RS_Modification::deletePolylineNodesBetween(RS_Polyline& polyline,
 
             // drop deleted node:
             else {
-                RS_DEBUG->print("RS_Modification::deletePolylineNodesBetween: "
+                DEBUG->print("Modification::deletePolylineNodesBetween: "
                                 "deleting vertex: %f/%f",
                                 ae->getEndpoint().x, ae->getEndpoint().y);
             }
@@ -1086,7 +1086,7 @@ RS_Polyline* RS_Modification::deletePolylineNodesBetween(RS_Polyline& polyline,
             if (done==false && removing==false &&
                     (node1.distanceTo(ae->getEndpoint())<1.0e-6 ||
                      node2.distanceTo(ae->getEndpoint())<1.0e-6)) {
-                RS_DEBUG->print("RS_Modification::deletePolylineNodesBetween: "
+                DEBUG->print("Modification::deletePolylineNodesBetween: "
                                 "start removing at: %f/%f",
                                 ae->getEndpoint().x, ae->getEndpoint().y);
                 removing = true;
@@ -1096,25 +1096,25 @@ RS_Polyline* RS_Modification::deletePolylineNodesBetween(RS_Polyline& polyline,
                 done=false;
             }
         } else {
-            RS_DEBUG->print("RS_Modification::deletePolylineNodesBetween: "
+            DEBUG->print("Modification::deletePolylineNodesBetween: "
                             "Polyline contains non-atomic entities",
-                            RS_Debug::D_WARNING);
+                            Debug::D_WARNING);
         }
     }
 
-    RS_DEBUG->print("RS_Modification::deletePolylineNodesBetween: ending polyline");
+    DEBUG->print("Modification::deletePolylineNodesBetween: ending polyline");
     newPolyline->setNextBulge(polyline.getClosingBulge());
     newPolyline->endPolyline();
 
     // add new polyline:
-    RS_DEBUG->print("RS_Modification::deletePolylineNodesBetween: adding new polyline");
+    DEBUG->print("Modification::deletePolylineNodesBetween: adding new polyline");
     container->addEntity(newPolyline);
     if (graphicView!=NULL) {
         graphicView->deleteEntity(&polyline);
         graphicView->drawEntity(newPolyline);
     }
 
-    RS_DEBUG->print("RS_Modification::deletePolylineNodesBetween: handling undo");
+    DEBUG->print("Modification::deletePolylineNodesBetween: handling undo");
     if (document!=NULL && handleUndo) {
         document->startUndoCycle();
 
@@ -1142,44 +1142,44 @@ RS_Polyline* RS_Modification::deletePolylineNodesBetween(RS_Polyline& polyline,
  * @return Pointer to the new polyline or NULL.
  */
 /*
-RS_Polyline* RS_Modification::polylineTrim(RS_Polyline& polyline,
-        RS_AtomicEntity& segment1,
-        RS_AtomicEntity& segment2) {
+Polyline* Modification::polylineTrim(Polyline& polyline,
+        AtomicEntity& segment1,
+        AtomicEntity& segment2) {
 
-    RS_DEBUG->print("RS_Modification::polylineTrim");
+    DEBUG->print("Modification::polylineTrim");
 
     if (container==NULL) {
-        RS_DEBUG->print("RS_Modification::addPolylineNodesBetween: no valid container",
-                        RS_Debug::D_WARNING);
+        DEBUG->print("Modification::addPolylineNodesBetween: no valid container",
+                        Debug::D_WARNING);
         return NULL;
     }
 
     if (segment1.getParent()!=&polyline || segment2.getParent()!=&polyline) {
-        RS_DEBUG->print("RS_Modification::polylineTrim: "
+        DEBUG->print("Modification::polylineTrim: "
                         "segments not in polyline",
-                        RS_Debug::D_WARNING);
+                        Debug::D_WARNING);
         return NULL;
     }
 
     if (&segment1==&segment2) {
-        RS_DEBUG->print("RS_Modification::polylineTrim: "
+        DEBUG->print("Modification::polylineTrim: "
                         "segments are identical",
-                        RS_Debug::D_WARNING);
+                        Debug::D_WARNING);
         return NULL;
     }
 
     VectorSolutions sol;
-    sol = RS_Information::getIntersection(&segment1, &segment2, false);
+    sol = Information::getIntersection(&segment1, &segment2, false);
 
     if (sol.getNumber()==0) {
-        RS_DEBUG->print("RS_Modification::polylineTrim: "
+        DEBUG->print("Modification::polylineTrim: "
                         "segments cannot be trimmed",
-                        RS_Debug::D_WARNING);
+                        Debug::D_WARNING);
         return NULL;
     }
 
     // check which segment comes first in the polyline:
-    RS_AtomicEntity* firstSegment;
+    AtomicEntity* firstSegment;
     if (polyline.findEntity(&segment1) > polyline.findEntity(&segment2)) {
         firstSegment = &segment2;
     } else {
@@ -1188,12 +1188,12 @@ RS_Polyline* RS_Modification::polylineTrim(RS_Polyline& polyline,
 
     // find out if we need to trim towards the open part of the polyline
     bool reverseTrim;
-    reverseTrim = !RS_Math::isSameDirection(firstSegment->getDirection1(),
+    reverseTrim = !Math::isSameDirection(firstSegment->getDirection1(),
                                             firstSegment->getStartpoint().angleTo(sol.get(0)), M_PI/2.0);
-    //reverseTrim = reverseTrim || !RS_Math::isSameDirection(segment2.getDirection1(),
+    //reverseTrim = reverseTrim || !Math::isSameDirection(segment2.getDirection1(),
     // segment2.getStartpoint().angleTo(sol.get(0)), M_PI/2.0);
 
-    RS_Polyline* newPolyline = new RS_Polyline(container);
+    Polyline* newPolyline = new Polyline(container);
     newPolyline->setClosed(polyline.isClosed());
     newPolyline->setSelected(polyline.isSelected());
     newPolyline->setLayer(polyline.getLayer());
@@ -1205,31 +1205,31 @@ RS_Polyline* RS_Modification::polylineTrim(RS_Polyline& polyline,
         bool first = true;
         bool removing = false;
         bool nextIsStraight = false;
-        RS_Entity* lastEntity = polyline.lastEntity();
-        for (RS_Entity* e=polyline.firstEntity(); e!=NULL;
+        Entity* lastEntity = polyline.lastEntity();
+        for (Entity* e=polyline.firstEntity(); e!=NULL;
                 e=polyline.nextEntity()) {
 
             if (e->isAtomic()) {
-                RS_AtomicEntity* ae = (RS_AtomicEntity*)e;
+                AtomicEntity* ae = (AtomicEntity*)e;
                 double bulge = 0.0;
                 if (ae->rtti()==RS2::EntityArc) {
-                    RS_DEBUG->print("RS_Modification::polylineTrim: arc segment");
-                    bulge = ((RS_Arc*)ae)->getBulge();
+                    DEBUG->print("Modification::polylineTrim: arc segment");
+                    bulge = ((Arc*)ae)->getBulge();
                 } else {
-                    RS_DEBUG->print("RS_Modification::polylineTrim: line segment");
+                    DEBUG->print("Modification::polylineTrim: line segment");
                     bulge = 0.0;
                 }
 
                 // last entity is closing entity and will be added below with endPolyline()
                 if (e==lastEntity && polyline.isClosed()) {
-                    RS_DEBUG->print("RS_Modification::polylineTrim: "
+                    DEBUG->print("Modification::polylineTrim: "
                                     "dropping last vertex of closed polyline");
                     continue;
                 }
 
                 // first vertex (startpoint)
                 if (first) {
-                    RS_DEBUG->print("RS_Modification::polylineTrim: first node: %f/%f",
+                    DEBUG->print("Modification::polylineTrim: first node: %f/%f",
                                     ae->getStartpoint().x, ae->getStartpoint().y);
 
                     newPolyline->setNextBulge(bulge);
@@ -1239,7 +1239,7 @@ RS_Polyline* RS_Modification::polylineTrim(RS_Polyline& polyline,
 
                 // trim and start removing nodes:
                 if (removing==false && (ae==&segment1 || ae==&segment2)) {
-                    RS_DEBUG->print("RS_Modification::polylineTrim: "
+                    DEBUG->print("Modification::polylineTrim: "
                                     "start removing at trim point %f/%f",
                                     sol.get(0).x, sol.get(0).y);
                     newPolyline->setNextBulge(0.0);
@@ -1250,14 +1250,14 @@ RS_Polyline* RS_Modification::polylineTrim(RS_Polyline& polyline,
 
                 // stop removing nodes:
                 else if (removing==true && (ae==&segment1 || ae==&segment2)) {
-                    RS_DEBUG->print("RS_Modification::polylineTrim: stop removing at: %f/%f",
+                    DEBUG->print("Modification::polylineTrim: stop removing at: %f/%f",
                                     ae->getEndpoint().x, ae->getEndpoint().y);
                     removing = false;
                 }
 
                 // normal node (not deleted):
                 if (removing==false) {
-                    RS_DEBUG->print("RS_Modification::polylineTrim: normal vertex found: %f/%f",
+                    DEBUG->print("Modification::polylineTrim: normal vertex found: %f/%f",
                                     ae->getEndpoint().x, ae->getEndpoint().y);
                     if (nextIsStraight) {
                         newPolyline->setNextBulge(0.0);
@@ -1268,9 +1268,9 @@ RS_Polyline* RS_Modification::polylineTrim(RS_Polyline& polyline,
                     newPolyline->addVertex(ae->getEndpoint());
                 }
             } else {
-                RS_DEBUG->print("RS_Modification::polylineTrim: "
+                DEBUG->print("Modification::polylineTrim: "
                                 "Polyline contains non-atomic entities",
-                                RS_Debug::D_WARNING);
+                                Debug::D_WARNING);
             }
         }
     }
@@ -1281,31 +1281,31 @@ RS_Polyline* RS_Modification::polylineTrim(RS_Polyline& polyline,
         //bool first = true;
         bool removing = true;
         bool nextIsStraight = false;
-        RS_Entity* lastEntity = polyline.lastEntity();
-        for (RS_Entity* e=polyline.firstEntity(); e!=NULL;
+        Entity* lastEntity = polyline.lastEntity();
+        for (Entity* e=polyline.firstEntity(); e!=NULL;
                 e=polyline.nextEntity()) {
 
             if (e->isAtomic()) {
-                RS_AtomicEntity* ae = (RS_AtomicEntity*)e;
+                AtomicEntity* ae = (AtomicEntity*)e;
                 double bulge = 0.0;
                 if (ae->rtti()==RS2::EntityArc) {
-                    RS_DEBUG->print("RS_Modification::polylineTrim: arc segment");
-                    bulge = ((RS_Arc*)ae)->getBulge();
+                    DEBUG->print("Modification::polylineTrim: arc segment");
+                    bulge = ((Arc*)ae)->getBulge();
                 } else {
-                    RS_DEBUG->print("RS_Modification::polylineTrim: line segment");
+                    DEBUG->print("Modification::polylineTrim: line segment");
                     bulge = 0.0;
                 }
 
                 // last entity is closing entity and will be added below with endPolyline()
                 if (e==lastEntity && polyline.isClosed()) {
-                    RS_DEBUG->print("RS_Modification::polylineTrim: "
+                    DEBUG->print("Modification::polylineTrim: "
                                     "dropping last vertex of closed polyline");
                     continue;
                 }
 
                 // trim and stop removing nodes:
                 if (removing==true && (ae==&segment1 || ae==&segment2)) {
-                    RS_DEBUG->print("RS_Modification::polylineTrim: "
+                    DEBUG->print("Modification::polylineTrim: "
                                     "stop removing at trim point %f/%f",
                                     sol.get(0).x, sol.get(0).y);
                     newPolyline->setNextBulge(0.0);
@@ -1317,7 +1317,7 @@ RS_Polyline* RS_Modification::polylineTrim(RS_Polyline& polyline,
 
                 // start removing nodes again:
                 else if (removing==false && (ae==&segment1 || ae==&segment2)) {
-                    RS_DEBUG->print("RS_Modification::polylineTrim: start removing at: %f/%f",
+                    DEBUG->print("Modification::polylineTrim: start removing at: %f/%f",
                                     ae->getEndpoint().x, ae->getEndpoint().y);
                     newPolyline->setNextBulge(0.0);
                     // start of new polyline:
@@ -1327,7 +1327,7 @@ RS_Polyline* RS_Modification::polylineTrim(RS_Polyline& polyline,
 
                 // normal node (not deleted):
                 if (removing==false) {
-                    RS_DEBUG->print("RS_Modification::polylineTrim: normal vertex found: %f/%f",
+                    DEBUG->print("Modification::polylineTrim: normal vertex found: %f/%f",
                                     ae->getEndpoint().x, ae->getEndpoint().y);
                     if (nextIsStraight) {
                         newPolyline->setNextBulge(0.0);
@@ -1338,26 +1338,26 @@ RS_Polyline* RS_Modification::polylineTrim(RS_Polyline& polyline,
                     newPolyline->addVertex(ae->getEndpoint());
                 }
             } else {
-                RS_DEBUG->print("RS_Modification::polylineTrim: "
+                DEBUG->print("Modification::polylineTrim: "
                                 "Polyline contains non-atomic entities",
-                                RS_Debug::D_WARNING);
+                                Debug::D_WARNING);
             }
         }
     }
 
-    RS_DEBUG->print("RS_Modification::polylineTrim: ending polyline");
+    DEBUG->print("Modification::polylineTrim: ending polyline");
     newPolyline->setNextBulge(polyline.getClosingBulge());
     newPolyline->endPolyline();
 
     // add new polyline:
-    RS_DEBUG->print("RS_Modification::polylineTrim: adding new polyline");
+    DEBUG->print("Modification::polylineTrim: adding new polyline");
     container->addEntity(newPolyline);
     if (graphicView!=NULL) {
         graphicView->deleteEntity(&polyline);
         graphicView->drawEntity(newPolyline);
     }
 
-    RS_DEBUG->print("RS_Modification::polylineTrim: handling undo");
+    DEBUG->print("Modification::polylineTrim: handling undo");
     if (document!=NULL && handleUndo) {
         document->startUndoCycle();
 
@@ -1376,17 +1376,17 @@ RS_Polyline* RS_Modification::polylineTrim(RS_Polyline& polyline,
  * Moves all selected entities with the given data for the move
  * modification.
  */
-bool RS_Modification::move(RS_MoveData & data)
+bool Modification::move(MoveData & data)
 {
        if (container == NULL)
        {
-               RS_DEBUG->print("RS_Modification::move: no valid container", RS_Debug::D_WARNING);
+               DEBUG->print("Modification::move: no valid container", Debug::D_WARNING);
                return false;
        }
 
-//    Q3PtrList<RS_Entity> addList;
+//    Q3PtrList<Entity> addList;
 //    addList.setAutoDelete(false);
-       QList<RS_Entity *> addList;
+       QList<Entity *> addList;
 
        if (document != NULL && handleUndo)
                document->startUndoCycle();
@@ -1396,12 +1396,12 @@ bool RS_Modification::move(RS_MoveData & data)
        {
                // too slow:
                //for (uint i=0; i<container->count(); ++i) {
-               //RS_Entity* e = container->entityAt(i);
-               for(RS_Entity* e=container->firstEntity(); e!=NULL; e=container->nextEntity())
+               //Entity* e = container->entityAt(i);
+               for(Entity* e=container->firstEntity(); e!=NULL; e=container->nextEntity())
                {
                        if (e != NULL && e->isSelected())
                        {
-                               RS_Entity * ec = e->clone();
+                               Entity * ec = e->clone();
                                ec->move(data.offset * num);
 
                                if (data.useCurrentLayer)
@@ -1411,7 +1411,7 @@ bool RS_Modification::move(RS_MoveData & data)
                                        ec->setPenToActive();
 
                                if (ec->rtti() == RS2::EntityInsert)
-                                       ((RS_Insert *)ec)->update();
+                                       ((Insert *)ec)->update();
 
                                // since 2.0.4.0: keep selection
                                ec->setSelected(true);
@@ -1435,18 +1435,18 @@ bool RS_Modification::move(RS_MoveData & data)
 /**
  * Rotates all selected entities with the given data for the rotation.
  */
-bool RS_Modification::rotate(RS_RotateData & data)
+bool Modification::rotate(RotateData & data)
 {
        if (container == NULL)
        {
-               RS_DEBUG->print("RS_Modification::rotate: no valid container",
-                                               RS_Debug::D_WARNING);
+               DEBUG->print("Modification::rotate: no valid container",
+                                               Debug::D_WARNING);
                return false;
        }
 
-//     Q3PtrList<RS_Entity> addList;
+//     Q3PtrList<Entity> addList;
 //     addList.setAutoDelete(false);
-       QList<RS_Entity *> addList;
+       QList<Entity *> addList;
 
        if (document!=NULL && handleUndo)
                document->startUndoCycle();
@@ -1454,14 +1454,14 @@ bool RS_Modification::rotate(RS_RotateData & data)
        // Create new entites
        for(int num=1; num<=data.number || (data.number==0 && num<=1); num++)
        {
-               for (RS_Entity * e=container->firstEntity(); e!=NULL; e=container->nextEntity())
+               for (Entity * e=container->firstEntity(); e!=NULL; e=container->nextEntity())
                {
                        //for (uint i=0; i<container->count(); ++i) {
-                       //RS_Entity* e = container->entityAt(i);
+                       //Entity* e = container->entityAt(i);
 
                        if (e != NULL && e->isSelected())
                        {
-                               RS_Entity * ec = e->clone();
+                               Entity * ec = e->clone();
                                ec->setSelected(false);
                                ec->rotate(data.center, data.angle*num);
 
@@ -1472,7 +1472,7 @@ bool RS_Modification::rotate(RS_RotateData & data)
                                        ec->setPenToActive();
 
                                if (ec->rtti() == RS2::EntityInsert)
-                                       ((RS_Insert *)ec)->update();
+                                       ((Insert *)ec)->update();
 
                                addList.append(ec);
                        }
@@ -1495,17 +1495,17 @@ bool RS_Modification::rotate(RS_RotateData & data)
  * Moves all selected entities with the given data for the scale
  * modification.
  */
-bool RS_Modification::scale(RS_ScaleData & data)
+bool Modification::scale(ScaleData & data)
 {
        if (container == NULL)
        {
-               RS_DEBUG->print("RS_Modification::scale: no valid container", RS_Debug::D_WARNING);
+               DEBUG->print("Modification::scale: no valid container", Debug::D_WARNING);
                return false;
        }
 
-//     Q3PtrList<RS_Entity> addList;
+//     Q3PtrList<Entity> addList;
 //     addList.setAutoDelete(false);
-       QList<RS_Entity *> addList;
+       QList<Entity *> addList;
 
        if (document!=NULL && handleUndo)
                document->startUndoCycle();
@@ -1513,15 +1513,15 @@ bool RS_Modification::scale(RS_ScaleData & data)
        // Create new entites
        for(int num=1; num<=data.number || (data.number==0 && num<=1); num++)
        {
-               for(RS_Entity* e=container->firstEntity(); e!=NULL; e=container->nextEntity())
+               for(Entity* e=container->firstEntity(); e!=NULL; e=container->nextEntity())
                {
                        //for (uint i=0; i<container->count(); ++i) {
-                       //RS_Entity* e = container->entityAt(i);
+                       //Entity* e = container->entityAt(i);
                        if (e != NULL && e->isSelected())
                        {
-                               RS_Entity * ec = e->clone();
+                               Entity * ec = e->clone();
                                ec->setSelected(false);
-                               ec->scale(data.referencePoint, RS_Math::pow(data.factor, num));
+                               ec->scale(data.referencePoint, Math::pow(data.factor, num));
 
                                if (data.useCurrentLayer)
                                        ec->setLayerToActive();
@@ -1530,7 +1530,7 @@ bool RS_Modification::scale(RS_ScaleData & data)
                                        ec->setPenToActive();
 
                                if (ec->rtti()==RS2::EntityInsert)
-                                       ((RS_Insert*)ec)->update();
+                                       ((Insert*)ec)->update();
 
                                addList.append(ec);
                        }
@@ -1553,17 +1553,17 @@ bool RS_Modification::scale(RS_ScaleData & data)
  * Mirror all selected entities with the given data for the mirror
  * modification.
  */
-bool RS_Modification::mirror(RS_MirrorData & data)
+bool Modification::mirror(MirrorData & data)
 {
        if (container==NULL) {
-               RS_DEBUG->print("RS_Modification::mirror: no valid container",
-                                               RS_Debug::D_WARNING);
+               DEBUG->print("Modification::mirror: no valid container",
+                                               Debug::D_WARNING);
                return false;
        }
 
-//     Q3PtrList<RS_Entity> addList;
+//     Q3PtrList<Entity> addList;
 //     addList.setAutoDelete(false);
-       QList<RS_Entity *> addList;
+       QList<Entity *> addList;
 
        if (document!=NULL && handleUndo) {
                document->startUndoCycle();
@@ -1573,14 +1573,14 @@ bool RS_Modification::mirror(RS_MirrorData & data)
        for (int num=1;
                        num<=(int)data.copy || (data.copy==false && num<=1);
                        num++) {
-               for (RS_Entity* e=container->firstEntity();
+               for (Entity* e=container->firstEntity();
                                e!=NULL;
                                e=container->nextEntity()) {
                        //for (uint i=0; i<container->count(); ++i) {
-                       //RS_Entity* e = container->entityAt(i);
+                       //Entity* e = container->entityAt(i);
 
                        if (e!=NULL && e->isSelected()) {
-                               RS_Entity* ec = e->clone();
+                               Entity* ec = e->clone();
                                ec->setSelected(false);
 
                                ec->mirror(data.axisPoint1, data.axisPoint2);
@@ -1591,7 +1591,7 @@ bool RS_Modification::mirror(RS_MirrorData & data)
                                        ec->setPenToActive();
                                }
                                if (ec->rtti()==RS2::EntityInsert) {
-                                       ((RS_Insert*)ec)->update();
+                                       ((Insert*)ec)->update();
                                }
                                addList.append(ec);
                        }
@@ -1614,17 +1614,17 @@ bool RS_Modification::mirror(RS_MirrorData & data)
 /**
  * Rotates entities around two centers with the given parameters.
  */
-bool RS_Modification::rotate2(RS_Rotate2Data & data)
+bool Modification::rotate2(Rotate2Data & data)
 {
        if (container==NULL) {
-               RS_DEBUG->print("RS_Modification::rotate2: no valid container",
-                                               RS_Debug::D_WARNING);
+               DEBUG->print("Modification::rotate2: no valid container",
+                                               Debug::D_WARNING);
                return false;
        }
 
-//     Q3PtrList<RS_Entity> addList;
+//     Q3PtrList<Entity> addList;
 //     addList.setAutoDelete(false);
-       QList<RS_Entity *> addList;
+       QList<Entity *> addList;
 
        if (document!=NULL && handleUndo) {
                document->startUndoCycle();
@@ -1635,14 +1635,14 @@ bool RS_Modification::rotate2(RS_Rotate2Data & data)
                        num<=data.number || (data.number==0 && num<=1);
                        num++) {
 
-               for (RS_Entity* e=container->firstEntity();
+               for (Entity* e=container->firstEntity();
                                e!=NULL;
                                e=container->nextEntity()) {
                        //for (uint i=0; i<container->count(); ++i) {
-                       //RS_Entity* e = container->entityAt(i);
+                       //Entity* e = container->entityAt(i);
 
                        if (e!=NULL && e->isSelected()) {
-                               RS_Entity* ec = e->clone();
+                               Entity* ec = e->clone();
                                ec->setSelected(false);
 
                                ec->rotate(data.center1, data.angle1*num);
@@ -1657,7 +1657,7 @@ bool RS_Modification::rotate2(RS_Rotate2Data & data)
                                        ec->setPenToActive();
                                }
                                if (ec->rtti()==RS2::EntityInsert) {
-                                       ((RS_Insert*)ec)->update();
+                                       ((Insert*)ec)->update();
                                }
                                addList.append(ec);
                        }
@@ -1680,17 +1680,17 @@ bool RS_Modification::rotate2(RS_Rotate2Data & data)
 /**
  * Moves and rotates entities with the given parameters.
  */
-bool RS_Modification::moveRotate(RS_MoveRotateData & data)
+bool Modification::moveRotate(MoveRotateData & data)
 {
     if (container==NULL) {
-        RS_DEBUG->print("RS_Modification::moveRotate: no valid container",
-                        RS_Debug::D_WARNING);
+        DEBUG->print("Modification::moveRotate: no valid container",
+                        Debug::D_WARNING);
         return false;
     }
 
-//     Q3PtrList<RS_Entity> addList;
+//     Q3PtrList<Entity> addList;
 //     addList.setAutoDelete(false);
-       QList<RS_Entity *> addList;
+       QList<Entity *> addList;
 
     if (document!=NULL && handleUndo) {
         document->startUndoCycle();
@@ -1700,14 +1700,14 @@ bool RS_Modification::moveRotate(RS_MoveRotateData & data)
     for (int num=1;
             num<=data.number || (data.number==0 && num<=1);
             num++) {
-        for (RS_Entity* e=container->firstEntity();
+        for (Entity* e=container->firstEntity();
                 e!=NULL;
                 e=container->nextEntity()) {
             //for (uint i=0; i<container->count(); ++i) {
-            //RS_Entity* e = container->entityAt(i);
+            //Entity* e = container->entityAt(i);
 
             if (e!=NULL && e->isSelected()) {
-                RS_Entity* ec = e->clone();
+                Entity* ec = e->clone();
                 ec->setSelected(false);
 
                 ec->move(data.offset*num);
@@ -1720,7 +1720,7 @@ bool RS_Modification::moveRotate(RS_MoveRotateData & data)
                     ec->setPenToActive();
                 }
                 if (ec->rtti()==RS2::EntityInsert) {
-                    ((RS_Insert*)ec)->update();
+                    ((Insert*)ec)->update();
                 }
                 addList.append(ec);
             }
@@ -1745,19 +1745,19 @@ bool RS_Modification::moveRotate(RS_MoveRotateData & data)
  *
  * @param remove true: Remove entites.
  */
-void RS_Modification::deselectOriginals(bool remove)
+void Modification::deselectOriginals(bool remove)
 {
-       for(RS_Entity* e=container->firstEntity(); e!=NULL; e=container->nextEntity())
+       for(Entity* e=container->firstEntity(); e!=NULL; e=container->nextEntity())
        {
                //for (uint i=0; i<container->count(); ++i) {
-               //RS_Entity* e = container->entityAt(i);
+               //Entity* e = container->entityAt(i);
 
                if (e != NULL)
                {
                        bool selected = false;
                        /*
                                        if (e->isAtomic()) {
-                                               RS_AtomicEntity* ae = (RS_AtomicEntity*)e;
+                                               AtomicEntity* ae = (AtomicEntity*)e;
                                                if (ae->isStartpointSelected() ||
                                                                ae->isEndpointSelected()) {
 
@@ -1800,13 +1800,13 @@ void RS_Modification::deselectOriginals(bool remove)
  *
  * @param addList Entities to add.
  */
-//void RS_Modification::addNewEntities(Q3PtrList<RS_Entity> & addList)
-void RS_Modification::addNewEntities(QList<RS_Entity *> & addList)
+//void Modification::addNewEntities(Q3PtrList<Entity> & addList)
+void Modification::addNewEntities(QList<Entity *> & addList)
 {
-//     for(RS_Entity * e=addList.first(); e!=NULL; e=addList.next())
+//     for(Entity * e=addList.first(); e!=NULL; e=addList.next())
        for(int i=0; i<addList.size(); i++)
        {
-               RS_Entity * e = addList[i];
+               Entity * e = addList[i];
 
                if (e != NULL)
                {
@@ -1833,20 +1833,20 @@ void RS_Modification::addNewEntities(QList<RS_Entity *> & addList)
  * @param limitEntity Entity to which the trim entity will be trimmed.
  * @param both true: Trim both entities. false: trim trimEntity only.
  */
-bool RS_Modification::trim(const Vector& trimCoord, RS_AtomicEntity* trimEntity,
-       const Vector& limitCoord, RS_Entity* limitEntity, bool both)
+bool Modification::trim(const Vector& trimCoord, AtomicEntity* trimEntity,
+       const Vector& limitCoord, Entity* limitEntity, bool both)
 {
     if (trimEntity==NULL || limitEntity==NULL)
        {
-        RS_DEBUG->print(RS_Debug::D_WARNING,
-                        "RS_Modification::trim: At least one entity is NULL");
+        DEBUG->print(Debug::D_WARNING,
+                        "Modification::trim: At least one entity is NULL");
         return false;
     }
 
     if (both && !limitEntity->isAtomic())
        {
-        RS_DEBUG->print(RS_Debug::D_WARNING,
-                        "RS_Modification::trim: limitEntity is not atomic");
+        DEBUG->print(Debug::D_WARNING,
+                        "Modification::trim: limitEntity is not atomic");
     }
 
     VectorSolutions sol;
@@ -1854,21 +1854,21 @@ bool RS_Modification::trim(const Vector& trimCoord, RS_AtomicEntity* trimEntity,
        if (limitEntity->isAtomic())
        {
         // intersection(s) of the two entities:
-        sol = RS_Information::getIntersection(trimEntity, limitEntity, false);
+        sol = Information::getIntersection(trimEntity, limitEntity, false);
     } else if (limitEntity->isContainer()) {
-        RS_EntityContainer* ec = (RS_EntityContainer*)limitEntity;
+        EntityContainer* ec = (EntityContainer*)limitEntity;
 
         sol.alloc(128);
         int i=0;
 
-        for (RS_Entity* e=ec->firstEntity(RS2::ResolveAll); e!=NULL;
+        for (Entity* e=ec->firstEntity(RS2::ResolveAll); e!=NULL;
                 e=ec->nextEntity(RS2::ResolveAll)) {
             //for (int i=0; i<container->count(); ++i) {
-            //    RS_Entity* e = container->entityAt(i);
+            //    Entity* e = container->entityAt(i);
 
             if (e!=NULL) {
 
-                VectorSolutions s2 = RS_Information::getIntersection(trimEntity,
+                VectorSolutions s2 = Information::getIntersection(trimEntity,
                                         e, false);
 
                 if (s2.hasValid()) {
@@ -1888,23 +1888,23 @@ bool RS_Modification::trim(const Vector& trimCoord, RS_AtomicEntity* trimEntity,
        if (!sol.hasValid())
                return false;
 
-       RS_AtomicEntity * trimmed1 = NULL;
-       RS_AtomicEntity * trimmed2 = NULL;
+       AtomicEntity * trimmed1 = NULL;
+       AtomicEntity * trimmed2 = NULL;
 
        // remove trim entity from view:
        if (trimEntity->rtti() == RS2::EntityCircle)
        {
                // convert a circle into a trimmable arc
-               RS_Circle * c = (RS_Circle *)trimEntity;
+               Circle * c = (Circle *)trimEntity;
                double am = c->getCenter().angleTo(trimCoord);
-               RS_ArcData d(c->getCenter(), c->getRadius(),
-                       RS_Math::correctAngle(am - M_PI / 2),
-                       RS_Math::correctAngle(am + M_PI / 2), false);
-               trimmed1 = new RS_Arc(trimEntity->getParent(), d);
+               ArcData d(c->getCenter(), c->getRadius(),
+                       Math::correctAngle(am - M_PI / 2),
+                       Math::correctAngle(am + M_PI / 2), false);
+               trimmed1 = new Arc(trimEntity->getParent(), d);
        }
        else
        {
-               trimmed1 = (RS_AtomicEntity *)trimEntity->clone();
+               trimmed1 = (AtomicEntity *)trimEntity->clone();
                trimmed1->setHighlighted(false);
        }
 
@@ -1917,7 +1917,7 @@ bool RS_Modification::trim(const Vector& trimCoord, RS_AtomicEntity* trimEntity,
        // remove limit entity from view:
        if (both)
        {
-               trimmed2 = (RS_AtomicEntity *)limitEntity->clone();
+               trimmed2 = (AtomicEntity *)limitEntity->clone();
                trimmed2->setHighlighted(false);
 
 #warning "!!! Old rendering path needs upgrading !!!"
@@ -1931,13 +1931,13 @@ bool RS_Modification::trim(const Vector& trimCoord, RS_AtomicEntity* trimEntity,
     int ind = 0;
     Vector is = sol.getClosest(limitCoord, NULL, &ind);
     //sol.getClosest(limitCoord, NULL, &ind);
-    RS_DEBUG->print("RS_Modification::trim: limitCoord: %f/%f", limitCoord.x, limitCoord.y);
-    RS_DEBUG->print("RS_Modification::trim: sol.get(0): %f/%f", sol.get(0).x, sol.get(0).y);
-    RS_DEBUG->print("RS_Modification::trim: sol.get(1): %f/%f", sol.get(1).x, sol.get(1).y);
-    RS_DEBUG->print("RS_Modification::trim: ind: %d", ind);
+    DEBUG->print("Modification::trim: limitCoord: %f/%f", limitCoord.x, limitCoord.y);
+    DEBUG->print("Modification::trim: sol.get(0): %f/%f", sol.get(0).x, sol.get(0).y);
+    DEBUG->print("Modification::trim: sol.get(1): %f/%f", sol.get(1).x, sol.get(1).y);
+    DEBUG->print("Modification::trim: ind: %d", ind);
     Vector is2 = sol.get(ind==0 ? 1 : 0);
     //Vector is2 = sol.get(ind);
-    RS_DEBUG->print("RS_Modification::trim: is2: %f/%f", is2.x, is2.y);
+    DEBUG->print("Modification::trim: is2: %f/%f", is2.x, is2.y);
 
     //RS2::Ending ending = trimmed1->getTrimPoint(trimCoord, is);
     RS2::Ending ending = trimmed1->getTrimPoint(trimCoord, is);
@@ -2017,19 +2017,19 @@ bool RS_Modification::trim(const Vector& trimCoord, RS_AtomicEntity* trimEntity,
  * @param trimEntity Entity which will be trimmed.
  * @param dist Amount to trim by.
  */
-bool RS_Modification::trimAmount(const Vector & trimCoord,
-       RS_AtomicEntity * trimEntity, double dist)
+bool Modification::trimAmount(const Vector & trimCoord,
+       AtomicEntity * trimEntity, double dist)
 {
        if (!trimEntity)
        {
-               RS_DEBUG->print(RS_Debug::D_WARNING, "RS_Modification::trimAmount: Entity is NULL");
+               DEBUG->print(Debug::D_WARNING, "Modification::trimAmount: Entity is NULL");
                return false;
        }
 
-       RS_AtomicEntity * trimmed = NULL;
+       AtomicEntity    * trimmed = NULL;
 
        // remove trim entity:
-       trimmed = (RS_AtomicEntity*)trimEntity->clone();
+       trimmed = (AtomicEntity*)trimEntity->clone();
 
 #warning "!!! Old rendering path needs upgrading !!!"
 #if 0
@@ -2075,26 +2075,26 @@ bool RS_Modification::trimAmount(const Vector & trimCoord,
 /**
  * Cuts the given entity at the given point.
  */
-bool RS_Modification::cut(const Vector& cutCoord,
-                          RS_AtomicEntity* cutEntity) {
+bool Modification::cut(const Vector& cutCoord,
+                          AtomicEntity* cutEntity) {
 
     if (cutEntity==NULL) {
-        RS_DEBUG->print(RS_Debug::D_WARNING,
-                        "RS_Modification::cut: Entity is NULL");
+        DEBUG->print(Debug::D_WARNING,
+                        "Modification::cut: Entity is NULL");
         return false;
     }
 
     if (!cutCoord.valid) {
-        RS_DEBUG->print(RS_Debug::D_WARNING,
-                        "RS_Modification::cut: Point invalid.");
+        DEBUG->print(Debug::D_WARNING,
+                        "Modification::cut: Point invalid.");
         return false;
     }
 
     // cut point is at endpoint of entity:
     if (cutCoord.distanceTo(cutEntity->getStartpoint())<1.0e-6 ||
             cutCoord.distanceTo(cutEntity->getEndpoint())<1.0e-6) {
-        RS_DEBUG->print(RS_Debug::D_WARNING,
-                        "RS_Modification::cut: Cutting point on endpoint");
+        DEBUG->print(Debug::D_WARNING,
+                        "Modification::cut: Cutting point on endpoint");
         return false;
     }
 
@@ -2105,15 +2105,15 @@ bool RS_Modification::cut(const Vector& cutCoord,
                graphicView->deleteEntity(cutEntity);
 #endif
 
-       RS_AtomicEntity * cut1 = NULL;
-       RS_AtomicEntity * cut2 = NULL;
+       AtomicEntity * cut1 = NULL;
+       AtomicEntity * cut2 = NULL;
 
     // create new two halves:
     if (cutEntity->rtti() == RS2::EntityCircle)
        {
-        RS_Circle * c = (RS_Circle *)cutEntity;
-        cut1 = new RS_Arc(cutEntity->getParent(),
-                          RS_ArcData(c->getCenter(),
+        Circle * c = (Circle *)cutEntity;
+        cut1 = new Arc(cutEntity->getParent(),
+                          ArcData(c->getCenter(),
                                      c->getRadius(),
                                      0.0,0.0, false));
         cut1->setPen(cutEntity->getPen());
@@ -2125,8 +2125,8 @@ bool RS_Modification::cut(const Vector& cutCoord,
     }
     else
        {
-        cut1 = (RS_AtomicEntity*)cutEntity->clone();
-        cut2 = (RS_AtomicEntity*)cutEntity->clone();
+        cut1 = (AtomicEntity*)cutEntity->clone();
+        cut2 = (AtomicEntity*)cutEntity->clone();
 
         cut1->trimEndpoint(cutCoord);
         cut2->trimStartpoint(cutCoord);
@@ -2162,30 +2162,30 @@ bool RS_Modification::cut(const Vector& cutCoord,
 /**
  * Stretching.
  */
-bool RS_Modification::stretch(const Vector& firstCorner, const Vector& secondCorner,
+bool Modification::stretch(const Vector& firstCorner, const Vector& secondCorner,
        const Vector& offset)
 {
     if (!offset.valid)
        {
-        RS_DEBUG->print(RS_Debug::D_WARNING,
-                        "RS_Modification::stretch: Offset invalid");
+        DEBUG->print(Debug::D_WARNING,
+                        "Modification::stretch: Offset invalid");
         return false;
     }
 
-//     Q3PtrList<RS_Entity> addList;
+//     Q3PtrList<Entity> addList;
 //     addList.setAutoDelete(false);
-       QList<RS_Entity *> addList;
+       QList<Entity *> addList;
 
     if (document!=NULL && handleUndo) {
         document->startUndoCycle();
     }
 
     // Create new entites
-    for (RS_Entity* e=container->firstEntity();
+    for (Entity* e=container->firstEntity();
             e!=NULL;
             e=container->nextEntity()) {
         //for (int i=0; i<container->count(); ++i) {
-        //    RS_Entity* e = container->entityAt(i);
+        //    Entity* e = container->entityAt(i);
 
         if (e!=NULL &&
                 e->isVisible() &&
@@ -2193,7 +2193,7 @@ bool RS_Modification::stretch(const Vector& firstCorner, const Vector& secondCor
                 (e->isInWindow(firstCorner, secondCorner) ||
                  e->hasEndpointsWithinWindow(firstCorner, secondCorner))) {
 
-            RS_Entity* ec = e->clone();
+            Entity* ec = e->clone();
             ec->stretch(firstCorner, secondCorner, offset);
             addList.append(ec);
             e->setSelected(true);
@@ -2224,19 +2224,19 @@ bool RS_Modification::stretch(const Vector& firstCorner, const Vector& secondCor
  * @param entity2 Second entity of the corner.
  * @param data Lengths and trim flag.
  */
-bool RS_Modification::bevel(const Vector& coord1, RS_AtomicEntity* entity1,
-                            const Vector& coord2, RS_AtomicEntity* entity2,
-                            RS_BevelData& data) {
+bool Modification::bevel(const Vector& coord1, AtomicEntity* entity1,
+                            const Vector& coord2, AtomicEntity* entity2,
+                            BevelData& data) {
 
-    RS_DEBUG->print("RS_Modification::bevel");
+    DEBUG->print("Modification::bevel");
 
     if (entity1==NULL || entity2==NULL) {
-        RS_DEBUG->print(RS_Debug::D_WARNING,
-                        "RS_Modification::bevel: At least one entity is NULL");
+        DEBUG->print(Debug::D_WARNING,
+                        "Modification::bevel: At least one entity is NULL");
         return false;
     }
 
-    RS_EntityContainer* baseContainer = container;
+    EntityContainer* baseContainer = container;
     bool isPolyline = false;
     bool isClosedPolyline = false;
 
@@ -2246,16 +2246,16 @@ bool RS_Modification::bevel(const Vector& coord1, RS_AtomicEntity* entity1,
 
     // find out whether we're bevelling within a polyline:
     if (entity1->getParent()!=NULL && entity1->getParent()->rtti()==RS2::EntityPolyline) {
-        RS_DEBUG->print("RS_Modification::bevel: trimming polyline segments");
+        DEBUG->print("Modification::bevel: trimming polyline segments");
         if (entity1->getParent()!=entity2->getParent()) {
-            RS_DEBUG->print(RS_Debug::D_WARNING,
-                            "RS_Modification::bevel: entities not in the same polyline");
+            DEBUG->print(Debug::D_WARNING,
+                            "Modification::bevel: entities not in the same polyline");
             return false;
         }
         // clone polyline for undo
         if (document!=NULL && handleUndo) {
-            RS_EntityContainer* cl =
-                (RS_EntityContainer*)entity1->getParent()->clone();
+            EntityContainer* cl =
+                (EntityContainer*)entity1->getParent()->clone();
             container->addEntity(cl);
             //cl->setUndoState(true);
             document->addUndoable(cl);
@@ -2266,33 +2266,33 @@ bool RS_Modification::bevel(const Vector& coord1, RS_AtomicEntity* entity1,
             baseContainer = cl;
         }
 
-        entity1 = (RS_AtomicEntity*)baseContainer->entityAt(entity1->getParent()->findEntity(entity1));
-        entity2 = (RS_AtomicEntity*)baseContainer->entityAt(entity2->getParent()->findEntity(entity2));
+        entity1 = (AtomicEntity*)baseContainer->entityAt(entity1->getParent()->findEntity(entity1));
+        entity2 = (AtomicEntity*)baseContainer->entityAt(entity2->getParent()->findEntity(entity2));
 
         //baseContainer = entity1->getParent();
         isPolyline = true;
-               isClosedPolyline = ((RS_Polyline*)entity1)->isClosed();
+               isClosedPolyline = ((Polyline*)entity1)->isClosed();
     }
 
-    RS_DEBUG->print("RS_Modification::bevel: getting intersection");
+    DEBUG->print("Modification::bevel: getting intersection");
 
     VectorSolutions sol =
-        RS_Information::getIntersection(entity1, entity2, false);
+        Information::getIntersection(entity1, entity2, false);
 
     if (sol.getNumber()==0) {
         return false;
     }
 
-    RS_AtomicEntity* trimmed1 = NULL;
-    RS_AtomicEntity* trimmed2 = NULL;
+    AtomicEntity* trimmed1 = NULL;
+    AtomicEntity* trimmed2 = NULL;
 
     //if (data.trim || isPolyline) {
         if (isPolyline) {
             trimmed1 = entity1;
             trimmed2 = entity2;
         } else {
-            trimmed1 = (RS_AtomicEntity*)entity1->clone();
-            trimmed2 = (RS_AtomicEntity*)entity2->clone();
+            trimmed1 = (AtomicEntity*)entity1->clone();
+            trimmed2 = (AtomicEntity*)entity2->clone();
         }
 
 #warning "!!! Old rendering path needs upgrading !!!"
@@ -2316,7 +2316,7 @@ bool RS_Modification::bevel(const Vector& coord1, RS_AtomicEntity* entity1,
 #endif
 
         // trim entities to intersection
-        RS_DEBUG->print("RS_Modification::bevel: trim entities to intersection 01");
+        DEBUG->print("Modification::bevel: trim entities to intersection 01");
         bool start1 = false;
         Vector is = sol.getClosest(coord2);
         RS2::Ending ending1 = trimmed1->getTrimPoint(coord1, is);
@@ -2333,7 +2333,7 @@ bool RS_Modification::bevel(const Vector& coord1, RS_AtomicEntity* entity1,
             break;
         }
 
-        RS_DEBUG->print("RS_Modification::bevel: trim entities to intersection 02");
+        DEBUG->print("Modification::bevel: trim entities to intersection 02");
         bool start2 = false;
         is = sol.getClosest(coord1);
         RS2::Ending ending2 = trimmed2->getTrimPoint(coord2, is);
@@ -2353,12 +2353,12 @@ bool RS_Modification::bevel(const Vector& coord1, RS_AtomicEntity* entity1,
 
 
     // find definitive bevel points
-    RS_DEBUG->print("RS_Modification::bevel: find definitive bevel points");
+    DEBUG->print("Modification::bevel: find definitive bevel points");
     Vector bp1 = trimmed1->getNearestDist(data.length1, start1);
     Vector bp2 = trimmed2->getNearestDist(data.length2, start2);
 
     // final trim:
-    RS_DEBUG->print("RS_Modification::bevel: final trim");
+    DEBUG->print("Modification::bevel: final trim");
     if (data.trim==true) {
         switch (ending1) {
         case RS2::EndingStart:
@@ -2397,8 +2397,8 @@ bool RS_Modification::bevel(const Vector& coord1, RS_AtomicEntity* entity1,
 
 
     // add bevel line:
-    RS_DEBUG->print("RS_Modification::bevel: add bevel line");
-    RS_Line* bevel = new RS_Line(baseContainer, RS_LineData(bp1, bp2));
+    DEBUG->print("Modification::bevel: add bevel line");
+    Line* bevel = new Line(baseContainer, LineData(bp1, bp2));
 
     if (isPolyline==false) {
         baseContainer->addEntity(bevel);
@@ -2436,7 +2436,7 @@ bool RS_Modification::bevel(const Vector& coord1, RS_AtomicEntity* entity1,
     }
 
     if (isPolyline) {
-        ((RS_Polyline*)baseContainer)->updateEndpoints();
+        ((Polyline*)baseContainer)->updateEndpoints();
     }
 
     if (graphicView!=NULL) {
@@ -2447,7 +2447,7 @@ bool RS_Modification::bevel(const Vector& coord1, RS_AtomicEntity* entity1,
         }
     }
 
-    RS_DEBUG->print("RS_Modification::bevel: handling undo");
+    DEBUG->print("Modification::bevel: handling undo");
 
     if (document!=NULL && handleUndo) {
         //document->startUndoCycle();
@@ -2470,10 +2470,10 @@ bool RS_Modification::bevel(const Vector& coord1, RS_AtomicEntity* entity1,
     }
 
     if (data.trim==false) {
-        RS_DEBUG->print("RS_Modification::bevel: delete trimmed elements");
+        DEBUG->print("Modification::bevel: delete trimmed elements");
         delete trimmed1;
         delete trimmed2;
-        RS_DEBUG->print("RS_Modification::bevel: delete trimmed elements: ok");
+        DEBUG->print("Modification::bevel: delete trimmed elements: ok");
     }
 
     return true;
@@ -2490,20 +2490,20 @@ bool RS_Modification::bevel(const Vector& coord1, RS_AtomicEntity* entity1,
  * @param entity2 Second entity of the corner.
  * @param data Radius and trim flag.
  */
-bool RS_Modification::round(const Vector& coord,
+bool Modification::round(const Vector& coord,
                             const Vector& coord1,
-                            RS_AtomicEntity* entity1,
+                            AtomicEntity* entity1,
                             const Vector& coord2,
-                            RS_AtomicEntity* entity2,
-                            RS_RoundData& data) {
+                            AtomicEntity* entity2,
+                            RoundData& data) {
 
     if (entity1==NULL || entity2==NULL) {
-        RS_DEBUG->print(RS_Debug::D_WARNING,
-                        "RS_Modification::round: At least one entity is NULL");
+        DEBUG->print(Debug::D_WARNING,
+                        "Modification::round: At least one entity is NULL");
         return false;
     }
 
-    RS_EntityContainer* baseContainer = container;
+    EntityContainer* baseContainer = container;
     bool isPolyline = false;
     bool isClosedPolyline = false;
 
@@ -2516,8 +2516,8 @@ bool RS_Modification::round(const Vector& coord,
                entity1->getParent()->rtti()==RS2::EntityPolyline) {
 
         if (entity1->getParent()!=entity2->getParent()) {
-            RS_DEBUG->print(RS_Debug::D_WARNING,
-                            "RS_Modification::round: entities not in "
+            DEBUG->print(Debug::D_WARNING,
+                            "Modification::round: entities not in "
                                                        "the same polyline");
             if (document!=NULL && handleUndo) {
                 document->endUndoCycle();
@@ -2527,8 +2527,8 @@ bool RS_Modification::round(const Vector& coord,
 
         // clone polyline for undo
         if (document!=NULL && handleUndo) {
-            RS_EntityContainer* cl =
-                (RS_EntityContainer*)entity1->getParent()->clone();
+            EntityContainer* cl =
+                (EntityContainer*)entity1->getParent()->clone();
             container->addEntity(cl);
             document->addUndoable(cl);
 
@@ -2538,23 +2538,23 @@ bool RS_Modification::round(const Vector& coord,
             baseContainer = cl;
         }
 
-        entity1 = (RS_AtomicEntity*)baseContainer->entityAt(entity1->getParent()->findEntity(entity1));
-        entity2 = (RS_AtomicEntity*)baseContainer->entityAt(entity2->getParent()->findEntity(entity2));
+        entity1 = (AtomicEntity*)baseContainer->entityAt(entity1->getParent()->findEntity(entity1));
+        entity2 = (AtomicEntity*)baseContainer->entityAt(entity2->getParent()->findEntity(entity2));
 
         isPolyline = true;
-               isClosedPolyline = ((RS_Polyline*)entity1)->isClosed();
+               isClosedPolyline = ((Polyline*)entity1)->isClosed();
     }
 
     // create 2 tmp parallels
-    RS_Creation creation(NULL, NULL);
-    RS_Entity* par1 = creation.createParallel(coord, data.radius, 1, entity1);
-    RS_Entity* par2 = creation.createParallel(coord, data.radius, 1, entity2);
+    Creation creation(NULL, NULL);
+    Entity* par1 = creation.createParallel(coord, data.radius, 1, entity1);
+    Entity* par2 = creation.createParallel(coord, data.radius, 1, entity2);
 
     VectorSolutions sol2 =
-        RS_Information::getIntersection(entity1, entity2, false);
+        Information::getIntersection(entity1, entity2, false);
 
     VectorSolutions sol =
-        RS_Information::getIntersection(par1, par2, false);
+        Information::getIntersection(par1, par2, false);
 
     if (sol.getNumber()==0) {
         if (document!=NULL && handleUndo) {
@@ -2569,25 +2569,25 @@ bool RS_Modification::round(const Vector& coord,
     Vector p2 = entity2->getNearestPointOnEntity(is, false);
     double ang1 = is.angleTo(p1);
     double ang2 = is.angleTo(p2);
-    bool reversed = (RS_Math::getAngleDifference(ang1, ang2)>M_PI);
+    bool reversed = (Math::getAngleDifference(ang1, ang2)>M_PI);
 
-    RS_Arc* arc = new RS_Arc(baseContainer,
-                             RS_ArcData(is,
+    Arc* arc = new Arc(baseContainer,
+                             ArcData(is,
                                         data.radius,
                                         ang1, ang2,
                                         reversed));
 
 
-    RS_AtomicEntity* trimmed1 = NULL;
-    RS_AtomicEntity* trimmed2 = NULL;
+    AtomicEntity* trimmed1 = NULL;
+    AtomicEntity* trimmed2 = NULL;
 
     if (data.trim || isPolyline) {
         if (isPolyline) {
             trimmed1 = entity1;
             trimmed2 = entity2;
         } else {
-            trimmed1 = (RS_AtomicEntity*)entity1->clone();
-            trimmed2 = (RS_AtomicEntity*)entity2->clone();
+            trimmed1 = (AtomicEntity*)entity1->clone();
+            trimmed2 = (AtomicEntity*)entity2->clone();
         }
 
 #warning "!!! Old rendering path needs upgrading !!!"
@@ -2659,10 +2659,10 @@ bool RS_Modification::round(const Vector& coord,
         arc->setLayer(baseContainer->getLayer());
         arc->setPen(baseContainer->getPen());
 
-               RS_DEBUG->print("RS_Modification::round: idx1<idx2: %d", (int)(idx1<idx2));
-               RS_DEBUG->print("RS_Modification::round: idx1!=0: %d", (int)(idx1!=0));
-               RS_DEBUG->print("RS_Modification::round: idx2==0: %d", (int)(idx2==0));
-               RS_DEBUG->print("RS_Modification::round: idx1==(int)baseContainer->count()-1: %d",
+               DEBUG->print("Modification::round: idx1<idx2: %d", (int)(idx1<idx2));
+               DEBUG->print("Modification::round: idx1!=0: %d", (int)(idx1!=0));
+               DEBUG->print("Modification::round: idx2==0: %d", (int)(idx2==0));
+               DEBUG->print("Modification::round: idx1==(int)baseContainer->count()-1: %d",
                        (int)(idx1==(int)baseContainer->count()-1));
 
                bool insertAfter1 = false;
@@ -2692,7 +2692,7 @@ bool RS_Modification::round(const Vector& coord,
     }
 
     if (isPolyline) {
-        ((RS_Polyline*)baseContainer)->updateEndpoints();
+        ((Polyline*)baseContainer)->updateEndpoints();
     }
 
     if (graphicView!=NULL) {
@@ -2731,39 +2731,39 @@ bool RS_Modification::round(const Vector& coord,
  * Removes the selected entity containers and adds the entities in them as
  * new single entities.
  */
-bool RS_Modification::explode()
+bool Modification::explode()
 {
     if (container == NULL)
        {
-        RS_DEBUG->print("RS_Modification::explode: no valid container for addinge entities",
-                       RS_Debug::D_WARNING);
+        DEBUG->print("Modification::explode: no valid container for addinge entities",
+                       Debug::D_WARNING);
         return false;
     }
 
-//     Q3PtrList<RS_Entity> addList;
+//     Q3PtrList<Entity> addList;
 //     addList.setAutoDelete(false);
-       QList<RS_Entity *> addList;
+       QList<Entity *> addList;
 
     if (document!=NULL && handleUndo) {
         document->startUndoCycle();
     }
 
-    for (RS_Entity* e=container->firstEntity();
+    for (Entity* e=container->firstEntity();
             e!=NULL;
             e=container->nextEntity()) {
         //for (uint i=0; i<container->count(); ++i) {
-        //RS_Entity* e = container->entityAt(i);
+        //Entity* e = container->entityAt(i);
 
         if (e!=NULL && e->isSelected()) {
             if (e->isContainer()) {
 
                 // add entities from container:
-                RS_EntityContainer* ec = (RS_EntityContainer*)e;
+                EntityContainer* ec = (EntityContainer*)e;
                 //ec->setSelected(false);
 
                 // iterate and explode container:
                 //for (uint i2=0; i2<ec->count(); ++i2) {
-                //    RS_Entity* e2 = ec->entityAt(i2);
+                //    Entity* e2 = ec->entityAt(i2);
                 RS2::ResolveLevel rl;
                 bool resolvePen;
                 bool resolveLayer;
@@ -2801,11 +2801,11 @@ bool RS_Modification::explode()
                     break;
                 }
 
-                for (RS_Entity* e2 = ec->firstEntity(rl); e2!=NULL;
+                for (Entity* e2 = ec->firstEntity(rl); e2!=NULL;
                         e2 = ec->nextEntity(rl)) {
 
                     if (e2!=NULL) {
-                        RS_Entity* clone = e2->clone();
+                        Entity* clone = e2->clone();
                         clone->setSelected(false);
                         clone->reparent(container);
 
@@ -2842,30 +2842,30 @@ bool RS_Modification::explode()
     return true;
 }
 
-bool RS_Modification::explodeTextIntoLetters()
+bool Modification::explodeTextIntoLetters()
 {
     if (container == NULL)
        {
-        RS_DEBUG->print("RS_Modification::explodeTextIntoLetters: no valid container"
-                       " for addinge entities", RS_Debug::D_WARNING);
+        DEBUG->print("Modification::explodeTextIntoLetters: no valid container"
+                       " for addinge entities", Debug::D_WARNING);
         return false;
     }
 
-//     Q3PtrList<RS_Entity> addList;
+//     Q3PtrList<Entity> addList;
 //     addList.setAutoDelete(false);
-       QList<RS_Entity *> addList;
+       QList<Entity *> addList;
 
     if (document!=NULL && handleUndo) {
         document->startUndoCycle();
     }
 
-    for (RS_Entity* e=container->firstEntity();
+    for (Entity* e=container->firstEntity();
             e!=NULL;
             e=container->nextEntity()) {
         if (e!=NULL && e->isSelected()) {
             if (e->rtti()==RS2::EntityText) {
                 // add letters of text:
-                RS_Text* text = (RS_Text*)e;
+                Text* text = (Text*)e;
                 explodeTextIntoLetters(text, addList);
             } else {
                 e->setSelected(false);
@@ -2887,14 +2887,14 @@ bool RS_Modification::explodeTextIntoLetters()
     return true;
 }
 
-//bool RS_Modification::explodeTextIntoLetters(RS_Text* text, Q3PtrList<RS_Entity>& addList)
-bool RS_Modification::explodeTextIntoLetters(RS_Text * text, QList<RS_Entity *> & addList)
+//bool Modification::explodeTextIntoLetters(Text* text, Q3PtrList<Entity>& addList)
+bool Modification::explodeTextIntoLetters(Text * text, QList<Entity *> & addList)
 {
        if (text == NULL)
                return false;
 
        // iterate though lines:
-       for(RS_Entity * e2=text->firstEntity(); e2!=NULL; e2=text->nextEntity())
+       for(Entity * e2=text->firstEntity(); e2!=NULL; e2=text->nextEntity())
        {
                if (e2 == NULL)
                        break;
@@ -2902,23 +2902,23 @@ bool RS_Modification::explodeTextIntoLetters(RS_Text * text, QList<RS_Entity *>
                // text lines:
                if (e2->rtti() == RS2::EntityContainer)
                {
-                       RS_EntityContainer * line = (RS_EntityContainer *)e2;
+                       EntityContainer * line = (EntityContainer *)e2;
 
                        // iterate though letters:
-                       for(RS_Entity * e3=line->firstEntity(); e3!=NULL; e3=line->nextEntity())
+                       for(Entity * e3=line->firstEntity(); e3!=NULL; e3=line->nextEntity())
                        {
                                if (e3 == NULL)
                                        break;
 
                                // super / sub texts:
                                if (e3->rtti() == RS2::EntityText)
-                                       explodeTextIntoLetters((RS_Text *)e3, addList);
+                                       explodeTextIntoLetters((Text *)e3, addList);
                                // normal letters:
                                else if (e3->rtti() == RS2::EntityInsert)
                                {
-                                       RS_Insert * letter = (RS_Insert *)e3;
+                                       Insert * letter = (Insert *)e3;
 
-                                       RS_Text * tl = new RS_Text(container, RS_TextData(letter->getInsertionPoint(),
+                                       Text * tl = new Text(container, TextData(letter->getInsertionPoint(),
                                                text->getHeight(), 100.0, RS2::VAlignBottom, RS2::HAlignLeft,
                                                RS2::LeftToRight, RS2::Exact, 1.0, letter->getName(), text->getStyle(),
                                                letter->getAngle(), RS2::Update));
@@ -2939,27 +2939,27 @@ bool RS_Modification::explodeTextIntoLetters(RS_Text * text, QList<RS_Entity *>
 /**
  * Moves all reference points of selected entities with the given data.
  */
-bool RS_Modification::moveRef(RS_MoveRefData& data)
+bool Modification::moveRef(MoveRefData& data)
 {
        if (container == NULL)
        {
-               RS_DEBUG->print("RS_Modification::moveRef: no valid container", RS_Debug::D_WARNING);
+               DEBUG->print("Modification::moveRef: no valid container", Debug::D_WARNING);
                return false;
        }
 
-       //      Q3PtrList<RS_Entity> addList;
+       //      Q3PtrList<Entity> addList;
        //      addList.setAutoDelete(false);
-       QList<RS_Entity *> addList;
+       QList<Entity *> addList;
 
        if (document != NULL && handleUndo)
                document->startUndoCycle();
 
        // Create new entites
-       for(RS_Entity * e=container->firstEntity(); e!=NULL; e=container->nextEntity())
+       for(Entity * e=container->firstEntity(); e!=NULL; e=container->nextEntity())
        {
                if (e != NULL && e->isSelected())
                {
-                       RS_Entity * ec = e->clone();
+                       Entity * ec = e->clone();
                        ec->moveRef(data.ref, data.offset);
                        // since 2.0.4.0: keep it selected
                        ec->setSelected(true);
index fc139dd7cbdf42c480ac7ab3122425336b8036b9..55345222fd6f3fdbf793ea23d7336edc0e1917d5 100644 (file)
@@ -8,7 +8,7 @@
 /**
  * Holds the data needed for move modifications.
  */
-class RS_MoveData
+class MoveData
 {
        public:
                int number;
@@ -20,7 +20,7 @@ class RS_MoveData
 /**
  * Holds the data needed for rotation modifications.
  */
-class RS_RotateData
+class RotateData
 {
        public:
                int number;
@@ -33,7 +33,7 @@ class RS_RotateData
 /**
  * Holds the data needed for scale modifications.
  */
-class RS_ScaleData
+class ScaleData
 {
        public:
                int number;
@@ -46,7 +46,7 @@ class RS_ScaleData
 /**
  * Holds the data needed for mirror modifications.
  */
-class RS_MirrorData
+class MirrorData
 {
        public:
                bool copy;
@@ -59,7 +59,7 @@ class RS_MirrorData
 /**
  * Holds the data needed for move/rotate modifications.
  */
-class RS_MoveRotateData
+class MoveRotateData
 {
        public:
                int number;
@@ -73,7 +73,7 @@ class RS_MoveRotateData
 /**
  * Holds the data needed for rotation around two centers modifications.
  */
-class RS_Rotate2Data
+class Rotate2Data
 {
        public:
                int number;
@@ -88,7 +88,7 @@ class RS_Rotate2Data
 /**
  * Holds the data needed for beveling modifications.
  */
-class RS_BevelData
+class BevelData
 {
        public:
                double length1;
@@ -99,7 +99,7 @@ class RS_BevelData
 /**
  * Holds the data needed for rounding modifications.
  */
-class RS_RoundData
+class RoundData
 {
        public:
                double radius;
@@ -109,7 +109,7 @@ class RS_RoundData
 /**
  * Holds the data needed for moving reference points.
  */
-class RS_MoveRefData
+class MoveRefData
 {
        public:
                Vector ref;
@@ -119,11 +119,11 @@ class RS_MoveRefData
 /**
  * Holds the data needed for changing attributes.
  */
-class RS_AttributesData
+class AttributesData
 {
        public:
                QString layer;
-               RS_Pen pen;
+               Pen pen;
                bool changeLayer;
                bool changeColor;
                bool changeLineType;
@@ -133,10 +133,10 @@ class RS_AttributesData
 /**
  * Holds the data needed for pasting.
  */
-class RS_PasteData
+class PasteData
 {
        public:
-               RS_PasteData(Vector insertionPoint, double factor, double angle,
+               PasteData(Vector insertionPoint, double factor, double angle,
                        bool asInsert, const QString & blockName)
                {
                        this->insertionPoint = insertionPoint;
@@ -170,69 +170,69 @@ class RS_PasteData
  *
  * @author Andrew Mustun
  */
-class RS_Modification
+class Modification
 {
        public:
-               RS_Modification(RS_EntityContainer & entityContainer,
+               Modification(EntityContainer & entityContainer,
                        GraphicView * graphicView = NULL, bool handleUndo = true);
 
                void remove();
-               bool changeAttributes(RS_AttributesData& data);
+               bool changeAttributes(AttributesData& data);
 
                void copy(const Vector & ref, const bool cut);
        private:
-               void copyEntity(RS_Entity * e, const Vector & ref, const bool cut);
+               void copyEntity(Entity * e, const Vector & ref, const bool cut);
        public:
-               void copyLayers(RS_Entity * e);
-               void copyBlocks(RS_Entity * e);
-               void paste(const RS_PasteData & data, Drawing * source = NULL);
-
-               bool move(RS_MoveData & data);
-               bool rotate(RS_RotateData & data);
-               bool scale(RS_ScaleData & data);
-               bool mirror(RS_MirrorData & data);
-               bool moveRotate(RS_MoveRotateData & data);
-               bool rotate2(RS_Rotate2Data & data);
-
-               bool trim(const Vector & trimCoord, RS_AtomicEntity * trimEntity,
-                       const Vector & limitCoord, RS_Entity * limitEntity,
+               void copyLayers(Entity * e);
+               void copyBlocks(Entity * e);
+               void paste(const PasteData & data, Drawing * source = NULL);
+
+               bool move(MoveData & data);
+               bool rotate(RotateData & data);
+               bool scale(ScaleData & data);
+               bool mirror(MirrorData & data);
+               bool moveRotate(MoveRotateData & data);
+               bool rotate2(Rotate2Data & data);
+
+               bool trim(const Vector & trimCoord, AtomicEntity * trimEntity,
+                       const Vector & limitCoord, Entity * limitEntity,
                        bool both);
-               bool trimAmount(const Vector & trimCoord, RS_AtomicEntity * trimEntity,
+               bool trimAmount(const Vector & trimCoord, AtomicEntity * trimEntity,
                        double dist);
 
-               bool cut(const Vector& cutCoord, RS_AtomicEntity* cutEntity);
+               bool cut(const Vector& cutCoord, AtomicEntity* cutEntity);
                bool stretch(const Vector & firstCorner, const Vector & secondCorner,
                        const Vector & offset);
 
-               bool bevel(const Vector & coord1, RS_AtomicEntity * entity1,
-                       const Vector & coord2, RS_AtomicEntity * entity2,
-                       RS_BevelData & data);
-               bool round(const Vector & coord, const Vector & coord1, RS_AtomicEntity * entity1,
-                       const Vector & coord2, RS_AtomicEntity * entity2, RS_RoundData & data);
+               bool bevel(const Vector & coord1, AtomicEntity * entity1,
+                       const Vector & coord2, AtomicEntity * entity2,
+                       BevelData & data);
+               bool round(const Vector & coord, const Vector & coord1, AtomicEntity * entity1,
+                       const Vector & coord2, AtomicEntity * entity2, RoundData & data);
 
                bool explode();
                bool explodeTextIntoLetters();
-               bool explodeTextIntoLetters(RS_Text * text, QList<RS_Entity *> & addList);
-               bool moveRef(RS_MoveRefData & data);
-
-               bool splitPolyline(RS_Polyline & polyline, RS_Entity & e1, Vector v1,
-                       RS_Entity & e2, Vector v2, RS_Polyline ** polyline1, RS_Polyline ** polyline2) const;
-               RS_Polyline * addPolylineNode(RS_Polyline& polyline,
-                       const RS_AtomicEntity& segment, const Vector& node);
-               RS_Polyline * deletePolylineNode(RS_Polyline& polyline, const Vector& node);
-               RS_Polyline * deletePolylineNodesBetween(RS_Polyline & polyline, RS_AtomicEntity & segment,
+               bool explodeTextIntoLetters(Text * text, QList<Entity *> & addList);
+               bool moveRef(MoveRefData & data);
+
+               bool splitPolyline(Polyline & polyline, Entity & e1, Vector v1,
+                       Entity & e2, Vector v2, Polyline ** polyline1, Polyline ** polyline2) const;
+               Polyline * addPolylineNode(Polyline& polyline,
+                       const AtomicEntity& segment, const Vector& node);
+               Polyline * deletePolylineNode(Polyline& polyline, const Vector& node);
+               Polyline * deletePolylineNodesBetween(Polyline & polyline, AtomicEntity & segment,
                        const Vector& node1, const Vector & node2);
-               RS_Polyline * polylineTrim(RS_Polyline & polyline,
-                       RS_AtomicEntity & segment1, RS_AtomicEntity & segment2);
+               Polyline * polylineTrim(Polyline & polyline,
+                       AtomicEntity & segment1, AtomicEntity & segment2);
 
        private:
                void deselectOriginals(bool remove);
-               void addNewEntities(QList<RS_Entity *> & addList);
+               void addNewEntities(QList<Entity *> & addList);
 
        protected:
-               RS_EntityContainer * container;
+               EntityContainer * container;
                Drawing * graphic;
-               RS_Document * document;
+               Document * document;
                GraphicView * graphicView;
                bool handleUndo;
 };
index 1fd77511ada5b3d6e28a6893d4f1d3c0c905671d..fdcbee464204887a8f361419573fdab84eb9cada 100644 (file)
@@ -47,7 +47,7 @@ void PaintInterface::createArc(QPolygon & pa, const Vector& cp, double radius,
 {
        if (radius < 1.0e-6)
        {
-               RS_DEBUG->print(RS_Debug::D_WARNING, "PaintInterface::createArc: invalid radius: %f", radius);
+               DEBUG->print(Debug::D_WARNING, "PaintInterface::createArc: invalid radius: %f", radius);
                return;
        }
 
@@ -120,7 +120,7 @@ void PaintInterface::drawRect(const Vector & p1, const Vector & p2)
        drawLine(Vector(p1.x, p2.y), Vector(p1.x, p1.y));
 }
 
-void PaintInterface::drawHandle(const Vector & p, const RS_Color & c, int size)
+void PaintInterface::drawHandle(const Vector & p, const Color & c, int size)
 {
        if (size < 0)
                size = 2;
@@ -147,12 +147,12 @@ void PaintInterface::setOffset(const Vector & o)
 
 int PaintInterface::toScreenX(double x)
 {
-       return RS_Math::round(offset.x + x);
+       return Math::round(offset.x + x);
 }
 
 int PaintInterface::toScreenY(double y)
 {
-       return RS_Math::round(offset.y + y);
+       return Math::round(offset.y + y);
 }
 
 /**
@@ -339,7 +339,7 @@ void PaintInterface::drawArc(const Vector & cp, double radius, double a1, double
  */
 void PaintInterface::drawArcMac(const Vector& cp, double radius, double a1, double a2, bool reversed)
 {
-       RS_DEBUG->print("PaintInterface::drawArcMac");
+       DEBUG->print("PaintInterface::drawArcMac");
        if (radius <= 0.5)
                drawGridPoint(cp);
        else
@@ -411,7 +411,7 @@ void PaintInterface::drawCircle(const Vector & cp, double radius)
        if (drawingMode == RS2::ModeXOR && radius < 500)
        {
                // This is _very_ slow for large arcs:
-               painter->drawEllipse(toScreenX(cp.x - radius), toScreenY(cp.y - radius), RS_Math::round(2.0 * radius), RS_Math::round(2.0 * radius));
+               painter->drawEllipse(toScreenX(cp.x - radius), toScreenY(cp.y - radius), Math::round(2.0 * radius), Math::round(2.0 * radius));
        }
        else
        {
@@ -422,7 +422,7 @@ void PaintInterface::drawCircle(const Vector & cp, double radius)
 #endif
        }
 #else
-//     painter->drawEllipse(toScreenX(cp.x - radius), toScreenY(cp.y - radius), RS_Math::round(2.0 * radius), RS_Math::round(2.0 * radius));
+//     painter->drawEllipse(toScreenX(cp.x - radius), toScreenY(cp.y - radius), Math::round(2.0 * radius), Math::round(2.0 * radius));
        painter->drawEllipse(QPointF(cp.x, cp.y), radius, radius);
 #endif
 }
@@ -498,7 +498,7 @@ void PaintInterface::drawImg(QImage & img, const Vector & pos,
        QMatrix wm;
        wm.translate(pos.x, pos.y);
        wm.scale(factor.x, factor.y);
-       wm.rotate(RS_Math::rad2deg(-angle));
+       wm.rotate(Math::rad2deg(-angle));
        painter->setWorldMatrix(wm);
 
        if (fabs(angle) < 1.0e-4)
@@ -509,7 +509,7 @@ void PaintInterface::drawImg(QImage & img, const Vector & pos,
        painter->restore();
 }
 
-void PaintInterface::fillRect(int x1, int y1, int w, int h, const RS_Color & col)
+void PaintInterface::fillRect(int x1, int y1, int w, int h, const Color & col)
 {
        painter->fillRect(x1, y1, w, h, col);
 }
@@ -539,33 +539,33 @@ int PaintInterface::getHeight()
 
 void PaintInterface::setPreviewPen()
 {
-       setPen(RS_Color(0, 255, 255));
+       setPen(Color(0, 255, 255));
 }
 
-RS_Pen PaintInterface::getPen()
+Pen PaintInterface::getPen()
 {
        return lpen;
 }
 
-void PaintInterface::setPen(const RS_Pen & pen)
+void PaintInterface::setPen(const Pen & pen)
 {
        lpen = pen;
 
        if (drawingMode == RS2::ModeBW)
-               lpen.setColor(RS_Color(0, 0, 0));
+               lpen.setColor(Color(0, 0, 0));
 
-       QPen p(lpen.getColor(), RS_Math::round(lpen.getScreenWidth()), RS2::rsToQtLineType(lpen.getLineType()));
+       QPen p(lpen.getColor(), Math::round(lpen.getScreenWidth()), RS2::rsToQtLineType(lpen.getLineType()));
        p.setJoinStyle(Qt::RoundJoin);
        p.setCapStyle(Qt::RoundCap);
        painter->setPen(p);
 }
 
-void PaintInterface::setPen(const RS_Color & color)
+void PaintInterface::setPen(const Color & color)
 {
        if (drawingMode == RS2::ModeBW)
        {
-               lpen.setColor(RS_Color(0, 0, 0));
-               painter->setPen(RS_Color(0, 0, 0));
+               lpen.setColor(Color(0, 0, 0));
+               painter->setPen(Color(0, 0, 0));
        }
        else
        {
@@ -584,11 +584,11 @@ void PaintInterface::setPen(int r, int g, int b)
 
 void PaintInterface::disablePen(void)
 {
-       lpen = RS_Pen(RS2::FlagInvalid);
+       lpen = Pen(RS2::FlagInvalid);
        painter->setPen(Qt::NoPen);
 }
 
-void PaintInterface::setBrush(const RS_Color & color)
+void PaintInterface::setBrush(const Color & color)
 {
        if (drawingMode == RS2::ModeBW)
                painter->setBrush(QColor(0, 0, 0));
@@ -598,7 +598,7 @@ void PaintInterface::setBrush(const RS_Color & color)
 
 void PaintInterface::disableBrush(void)
 {
-//     lpen = RS_Pen(RS2::FlagInvalid);
+//     lpen = Pen(RS2::FlagInvalid);
        painter->setBrush(Qt::NoBrush);
 }
 
index 072d33336b18969a5f77b512af4d0cb65f4aeaf2..94701cf4fb21cdfd562223350d9fd7c4a2bd74f0 100644 (file)
@@ -2,7 +2,7 @@
 #define ____PAINTINTERFACE_H____
 
 #include <QtGui>
-#include "rs.h"
+#include "enums.h"
 #include "vector.h"
 #include "color.h"
 #include "pen.h"
@@ -38,16 +38,16 @@ class PaintInterface
                        double angle, double angle1, double angle2, bool reversed);
                void drawImg(QImage & img, const Vector & pos,
                        double angle, const Vector & factor, int sx, int sy, int sw, int sh);
-               void fillRect(int x1, int y1, int w, int h, const RS_Color & col);
+               void fillRect(int x1, int y1, int w, int h, const Color & col);
                void fillTriangle(const Vector & p1, const Vector & p2, const Vector & p3);
-               void drawHandle(const Vector & p, const RS_Color & c, int size = -1);
+               void drawHandle(const Vector & p, const Color & c, int size = -1);
                void setPreviewPen();
-               RS_Pen getPen();
-               void setPen(const RS_Pen & pen);
-               void setPen(const RS_Color & color);
+               Pen getPen();
+               void setPen(const Pen & pen);
+               void setPen(const Color & color);
                void setPen(int r, int g, int b);
                void disablePen();
-               void setBrush(const RS_Color & color);
+               void setBrush(const Color & color);
                void disableBrush();
                void drawPolygon(const QPolygon & p);
                void erase();
@@ -73,7 +73,7 @@ class PaintInterface
                 * A fixed offset added to all entities drawn (useful for previews).
                 */
                Vector offset;
-               RS_Pen lpen;
+               Pen lpen;
 };
 
 #endif // __PAINTINTERFACE_H____
index 5d14519ac524c21b790b143b8ba2eb81aa463363..26af65b4593b35a13a209940d2308f6d1f983ee5 100644 (file)
@@ -26,9 +26,9 @@
  *
  * @param fileName File name of a DXF file defining the pattern
  */
-RS_Pattern::RS_Pattern(const QString & fileName): RS_EntityContainer(NULL)
+Pattern::Pattern(const QString & fileName): EntityContainer(NULL)
 {
-       RS_DEBUG->print("RS_Pattern::RS_Pattern() ");
+       DEBUG->print("Pattern::Pattern() ");
 
        this->fileName = fileName;
        loaded = false;
@@ -42,14 +42,14 @@ RS_Pattern::RS_Pattern(const QString & fileName): RS_EntityContainer(NULL)
  * @param name Pattern name.
  *
  */
-/*RS_Pattern::RS_Pattern(const QString& fileName, const QString& name)
-        : RS_EntityContainer(NULL) {
+/*Pattern::Pattern(const QString& fileName, const QString& name)
+        : EntityContainer(NULL) {
        this->fileName = fileName;
        this->name = name;
        loaded = false;
 }*/
 
-RS_Pattern::~RS_Pattern()
+Pattern::~Pattern()
 {
 }
 
@@ -60,19 +60,19 @@ RS_Pattern::~RS_Pattern()
  * @param filename File name of the pattern file (without path and
  * extension or full path.
  */
-bool RS_Pattern::loadPattern()
+bool Pattern::loadPattern()
 {
        if (loaded)
                return true;
 
-       RS_DEBUG->print("RS_Pattern::loadPattern");
+       DEBUG->print("Pattern::loadPattern");
 
        QString path;
 
        // Search for the appropriate pattern if we have only the name of the pattern:
        if (!fileName.toLower().contains(".dxf"))
        {
-               QStringList patterns = RS_SYSTEM->getPatternList();
+               QStringList patterns = SYSTEM->getPatternList();
                QFileInfo file;
 
                for(QStringList::Iterator it=patterns.begin(); it!=patterns.end(); it++)
@@ -80,7 +80,7 @@ bool RS_Pattern::loadPattern()
                        if (QFileInfo(*it).baseName().toLower() == fileName.toLower())
                        {
                                path = *it;
-                               RS_DEBUG->print("Pattern found: %s", path.toLatin1().data());
+                               DEBUG->print("Pattern found: %s", path.toLatin1().data());
                                break;
                        }
                }
@@ -94,21 +94,21 @@ bool RS_Pattern::loadPattern()
        // No pattern paths found:
        if (path.isEmpty())
        {
-               RS_DEBUG->print("No pattern \"%s\"available.", fileName.toLatin1().data());
+               DEBUG->print("No pattern \"%s\"available.", fileName.toLatin1().data());
                return false;
        }
 
        Drawing * gr = new Drawing();
 
        // TODO: Find out why the new dxf filter doesn't work for patterns:
-       RS_FILEIO->fileImport(*gr, path, RS2::FormatDXF1);
+       FILEIO->fileImport(*gr, path, RS2::FormatDXF1);
 
-       for(RS_Entity * e=gr->firstEntity(); e!=NULL; e=gr->nextEntity())
+       for(Entity * e=gr->firstEntity(); e!=NULL; e=gr->nextEntity())
        {
                if (e->rtti() == RS2::EntityLine || e->rtti() == RS2::EntityArc)
                {
-                       RS_Layer * l = e->getLayer();
-                       RS_Entity * cl = e->clone();
+                       Layer * l = e->getLayer();
+                       Entity * cl = e->clone();
                        cl->reparent(this);
 
                        if (l != NULL)
@@ -122,13 +122,13 @@ bool RS_Pattern::loadPattern()
 
        delete gr;
        loaded = true;
-       RS_DEBUG->print("RS_Pattern::loadPattern: OK");
+       DEBUG->print("Pattern::loadPattern: OK");
 
        return true;
 }
 
 /** @return the fileName of this pattern. */
-QString RS_Pattern::getFileName() const
+QString Pattern::getFileName() const
 {
        return fileName;
 }
index 985257308dc7aec730c14b30306e807cc45045e1..8818d516decf8a18a7a5792fc4bc55260c75576b 100644 (file)
@@ -3,19 +3,19 @@
 
 #include "entitycontainer.h"
 
-class RS_PatternList;
+class PatternList;
 
 /**
- * Patterns are used for hatches. They are stored in a RS_PatternList.
- * Use RS_PatternList to access a pattern.
+ * Patterns are used for hatches. They are stored in a PatternList.
+ * Use PatternList to access a pattern.
  *
  * @author Andrew Mustun
  */
-class RS_Pattern: public RS_EntityContainer
+class Pattern: public EntityContainer
 {
        public:
-               RS_Pattern(const QString & fileName);
-               virtual ~RS_Pattern();
+               Pattern(const QString & fileName);
+               virtual ~Pattern();
 
                virtual bool loadPattern();
                QString getFileName() const;
index c9f1499510f377f8cbc181f501ddbb3ed6a80cf6..989d406bf3ef6c2b021344791e58cbc84f033df5 100644 (file)
 
 #include "system.h"
 
-RS_PatternList * RS_PatternList::uniqueInstance = NULL;
+PatternList * PatternList::uniqueInstance = NULL;
 
 /**
  * Default constructor.
  */
-RS_PatternList::RS_PatternList(): patternIterator(patterns)
+PatternList::PatternList(): patternIterator(patterns)
 {
 #warning "!!! Need to deal with setAutoDelete() Qt3->Qt4 !!!"
 //    patterns.setAutoDelete(true);
     //patternListListeners.setAutoDelete(false);
 }
 
-/*virtual*/ RS_PatternList::~RS_PatternList()
+/*virtual*/ PatternList::~PatternList()
 {
 }
 
 /**
  * @return Instance to the unique pattern list.
  */
-/*static*/ RS_PatternList * RS_PatternList::instance()
+/*static*/ PatternList * PatternList::instance()
 {
        if (uniqueInstance == NULL)
-               uniqueInstance = new RS_PatternList();
+               uniqueInstance = new PatternList();
 
        return uniqueInstance;
 }
 
 /**
- * Initializes the pattern list by creating empty RS_Pattern
+ * Initializes the pattern list by creating empty Pattern
  * objects, one for each pattern that could be found.
  */
-void RS_PatternList::init()
+void PatternList::init()
 {
-    RS_DEBUG->print("RS_PatternList::initPatterns");
+    DEBUG->print("PatternList::initPatterns");
 
-    QStringList list = RS_SYSTEM->getPatternList();
-    RS_Pattern * pattern;
+    QStringList list = SYSTEM->getPatternList();
+    Pattern * pattern;
 
        patterns.clear();
 
     for(QStringList::Iterator it=list.begin(); it!=list.end(); ++it)
        {
-        RS_DEBUG->print("pattern: %s:", (*it).toLatin1().data());
+        DEBUG->print("pattern: %s:", (*it).toLatin1().data());
 
         QFileInfo fi(*it);
-        pattern = new RS_Pattern(fi.baseName().toLower());
+        pattern = new Pattern(fi.baseName().toLower());
         patterns.append(pattern);
 
-        RS_DEBUG->print("base: %s", pattern->getFileName().toLatin1().data());
+        DEBUG->print("base: %s", pattern->getFileName().toLatin1().data());
     }
 }
 
 /**
  * Removes all patterns in the patternlist.
  */
-void RS_PatternList::clearPatterns()
+void PatternList::clearPatterns()
 {
     patterns.clear();
 }
 
-int RS_PatternList::countPatterns()
+int PatternList::countPatterns()
 {
        return patterns.count();
 }
@@ -88,9 +88,9 @@ int RS_PatternList::countPatterns()
  * Listeners are notified after the pattern was removed from
  * the list but before it gets deleted.
  */
-void RS_PatternList::removePattern(RS_Pattern * pattern)
+void PatternList::removePattern(Pattern * pattern)
 {
-       RS_DEBUG->print("RS_PatternList::removePattern()");
+       DEBUG->print("PatternList::removePattern()");
 
        // here the pattern is removed from the list but not deleted
 //     patterns.remove(pattern);
@@ -102,7 +102,7 @@ void RS_PatternList::removePattern(RS_Pattern * pattern)
                delete patterns.takeAt(i);
 
        //for (uint i=0; i<patternListListeners.count(); ++i) {
-       //    RS_PatternListListener* l = patternListListeners.at(i);
+       //    PatternListListener* l = patternListListeners.at(i);
        //    l->patternRemoved(pattern);
        //}
 }
@@ -112,20 +112,20 @@ void RS_PatternList::removePattern(RS_Pattern * pattern)
  * \p NULL if no such pattern was found. The pattern will be loaded into
  * memory if it's not already.
  */
-RS_Pattern * RS_PatternList::requestPattern(const QString & name)
+Pattern * PatternList::requestPattern(const QString & name)
 {
-       RS_DEBUG->print("RS_PatternList::requestPattern %s", name.toLatin1().data());
+       DEBUG->print("PatternList::requestPattern %s", name.toLatin1().data());
 
        QString name2 = name.toLower();
-       RS_Pattern * foundPattern = NULL;
+       Pattern * foundPattern = NULL;
 
-       RS_DEBUG->print("name2: %s", name2.toLatin1().data());
+       DEBUG->print("name2: %s", name2.toLatin1().data());
 
        // Search our list of available patterns:
-//     for(RS_Pattern * p=patterns.first(); p!=NULL; p=patterns.next())
+//     for(Pattern * p=patterns.first(); p!=NULL; p=patterns.next())
        for(int i=0; i<patterns.size(); i++)
        {
-               RS_Pattern * p = patterns[i];
+               Pattern * p = patterns[i];
 
                if (p->getFileName() == name2)
                {
@@ -144,7 +144,7 @@ RS_Pattern * RS_PatternList::requestPattern(const QString & name)
 }
 
 //! @return First pattern of the list.
-RS_Pattern * RS_PatternList::firstPattern()
+Pattern * PatternList::firstPattern()
 {
        patternIterator.toFront();
        return patternIterator.next();
@@ -154,20 +154,20 @@ RS_Pattern * RS_PatternList::firstPattern()
  * @return Next pattern from the list after
  * calling firstPattern() or nextPattern().
  */
-RS_Pattern * RS_PatternList::nextPattern()
+Pattern * PatternList::nextPattern()
 {
        return patternIterator.next();
 }
 
-bool RS_PatternList::contains(const QString & name)
+bool PatternList::contains(const QString & name)
 {
        QString name2 = name.toLower();
 
        // Search our list of available patterns:
-//     for(RS_Pattern * p=patterns.first(); p!=NULL; p=patterns.next())
+//     for(Pattern * p=patterns.first(); p!=NULL; p=patterns.next())
        for(int i=0; i<patterns.size(); i++)
        {
-               RS_Pattern * p = patterns[i];
+               Pattern * p = patterns[i];
 
                if (p->getFileName() == name2)
                        return true;
@@ -179,10 +179,10 @@ bool RS_PatternList::contains(const QString & name)
 /**
  * Dumps the patterns to stdout.
  */
-std::ostream & operator<<(std::ostream & os, RS_PatternList & l)
+std::ostream & operator<<(std::ostream & os, PatternList & l)
 {
     os << "Patternlist: \n";
-    for(RS_Pattern * p=l.firstPattern(); p!=NULL; p=l.nextPattern())
+    for(Pattern * p=l.firstPattern(); p!=NULL; p=l.nextPattern())
         os << *p << "\n";
 
     return os;
index 06902037957a86319556edc35a7f86effeef5bbf..1661b3b3ba5024d0c3cb869c97c2f78be55347b5 100644 (file)
@@ -5,42 +5,42 @@
 #include "pattern.h"
 #include "entity.h"
 
-#define RS_PATTERNLIST RS_PatternList::instance()
+#define PATTERNLIST PatternList::instance()
 
 /**
  * The global list of patterns. This is implemented as a singleton.
- * Use RS_PatternList::instance() to get a pointer to the object.
+ * Use PatternList::instance() to get a pointer to the object.
  *
  * @author James Hammons
  * @author Andrew Mustun
  */
-class RS_PatternList
+class PatternList
 {
        protected:
-               RS_PatternList();
+               PatternList();
 
        public:
-               virtual ~RS_PatternList();
+               virtual ~PatternList();
 
-               static RS_PatternList * instance();
+               static PatternList * instance();
                void init();
                void clearPatterns();
                int countPatterns();
-               virtual void removePattern(RS_Pattern * pattern);
-               RS_Pattern * requestPattern(const QString & name);
-               RS_Pattern * firstPattern();
-               RS_Pattern * nextPattern();
+               virtual void removePattern(Pattern * pattern);
+               Pattern * requestPattern(const QString & name);
+               Pattern * firstPattern();
+               Pattern * nextPattern();
                bool contains(const QString & name);
 
-               friend std::ostream & operator<<(std::ostream & os, RS_PatternList & l);
+               friend std::ostream & operator<<(std::ostream & os, PatternList & l);
 
        protected:
-               static RS_PatternList * uniqueInstance;
+               static PatternList * uniqueInstance;
 
        private:
                //! patterns in the graphic
-               QList<RS_Pattern *> patterns;
-               QListIterator<RS_Pattern *> patternIterator;
+               QList<Pattern *> patterns;
+               QListIterator<Pattern *> patternIterator;
 };
 
 #endif // __PATTERNLIST_H__
index ee68475fe3e9372ea2a9f4d34455b20795ca349e..4e96d6f6e44668e5e12ff6036ef25e42381f6d05 100644 (file)
@@ -19,9 +19,9 @@
 /**
  * Creates a default pen (black, solid, width 0).
  */
-RS_Pen::RS_Pen(): RS_Flags()
+Pen::Pen(): Flags()
 {
-       setColor(RS_Color(0, 0, 0));
+       setColor(Color(0, 0, 0));
        setWidth(RS2::Width00);
        setLineType(RS2::SolidLine);
        setScreenWidth(0);
@@ -30,7 +30,7 @@ RS_Pen::RS_Pen(): RS_Flags()
 /**
  * Creates a pen with the given attributes.
  */
-RS_Pen::RS_Pen(const RS_Color & c, RS2::LineWidth w, RS2::LineType t): RS_Flags()
+Pen::Pen(const Color & c, RS2::LineWidth w, RS2::LineType t): Flags()
 {
        setColor(c);
        setWidth(w);
@@ -44,77 +44,77 @@ RS_Pen::RS_Pen(const RS_Color & c, RS2::LineWidth w, RS2::LineType t): RS_Flags(
  *
  * e.g.:
  * <pre>
- *   RS_Pen p(RS2::FlagInvalid);
+ *   Pen p(RS2::FlagInvalid);
  * </pre>
  */
-RS_Pen::RS_Pen(unsigned int f): RS_Flags(f)
+Pen::Pen(unsigned int f): Flags(f)
 {
-       setColor(RS_Color(0, 0, 0));
+       setColor(Color(0, 0, 0));
        setWidth(RS2::Width00);
        setLineType(RS2::SolidLine);
        setScreenWidth(0);
 }
 
-/*virtual*/ RS_Pen::~RS_Pen()
+/*virtual*/ Pen::~Pen()
 {
 }
 
-RS2::LineType RS_Pen::getLineType() const
+RS2::LineType Pen::getLineType() const
 {
        return lineType;
 }
 
-void RS_Pen::setLineType(RS2::LineType t)
+void Pen::setLineType(RS2::LineType t)
 {
        lineType = t;
 }
 
-RS2::LineWidth RS_Pen::getWidth() const
+RS2::LineWidth Pen::getWidth() const
 {
        return width;
 }
 
-void RS_Pen::setWidth(RS2::LineWidth w)
+void Pen::setWidth(RS2::LineWidth w)
 {
        width = w;
 }
 
-double RS_Pen::getScreenWidth() const
+double Pen::getScreenWidth() const
 {
        return screenWidth;
 }
 
-void RS_Pen::setScreenWidth(double w)
+void Pen::setScreenWidth(double w)
 {
        screenWidth = w;
 }
 
-const RS_Color & RS_Pen::getColor() const
+const Color & Pen::getColor() const
 {
        return color;
 }
 
-void RS_Pen::setColor(const RS_Color & c)
+void Pen::setColor(const Color & c)
 {
        color = c;
 }
 
-bool RS_Pen::isValid()
+bool Pen::isValid()
 {
        return !getFlag(RS2::FlagInvalid);
 }
 
-bool RS_Pen::operator==(const RS_Pen & p) const
+bool Pen::operator==(const Pen & p) const
 {
        return (lineType == p.lineType && width == p.width && color == p.color);
 }
 
-bool RS_Pen::operator!=(const RS_Pen & p) const
+bool Pen::operator!=(const Pen & p) const
 {
        return !(*this == p);
 }
 
-/*friend*/ std::ostream & operator<<(std::ostream & os, const RS_Pen & p)
+/*friend*/ std::ostream & operator<<(std::ostream & os, const Pen & p)
 {
        //os << "style: " << p.style << std::endl;
        os << " pen color: " << p.getColor()
index 526dadec7afbf1640eff2d7acb8c0f5142ef6b5e..a49c3e71c535972d58a99435959cc9e0cb5025d2 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef __PEN_H__
 #define __PEN_H__
 
-#include "rs.h"
+#include "enums.h"
 #include "color.h"
 #include "flags.h"
 
  * @author James Hammons
  * @author Andrew Mustun
  */
-class RS_Pen: public RS_Flags
+class Pen: public Flags
 {
        public:
-               RS_Pen();
-               RS_Pen(const RS_Color & c, RS2::LineWidth w, RS2::LineType t);
-               RS_Pen(unsigned int f);
-               virtual ~RS_Pen();
+               Pen();
+               Pen(const Color & c, RS2::LineWidth w, RS2::LineType t);
+               Pen(unsigned int f);
+               virtual ~Pen();
 
                RS2::LineType getLineType() const;
                void setLineType(RS2::LineType t);
@@ -26,19 +26,19 @@ class RS_Pen: public RS_Flags
                void setWidth(RS2::LineWidth w);
                double getScreenWidth() const;
                void setScreenWidth(double w);
-               const RS_Color & getColor() const;
-               void setColor(const RS_Color & c);
+               const Color & getColor() const;
+               void setColor(const Color & c);
                bool isValid();
-               bool operator==(const RS_Pen & p) const;
-               bool operator!=(const RS_Pen & p) const;
+               bool operator==(const Pen & p) const;
+               bool operator!=(const Pen & p) const;
 
-               friend std::ostream & operator<<(std::ostream & os, const RS_Pen & p);
+               friend std::ostream & operator<<(std::ostream & os, const Pen & p);
 
        protected:
                RS2::LineType lineType;
                RS2::LineWidth width;
                double screenWidth;
-               RS_Color color;
+               Color color;
 };
 
 #endif
index 6a680db54a0ea3d14309a20b17622aa7b98c176d..e0308ef7e8d1b60d33887adc5565bc006af5d2eb 100644 (file)
 /**
  * Default constructor.
  */
-RS_Point::RS_Point(RS_EntityContainer * parent, const RS_PointData & d):
-       RS_AtomicEntity(parent), data(d)
+Point::Point(EntityContainer * parent, const PointData & d):
+       AtomicEntity(parent), data(d)
 {
        calculateBorders();
 }
 
-/*virtual*/ RS_Entity * RS_Point::clone()
+/*virtual*/ Entity * Point::clone()
 {
-       RS_Point * p = new RS_Point(*this);
+       Point * p = new Point(*this);
        p->initId();
        return p;
 }
 
 /**    @return RS_ENTITY_POINT */
-/*virtual*/ RS2::EntityType RS_Point::rtti() const
+/*virtual*/ RS2::EntityType Point::rtti() const
 {
        return RS2::EntityPoint;
 }
@@ -44,7 +44,7 @@ RS_Point::RS_Point(RS_EntityContainer * parent, const RS_PointData & d):
 /**
  * @return Start point of the entity.
  */
-/*virtual*/ Vector RS_Point::getStartpoint() const
+/*virtual*/ Vector Point::getStartpoint() const
 {
        return data.pos;
 }
@@ -52,41 +52,41 @@ RS_Point::RS_Point(RS_EntityContainer * parent, const RS_PointData & d):
 /**
  * @return End point of the entity.
  */
-/*virtual*/ Vector RS_Point::getEndpoint() const
+/*virtual*/ Vector Point::getEndpoint() const
 {
        return data.pos;
 }
 
 /** @return Copy of data that defines the point. */
-RS_PointData RS_Point::getData() const
+PointData Point::getData() const
 {
        return data;
 }
 
 /** @return Position of the point */
-Vector RS_Point::getPos()
+Vector Point::getPos()
 {
        return data.pos;
 }
 
 /** Sets a new position for this point. */
-void RS_Point::setPos(const Vector & pos)
+void Point::setPos(const Vector & pos)
 {
        data.pos = pos;
 }
 
-void RS_Point::calculateBorders()
+void Point::calculateBorders()
 {
        minV = maxV = data.pos;
 }
 
-VectorSolutions RS_Point::getRefPoints()
+VectorSolutions Point::getRefPoints()
 {
        VectorSolutions ret(data.pos);
        return ret;
 }
 
-Vector RS_Point::getNearestEndpoint(const Vector & coord, double * dist)
+Vector Point::getNearestEndpoint(const Vector & coord, double * dist)
 {
        if (dist != NULL)
                *dist = data.pos.distanceTo(coord);
@@ -94,8 +94,8 @@ Vector RS_Point::getNearestEndpoint(const Vector & coord, double * dist)
        return data.pos;
 }
 
-Vector RS_Point::getNearestPointOnEntity(const Vector & coord,
-       bool /*onEntity*/, double * dist, RS_Entity ** entity)
+Vector Point::getNearestPointOnEntity(const Vector & coord,
+       bool /*onEntity*/, double * dist, Entity ** entity)
 {
        if (dist != NULL)
                *dist = data.pos.distanceTo(coord);
@@ -106,7 +106,7 @@ Vector RS_Point::getNearestPointOnEntity(const Vector & coord,
        return data.pos;
 }
 
-Vector RS_Point::getNearestCenter(const Vector & coord, double * dist)
+Vector Point::getNearestCenter(const Vector & coord, double * dist)
 {
        if (dist != NULL)
                *dist = data.pos.distanceTo(coord);
@@ -114,7 +114,7 @@ Vector RS_Point::getNearestCenter(const Vector & coord, double * dist)
        return data.pos;
 }
 
-Vector RS_Point::getNearestMiddle(const Vector & coord, double * dist)
+Vector Point::getNearestMiddle(const Vector & coord, double * dist)
 {
        if (dist != NULL)
                *dist = data.pos.distanceTo(coord);
@@ -122,7 +122,7 @@ Vector RS_Point::getNearestMiddle(const Vector & coord, double * dist)
        return data.pos;
 }
 
-Vector RS_Point::getNearestDist(double /*distance*/, const Vector & /*coord*/, double * dist)
+Vector Point::getNearestDist(double /*distance*/, const Vector & /*coord*/, double * dist)
 {
        if (dist != NULL)
                *dist = RS_MAXDOUBLE;
@@ -130,7 +130,7 @@ Vector RS_Point::getNearestDist(double /*distance*/, const Vector & /*coord*/, d
        return Vector(false);
 }
 
-double RS_Point::getDistanceToPoint(const Vector & coord, RS_Entity ** entity,
+double Point::getDistanceToPoint(const Vector & coord, Entity ** entity,
        RS2::ResolveLevel /*level*/, double /*solidDist*/)
 {
        if (entity != NULL)
@@ -139,37 +139,37 @@ double RS_Point::getDistanceToPoint(const Vector & coord, RS_Entity ** entity,
        return data.pos.distanceTo(coord);
 }
 
-void RS_Point::moveStartpoint(const Vector & pos)
+void Point::moveStartpoint(const Vector & pos)
 {
        data.pos = pos;
        calculateBorders();
 }
 
-void RS_Point::move(Vector offset)
+void Point::move(Vector offset)
 {
        data.pos.move(offset);
        calculateBorders();
 }
 
-void RS_Point::rotate(Vector center, double angle)
+void Point::rotate(Vector center, double angle)
 {
        data.pos.rotate(center, angle);
        calculateBorders();
 }
 
-void RS_Point::scale(Vector center, Vector factor)
+void Point::scale(Vector center, Vector factor)
 {
        data.pos.scale(center, factor);
        calculateBorders();
 }
 
-void RS_Point::mirror(Vector axisPoint1, Vector axisPoint2)
+void Point::mirror(Vector axisPoint1, Vector axisPoint2)
 {
        data.pos.mirror(axisPoint1, axisPoint2);
        calculateBorders();
 }
 
-void RS_Point::draw(PaintInterface * painter, GraphicView * view, double /*patternOffset*/)
+void Point::draw(PaintInterface * painter, GraphicView * view, double /*patternOffset*/)
 {
        if (painter == NULL || view == NULL)
                return;
@@ -180,7 +180,7 @@ void RS_Point::draw(PaintInterface * painter, GraphicView * view, double /*patte
 /**
  * Dumps the point's data to stdout.
  */
-std::ostream & operator<<(std::ostream & os, const RS_Point & p)
+std::ostream & operator<<(std::ostream & os, const Point & p)
 {
     os << " Point: " << p.getData() << "\n";
     return os;
index 20fb95e5b41830c19e1027cb9d19ef81d6d0ebe6..4e467d09b556446fbe8c5e867b7234f13ad51c8a 100644 (file)
@@ -6,15 +6,15 @@
 /**
  * Holds the data that defines a point.
  */
-class RS_PointData
+class PointData
 {
        public:
-               RS_PointData(const Vector & pos)
+               PointData(const Vector & pos)
                {
                        this->pos = pos;
                }
 
-               friend std::ostream & operator<<(std::ostream & os, const RS_PointData & pd)
+               friend std::ostream & operator<<(std::ostream & os, const PointData & pd)
                {
                        os << "(" << pd.pos << ")";
                        return os;
@@ -28,28 +28,28 @@ class RS_PointData
  *
  * @author Andrew Mustun
  */
-class RS_Point: public RS_AtomicEntity
+class Point: public AtomicEntity
 {
        public:
-               RS_Point(RS_EntityContainer * parent, const RS_PointData & d);
+               Point(EntityContainer * parent, const PointData & d);
 
-               virtual RS_Entity * clone();
+               virtual Entity * clone();
                virtual RS2::EntityType rtti() const;
                virtual Vector getStartpoint() const;
                virtual Vector getEndpoint() const;
                virtual void moveStartpoint(const Vector & pos);
-               RS_PointData getData() const;
+               PointData getData() const;
                virtual VectorSolutions getRefPoints();
                Vector getPos();
                void setPos(const Vector & pos);
 
                virtual Vector getNearestEndpoint(const Vector & coord, double * dist = NULL);
                virtual Vector getNearestPointOnEntity(const Vector & coord,
-                               bool onEntity = true, double * dist = NULL, RS_Entity ** entity = NULL);
+                               bool onEntity = true, double * dist = NULL, Entity ** entity = NULL);
                virtual Vector getNearestCenter(const Vector & coord, double * dist = NULL);
                virtual Vector getNearestMiddle(const Vector & coord, double * dist = NULL);
                virtual Vector getNearestDist(double distance, const Vector & coord, double * dist = NULL);
-               virtual double getDistanceToPoint(const Vector& coord, RS_Entity ** entity = NULL,
+               virtual double getDistanceToPoint(const Vector& coord, Entity ** entity = NULL,
                        RS2::ResolveLevel level = RS2::ResolveNone, double solidDist = RS_MAXDOUBLE);
 
                virtual void move(Vector offset);
@@ -58,13 +58,13 @@ class RS_Point: public RS_AtomicEntity
                virtual void mirror(Vector axisPoint1, Vector axisPoint2);
                virtual void draw(PaintInterface * painter, GraphicView * view, double patternOffset = 0.0);
 
-               friend std::ostream & operator<<(std::ostream & os, const RS_Point & p);
+               friend std::ostream & operator<<(std::ostream & os, const Point & p);
 
                /** Recalculates the borders of this entity. */
                virtual void calculateBorders();
 
        protected:
-               RS_PointData data;
+               PointData data;
                //Vector point;
 };
 
index 77fdbabfc108f0ab9522011be627198faf60b60e..29f7a92b251739a317f50afaf10f5762cf8aa0ba 100644 (file)
@@ -25,7 +25,7 @@
 /**
  * Constructor.
  */
-RS_Polyline::RS_Polyline(RS_EntityContainer * parent): RS_EntityContainer(parent),
+Polyline::Polyline(EntityContainer * parent): EntityContainer(parent),
        closingEntity(NULL), nextBulge(0.0)
 {
 }
@@ -34,8 +34,8 @@ RS_Polyline::RS_Polyline(RS_EntityContainer * parent): RS_EntityContainer(parent
  * Constructor.
  * @param d Polyline data
  */
-RS_Polyline::RS_Polyline(RS_EntityContainer* parent, const RS_PolylineData& d):
-       RS_EntityContainer(parent), data(d)
+Polyline::Polyline(EntityContainer* parent, const PolylineData& d):
+       EntityContainer(parent), data(d)
 {
     closingEntity = NULL;
     nextBulge = 0.0;
@@ -45,13 +45,13 @@ RS_Polyline::RS_Polyline(RS_EntityContainer* parent, const RS_PolylineData& d):
 /**
  * Destructor
  */
-RS_Polyline::~RS_Polyline()
+Polyline::~Polyline()
 {
 }
 
-/*virtual*/ RS_Entity * RS_Polyline::clone()
+/*virtual*/ Entity * Polyline::clone()
 {
-       RS_Polyline * p = new RS_Polyline(*this);
+       Polyline * p = new Polyline(*this);
 #warning "!!! Need to deal with setAutoDelete() Qt3->Qt4 !!!"
 //     p->entities.setAutoDelete(entities.autoDelete());
        p->initId();
@@ -60,19 +60,19 @@ RS_Polyline::~RS_Polyline()
 }
 
 /**    @return RS2::EntityPolyline */
-/*virtual*/ RS2::EntityType RS_Polyline::rtti() const
+/*virtual*/ RS2::EntityType Polyline::rtti() const
 {
        return RS2::EntityPolyline;
 }
 
 /** @return Copy of data that defines the polyline. */
-RS_PolylineData RS_Polyline::getData() const
+PolylineData Polyline::getData() const
 {
        return data;
 }
 
 /** sets a new start point of the polyline */
-void RS_Polyline::setStartpoint(Vector & v)
+void Polyline::setStartpoint(Vector & v)
 {
        data.startpoint = v;
 
@@ -81,19 +81,19 @@ void RS_Polyline::setStartpoint(Vector & v)
 }
 
 /** @return Start point of the entity */
-Vector RS_Polyline::getStartpoint()
+Vector Polyline::getStartpoint()
 {
        return data.startpoint;
 }
 
 /** sets a new end point of the polyline */
-void RS_Polyline::setEndpoint(Vector & v)
+void Polyline::setEndpoint(Vector & v)
 {
        data.endpoint = v;
 }
 
 /** @return End point of the entity */
-Vector RS_Polyline::getEndpoint()
+Vector Polyline::getEndpoint()
 {
        return data.endpoint;
 }
@@ -101,9 +101,9 @@ Vector RS_Polyline::getEndpoint()
 /**
  * Removes the last vertex of this polyline.
  */
-void RS_Polyline::removeLastVertex()
+void Polyline::removeLastVertex()
 {
-       RS_Entity * last = lastEntity();
+       Entity * last = lastEntity();
 
        if (last != NULL)
        {
@@ -113,9 +113,9 @@ void RS_Polyline::removeLastVertex()
                if (last != NULL)
                {
                        if (last->isAtomic())
-                               data.endpoint = ((RS_AtomicEntity*)last)->getEndpoint();
+                               data.endpoint = ((AtomicEntity*)last)->getEndpoint();
                        else
-                               RS_DEBUG->print(RS_Debug::D_WARNING, "RS_Polyline::removeLastVertex: "
+                               DEBUG->print(Debug::D_WARNING, "Polyline::removeLastVertex: "
                                        "polyline contains non-atomic entity");
                }
        }
@@ -135,9 +135,9 @@ void RS_Polyline::removeLastVertex()
  * @return Pointer to the entity that was addded or NULL if this
  *         was the first vertex added.
  */
-RS_Entity * RS_Polyline::addVertex(const Vector & v, double bulge, bool prepend)
+Entity * Polyline::addVertex(const Vector & v, double bulge, bool prepend)
 {
-    RS_Entity * entity = NULL;
+    Entity * entity = NULL;
     //static double nextBulge = 0.0;
 
     // very first vertex:
@@ -153,11 +153,11 @@ RS_Entity * RS_Polyline::addVertex(const Vector & v, double bulge, bool prepend)
         entity = createVertex(v, nextBulge, prepend);
         if (entity!=NULL) {
                        if (prepend==false) {
-               RS_EntityContainer::addEntity(entity);
+               EntityContainer::addEntity(entity);
                                data.endpoint = v;
                        }
                        else {
-               RS_EntityContainer::insertEntity(0, entity);
+               EntityContainer::insertEntity(0, entity);
                                data.startpoint = v;
                        }
         }
@@ -184,25 +184,25 @@ RS_Entity * RS_Polyline::addVertex(const Vector & v, double bulge, bool prepend)
  * @return Pointer to the entity that was created or NULL if this
  *         was the first vertex added.
  */
-RS_Entity* RS_Polyline::createVertex(const Vector& v, double bulge, bool prepend) {
+Entity* Polyline::createVertex(const Vector& v, double bulge, bool prepend) {
 
-    RS_Entity* entity=NULL;
+    Entity* entity=NULL;
 
-    RS_DEBUG->print("RS_Polyline::createVertex: %f/%f to %f/%f bulge: %f",
+    DEBUG->print("Polyline::createVertex: %f/%f to %f/%f bulge: %f",
                     data.endpoint.x, data.endpoint.y, v.x, v.y, bulge);
 
     // create line for the polyline:
     if (fabs(bulge)<RS_TOLERANCE) {
                if (prepend==false) {
-               entity = new RS_Line(this, RS_LineData(data.endpoint, v));
+               entity = new Line(this, LineData(data.endpoint, v));
                }
                else {
-               entity = new RS_Line(this, RS_LineData(v, data.startpoint));
+               entity = new Line(this, LineData(v, data.startpoint));
                }
         entity->setSelected(isSelected());
-        entity->setPen(RS_Pen(RS2::FlagInvalid));
+        entity->setPen(Pen(RS2::FlagInvalid));
         entity->setLayer(NULL);
-        //RS_EntityContainer::addEntity(entity);
+        //EntityContainer::addEntity(entity);
         //data.endpoint = v;
     }
 
@@ -231,7 +231,7 @@ RS_Entity* RS_Polyline::createVertex(const Vector& v, double bulge, bool prepend
         // alpha can't be 0.0 at this point
         radius = fabs(dist / sin(alpha/2.0));
 
-        double wu = fabs(RS_Math::pow(radius, 2.0) - RS_Math::pow(dist, 2.0));
+        double wu = fabs(Math::pow(radius, 2.0) - Math::pow(dist, 2.0));
         double h = sqrt(wu);
 
         if (bulge>0.0) {
@@ -259,13 +259,13 @@ RS_Entity* RS_Polyline::createVertex(const Vector& v, double bulge, bool prepend
                        a2 = center.angleTo(data.startpoint);
                }
 
-        RS_ArcData d(center, radius,
+        ArcData d(center, radius,
                      a1, a2,
                      reversed);
 
-        entity = new RS_Arc(this, d);
+        entity = new Arc(this, d);
         entity->setSelected(isSelected());
-        entity->setPen(RS_Pen(RS2::FlagInvalid));
+        entity->setPen(Pen(RS2::FlagInvalid));
         entity->setLayer(NULL);
     }
 
@@ -275,13 +275,13 @@ RS_Entity* RS_Polyline::createVertex(const Vector& v, double bulge, bool prepend
 /**
  * Ends polyline and adds the last entity if the polyline is closed
  */
-void RS_Polyline::endPolyline()
+void Polyline::endPolyline()
 {
-       RS_DEBUG->print("RS_Polyline::endPolyline");
+       DEBUG->print("Polyline::endPolyline");
 
     if (isClosed())
        {
-               RS_DEBUG->print("RS_Polyline::endPolyline: adding closing entity");
+               DEBUG->print("Polyline::endPolyline: adding closing entity");
 
         // remove old closing entity:
         if (closingEntity!=NULL)
@@ -293,7 +293,7 @@ void RS_Polyline::endPolyline()
         closingEntity = createVertex(data.startpoint, nextBulge);
         if (closingEntity!=NULL)
                {
-            RS_EntityContainer::addEntity(closingEntity);
+            EntityContainer::addEntity(closingEntity);
             //data.endpoint = data.startpoint;
         }
     }
@@ -302,12 +302,12 @@ void RS_Polyline::endPolyline()
 /**
  * @return The bulge of the closing entity.
  */
-double RS_Polyline::getClosingBulge()
+double Polyline::getClosingBulge()
 {
     if (isClosed()) {
-               RS_Entity* e = lastEntity();
+               Entity* e = lastEntity();
                if (e!=NULL && e->rtti()==RS2::EntityArc) {
-                       return ((RS_Arc*)e)->getBulge();
+                       return ((Arc*)e)->getBulge();
                }
        }
 
@@ -317,17 +317,17 @@ double RS_Polyline::getClosingBulge()
 /**
  * Sets the polylines start and endpoint to match the first and last vertex.
  */
-void RS_Polyline::updateEndpoints()
+void Polyline::updateEndpoints()
 {
-       RS_Entity * e1 = firstEntity();
+       Entity * e1 = firstEntity();
 
        if (e1 != NULL && e1->isAtomic())
        {
-               Vector v = ((RS_AtomicEntity *)e1)->getStartpoint();
+               Vector v = ((AtomicEntity *)e1)->getStartpoint();
                setStartpoint(v);
        }
 
-       RS_Entity * e2 = lastEntity();
+       Entity * e2 = lastEntity();
 
        if (isClosed())
        {
@@ -336,18 +336,18 @@ void RS_Polyline::updateEndpoints()
 
        if (e2 != NULL && e2->isAtomic())
        {
-               Vector v = ((RS_AtomicEntity *)e2)->getEndpoint();
+               Vector v = ((AtomicEntity *)e2)->getEndpoint();
                setEndpoint(v);
        }
 }
 
 /** @return true if the polyline is closed. false otherwise */
-bool RS_Polyline::isClosed() const
+bool Polyline::isClosed() const
 {
        return data.getFlag(RS2::FlagClosed);
 }
 
-void RS_Polyline::setClosed(bool cl)
+void Polyline::setClosed(bool cl)
 {
        if (cl)
                data.setFlag(RS2::FlagClosed);
@@ -361,9 +361,9 @@ void RS_Polyline::setClosed(bool cl)
  *
  * To add entities use addVertex() or addSegment() instead.
  */
-void RS_Polyline::addEntity(RS_Entity * entity)
+void Polyline::addEntity(Entity * entity)
 {
-       RS_DEBUG->print(RS_Debug::D_WARNING, "RS_Polyline::addEntity: should never be called");
+       DEBUG->print(Debug::D_WARNING, "Polyline::addEntity: should never be called");
 
        if (entity == NULL)
                return;
@@ -371,7 +371,7 @@ void RS_Polyline::addEntity(RS_Entity * entity)
        delete entity;
 }
 
-/*virtual*/ void RS_Polyline::setNextBulge(double bulge)
+/*virtual*/ void Polyline::setNextBulge(double bulge)
 {
        nextBulge = bulge;
 }
@@ -379,12 +379,12 @@ void RS_Polyline::addEntity(RS_Entity * entity)
 /**
  * Adds a segment to the polyline.
  */
-/*void RS_Polyline::addSegment(RS_Entity* entity) {
-       RS_EntityContainer::addEntity(entity);
+/*void Polyline::addSegment(Entity* entity) {
+       EntityContainer::addEntity(entity);
        // TODO: reorder and check polyline
 }*/
 
-VectorSolutions RS_Polyline::getRefPoints()
+VectorSolutions Polyline::getRefPoints()
 {
     VectorSolutions ret(count()+1);
 
@@ -392,11 +392,11 @@ VectorSolutions RS_Polyline::getRefPoints()
     ret.set(0, data.startpoint);
        i++;
 
-       for (RS_Entity* e=firstEntity(RS2::ResolveNone);
+       for (Entity* e=firstEntity(RS2::ResolveNone);
             e!=NULL;
             e = nextEntity(RS2::ResolveNone), i++) {
                if (e->isAtomic()) {
-               ret.set(i, ((RS_AtomicEntity*)e)->getEndpoint());
+               ret.set(i, ((AtomicEntity*)e)->getEndpoint());
                }
     }
 
@@ -405,22 +405,22 @@ VectorSolutions RS_Polyline::getRefPoints()
     return ret;
 }
 
-Vector RS_Polyline::getNearestRef(const Vector& coord,
+Vector Polyline::getNearestRef(const Vector& coord,
                                    double* dist) {
 
-    return RS_Entity::getNearestRef(coord, dist);
+    return Entity::getNearestRef(coord, dist);
 }
 
-Vector RS_Polyline::getNearestSelectedRef(const Vector& coord,
+Vector Polyline::getNearestSelectedRef(const Vector& coord,
         double* dist) {
 
-    return RS_Entity::getNearestSelectedRef(coord, dist);
+    return Entity::getNearestSelectedRef(coord, dist);
 }
 
 
 
 /*
-void RS_Polyline::reorder() {
+void Polyline::reorder() {
        // current point:
        Vector cp;
 
@@ -433,39 +433,39 @@ void RS_Polyline::reorder() {
 
 
 
-void RS_Polyline::move(Vector offset) {
-    RS_EntityContainer::move(offset);
+void Polyline::move(Vector offset) {
+    EntityContainer::move(offset);
     data.startpoint.move(offset);
     data.endpoint.move(offset);
 }
 
 
 
-void RS_Polyline::rotate(Vector center, double angle) {
-    RS_EntityContainer::rotate(center, angle);
+void Polyline::rotate(Vector center, double angle) {
+    EntityContainer::rotate(center, angle);
     data.startpoint.rotate(center, angle);
     data.endpoint.rotate(center, angle);
 }
 
 
 
-void RS_Polyline::scale(Vector center, Vector factor) {
-    RS_EntityContainer::scale(center, factor);
+void Polyline::scale(Vector center, Vector factor) {
+    EntityContainer::scale(center, factor);
     data.startpoint.scale(center, factor);
     data.endpoint.scale(center, factor);
 }
 
 
 
-void RS_Polyline::mirror(Vector axisPoint1, Vector axisPoint2) {
-    RS_EntityContainer::mirror(axisPoint1, axisPoint2);
+void Polyline::mirror(Vector axisPoint1, Vector axisPoint2) {
+    EntityContainer::mirror(axisPoint1, axisPoint2);
     data.startpoint.mirror(axisPoint1, axisPoint2);
     data.endpoint.mirror(axisPoint1, axisPoint2);
 }
 
-void RS_Polyline::moveRef(const Vector & ref, const Vector & offset)
+void Polyline::moveRef(const Vector & ref, const Vector & offset)
 {
-       RS_EntityContainer::moveRef(ref, offset);
+       EntityContainer::moveRef(ref, offset);
 
        if (ref.distanceTo(data.startpoint) < 1.0e-4)
                data.startpoint.move(offset);
@@ -476,7 +476,7 @@ void RS_Polyline::moveRef(const Vector & ref, const Vector & offset)
        //update();
 }
 
-void RS_Polyline::stretch(Vector firstCorner, Vector secondCorner, Vector offset)
+void Polyline::stretch(Vector firstCorner, Vector secondCorner, Vector offset)
 {
        if (data.startpoint.isInWindow(firstCorner, secondCorner))
                data.startpoint.move(offset);
@@ -484,33 +484,33 @@ void RS_Polyline::stretch(Vector firstCorner, Vector secondCorner, Vector offset
        if (data.endpoint.isInWindow(firstCorner, secondCorner))
                data.endpoint.move(offset);
 
-       RS_EntityContainer::stretch(firstCorner, secondCorner, offset);
+       EntityContainer::stretch(firstCorner, secondCorner, offset);
 }
 
 /**
  * Slightly optimized drawing for polylines.
  */
-void RS_Polyline::draw(PaintInterface * painter, GraphicView * view, double /*patternOffset*/)
+void Polyline::draw(PaintInterface * painter, GraphicView * view, double /*patternOffset*/)
 {
        if (!painter || !view)
                return;
 
        // draw first entity and set correct pen:
-       RS_Entity * e = firstEntity(RS2::ResolveNone);
+       Entity * e = firstEntity(RS2::ResolveNone);
        view->drawEntity(e);
 
        // draw subsequent entities with same pen:
-       for(RS_Entity * e=nextEntity(RS2::ResolveNone); e!=NULL; e = nextEntity(RS2::ResolveNone))
+       for(Entity * e=nextEntity(RS2::ResolveNone); e!=NULL; e = nextEntity(RS2::ResolveNone))
                view->drawEntityPlain(e);
 }
 
 /**
  * Dumps the point's data to stdout.
  */
-std::ostream & operator<<(std::ostream & os, const RS_Polyline & l)
+std::ostream & operator<<(std::ostream & os, const Polyline & l)
 {
        os << " Polyline: " << l.getData() << " {\n";
-       os << (RS_EntityContainer &)l;
+       os << (EntityContainer &)l;
        os << "\n}\n";
 
        return os;
index 49c9b094b3a9add002f751636d65f736bd4a416e..b6fba86c823c4fcb5ef8ec40e22aa91b9cd350d0 100644 (file)
@@ -7,26 +7,26 @@
 /**
  * Holds the data that defines a polyline.
  */
-class RS_PolylineData: public RS_Flags
+class PolylineData: public Flags
 {
        public:
-               RS_PolylineData()
+               PolylineData()
                {
                        startpoint = endpoint = Vector(false);
                }
 
-               RS_PolylineData(const Vector & startpoint, const Vector & endpoint, bool closed)
+               PolylineData(const Vector & startpoint, const Vector & endpoint, bool closed)
                {
                        this->startpoint = startpoint;
                        this->endpoint = endpoint;
 
-                       if (closed == true)
+                       if (closed)
                                setFlag(RS2::FlagClosed);
                }
 
-               friend class RS_Polyline;
+               friend class Polyline;
 
-               friend std::ostream & operator<<(std::ostream & os, const RS_PolylineData & pd)
+               friend std::ostream & operator<<(std::ostream & os, const PolylineData & pd)
                {
                        os << "(" << pd.startpoint << "/" << pd.endpoint << ")";
                        return os;
@@ -42,16 +42,16 @@ class RS_PolylineData: public RS_Flags
  *
  * @author Andrew Mustun
  */
-class RS_Polyline: public RS_EntityContainer
+class Polyline: public EntityContainer
 {
        public:
-               RS_Polyline(RS_EntityContainer * parent = NULL);
-               RS_Polyline(RS_EntityContainer * parent, const RS_PolylineData & d);
-               virtual ~RS_Polyline();
+               Polyline(EntityContainer * parent = NULL);
+               Polyline(EntityContainer * parent, const PolylineData & d);
+               virtual ~Polyline();
 
-               virtual RS_Entity * clone();
+               virtual Entity * clone();
                virtual RS2::EntityType rtti() const;
-               RS_PolylineData getData() const;
+               PolylineData getData() const;
                void setStartpoint(Vector & v);
                Vector getStartpoint();
                void setEndpoint(Vector & v);
@@ -64,10 +64,10 @@ class RS_Polyline: public RS_EntityContainer
                virtual VectorSolutions getRefPoints();
                virtual Vector getNearestRef(const Vector & coord, double * dist = NULL);
                virtual Vector getNearestSelectedRef(const Vector & coord, double * dist = NULL);
-               virtual RS_Entity * addVertex(const Vector & v, double bulge = 0.0, bool prepend = false);
+               virtual Entity * addVertex(const Vector & v, double bulge = 0.0, bool prepend = false);
                virtual void setNextBulge(double bulge);
-               virtual void addEntity(RS_Entity * entity);
-               //virtual void addSegment(RS_Entity* entity);
+               virtual void addEntity(Entity * entity);
+               //virtual void addSegment(Entity* entity);
                virtual void removeLastVertex();
                virtual void endPolyline();
                //virtual void reorder();
@@ -79,14 +79,14 @@ class RS_Polyline: public RS_EntityContainer
                virtual void stretch(Vector firstCorner, Vector secondCorner, Vector offset);
                virtual void draw(PaintInterface * painter, GraphicView * view, double patternOffset = 0.0);
 
-               friend std::ostream & operator<<(std::ostream & os, const RS_Polyline & l);
+               friend std::ostream & operator<<(std::ostream & os, const Polyline & l);
 
        protected:
-               virtual RS_Entity * createVertex(const Vector & v, double bulge = 0.0, bool prepend = false);
+               virtual Entity * createVertex(const Vector & v, double bulge = 0.0, bool prepend = false);
 
        protected:
-               RS_PolylineData data;
-               RS_Entity * closingEntity;
+               PolylineData data;
+               Entity * closingEntity;
                double nextBulge;
 };
 
index 1a873b81c7b4413a9ad701292b9910cf5ffd9c54..b0d60664dca741a7cedfb869e4740d51f2c8ef50 100644 (file)
@@ -25,7 +25,7 @@
 /**
  * Constructor.
  */
-RS_Preview::RS_Preview(RS_EntityContainer * parent): RS_EntityContainer(parent),
+Preview::Preview(EntityContainer * parent): EntityContainer(parent),
        visible(false)
 {
        settings.beginGroup("Appearance");
@@ -36,7 +36,7 @@ RS_Preview::RS_Preview(RS_EntityContainer * parent): RS_EntityContainer(parent),
 /**
  * Destructor.
  */
-RS_Preview::~RS_Preview()
+Preview::~Preview()
 {
 }
 
@@ -44,7 +44,7 @@ RS_Preview::~RS_Preview()
  * Adds an entity to this preview and removes any attributes / layer
  * connectsions before that.
  */
-void RS_Preview::addEntity(RS_Entity * entity)
+void Preview::addEntity(Entity * entity)
 {
        if (entity == NULL || entity->isUndone())
                return;
@@ -73,15 +73,15 @@ void RS_Preview::addEntity(RS_Entity * entity)
                Vector min = entity->getMin();
                Vector max = entity->getMax();
 
-               RS_Line * l1 = new RS_Line(this, RS_LineData(Vector(min.x, min.y), Vector(max.x, min.y)));
-               RS_Line * l2 = new RS_Line(this, RS_LineData(Vector(max.x, min.y), Vector(max.x, max.y)));
-               RS_Line * l3 = new RS_Line(this, RS_LineData(Vector(max.x, max.y), Vector(min.x, max.y)));
-               RS_Line * l4 = new RS_Line(this, RS_LineData(Vector(min.x, max.y), Vector(min.x, min.y)));
+               Line * l1 = new Line(this, LineData(Vector(min.x, min.y), Vector(max.x, min.y)));
+               Line * l2 = new Line(this, LineData(Vector(max.x, min.y), Vector(max.x, max.y)));
+               Line * l3 = new Line(this, LineData(Vector(max.x, max.y), Vector(min.x, max.y)));
+               Line * l4 = new Line(this, LineData(Vector(min.x, max.y), Vector(min.x, min.y)));
 
-               RS_EntityContainer::addEntity(l1);
-               RS_EntityContainer::addEntity(l2);
-               RS_EntityContainer::addEntity(l3);
-               RS_EntityContainer::addEntity(l4);
+               EntityContainer::addEntity(l1);
+               EntityContainer::addEntity(l2);
+               EntityContainer::addEntity(l3);
+               EntityContainer::addEntity(l4);
 
                delete entity;
                entity = NULL;
@@ -91,35 +91,35 @@ void RS_Preview::addEntity(RS_Entity * entity)
                entity->setLayer(NULL);
                entity->setSelected(false);
                entity->reparent(this);
-               entity->setPen(RS_Pen(RS_Color(255, 255, 255), RS2::Width00, RS2::SolidLine));
-               RS_EntityContainer::addEntity(entity);
+               entity->setPen(Pen(Color(255, 255, 255), RS2::Width00, RS2::SolidLine));
+               EntityContainer::addEntity(entity);
        }
 }
 
 /**
  * Clones the given entity and adds the clone to the preview.
  */
-void RS_Preview::addCloneOf(RS_Entity * entity)
+void Preview::addCloneOf(Entity * entity)
 {
        if (!entity)
                return;
 
-       RS_Entity * clone = entity->clone();
+       Entity * clone = entity->clone();
        addEntity(clone);
 }
 
 /**
  * Adds all entities from 'container' to the preview (unselected).
  */
-void RS_Preview::addAllFrom(RS_EntityContainer & container)
+void Preview::addAllFrom(EntityContainer & container)
 {
        int c = 0;
 
-       for(RS_Entity * e=container.firstEntity(); e!=NULL; e=container.nextEntity())
+       for(Entity * e=container.firstEntity(); e!=NULL; e=container.nextEntity())
        {
                if (c < maxEntities)
                {
-                       RS_Entity * clone = e->clone();
+                       Entity * clone = e->clone();
                        clone->setSelected(false);
                        clone->reparent(this);
 
@@ -133,15 +133,15 @@ void RS_Preview::addAllFrom(RS_EntityContainer & container)
 /**
  * Adds all selected entities from 'container' to the preview (unselected).
  */
-void RS_Preview::addSelectionFrom(RS_EntityContainer & container)
+void Preview::addSelectionFrom(EntityContainer & container)
 {
        int c = 0;
 
-       for(RS_Entity * e=container.firstEntity(); e!=NULL; e=container.nextEntity())
+       for(Entity * e=container.firstEntity(); e!=NULL; e=container.nextEntity())
        {
                if (e->isSelected() && c < maxEntities)
                {
-                       RS_Entity * clone = e->clone();
+                       Entity * clone = e->clone();
                        clone->setSelected(false);
                        clone->reparent(this);
 
@@ -156,17 +156,17 @@ void RS_Preview::addSelectionFrom(RS_EntityContainer & container)
  * Adds all entities in the given range and those which have endpoints in the
  * given range to the preview.
  */
-void RS_Preview::addStretchablesFrom(RS_EntityContainer & container, const Vector & v1,
+void Preview::addStretchablesFrom(EntityContainer & container, const Vector & v1,
        const Vector & v2)
 {
        int c = 0;
 
-       for(RS_Entity * e=container.firstEntity(); e!=NULL; e=container.nextEntity())
+       for(Entity * e=container.firstEntity(); e!=NULL; e=container.nextEntity())
        {
                if (e->isVisible() && e->rtti() != RS2::EntityHatch && (e->isInWindow(v1, v2)
                        || e->hasEndpointsWithinWindow(v1, v2)) && c < maxEntities)
                {
-                       RS_Entity * clone = e->clone();
+                       Entity * clone = e->clone();
                        //clone->setSelected(false);
                        clone->reparent(this);
 
@@ -177,37 +177,37 @@ void RS_Preview::addStretchablesFrom(RS_EntityContainer & container, const Vecto
        }
 }
 
-void RS_Preview::SetOffset(Vector v)
+void Preview::SetOffset(Vector v)
 {
        offset = v;
 }
 
-Vector RS_Preview::Offset(void)
+Vector Preview::Offset(void)
 {
        return offset;
 }
 
-void RS_Preview::SetVisible(bool visibility/*= true*/)
+void Preview::SetVisible(bool visibility/*= true*/)
 {
        visible = visibility;
 }
 
-bool RS_Preview::Visible(void)
+bool Preview::Visible(void)
 {
        return visible;
 }
 
-void RS_Preview::Draw(GraphicView * view, PaintInterface * painter)
+void Preview::Draw(GraphicView * view, PaintInterface * painter)
 {
        if (isEmpty())
                return;
 
-       painter->setPen(RS_Pen(RS_Color(60, 255, 80), RS2::Width00, RS2::SolidLine));
+       painter->setPen(Pen(Color(60, 255, 80), RS2::Width00, RS2::SolidLine));
        painter->setOffset(offset);
 
        // We have to traverse the container ourselves, because RS_Container::draw()
        // uses drawEntity() instead of drawEntityPlain()...
-       for(RS_Entity * e=firstEntity(RS2::ResolveNone); e!=NULL; e=nextEntity(RS2::ResolveNone))
+       for(Entity * e=firstEntity(RS2::ResolveNone); e!=NULL; e=nextEntity(RS2::ResolveNone))
                view->drawEntityPlain(e);
 
        painter->setOffset(Vector(0, 0));
index 42ed4d0d2e16540aba38e1bfaf54858207795a93..4f2a39b1235686bfa294855f8540611b0be04034 100644 (file)
@@ -4,27 +4,27 @@
 #include "entitycontainer.h"
 #include "vector.h"
 
-class RS_Entity;
+class Entity;
 class PaintInterface;
 
 /**
- * This class supports previewing. The RS_Snapper class uses
- * an instance of RS_Preview to preview entities, ranges,
+ * This class supports previewing. The Snapper class uses
+ * an instance of Preview to preview entities, ranges,
  * lines, arcs, ... on the fly.
  *
  * @author Andrew Mustun
  */
-class RS_Preview: public RS_EntityContainer
+class Preview: public EntityContainer
 {
        public:
-               RS_Preview(RS_EntityContainer * parent = NULL);
-               ~RS_Preview();
+               Preview(EntityContainer * parent = NULL);
+               ~Preview();
 
-               virtual void addEntity(RS_Entity * entity);
-               void addCloneOf(RS_Entity * entity);
-               virtual void addSelectionFrom(RS_EntityContainer & container);
-               virtual void addAllFrom(RS_EntityContainer & container);
-               virtual void addStretchablesFrom(RS_EntityContainer & container,
+               virtual void addEntity(Entity * entity);
+               void addCloneOf(Entity * entity);
+               virtual void addSelectionFrom(EntityContainer & container);
+               virtual void addAllFrom(EntityContainer & container);
+               virtual void addStretchablesFrom(EntityContainer & container,
                        const Vector & v1, const Vector & v2);
 
                void SetOffset(Vector);
diff --git a/src/base/python.cpp b/src/base/python.cpp
deleted file mode 100644 (file)
index b3a92d3..0000000
+++ /dev/null
@@ -1,101 +0,0 @@
-// python.cpp
-//
-// Part of the Architektonas Project
-// Originally part of QCad Community Edition by Andrew Mustun
-// Extensively rewritten and refactored by James L. Hammons
-// Portions copyright (C) 2001-2003 RibbonSoft
-// Copyright (C) 2010 Underground Software
-// See the README and GPLv2 files for licensing and warranty information
-//
-// JLH = James L. Hammons <jlhamm@acm.org>
-//
-// Who  When        What
-// ---  ----------  -----------------------------------------------------------
-// JLH  06/02/2010  Added this text. :-)
-//
-
-#include "python.h"
-
-#ifdef RS_OPT_PYTHON
-
-//
-// This is exported from the Boost::Python library declarations
-// that are declared inside rs_python_wrappers.cpp.
-//
-extern "C" void initqcad();
-
-/**
- * The unique instance of the Python scripting engine
- */
-RS_Python* RS_Python::uniqueInstance = NULL;
-
-/**
- * Constructor
- */
-RS_Python::RS_Python()
-{
-    graphic = NULL;
-    Py_Initialize();
-    initqcad();
-}
-
-/**
- *  Gets the one and only RS_Python instance
- *  (creates a new one on first call only)
- *
- *  @return Pointer to the single instance of this
- * singleton class
- */
-RS_Python* RS_Python::instance() {
-    if(uniqueInstance==NULL) {
-        uniqueInstance = new RS_Python;
-    }
-    return uniqueInstance;
-}
-
-
-/**
- * Launches the given script.
- */
-int RS_Python::launch(const QString& script) {
-    PyObject *modname, *mod, *mdict, *func, *rslt;
-    //Py_SetProgramName(argv[0]);
-
-    modname = PyString_FromString(script);
-    mod = PyImport_Import(modname);
-    if (mod) {
-        //printf( "mod\n");
-        mdict = PyModule_GetDict(mod);
-
-        // Borrowed reference to start function
-        func = PyDict_GetItemString(mdict, "start");
-        if (func) {
-            //printf( "func\n");
-            if (PyCallable_Check(func)) {
-                //printf("calling..\n");
-                rslt = PyObject_CallFunction(func, "(s)", "noparam");
-                //printf("calling ok\n");
-                if (rslt) {
-                   // The result value is currently not used
-                    Py_XDECREF(rslt);
-                } else
-               {
-                   // Give user some feed back what went wrong
-                   printf("*** PYTHON RUNTIME ERROR ***\n");
-                   PyErr_Print();
-               }
-            }
-        } else {
-            printf("no such function: start\n");
-        }
-        Py_XDECREF(mod);
-    } else {
-        printf("*** ERROR LOADING SCRIPT '%s' ***\n", script.latin1());
-       PyErr_Print();
-    }
-    Py_XDECREF(modname);
-    //Py_Finalize();
-    return 0;
-}
-
-#endif
diff --git a/src/base/python.h b/src/base/python.h
deleted file mode 100644 (file)
index 7e1a7db..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-#ifndef __PYTHON_H__
-#define __PYTHON_H__
-
-#ifdef RS_OPT_PYTHON
-
-#include "Python.h"
-
-#include "drawing.h"
-
-#define __PYTHON RS_Python::instance()
-
-/**
- * Python scripting support.
- *
- * OBSOLETE
- *
- * @author Andrew Mustun
- */
-class RS_Python {
-private:
-    RS_Python();
-
-public:
-    static RS_Python* instance();
-
-    void setGraphic(Drawing* g) {
-        graphic = g;
-    }
-
-    Drawing* getGraphic() {
-        return graphic;
-    }
-
-    int launch(const QString& script);
-
-private:
-    static RS_Python* uniqueInstance;
-    Drawing* graphic;
-};
-
-#endif
-
-#endif
diff --git a/src/base/python_wrappers.cpp b/src/base/python_wrappers.cpp
deleted file mode 100644 (file)
index 68901f4..0000000
+++ /dev/null
@@ -1,602 +0,0 @@
-/***************************************************************************
-** $Id
-**
-** Python language bindings for QCad II
-**
-** Copyright (C) 2003 Markus Meyer <meyer@mesw.de>
-**
-** Permission to copy, use, modify, sell and distribute this file is granted
-** provided this copyright notice is not removed or altered.
-** This software is provided "as is" without express or implied
-** warranty, and with no claim as to its suitability for any purpose.
-**
-***************************************************************************/
-
-/** 
-  * TODO:
-  * - Complete block support
-  * - Support for hatches, dimensions, text, solids
-  * - Support for user interactions
-  * - Support for more than one document
-  */
-#ifdef RS_OPT_PYTHON
-
-#include <boost/python.hpp>
-using namespace boost::python;
-
-#include "python_wrappers.h"
-#include "python.h"
-
-#include "rs.h"
-#include "arc.h"
-#include "atomicentity.h"
-#include "block.h"
-#include "blocklist.h"
-#include "circle.h"
-#include "color.h"
-#include "constructionline.h"
-#include "document.h"
-#include "ellipse.h"
-#include "entitycontainer.h"
-#include "entity.h"
-#include "flags.h"
-#include "drawing.h"
-#include "image.h"
-#include "insert.h"
-#include "layer.h"
-#include "layerlist.h"
-#include "line.h"
-#include "pen.h"
-#include "point.h"
-#include "polyline.h"
-#include "vector.h"
-
-/* Global root functions */
-Drawing* currentGraphic() { return RS_PYTHON->getGraphic(); }
-
-    /* more to be added later (access to global properties, all documents,
-       creation of new documents, ... */
-
-/* To/From Python string conversion logic for string management */
-namespace QString_Python_Conversions {
-    namespace {
-        struct QString_to_python_str
-        {
-            static PyObject* convert(QString const& s)
-            {
-                return boost::python::incref(boost::python::object((const char*)s).ptr());
-            }
-        };
-
-        struct QString_from_python_str
-        {
-            QString_from_python_str()
-            {
-                boost::python::converter::registry::push_back(
-                    &convertible,
-                    &construct,
-                    boost::python::type_id<QString>());
-            }
-
-            static void* convertible(PyObject* obj_ptr)
-            {
-                if (!PyString_Check(obj_ptr)) return 0;
-                return obj_ptr;
-            }
-
-            static void construct(
-                PyObject* obj_ptr,
-                boost::python::converter::rvalue_from_python_stage1_data* data)
-            {
-                const char* value = PyString_AsString(obj_ptr);
-                if (!value)
-                    boost::python::throw_error_already_set();
-                void* storage = (
-                    (boost::python::converter::rvalue_from_python_storage<QString>*)
-                    data)->storage.bytes;
-                new (storage) QString(value);
-                data->convertible = storage;
-            }
-        };
-
-        void registerConversions()
-        {
-            using namespace boost::python;
-
-            boost::python::to_python_converter<
-                QString, QString_to_python_str>();
-
-            QString_from_python_str();
-        }
-    }
-}
-
-/* Transfer of ownership is done by using auto pointers */
-/* These are the helper functions needed for this mechanism */
-
-#define TRANSFER_OWNERSHIP_FUNCTION(fname, container, addfunc, entity) \
-   void fname(container& cont, std::auto_ptr<entity> obj) \
-   { cont.addfunc(obj.get()); obj.release(); }
-
-TRANSFER_OWNERSHIP_FUNCTION(Drawing_addLayer, Drawing, addLayer, RS_Layer)
-TRANSFER_OWNERSHIP_FUNCTION(RS_LayerList_add, RS_LayerList, add, RS_Layer)
-
-#define ADDVERTEX_FUNCTION(fname, entity) \
-   TRANSFER_OWNERSHIP_FUNCTION(fname, RS_EntityContainer, addEntity, entity)
-
-ADDVERTEX_FUNCTION(RS_EntityContainer_addArc, RS_Arc)
-ADDVERTEX_FUNCTION(RS_EntityContainer_addBlock, RS_Block)
-ADDVERTEX_FUNCTION(RS_EntityContainer_addCircle, RS_Circle)
-ADDVERTEX_FUNCTION(RS_EntityContainer_addConstructionLine, RS_ConstructionLine)
-ADDVERTEX_FUNCTION(RS_EntityContainer_addEllipse, RS_Ellipse)
-ADDVERTEX_FUNCTION(RS_EntityContainer_addImage, RS_Image)
-ADDVERTEX_FUNCTION(RS_EntityContainer_addLine, RS_Line)
-ADDVERTEX_FUNCTION(RS_EntityContainer_addPoint, RS_Point)
-ADDVERTEX_FUNCTION(RS_EntityContainer_addPolyline, RS_Polyline)
-
-/* Overloaded functions helpers */
-void (RS_LayerList::*RS_LayerList_activate_string)(const QString&) = &RS_LayerList::activate;
-void (RS_LayerList::*RS_LayerList_activate_layer)(RS_Layer*) = &RS_LayerList::activate;
-void (RS_LayerList::*RS_LayerList_toggle_string)(const QString&) = &RS_LayerList::toggle;
-void (RS_LayerList::*RS_LayerList_toggle_layer)(const QString&) = &RS_LayerList::toggle;
-void (Drawing::*Drawing_toggleLayer_string)(const QString&) = &Drawing::toggleLayer;
-void (Drawing::*Drawing_toggleLayer_layer)(RS_Layer*) = &Drawing::toggleLayer;
-void (RS_Entity::*RS_Entity_setLayer_string)(const QString&) = &RS_Entity::setLayer;
-void (RS_Entity::*RS_Entity_setLayer_layer)(RS_Layer*) = &RS_Entity::setLayer;
-
-/**
-  * The main python module
-  */
-  
-BOOST_PYTHON_MODULE(qcad)
-{
-    /* Initialization code */
-    QString_Python_Conversions::registerConversions();
-    
-    /* Unbound functions */
-    
-    def("currentGraphic", currentGraphic, return_value_policy<reference_existing_object>());
-
-    /* Enums */
-    enum_<RS2::Flags>("Flag")
-        .value("Undone", RS2::FlagUndone)
-       .value("Visible", RS2::FlagVisible)
-       .value("ByLayer", RS2::FlagByLayer)
-       .value("ByBlock", RS2::FlagByBlock)
-       .value("Frozen", RS2::FlagFrozen)
-       .value("DefFrozen", RS2::FlagDefFrozen)
-       .value("Locked", RS2::FlagLocked)
-       .value("Invalid", RS2::FlagInvalid)
-       .value("Selected", RS2::FlagSelected)
-       .value("Closed", RS2::FlagClosed)
-       .value("Temp", RS2::FlagTemp)
-       .value("Processed", RS2::FlagProcessed)
-       .value("Selected1", RS2::FlagSelected1)
-       .value("Selected2", RS2::FlagSelected2)
-    ;
-
-    enum_<RS2::VariableType>("VariableType")
-        .value("String", RS2::VariableString)
-       .value("Int", RS2::VariableInt)
-       .value("Double", RS2::VariableDouble)
-       .value("Vector", RS2::VariableVector)
-       .value("Void", RS2::VariableVoid)
-    ;
-
-    enum_<RS2::EntityType>("EntityType")
-        .value("Unknown", RS2::EntityUnknown)
-       .value("Container", RS2::EntityContainer)
-       .value("Block", RS2::EntityBlock)
-       .value("FontChar", RS2::EntityFontChar)
-       .value("Insert", RS2::EntityInsert)
-       .value("Graphic", RS2::EntityGraphic)
-       .value("Point", RS2::EntityPoint)
-       .value("Line", RS2::EntityLine)
-       .value("Polyline", RS2::EntityPolyline)
-       .value("Vertex", RS2::EntityVertex)
-       .value("Arc", RS2::EntityArc)
-       .value("Circle", RS2::EntityCircle)
-       .value("Ellipse", RS2::EntityEllipse)
-       .value("Solid", RS2::EntitySolid)
-       .value("ConstructionLine", RS2::EntityConstructionLine)
-       .value("Text", RS2::EntityText)
-       .value("DimAligned", RS2::EntityDimAligned)
-       .value("DimLinear", RS2::EntityDimLinear)
-       .value("DimRadial", RS2::EntityDimRadial)
-       .value("DimDiametric", RS2::EntityDimDiametric)
-       .value("DimAngular", RS2::EntityDimAngular)
-       .value("DimLeader", RS2::EntityDimLeader)
-       .value("Hatch", RS2::EntityHatch)
-       .value("Image", RS2::EntityImage)
-    ;
-
-    enum_<RS2::LineType>("LineType")
-        .value("NoPen", RS2::NoPen)
-       .value("SolidLine", RS2::SolidLine)
-       .value("DotLine", RS2::DotLine)
-       .value("DotLine2", RS2::DotLine2)
-       .value("DotLineX2", RS2::DotLineX2)
-       .value("DashLine", RS2::DashLine)
-       .value("DashLine2", RS2::DashLine2)
-       .value("DashLineX2", RS2::DashLineX2)
-       .value("DashDotLine", RS2::DashDotLine)
-       .value("DashDotLine2", RS2::DashDotLine2)
-       .value("DashDotLineX2", RS2::DashDotLineX2)
-       .value("DivideLine", RS2::DivideLine)
-       .value("DivideLine2", RS2::DivideLine2)
-       .value("DivideLineX2", RS2::DivideLineX2)
-       .value("CenterLine", RS2::CenterLine)
-       .value("CenterLine2", RS2::CenterLine2)
-       .value("CenterLineX2", RS2::CenterLineX2)
-       .value("BorderLine", RS2::BorderLine)
-       .value("BorderLine2", RS2::BorderLine2)
-       .value("BorderLineX2", RS2::BorderLineX2)
-       .value("ByLayer", RS2::LineByLayer)
-       .value("ByBlock", RS2::LineByBlock)
-    ;
-
-    enum_<RS2::LineWidth>("LineWidth")
-        .value("Width00", RS2::Width00)
-        .value("Width01", RS2::Width01)
-        .value("Width02", RS2::Width02)
-        .value("Width03", RS2::Width03)
-        .value("Width04", RS2::Width04)
-        .value("Width05", RS2::Width05)
-        .value("Width06", RS2::Width06)
-        .value("Width07", RS2::Width07)
-        .value("Width08", RS2::Width08)
-        .value("Width09", RS2::Width09)
-        .value("Width10", RS2::Width10)
-        .value("Width11", RS2::Width11)
-        .value("Width12", RS2::Width12)
-        .value("Width13", RS2::Width13)
-        .value("Width14", RS2::Width14)
-        .value("Width15", RS2::Width15)
-        .value("Width16", RS2::Width16)
-        .value("Width17", RS2::Width17)
-        .value("Width18", RS2::Width18)
-        .value("Width19", RS2::Width19)
-        .value("Width20", RS2::Width20)
-        .value("Width21", RS2::Width21)
-        .value("Width22", RS2::Width22)
-        .value("Width23", RS2::Width23)
-       .value("ByLayer", RS2::WidthByLayer)
-       .value("ByBlock", RS2::WidthByBlock)
-       .value("Default", RS2::WidthDefault)
-    ;
-
-    /* "Small" classes */
-
-    class_<RS_Flags>("Flags")
-        .def(init<int>())
-       .add_property("flags", &RS_Flags::getFlags, &RS_Flags::setFlags)
-       .def("resetFlags", &RS_Flags::resetFlags)
-       .def("setFlag", &RS_Flags::setFlag)
-       .def("delFlag", &RS_Flags::delFlag)
-       .def("toggleFlag", &RS_Flags::toggleFlag)
-       .def("getFlag", &RS_Flags::getFlag)
-    ;
-
-    class_<RS_Color, bases<RS_Flags> >("Color")
-        .def(init<int, int, int>())
-       .def(init<int>())
-       .def("stripFlags", &RS_Color::stripFlags)
-       .add_property("byLayer", &RS_Color::isByLayer)
-       .add_property("byBlock", &RS_Color::isByBlock)
-    ;
-
-    class_<RS_Vector>("Vector")
-        .def(init<double, double, optional<double> >())
-       .def("set", &RS_Vector::set)
-       .def("setPolar", &RS_Vector::setPolar)
-       .def("distanceTo", &RS_Vector::distanceTo)
-       .def("angle", &RS_Vector::angle)
-       .def("angleTo", &RS_Vector::angleTo)
-       .def("magnitude", &RS_Vector::magnitude)
-       .def("move", &RS_Vector::move)
-       .def_readwrite("x", &RS_Vector::x)
-       .def_readwrite("y", &RS_Vector::y)
-       .def_readwrite("z", &RS_Vector::z)
-       .def_readwrite("valid", &RS_Vector::valid)
-    ;
-
-    class_<RS_Pen, bases<RS_Flags> >("Pen")
-        .def(init<const RS_Color&, RS2::LineWidth, RS2::LineType>())
-       .add_property("lineType", &RS_Pen::getLineType, &RS_Pen::setLineType)
-       .add_property("width", &RS_Pen::getWidth, &RS_Pen::setWidth)
-       .add_property("screenWidth", &RS_Pen::getScreenWidth, &RS_Pen::setScreenWidth)
-       .add_property("color", make_function(&RS_Pen::getColor, return_value_policy<reference_existing_object>()), &RS_Pen::setColor)
-       .add_property("valid", &RS_Pen::isValid)
-    ;
-
-    /* Common stuff */
-    
-    class_<RS_EntityContainer>("EntityContainer", init<RS_EntityContainer*, optional<bool> >())
-        /* Wrapper functions for ownership transfer */
-       .def("addEntity", RS_EntityContainer_addArc)
-       .def("addEntity", RS_EntityContainer_addBlock)
-       .def("addEntity", RS_EntityContainer_addCircle)
-       .def("addEntity", RS_EntityContainer_addConstructionLine)
-       .def("addEntity", RS_EntityContainer_addEllipse)
-       .def("addEntity", RS_EntityContainer_addImage)
-       .def("addEntity", RS_EntityContainer_addLine)
-       .def("addEntity", RS_EntityContainer_addPoint)
-       .def("addEntity", RS_EntityContainer_addPolyline)
-       
-       /** Owner-Containers will automatically delete entities upon removing,
-         * so no problem here. Other containers are not allowed in Python at the moment.
-         */
-       .def("removeEntity", &RS_EntityContainer::removeEntity)
-
-       /* Standard wrappers */
-        .def("clear", &RS_EntityContainer::clear)
-       .add_property("empty", &RS_EntityContainer::isEmpty)
-       .def("entityAt", &RS_EntityContainer::entityAt, return_value_policy<reference_existing_object>())
-
-        /* Iterators */
-        .def("firstEntity", &RS_EntityContainer::firstEntity, return_value_policy<reference_existing_object>())
-       .def("lastEntity", &RS_EntityContainer::lastEntity, return_value_policy<reference_existing_object>())
-       .def("nextEntity", &RS_EntityContainer::nextEntity, return_value_policy<reference_existing_object>())
-    ;
-
-    class_<RS_LayerData>("LayerData")
-        .def(init<const QString&, const RS_Pen&, bool>())
-       .def_readwrite("name", &RS_LayerData::name)
-       .def_readwrite("pen", &RS_LayerData::pen)
-       .def_readwrite("frozen", &RS_LayerData::frozen)
-    ;
-
-    class_<RS_Layer, std::auto_ptr<RS_Layer> >("Layer", init<const QString&>())
-        .add_property("name", &RS_Layer::getName, &RS_Layer::setName)
-       .add_property("pen", &RS_Layer::getPen, &RS_Layer::setPen)
-       .add_property("frozen", &RS_Layer::isFrozen, &RS_Layer::freeze)
-       .add_property("toggle", &RS_Layer::toggle)
-    ;
-
-    class_<RS_LayerList>("LayerList")
-        .def("clear", &RS_LayerList::clear)
-       .def("count", &RS_LayerList::count)
-       .def("at", &RS_LayerList::at, return_value_policy<reference_existing_object>())
-       .add_property("active", make_function(&RS_LayerList::getActive, return_value_policy<reference_existing_object>()),
-                               RS_LayerList_activate_layer)
-       .def("activate", RS_LayerList_activate_string)
-       .def("activate", RS_LayerList_activate_layer)
-        .def("add", RS_LayerList_add)
-       .def("remove", &RS_LayerList::remove)
-       .def("edit", &RS_LayerList::edit)
-       .def("find", &RS_LayerList::find, return_value_policy<reference_existing_object>())
-       .def("toggle", RS_LayerList_toggle_string)
-       .def("toggle", RS_LayerList_toggle_layer)
-       .def("freezeAll", &RS_LayerList::freezeAll)
-    ;
-
-    class_<RS_Document, bases<RS_EntityContainer>, boost::noncopyable >("Document", no_init)
-        .add_property("layerList", make_function(&RS_Document::getLayerList, return_value_policy<reference_existing_object>()))
-       .add_property("blockList", make_function(&RS_Document::getBlockList, return_value_policy<reference_existing_object>()))
-       .def("newDoc", &RS_Document::newDoc)
-       .def("save", &RS_Document::save)
-       .def("saveAs", &RS_Document::saveAs)
-       .def("open", &RS_Document::open)
-       .add_property("modified", &RS_Document::isModified)
-       .add_property("activePen", &RS_Document::getActivePen, &RS_Document::setActivePen)
-       .add_property("filename", &RS_Document::getFilename)
-    ;
-    
-    class_<Drawing, bases<RS_Document> >("Graphic", init<RS_EntityContainer*>())
-        .def("count", &Drawing::count)
-        .def("findLayer", &Drawing::findLayer, return_value_policy<reference_existing_object>())
-       .def("editLayer", &Drawing::editLayer)
-       .def("addLayer", Drawing_addLayer)
-       .def("removeLayer", &Drawing::removeLayer)
-       .def("toggleLayer", Drawing_toggleLayer_string)
-       .def("toggleLayer", Drawing_toggleLayer_layer)
-       .def("clearLayers", &Drawing::clearLayers)
-       .def("freezeAllLayers", &Drawing::freezeAllLayers)
-    ;
-
-    /* Entity types */
-
-    class_<RS_Entity, boost::noncopyable>("Entity", no_init)
-        .def("init", &RS_Entity::init)
-       .def("initId", &RS_Entity::initId)
-       .def("clone", &RS_Entity::clone, return_value_policy<reference_existing_object>())
-       .def("reparent", &RS_Entity::reparent)
-       .def("resetBorders", &RS_Entity::resetBorders)
-       .add_property("id", &RS_Entity::getId)
-       .add_property("count", &RS_Entity::count)
-       .add_property("parent", make_function(&RS_Entity::getParent, return_value_policy<reference_existing_object>()), &RS_Entity::setParent)
-       .add_property("graphic", make_function(&RS_Entity::getGraphic, return_value_policy<reference_existing_object>()))
-       .add_property("block", make_function(&RS_Entity::getBlock, return_value_policy<reference_existing_object>()))
-       .add_property("insert", make_function(&RS_Entity::getInsert, return_value_policy<reference_existing_object>()))
-       .add_property("blockOrInsert", make_function(&RS_Entity::getBlockOrInsert, return_value_policy<reference_existing_object>()))
-       .add_property("document", make_function(&RS_Entity::getDocument, return_value_policy<reference_existing_object>()))
-       .add_property("layer", make_function(&RS_Entity::getLayer, return_value_policy<reference_existing_object>()),
-                     RS_Entity_setLayer_layer)
-       .def("setLayer", RS_Entity_setLayer_string)
-       .def("setLayer", RS_Entity_setLayer_layer)
-       .def("setLayerToActive", &RS_Entity::setLayerToActive)
-       .add_property("isContainer", &RS_Entity::isContainer)
-       .add_property("isAtomic", &RS_Entity::isAtomic)
-       .add_property("isEdge", &RS_Entity::isEdge)
-       .add_property("isDocument", &RS_Entity::isDocument)
-       .add_property("selected", &RS_Entity::isSelected, &RS_Entity::setSelected)
-       .def("toggleSelected", &RS_Entity::toggleSelected)
-       .add_property("processed", &RS_Entity::isProcessed, &RS_Entity::setProcessed)
-       .add_property("visible", &RS_Entity::isVisible, &RS_Entity::setVisible)
-       .add_property("min", &RS_Entity::getMin)
-       .add_property("max", &RS_Entity::getMax)
-       .add_property("size", &RS_Entity::getSize)
-       .def("move", &RS_Entity::move)
-       .def("rotate", &RS_Entity::rotate)
-       .def("calculateBorders", &RS_Entity::calculateBorders)
-    ;
-
-    class_<RS_AtomicEntity, bases<RS_Entity>, boost::noncopyable>("AtomicEntity", no_init)
-        .add_property("startpointSelected", &RS_AtomicEntity::isStartpointSelected)
-       .add_property("endpointSelected", &RS_AtomicEntity::isEndpointSelected)
-       .def("moveStartpoint", &RS_AtomicEntity::moveStartpoint)
-       .def("moveEndpoint", &RS_AtomicEntity::moveEndpoint)
-       .add_property("trimPoint", &RS_AtomicEntity::getTrimPoint)
-       .def("reverse", &RS_AtomicEntity::reverse)
-    ;
-
-    /* Entities Data */
-
-    class_<RS_ArcData>("ArcData")
-        .def(init<RS_Vector&, double, double, double, bool>())
-       .def("reset", &RS_ArcData::reset)
-       .add_property("valid", &RS_ArcData::isValid)
-       .def_readwrite("center", &RS_ArcData::center)
-       .def_readwrite("radius", &RS_ArcData::radius)
-       .def_readwrite("angle1", &RS_ArcData::angle1)
-       .def_readwrite("angle2", &RS_ArcData::angle2)
-       .def_readwrite("reversed", &RS_ArcData::reversed)
-    ;
-
-    class_<RS_BlockData>("BlockData")
-        .def(init<QString&, const RS_Vector&, bool>())
-       .add_property("valid", &RS_BlockData::isValid)
-       .def_readwrite("name", &RS_BlockData::name)
-       .def_readwrite("basePoint", &RS_BlockData::basePoint)
-       .def_readwrite("frozen", &RS_BlockData::frozen)
-    ;
-
-    class_<RS_CircleData>("CircleData")
-        .def(init<RS_Vector&, double>())
-       .def("reset", &RS_CircleData::reset)
-       .add_property("valid", &RS_CircleData::isValid)
-       .def_readwrite("center", &RS_CircleData::center)
-       .def_readwrite("radius", &RS_CircleData::radius)
-    ;
-
-    class_<RS_ConstructionLineData>("ConstructionLineData")
-        .def(init<RS_Vector&, RS_Vector&>())
-    ;
-
-    class_<RS_EllipseData>("EllipseData", init<const RS_Vector&, const RS_Vector&, double, double, double, bool>())
-    ;
-
-    class_<RS_ImageData>("ImageData")
-        .def(init<int, const RS_Vector&, const RS_Vector&, const RS_Vector&, const RS_Vector&, const QString&, int, int, int>())
-       .def_readwrite("handle", &RS_ImageData::handle)
-       .def_readwrite("insertionPoint", &RS_ImageData::insertionPoint)
-       .def_readwrite("uVector", &RS_ImageData::uVector)
-       .def_readwrite("vVector", &RS_ImageData::vVector)
-       .def_readwrite("size", &RS_ImageData::size)
-       .def_readwrite("file", &RS_ImageData::file)
-       .def_readwrite("brightness", &RS_ImageData::brightness)
-       .def_readwrite("contrast", &RS_ImageData::contrast)
-       .def_readwrite("fade", &RS_ImageData::fade)
-    ;
-
-    class_<RS_LineData>("LineData")
-        .def(init<RS_Vector&, RS_Vector&>())
-       .def_readwrite("startpoint", &RS_LineData::startpoint)
-       .def_readwrite("endpoint", &RS_LineData::endpoint)
-    ;
-
-    class_<RS_PointData>("PointData", init<const RS_Vector&>())
-    ;
-
-    class_<RS_PolylineData>("PolylineData")
-        .def(init<const RS_Vector&, const RS_Vector&, bool>())
-    ;
-
-    /* Entities */
-
-    class_<RS_Arc, bases<RS_AtomicEntity>, std::auto_ptr<RS_Arc> >("Arc", init<RS_EntityContainer*, RS_ArcData&>())
-        .add_property("data", &RS_Arc::getData, &RS_Arc::setData)
-       .add_property("center", &RS_Arc::getCenter, &RS_Arc::setCenter)
-       .add_property("radius", &RS_Arc::getRadius, &RS_Arc::setRadius)
-       .add_property("angle1", &RS_Arc::getAngle1, &RS_Arc::setAngle1)
-       .add_property("angle2", &RS_Arc::getAngle2, &RS_Arc::setAngle2)
-       .add_property("direction1", &RS_Arc::getDirection1)
-       .add_property("direction2", &RS_Arc::getDirection2)
-       .add_property("reversed", &RS_Arc::isReversed, &RS_Arc::setReversed)
-       .add_property("middlepoint", &RS_Arc::getMiddlepoint)
-       .add_property("angleLength", &RS_Arc::getAngleLength)
-       .add_property("length", &RS_Arc::getLength)
-       .add_property("bulge", &RS_Arc::getBulge)
-       .def("createFrom3P", &RS_Arc::createFrom3P)
-    ;
-
-    class_<RS_Block, bases<RS_Document>, std::auto_ptr<RS_Block> >("Block", init<RS_EntityContainer*, const RS_BlockData&>())
-        .add_property("name", &RS_Block::getName, &RS_Block::setName)
-       .add_property("basePoint", &RS_Block::getBasePoint)
-       .add_property("frozen", &RS_Block::isFrozen, &RS_Block::freeze)
-       .def("toggle", &RS_Block::toggle)
-    ;
-
-    class_<RS_Circle, bases<RS_AtomicEntity>, std::auto_ptr<RS_Circle> >("Circle", init<RS_EntityContainer*, const RS_CircleData&>())
-        .add_property("data", &RS_Circle::getData)
-       .add_property("center", &RS_Circle::getCenter, &RS_Circle::setCenter)
-       .add_property("radius", &RS_Circle::getRadius, &RS_Circle::setRadius)
-       .add_property("angleLength", &RS_Circle::getAngleLength)
-       .def("createFromCR", &RS_Circle::createFromCR)
-       .def("createFrom2P", &RS_Circle::createFrom2P)
-       .def("createFrom3P", &RS_Circle::createFrom3P)
-    ;
-
-    class_<RS_ConstructionLine, bases<RS_AtomicEntity>, std::auto_ptr<RS_ConstructionLine> >
-            ("ConstructionLine", init<RS_EntityContainer*, const RS_ConstructionLineData&>())
-        .add_property("data", &RS_ConstructionLine::getData)
-       .add_property("point1", &RS_ConstructionLine::getPoint1)
-       .add_property("point2", &RS_ConstructionLine::getPoint2)
-    ;
-
-    class_<RS_Ellipse, bases<RS_AtomicEntity>, std::auto_ptr<RS_Ellipse> >
-            ("Ellipse", init<RS_EntityContainer*, const RS_EllipseData&>())
-       .add_property("data", &RS_Ellipse::getData)
-       .add_property("reversed", &RS_Ellipse::isReversed, &RS_Ellipse::setReversed)
-       .add_property("angle", &RS_Ellipse::getAngle)
-       .add_property("angle1", &RS_Ellipse::getAngle1, &RS_Ellipse::setAngle1)
-       .add_property("angle2", &RS_Ellipse::getAngle2, &RS_Ellipse::setAngle2)
-       .add_property("center", &RS_Ellipse::getCenter, &RS_Ellipse::setCenter)
-       .add_property("majorP", &RS_Ellipse::getMajorP, &RS_Ellipse::setMajorP)
-       .add_property("ratio", &RS_Ellipse::getRatio, &RS_Ellipse::setRatio)
-       .add_property("majorRadius", &RS_Ellipse::getMajorRadius)
-       .add_property("minorRadius", &RS_Ellipse::getMinorRadius)
-    ;
-
-    class_<RS_Image, bases<RS_AtomicEntity>, std::auto_ptr<RS_Image> >
-            ("Image", init<RS_EntityContainer*, const RS_ImageData&>())
-       .add_property("data", &RS_Image::getData)
-       .add_property("insertionPoint", &RS_Image::getInsertionPoint, &RS_Image::setInsertionPoint)
-       .add_property("file", &RS_Image::getFile, &RS_Image::setFile)
-       .add_property("uVector", &RS_Image::getUVector)
-       .add_property("vVector", &RS_Image::getVVector)
-       .add_property("width", &RS_Image::getWidth)
-       .add_property("height", &RS_Image::getHeight)
-       .add_property("brightness", &RS_Image::getBrightness)
-       .add_property("contrast", &RS_Image::getContrast)
-       .add_property("fade", &RS_Image::getFade)
-       .add_property("handle", &RS_Image::getHandle, &RS_Image::setHandle)
-       .add_property("imageWidth", &RS_Image::getImageWidth)
-       .add_property("imageHeight", &RS_Image::getImageHeight)
-    ;
-
-    class_<RS_Line, bases<RS_AtomicEntity>, std::auto_ptr<RS_Line> >
-            ("Line", init<RS_EntityContainer*, const RS_LineData&>())
-       .add_property("data", &RS_Line::getData)
-       .add_property("startpoint", &RS_Line::getStartpoint, &RS_Line::setStartpoint)
-       .add_property("endpoint", &RS_Line::getEndpoint, &RS_Line::setEndpoint)
-    ;
-
-    class_<RS_Point, bases<RS_AtomicEntity>, std::auto_ptr<RS_Point> >
-            ("Point", init<RS_EntityContainer*, const RS_PointData&>())
-       .add_property("pos", &RS_Point::getPos, &RS_Point::setPos)
-    ;
-
-    class_<RS_Polyline, bases<RS_EntityContainer>, std::auto_ptr<RS_Polyline> >
-            ("Polyline", init<RS_EntityContainer*, const RS_PolylineData&>())
-        .def(init<RS_EntityContainer*>())
-       .add_property("startpoint", &RS_Polyline::getStartpoint, &RS_Polyline::setStartpoint)
-       .add_property("endpoint", &RS_Polyline::getEndpoint)
-       .add_property("closed", &RS_Polyline::isClosed)
-       .def("addVertex", &RS_Polyline::addVertex, return_value_policy<reference_existing_object>())
-       .def("createVertex", &RS_Polyline::createVertex, return_value_policy<reference_existing_object>())
-       .def("endPolyline", &RS_Polyline::endPolyline)
-    ;
-}
-
-#endif
diff --git a/src/base/python_wrappers.h b/src/base/python_wrappers.h
deleted file mode 100644 (file)
index a07d00a..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-/**
-  * This function is automatically exported by the Boost::Python
-  * libraries. It adds the QCad scripting module to the environment
- *
- * OBSOLETE
-  */
-#ifdef RS_OPT_PYTHON
-extern "C" void initqcad();
-#endif
-
index 5cb583a5c4287e5e7cbec321c93faf4c6c4b69bd..13381f8b60ea46ae27b30af1c66b7208e6347785 100644 (file)
 /**
  * Constructor.
  */
-RS_Script::RS_Script(const QString & name, const QString & /*path*/)
+Script::Script(const QString & name, const QString & /*path*/)
 {
        this->name = name;
 }
 
 /** @return the name of this script. */
-QString RS_Script::getName() const
+QString Script::getName() const
 {
        return name;
 }
 
 /** @return the full path and file name of this script. */
-QString RS_Script::getPath() const
+QString Script::getPath() const
 {
        return path;
 }
index 18a3bb628c76bae8248c92af3893ec2efad197b1..ed9a3fcfa0d6d276f947b4b234f5bb5e721fee15 100644 (file)
@@ -3,6 +3,7 @@
 
 #include <QtCore>
 
+#warning "!!! THIS CLASS IS OBSOLETE !!!"
 /**
  * Class for representing a script. This is implemented as a QString
  * containing the script name.
  *
  * @author Andrew Mustun
  */
-class RS_Script
+class Script
 {
        public:
-               RS_Script(const QString & name, const QString & path);
-               //RS_Script(const char* name);
+               Script(const QString & name, const QString & path);
+               //Script(const char* name);
 
                QString getName() const;
                QString getPath() const;
index 4b6b007f9f2d4afb31fae39fecd6e597741f64ca..4fc8d640d32895e141d3ee35ec959ef8b0b0558c 100644 (file)
 
 #include "system.h"
 
-RS_ScriptList * RS_ScriptList::uniqueInstance = NULL;
+ScriptList * ScriptList::uniqueInstance = NULL;
 
 /**
  * Default constructor.
  */
-RS_ScriptList::RS_ScriptList(): scriptIterator(scripts)
+ScriptList::ScriptList(): scriptIterator(scripts)
 {
 //Should be dealt with...
 //#warning "!!! Need to deal with setAutoDelete() Qt3->Qt4 !!!"
@@ -33,7 +33,7 @@ RS_ScriptList::RS_ScriptList(): scriptIterator(scripts)
     //activeScript = NULL;
 }
 
-/*virtual*/ RS_ScriptList::~RS_ScriptList()
+/*virtual*/ ScriptList::~ScriptList()
 {
        while (!scripts.isEmpty())
                delete scripts.takeFirst();
@@ -42,51 +42,51 @@ RS_ScriptList::RS_ScriptList(): scriptIterator(scripts)
 /**
  * @return Instance to the unique script list.
  */
-/*static*/ RS_ScriptList * RS_ScriptList::instance()
+/*static*/ ScriptList * ScriptList::instance()
 {
        if (uniqueInstance == NULL)
-               uniqueInstance = new RS_ScriptList();
+               uniqueInstance = new ScriptList();
 
        return uniqueInstance;
 }
 
 /**
- * Initializes the script list by creating RS_Script
+ * Initializes the script list by creating Script
  * objects, one for each script that could be found.
  */
-void RS_ScriptList::init()
+void ScriptList::init()
 {
-       RS_DEBUG->print("RS_ScriptList::initScripts");
+       DEBUG->print("ScriptList::initScripts");
 
        scripts.clear();
-       QStringList list = RS_SYSTEM->getScriptList();
-       RS_Script * script;
+       QStringList list = SYSTEM->getScriptList();
+       Script * script;
 
        for(QStringList::Iterator it=list.begin(); it!=list.end(); ++it)
        {
-               RS_DEBUG->print("script: %s:", (*it).toLatin1().data());
+               DEBUG->print("script: %s:", (*it).toLatin1().data());
 
                QFileInfo fi(*it);
-               script = new RS_Script(fi.baseName(), fi.absoluteFilePath());
+               script = new Script(fi.baseName(), fi.absoluteFilePath());
                scripts.append(script);
 
-               RS_DEBUG->print("base: %s", fi.baseName().toLatin1().data());
-               RS_DEBUG->print("path: %s", fi.absoluteFilePath().toLatin1().data());
+               DEBUG->print("base: %s", fi.baseName().toLatin1().data());
+               DEBUG->print("path: %s", fi.absoluteFilePath().toLatin1().data());
        }
 
-       //RS_Script* f = new RS_Script("normal");
+       //Script* f = new Script("normal");
        //scripts.append(f);
 }
 
 /**
  * Removes all scripts in the scriptlist.
  */
-void RS_ScriptList::clearScripts()
+void ScriptList::clearScripts()
 {
        scripts.clear();
 }
 
-int RS_ScriptList::countScripts()
+int ScriptList::countScripts()
 {
        return scripts.count();
 }
@@ -96,9 +96,9 @@ int RS_ScriptList::countScripts()
  * Listeners are notified after the script was removed from
  * the list but before it gets deleted.
  */
-void RS_ScriptList::removeScript(RS_Script * script)
+void ScriptList::removeScript(Script * script)
 {
-    RS_DEBUG->print("RS_ScriptList::removeScript()");
+    DEBUG->print("ScriptList::removeScript()");
 
     // here the script is removed from the list but not deleted
 //    scripts.remove(script);
@@ -109,7 +109,7 @@ void RS_ScriptList::removeScript(RS_Script * script)
                delete scripts.takeAt(i);
 
     //for (uint i=0; i<scriptListListeners.count(); ++i) {
-    //    RS_ScriptListListener* l = scriptListListeners.at(i);
+    //    ScriptListListener* l = scriptListListeners.at(i);
     //    l->scriptRemoved(script);
     //}
 
@@ -127,20 +127,20 @@ void RS_ScriptList::removeScript(RS_Script * script)
  * \p NULL if no such script was found. The script will be loaded into
  * memory if it's not already.
  */
-RS_Script * RS_ScriptList::requestScript(const QString & name)
+Script * ScriptList::requestScript(const QString & name)
 {
-       RS_DEBUG->print("RS_ScriptList::requestScript %s",  name.toLatin1().data());
+       DEBUG->print("ScriptList::requestScript %s",  name.toLatin1().data());
 
        QString name2 = name.toLower();
-       RS_Script * foundScript = NULL;
+       Script * foundScript = NULL;
 
-       RS_DEBUG->print("name2: %s", name2.toLatin1().data());
+       DEBUG->print("name2: %s", name2.toLatin1().data());
 
        // Search our list of available scripts:
-//     for(RS_Script * s=scripts.first(); s!=NULL; s=scripts.next())
+//     for(Script * s=scripts.first(); s!=NULL; s=scripts.next())
        for(int i=0; i<scripts.size(); i++)
        {
-               RS_Script * s = scripts[i];
+               Script * s = scripts[i];
 
                if (s->getName() == name2)
                {
@@ -154,7 +154,7 @@ RS_Script * RS_ScriptList::requestScript(const QString & name)
 }
 
 //! @return First script of the list.
-RS_Script * RS_ScriptList::firstScript()
+Script * ScriptList::firstScript()
 {
 //     return scripts.first();
        scriptIterator.toFront();
@@ -164,7 +164,7 @@ RS_Script * RS_ScriptList::firstScript()
 /** @return Next script from the list after
  * calling firstScript() or nextScript().
  */
-RS_Script * RS_ScriptList::nextScript()
+Script * ScriptList::nextScript()
 {
 //     return scripts.next();
        return scriptIterator.next();
@@ -174,17 +174,17 @@ RS_Script * RS_ScriptList::nextScript()
  * @return Pointer to the script with the given name or
  * \p NULL if no such script was found.
  */
-//RS_Script* RS_ScriptList::loadScript(const QString& name) {
+//Script* ScriptList::loadScript(const QString& name) {
 //}
 
 /**
  * Tests the script list and its ability to load scripts.
  */
-bool RS_ScriptList::test()
+bool ScriptList::test()
 {
-    //RS_ScriptList* l = RS_ScriptList::instance();
+    //ScriptList* l = ScriptList::instance();
 
-    //std::cout << "RS_ScriptList: " << *l << std::endl;
+    //std::cout << "ScriptList: " << *l << std::endl;
 
     return true;
 }
index 417d00a925a514dc8014023edb705973258e187a..c3331fdb057cc865fb08cf272b8c5bd7f5d82d3e 100644 (file)
@@ -4,42 +4,42 @@
 #include <QtCore>
 #include "script.h"
 
-#define RS_SCRIPTLIST RS_ScriptList::instance()
+#define SCRIPTLIST ScriptList::instance()
 #warning "!!! THIS CLASS IS OBSOLETE !!!"
 
 /**
  * The global list of scripts. This is implemented as a singleton.
- * Use RS_ScriptList::instance() to get a pointer to the object.
+ * Use ScriptList::instance() to get a pointer to the object.
  *
  * OBSOLETE
  *
  * @author Andrew Mustun
  */
-class RS_ScriptList
+class ScriptList
 {
        protected:
-               RS_ScriptList();
+               ScriptList();
 
        public:
-               virtual ~RS_ScriptList();
+               virtual ~ScriptList();
 
-               static RS_ScriptList * instance();
+               static ScriptList * instance();
                void init();
                void clearScripts();
                int countScripts();
-               virtual void removeScript(RS_Script * script);
-               RS_Script * requestScript(const QString & name);
-               RS_Script * firstScript();
-               RS_Script * nextScript();
+               virtual void removeScript(Script * script);
+               Script * requestScript(const QString & name);
+               Script * firstScript();
+               Script * nextScript();
                static bool test();
 
        protected:
-               static RS_ScriptList * uniqueInstance;
+               static ScriptList * uniqueInstance;
 
        private:
                //! all scripts available
-               QList<RS_Script *> scripts;
-               QListIterator<RS_Script *> scriptIterator;
+               QList<Script *> scripts;
+               QListIterator<Script *> scriptIterator;
 };
 
 #endif // __SCRIPTLIST_H__
index 1261f7098325549366d71d4d9443e0ed9cab1978..ce50e01c0f8a73e5e365b560218e361b29a556f9 100644 (file)
@@ -29,7 +29,7 @@
  *        entities. Usually that's an Drawing entity but
  *        it can also be a polyline, text, ...
  */
-RS_Selection::RS_Selection(RS_EntityContainer & container, GraphicView * graphicView)
+Selection::Selection(EntityContainer & container, GraphicView * graphicView)
 {
        this->container = &container;
        this->graphicView = graphicView;
@@ -39,7 +39,7 @@ RS_Selection::RS_Selection(RS_EntityContainer & container, GraphicView * graphic
 /**
  * Selects or deselects the given entitiy.
  */
-void RS_Selection::selectSingle(RS_Entity * e)
+void Selection::selectSingle(Entity * e)
 {
        if (e && (e->getLayer() == NULL || e->getLayer()->isLocked() == false))
        {
@@ -52,7 +52,7 @@ void RS_Selection::selectSingle(RS_Entity * e)
 
 //Most likely because while the painter is valid, the QPainter is not...
 //[WAS]#warning "!!! This is causing a segfault in the draw code !!!"
-               if (graphicView != NULL)
+               if (graphicView)
 //                     graphicView->drawEntity(e);
                        graphicView->redraw();
        }
@@ -61,29 +61,28 @@ void RS_Selection::selectSingle(RS_Entity * e)
 /**
  * Selects all entities on visible layers.
  */
-void RS_Selection::selectAll(bool select)
+void Selection::selectAll(bool select)
 {
-       if (graphicView != NULL)
+       if (graphicView)
        {
                //graphicView->deleteEntity(container);
        }
 
        //container->setSelected(select);
-       for(RS_Entity * e=container->firstEntity(); e!=NULL; e=container->nextEntity())
+       for(Entity * e=container->firstEntity(); e!=NULL; e=container->nextEntity())
        {
        //for (uint i=0; i<container->count(); ++i) {
-               //RS_Entity* e = container->entityAt(i);
+               //Entity* e = container->entityAt(i);
 
                if (e != NULL && e->isVisible())
                        e->setSelected(select);
        }
 
-       if (graphicView!=NULL)
-               //graphicView->drawEntity(container);
+       if (graphicView)
                graphicView->redraw();
 }
 
-void RS_Selection::deselectAll()
+void Selection::deselectAll()
 {
        selectAll(false);
 }
@@ -91,17 +90,17 @@ void RS_Selection::deselectAll()
 /**
  * Selects all entities on visible layers.
  */
-void RS_Selection::invertSelection()
+void Selection::invertSelection()
 {
        if (graphicView != NULL)
        {
                //graphicView->deleteEntity(container);
        }
 
-       for(RS_Entity * e=container->firstEntity(); e!=NULL; e=container->nextEntity())
+       for(Entity * e=container->firstEntity(); e!=NULL; e=container->nextEntity())
        {
        //for (uint i=0; i<container->count(); ++i) {
-               //RS_Entity* e = container->entityAt(i);
+               //Entity* e = container->entityAt(i);
 
                if (e != NULL && e->isVisible())
                        e->toggleSelected();
@@ -119,7 +118,7 @@ void RS_Selection::invertSelection()
  * @param v2 Second corner of the window to select.
  * @param select true: select, false: deselect
  */
-void RS_Selection::selectWindow(const Vector & v1, const Vector & v2, bool select, bool cross)
+void Selection::selectWindow(const Vector & v1, const Vector & v2, bool select, bool cross)
 {
        //if (graphicView!=NULL) {
        //    graphicView->drawWindow(v1, v2, true);
@@ -132,7 +131,7 @@ void RS_Selection::selectWindow(const Vector & v1, const Vector & v2, bool selec
                graphicView->redraw();
 }
 
-void RS_Selection::deselectWindow(const Vector & v1, const Vector & v2)
+void Selection::deselectWindow(const Vector & v1, const Vector & v2)
 {
        selectWindow(v1, v2, false);
 }
@@ -144,15 +143,15 @@ void RS_Selection::deselectWindow(const Vector & v1, const Vector & v2)
  * @param v2 Endpoint of line.
  * @param select true: select, false: deselect
  */
-void RS_Selection::selectIntersected(const Vector & v1, const Vector & v2, bool select)
+void Selection::selectIntersected(const Vector & v1, const Vector & v2, bool select)
 {
-       RS_Line line(NULL, RS_LineData(v1, v2));
+       Line line(NULL, LineData(v1, v2));
        bool inters;
 
-       for (RS_Entity* e=container->firstEntity(); e!=NULL;
+       for (Entity* e=container->firstEntity(); e!=NULL;
                        e=container->nextEntity()) {
        //for (uint i=0; i<container->count(); ++i) {
-               //RS_Entity* e = container->entityAt(i);
+               //Entity* e = container->entityAt(i);
 
                if (e!=NULL && e->isVisible())
                {
@@ -161,12 +160,12 @@ void RS_Selection::selectIntersected(const Vector & v1, const Vector & v2, bool
                        // select containers / groups:
                        if (e->isContainer())
                        {
-                               RS_EntityContainer * ec = (RS_EntityContainer *)e;
+                               EntityContainer * ec = (EntityContainer *)e;
 
-                               for(RS_Entity * e2=ec->firstEntity(RS2::ResolveAll); e2!=NULL;
+                               for(Entity * e2=ec->firstEntity(RS2::ResolveAll); e2!=NULL;
                                        e2=ec->nextEntity(RS2::ResolveAll))
                                {
-                                       VectorSolutions sol = RS_Information::getIntersection(&line, e2, true);
+                                       VectorSolutions sol = Information::getIntersection(&line, e2, true);
 
                                        if (sol.hasValid())
                                                inters = true;
@@ -174,7 +173,7 @@ void RS_Selection::selectIntersected(const Vector & v1, const Vector & v2, bool
                        }
                        else
                        {
-                               VectorSolutions sol = RS_Information::getIntersection(&line, e, true);
+                               VectorSolutions sol = Information::getIntersection(&line, e, true);
 
                                if (sol.hasValid())
                                        inters = true;
@@ -200,7 +199,7 @@ void RS_Selection::selectIntersected(const Vector & v1, const Vector & v2, bool
        }
 }
 
-void RS_Selection::deselectIntersected(const Vector & v1, const Vector & v2)
+void Selection::deselectIntersected(const Vector & v1, const Vector & v2)
 {
        selectIntersected(v1, v2, false);
 }
@@ -210,13 +209,13 @@ void RS_Selection::deselectIntersected(const Vector & v1, const Vector & v2)
  *
  * @param e The entity where the algorithm starts. Must be an atomic entity.
  */
-void RS_Selection::selectContour(RS_Entity * e)
+void Selection::selectContour(Entity * e)
 {
        if (!e || !e->isAtomic())
                return;
 
        bool select = !e->isSelected();
-       RS_AtomicEntity * ae = (RS_AtomicEntity *)e;
+       AtomicEntity * ae = (AtomicEntity *)e;
        Vector p1 = ae->getStartpoint();
        Vector p2 = ae->getEndpoint();
        bool found = false;
@@ -240,17 +239,17 @@ void RS_Selection::selectContour(RS_Entity * e)
        {
                found = false;
 
-               for(RS_Entity * en=container->firstEntity(); en!=NULL;
+               for(Entity * en=container->firstEntity(); en!=NULL;
                        en=container->nextEntity())
                {
                //for (uint i=0; i<container->count(); ++i) {
-                       //RS_Entity* en = container->entityAt(i);
+                       //Entity* en = container->entityAt(i);
 
                        if (en!=NULL && en->isVisible() &&
                                en->isAtomic() && en->isSelected()!=select &&
                                (en->getLayer()==NULL || en->getLayer()->isLocked()==false))
                        {
-                               ae = (RS_AtomicEntity *)en;
+                               ae = (AtomicEntity *)en;
                                bool doit = false;
 
                                // startpoint connects to 1st point
@@ -303,14 +302,14 @@ void RS_Selection::selectContour(RS_Entity * e)
 /**
  * Selects all entities on the given layer.
  */
-void RS_Selection::selectLayer(RS_Entity * e)
+void Selection::selectLayer(Entity * e)
 {
        if (e == NULL)
                return;
 
        bool select = !e->isSelected();
 
-       RS_Layer * layer = e->getLayer(true);
+       Layer * layer = e->getLayer(true);
 
        if (layer == NULL)
                return;
@@ -322,14 +321,14 @@ void RS_Selection::selectLayer(RS_Entity * e)
 /**
  * Selects all entities on the given layer.
  */
-void RS_Selection::selectLayer(const QString & layerName, bool select)
+void Selection::selectLayer(const QString & layerName, bool select)
 {
-       for(RS_Entity * en=container->firstEntity(); en!=NULL; en=container->nextEntity())
+       for(Entity * en=container->firstEntity(); en!=NULL; en=container->nextEntity())
        {
                if (en != NULL && en->isVisible() && en->isSelected() != select
                        && (en->getLayer() == NULL || en->getLayer()->isLocked() == false))
                {
-                       RS_Layer * l = en->getLayer(true);
+                       Layer * l = en->getLayer(true);
 
                        if (l != NULL && l->getName() == layerName)
                        {
@@ -351,7 +350,7 @@ void RS_Selection::selectLayer(const QString & layerName, bool select)
        }
 }
 
-void RS_Selection::deselectLayer(QString & layerName)
+void Selection::deselectLayer(QString & layerName)
 {
        selectLayer(layerName, false);
 }
index 3a39ebed6ef9c73ec0f68118502ab5c1703d2d9e..cbc426fc1ebd9f14c0f0f5c6437052ea805daf94 100644 (file)
@@ -14,13 +14,13 @@ class GraphicView;
  *
  * @author Andrew Mustun
  */
-class RS_Selection
+class Selection
 {
        public:
-               RS_Selection(RS_EntityContainer & entityContainer,
+               Selection(EntityContainer & entityContainer,
                        GraphicView * graphicView = NULL);
 
-               void selectSingle(RS_Entity * e);
+               void selectSingle(Entity * e);
                void selectAll(bool select = true);
                void deselectAll();
                void invertSelection();
@@ -30,13 +30,13 @@ class RS_Selection
                void selectIntersected(const Vector & v1, const Vector & v2,
                        bool select = true);
                void deselectIntersected(const Vector & v1, const Vector & v2);
-               void selectContour(RS_Entity * e);
-               void selectLayer(RS_Entity * e);
+               void selectContour(Entity * e);
+               void selectLayer(Entity * e);
                void selectLayer(const QString & layerName, bool select = true);
                void deselectLayer(QString & layerName);
 
        protected:
-               RS_EntityContainer * container;
+               EntityContainer * container;
                Drawing * graphic;
                GraphicView * graphicView;
 };
diff --git a/src/base/simplepython.cpp b/src/base/simplepython.cpp
deleted file mode 100644 (file)
index 522a2e9..0000000
+++ /dev/null
@@ -1,154 +0,0 @@
-// simplepython.cpp
-//
-// Part of the Architektonas Project
-// Originally part of QCad Community Edition by Andrew Mustun
-// Extensively rewritten and refactored by James L. Hammons
-// Portions copyright (C) 2001-2003 RibbonSoft
-// Copyright (C) 2010 Underground Software
-// See the README and GPLv2 files for licensing and warranty information
-//
-// JLH = James L. Hammons <jlhamm@acm.org>
-//
-// Who  When        What
-// ---  ----------  -----------------------------------------------------------
-// JLH  06/02/2010  Added this text. :-)
-//
-
-#ifdef RS_OPT_SIMPLEPYTHON
-#include "simplepython.h"
-
-
-RS_SimplePython* RS_SimplePython::uniqueInstance = NULL;
-
-
-/**
- *  Gets the one and only RS_SimplePython instance
- *  (creates a new one on first call only)
- *
- *  @return Pointer to the single instance of this
- * singleton class
- */
-RS_SimplePython* RS_SimplePython::instance() {
-    if(uniqueInstance==NULL) {
-        uniqueInstance = new RS_SimplePython;
-    }
-    return uniqueInstance;
-}
-
-
-/**
- * Launches the given script.
- */
-int RS_SimplePython::launch(const QString& script) {
-    long answer;
-    PyObject *modname, *mod, *mdict, *func, *rslt;
-    //Py_SetProgramName(argv[0]);
-    Py_Initialize();
-    init_pyextension();
-    modname = PyString_FromString(script);
-    mod = PyImport_Import(modname);
-    if (mod) {
-        //printf( "mod\n");
-        mdict = PyModule_GetDict(mod);
-
-        // Borrowed reference to start function
-        func = PyDict_GetItemString(mdict, "start");
-        if (func) {
-            //printf( "func\n");
-            if (PyCallable_Check(func)) {
-                //printf("calling..\n");
-                rslt = PyObject_CallFunction(func, "(s)", "noparam");
-                //printf("calling ok\n");
-                if (rslt) {
-                    //printf("c: rslt\n");
-                    answer = PyInt_AsLong(rslt);
-                    //printf("c: answer is: %ld\n", answer);
-                    Py_XDECREF(rslt);
-                }
-            }
-        } else {
-            printf("no such function: start\n");
-        }
-        Py_XDECREF(mod);
-    } else {
-        printf("no such module: %s\n", script.latin1());
-    }
-    Py_XDECREF(modname);
-    Py_Finalize();
-    return 0;
-}
-
-
-/**
- * A test method exposed to Python
- */
-long inc(long i) {
-    printf("c: inc called\n");
-    printf("c: parameter from python: %ld\n", i);
-    return ++i;
-}
-
-/**
- * The magic that exposes inc(). A wrapper function.
- */
-static PyObject *py_inc(PyObject* /*self*/, PyObject* args) {
-    long i;
-    printf("c: py_inc called\n");
-    if (!PyArg_ParseTuple(args, "l", &i))
-        return NULL;
-    return Py_BuildValue("l", inc(i));
-}
-
-/**
- * Adds a line to the current graphic document.
- */
-void rsPyAddLine(double x1, double y1, double x2, double y2) {
-    //printf("c: addLine called\n");
-    //printf("c: parameter from python: %f\n", x1);
-
-    Drawing* graphic = RS_SIMPLEPYTHON->getGraphic();
-    if (graphic!=NULL) {
-        graphic->addEntity(new RS_Line(graphic,
-                                       RS_LineData(RS_Vector(x1, y1),
-                                                   RS_Vector(x2, y2))));
-    } else {
-        std::cerr << "rsPyAddLine: No graphic object set.\n";
-    }
-}
-
-/**
- * Python wrapper.
- */
-static PyObject *py_rsPyAddLine(PyObject* /*self*/, PyObject* args) {
-    double x1, y1, x2, y2;
-    //printf("c: py_rsPyAddLine called\n");
-    if (!PyArg_ParseTuple(args, "dddd", &x1, &y1, &x2, &y2)) {
-        return NULL;
-    }
-    rsPyAddLine(x1, y1, x2, y2);
-    return Py_BuildValue("d", 1);
-}
-
-/**
- * The qcadlib module's function table.
- */
-static PyMethodDef rsQCadMethods[] =
-    {
-        {"inc",     py_inc,     1,
-         "a silly example method"},
-        {"rsPyAddLine", py_rsPyAddLine, 1,
-         "adds a line to the current document"},
-        {NULL,      NULL}       /* sentinel */
-    };
-
-/**
- * Python will call this when the qcadlib module is imported.
- */
-void init_pyextension() {
-    printf("c: adding module: qcad\n");
-    PyImport_AddModule("qcad");
-    Py_InitModule("qcad", rsQCadMethods);
-    printf("c: module qcad: OK\n");
-}
-
-#endif
diff --git a/src/base/simplepython.h b/src/base/simplepython.h
deleted file mode 100644 (file)
index 031a82e..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-#ifndef __SIMPLEPYTHON_H__
-#define __SIMPLEPYTHON_H__
-
-#ifdef RS_OPT_SIMPLEPYTHON
-
-#include "Python.h"
-
-#include "drawing.h"
-
-#define __SIMPLEPYTHON RS_SimplePython::instance()
-
-/**
- * Python scripting support.
- *
- * OBSOLETE
- *
- * @author Andrew Mustun
- */
-class RS_SimplePython
-{
-       private:
-               RS_SimplePython()
-               {
-                       graphic = NULL;
-               }
-
-       public:
-               static RS_SimplePython * instance();
-
-               void setGraphic(Drawing* g)
-               {
-                       graphic = g;
-               }
-
-               Drawing * getGraphic()
-               {
-                       return graphic;
-               }
-
-               int launch(const QString& script);
-
-       private:
-               static RS_SimplePython * uniqueInstance;
-
-               Drawing * graphic;
-};
-
-/**
- * Global method needed by the python lib for initialisation.
- */
-void init_pyextension();
-
-/**
- * Test method.
- */
-long inc(long i);
-
-/**
- * Adds a line to the current graphic document.
- */
-void rsPyAddLine(double x1, double y1, double x2, double y2);
-
-#endif
-
-#endif
index dd6e8bc903a95ff784926bda382671deabafe8ed..24aaebff5ab221f29efad1e15dd12f8e3b7f4847 100644 (file)
 /**
  * Constructor.
  */
-RS_Snapper::RS_Snapper(RS_EntityContainer & c, GraphicView & gv):
+Snapper::Snapper(EntityContainer & c, GraphicView & gv):
        container(&c), graphicView(&gv), finished(false)
 {
        init();
 }
 
-RS_Snapper::RS_Snapper(void):
+Snapper::Snapper(void):
        container(NULL), graphicView(NULL), finished(false)
 {
        init();
@@ -43,14 +43,14 @@ RS_Snapper::RS_Snapper(void):
 /**
  * Destructor.
  */
-RS_Snapper::~RS_Snapper()
+Snapper::~Snapper()
 {
 }
 
 /**
  * Initialize (called by all constructors)
  */
-void RS_Snapper::init()
+void Snapper::init()
 {
        if (graphicView)
        {
@@ -76,19 +76,19 @@ void RS_Snapper::init()
                snapRange = 20;
 }
 
-void RS_Snapper::finish()
+void Snapper::finish()
 {
        finished = true;
 }
 
 //bleh
-void RS_Snapper::SetContainer(RS_EntityContainer * c)
+void Snapper::SetContainer(EntityContainer * c)
 {
        container = c;
 }
 
 //bleh
-void RS_Snapper::SetGraphicView(GraphicView * v)
+void Snapper::SetGraphicView(GraphicView * v)
 {
        graphicView = v;
 }
@@ -99,29 +99,29 @@ void RS_Snapper::SetGraphicView(GraphicView * v)
  * is the entity whos end point was caught. If the snap mode didn't require an
  * entity (e.g. free, grid) this method will return NULL.
  */
-RS_Entity * RS_Snapper::getKeyEntity()
+Entity * Snapper::getKeyEntity()
 {
        return keyEntity;
 }
 
 /** Sets a new snap mode. */
-void RS_Snapper::setSnapMode(RS2::SnapMode snapMode)
+void Snapper::setSnapMode(RS2::SnapMode snapMode)
 {
        this->snapMode = snapMode;
 }
 
 /** Sets a new snap restriction. */
-void RS_Snapper::setSnapRestriction(RS2::SnapRestriction snapRes)
+void Snapper::setSnapRestriction(RS2::SnapRestriction snapRes)
 {
        this->snapRes = snapRes;
 }
 
-RS2::SnapMode RS_Snapper::getSnapMode(void)
+RS2::SnapMode Snapper::getSnapMode(void)
 {
        return snapMode;
 }
 
-RS2::SnapRestriction RS_Snapper::getSnapRestriction(void)
+RS2::SnapRestriction Snapper::getSnapRestriction(void)
 {
        return snapRes;
 }
@@ -131,7 +131,7 @@ RS2::SnapRestriction RS_Snapper::getSnapRestriction(void)
  *
  * @see catchEntity()
  */
-void RS_Snapper::setSnapRange(int r)
+void Snapper::setSnapRange(int r)
 {
        snapRange = r;
 }
@@ -142,14 +142,14 @@ void RS_Snapper::setSnapRange(int r)
  * @param e A mouse event.
  * @return The coordinates of the point or an invalid vector.
  */
-Vector RS_Snapper::snapPoint(QMouseEvent * e)
+Vector Snapper::snapPoint(QMouseEvent * e)
 {
-       RS_DEBUG->print("RS_Snapper::snapPoint");
+       DEBUG->print("Snapper::snapPoint");
        snapSpot = Vector(false);
 
        if (!e)
        {
-               RS_DEBUG->print(RS_Debug::D_WARNING, "RS_Snapper::snapPoint: event is NULL");
+               DEBUG->print(Debug::D_WARNING, "Snapper::snapPoint: event is NULL");
                return snapSpot;
        }
 
@@ -211,10 +211,10 @@ Vector RS_Snapper::snapPoint(QMouseEvent * e)
                break;
        }
 
-       if (RS_DIALOGFACTORY)
-               RS_DIALOGFACTORY->updateCoordinateWidget(snapCoord, snapCoord - graphicView->getRelativeZero());
+       if (DIALOGFACTORY)
+               DIALOGFACTORY->updateCoordinateWidget(snapCoord, snapCoord - graphicView->getRelativeZero());
 
-       RS_DEBUG->print("RS_Snapper::snapPoint: OK");
+       DEBUG->print("Snapper::snapPoint: OK");
 
        return snapCoord;
 }
@@ -225,7 +225,7 @@ Vector RS_Snapper::snapPoint(QMouseEvent * e)
  * @param coord The mouse coordinate.
  * @return The coordinates of the point or an invalid vector.
  */
-Vector RS_Snapper::snapFree(Vector coord)
+Vector Snapper::snapFree(Vector coord)
 {
        keyEntity = NULL;
        return coord;
@@ -237,7 +237,7 @@ Vector RS_Snapper::snapFree(Vector coord)
  * @param coord The mouse coordinate.
  * @return The coordinates of the point or an invalid vector.
  */
-Vector RS_Snapper::snapEndpoint(Vector coord)
+Vector Snapper::snapEndpoint(Vector coord)
 {
        Vector vec(false);
        vec = container->getNearestEndpoint(coord, NULL);
@@ -251,25 +251,25 @@ Vector RS_Snapper::snapEndpoint(Vector coord)
  * @param coord The mouse coordinate.
  * @return The coordinates of the point or an invalid vector.
  */
-Vector RS_Snapper::snapGrid(Vector coord)
+Vector Snapper::snapGrid(Vector coord)
 {
-       RS_DEBUG->print("RS_Snapper::snapGrid begin");
+       DEBUG->print("Snapper::snapGrid begin");
 
        Vector vec(false);
        double dist = 0.0;
 
-       RS_Grid * grid = graphicView->getGrid();
+       Grid * grid = graphicView->getGrid();
 
-       RS_DEBUG->print("RS_Snapper::snapGrid 001");
+       DEBUG->print("Snapper::snapGrid 001");
 
        if (grid)
        {
-               RS_DEBUG->print("RS_Snapper::snapGrid 002");
+               DEBUG->print("Snapper::snapGrid 002");
                Vector * pts = grid->getPoints();
-               RS_DEBUG->print("RS_Snapper::snapGrid 003");
+               DEBUG->print("Snapper::snapGrid 003");
                int closest = -1;
                dist = 32000.00;
-               RS_DEBUG->print("RS_Snapper::snapGrid 004");
+               DEBUG->print("Snapper::snapGrid 004");
 
                for(int i=0; i<grid->count(); ++i)
                {
@@ -282,17 +282,17 @@ Vector RS_Snapper::snapGrid(Vector coord)
                        }
                }
 
-               RS_DEBUG->print("RS_Snapper::snapGrid 005");
+               DEBUG->print("Snapper::snapGrid 005");
 
                if (closest >= 0)
                        vec = pts[closest];
 
-               RS_DEBUG->print("RS_Snapper::snapGrid 006");
+               DEBUG->print("Snapper::snapGrid 006");
        }
 
        keyEntity = NULL;
 
-       RS_DEBUG->print("RS_Snapper::snapGrid end");
+       DEBUG->print("Snapper::snapGrid end");
 
        return vec;
 }
@@ -303,7 +303,7 @@ Vector RS_Snapper::snapGrid(Vector coord)
  * @param coord The mouse coordinate.
  * @return The coordinates of the point or an invalid vector.
  */
-Vector RS_Snapper::snapOnEntity(Vector coord)
+Vector Snapper::snapOnEntity(Vector coord)
 {
        Vector vec(false);
        vec = container->getNearestPointOnEntity(coord, true, NULL, &keyEntity);
@@ -317,7 +317,7 @@ Vector RS_Snapper::snapOnEntity(Vector coord)
  * @param coord The mouse coordinate.
  * @return The coordinates of the point or an invalid vector.
  */
-Vector RS_Snapper::snapCenter(Vector coord)
+Vector Snapper::snapCenter(Vector coord)
 {
        Vector vec(false);
        vec = container->getNearestCenter(coord, NULL);
@@ -331,7 +331,7 @@ Vector RS_Snapper::snapCenter(Vector coord)
  * @param coord The mouse coordinate.
  * @return The coordinates of the point or an invalid vector.
  */
-Vector RS_Snapper::snapMiddle(Vector coord)
+Vector Snapper::snapMiddle(Vector coord)
 {
        Vector vec(false);
        vec = container->getNearestMiddle(coord, NULL);
@@ -345,7 +345,7 @@ Vector RS_Snapper::snapMiddle(Vector coord)
  * @param coord The mouse coordinate.
  * @return The coordinates of the point or an invalid vector.
  */
-Vector RS_Snapper::snapDist(Vector coord)
+Vector Snapper::snapDist(Vector coord)
 {
        Vector vec(false);
        vec = container->getNearestDist(distance, coord, NULL);
@@ -359,7 +359,7 @@ Vector RS_Snapper::snapDist(Vector coord)
  * @param coord The mouse coordinate.
  * @return The coordinates of the point or an invalid vector.
  */
-Vector RS_Snapper::snapIntersection(Vector coord)
+Vector Snapper::snapIntersection(Vector coord)
 {
        Vector vec(false);
        vec = container->getNearestIntersection(coord, NULL);
@@ -374,7 +374,7 @@ Vector RS_Snapper::snapIntersection(Vector coord)
  * @param coord The uncorrected coordinates.
  * @return The corrected coordinates.
  */
-Vector RS_Snapper::restrictOrthogonal(Vector coord)
+Vector Snapper::restrictOrthogonal(Vector coord)
 {
        Vector rz = graphicView->getRelativeZero();
        Vector ret(coord);
@@ -397,7 +397,7 @@ Vector RS_Snapper::restrictOrthogonal(Vector coord)
  * @param coord The uncorrected coordinates.
  * @return The corrected coordinates.
  */
-Vector RS_Snapper::restrictHorizontal(Vector coord)
+Vector Snapper::restrictHorizontal(Vector coord)
 {
        Vector rz = graphicView->getRelativeZero();
 
@@ -411,7 +411,7 @@ Vector RS_Snapper::restrictHorizontal(Vector coord)
  * @param coord The uncorrected coordinates.
  * @return The corrected coordinates.
  */
-Vector RS_Snapper::restrictVertical(Vector coord)
+Vector Snapper::restrictVertical(Vector coord)
 {
        Vector rz = graphicView->getRelativeZero();
 
@@ -426,14 +426,14 @@ Vector RS_Snapper::restrictVertical(Vector coord)
  *        container
  * @return Pointer to the entity or NULL.
  */
-RS_Entity * RS_Snapper::catchEntity(const Vector & pos, RS2::ResolveLevel level)
+Entity * Snapper::catchEntity(const Vector & pos, RS2::ResolveLevel level)
 {
-       RS_DEBUG->print("RS_Snapper::catchEntity");
+       DEBUG->print("Snapper::catchEntity");
 
        // set default distance for points inside solids
        double dist = graphicView->toGraphDX(snapRange) * 0.9;
 
-       RS_Entity * entity = container->getNearestEntity(pos, &dist, level);
+       Entity * entity = container->getNearestEntity(pos, &dist, level);
 
        int idx = -1;
 
@@ -443,16 +443,16 @@ RS_Entity * RS_Snapper::catchEntity(const Vector & pos, RS2::ResolveLevel level)
        if (entity && dist <= graphicView->toGraphDX(snapRange))
        {
                // highlight:
-               RS_DEBUG->print("RS_Snapper::catchEntity: found: %d", idx);
+               DEBUG->print("Snapper::catchEntity: found: %d", idx);
                return entity;
        }
        else
        {
-               RS_DEBUG->print("RS_Snapper::catchEntity: not found");
+               DEBUG->print("Snapper::catchEntity: not found");
                return NULL;
        }
 
-       RS_DEBUG->print("RS_Snapper::catchEntity: OK");
+       DEBUG->print("Snapper::catchEntity: OK");
 }
 
 /**
@@ -463,7 +463,7 @@ RS_Entity * RS_Snapper::catchEntity(const Vector & pos, RS2::ResolveLevel level)
  *        container
  * @return Pointer to the entity or NULL.
  */
-RS_Entity * RS_Snapper::catchEntity(QMouseEvent * e, RS2::ResolveLevel level)
+Entity * Snapper::catchEntity(QMouseEvent * e, RS2::ResolveLevel level)
 {
     return catchEntity(Vector(graphicView->toGraphX(e->x()),
                graphicView->toGraphY(e->y())), level);
@@ -472,7 +472,7 @@ RS_Entity * RS_Snapper::catchEntity(QMouseEvent * e, RS2::ResolveLevel level)
 /**
  * Suspends this snapper while another action takes place.
  */
-/*virtual*/ void RS_Snapper::suspend()
+/*virtual*/ void Snapper::suspend()
 {
 #warning "!!! This may need to have SetVisibility() called !!!"
 //     deleteSnapper();
@@ -482,7 +482,7 @@ RS_Entity * RS_Snapper::catchEntity(QMouseEvent * e, RS2::ResolveLevel level)
 /**
  * Resumes this snapper after it has been suspended.
  */
-/*virtual*/ void RS_Snapper::resume()
+/*virtual*/ void Snapper::resume()
 {
 #warning "!!! This may need to have SetVisibility() called !!!"
 //     drawSnapper();
@@ -491,27 +491,27 @@ RS_Entity * RS_Snapper::catchEntity(QMouseEvent * e, RS2::ResolveLevel level)
 /**
  * Hides the snapper options.
  */
-/*virtual*/ void RS_Snapper::hideOptions()
+/*virtual*/ void Snapper::hideOptions()
 {
-       if (snapMode == RS2::SnapDist && RS_DIALOGFACTORY)
-               RS_DIALOGFACTORY->requestSnapDistOptions(distance, false);
+       if (snapMode == RS2::SnapDist && DIALOGFACTORY)
+               DIALOGFACTORY->requestSnapDistOptions(distance, false);
 }
 
 /**
  * Shows the snapper options.
  */
-/*virtual*/ void RS_Snapper::showOptions()
+/*virtual*/ void Snapper::showOptions()
 {
-       if (snapMode == RS2::SnapDist && RS_DIALOGFACTORY)
-               RS_DIALOGFACTORY->requestSnapDistOptions(distance, true);
+       if (snapMode == RS2::SnapDist && DIALOGFACTORY)
+               DIALOGFACTORY->requestSnapDistOptions(distance, true);
 }
 
-void RS_Snapper::SetVisible(bool visibility/*= true*/)
+void Snapper::SetVisible(bool visibility/*= true*/)
 {
        visible = visibility;
 }
 
-bool RS_Snapper::Visible(void)
+bool Snapper::Visible(void)
 {
        return visible;
 }
@@ -522,7 +522,7 @@ need to move the toGuiX/Y() functions into another class as static functions.
 Further inspection seems to rule this out as they are pretty well coupled to the
 GraphicView class... What to do?
 */
-void RS_Snapper::Draw(GraphicView * view, PaintInterface * painter)
+void Snapper::Draw(GraphicView * view, PaintInterface * painter)
 {
        if (finished || !snapSpot.valid || !snapCoord.valid)
                return;
@@ -533,14 +533,14 @@ void RS_Snapper::Draw(GraphicView * view, PaintInterface * painter)
 //     if (snapCoord.valid)
 //     {
        // Snap point (need to make sure the brush is NULL!)
-//     painter->setPen(RS_Pen(RS_Color(0, 127, 255), RS2::Width00, RS2::DashLine));
-       painter->setPen(RS_Pen(RS_Color(255, 127, 0), RS2::Width00, RS2::DashLine));
+//     painter->setPen(Pen(Color(0, 127, 255), RS2::Width00, RS2::DashLine));
+       painter->setPen(Pen(Color(255, 127, 0), RS2::Width00, RS2::DashLine));
        painter->drawCircle(view->toGui(snapCoord), 4);
 
        // Crosshairs
        if (showCrosshairs)
        {
-               painter->setPen(RS_Pen(RS_Color(0, 255, 255), RS2::Width00, RS2::DashLine));
+               painter->setPen(Pen(Color(0, 255, 255), RS2::Width00, RS2::DashLine));
                painter->drawLine(Vector(0, view->toGuiY(snapCoord.y)),
                        Vector(view->getWidth(), view->toGuiY(snapCoord.y)));
                painter->drawLine(Vector(view->toGuiX(snapCoord.x), 0),
index 990e4aea1170d0300ad9c807a182baec904a43a5..a37cf3305313d1e43355d815465d8b50904d282b 100644 (file)
@@ -2,11 +2,11 @@
 #define __SNAPPER_H__
 
 #include <QtCore>
-#include "rs.h"
+#include "enums.h"
 #include "vector.h"
 
-class RS_Entity;
-class RS_EntityContainer;
+class Entity;
+class EntityContainer;
 class GraphicView;
 class PaintInterface;
 
@@ -20,19 +20,19 @@ class PaintInterface;
  *
  * @author Andrew Mustun
  */
-class RS_Snapper
+class Snapper
 {
        public:
-               RS_Snapper(RS_EntityContainer & container, GraphicView & graphicView);
-               RS_Snapper();
-               virtual ~RS_Snapper();
+               Snapper(EntityContainer & container, GraphicView & graphicView);
+               Snapper();
+               virtual ~Snapper();
 
                void init();
                void finish();
 
-               void SetContainer(RS_EntityContainer *);
+               void SetContainer(EntityContainer *);
                void SetGraphicView(GraphicView *);
-               RS_Entity * getKeyEntity();
+               Entity * getKeyEntity();
                void setSnapMode(RS2::SnapMode snapMode);
                void setSnapRestriction(RS2::SnapRestriction snapRes);
                RS2::SnapMode getSnapMode(void);
@@ -53,8 +53,8 @@ class RS_Snapper
                Vector restrictHorizontal(Vector coord);
                Vector restrictVertical(Vector coord);
 
-               RS_Entity * catchEntity(const Vector & pos, RS2::ResolveLevel level = RS2::ResolveNone);
-               RS_Entity * catchEntity(QMouseEvent * e, RS2::ResolveLevel level = RS2::ResolveNone);
+               Entity * catchEntity(const Vector & pos, RS2::ResolveLevel level = RS2::ResolveNone);
+               Entity * catchEntity(QMouseEvent * e, RS2::ResolveLevel level = RS2::ResolveNone);
 
                virtual void suspend();
                virtual void resume();
@@ -97,9 +97,9 @@ for setting the coordinates?
 //             void xorSnapper();
 
        protected:
-               RS_EntityContainer * container;
+               EntityContainer * container;
                GraphicView * graphicView;
-               RS_Entity * keyEntity;
+               Entity * keyEntity;
                Vector snapCoord;
                Vector snapSpot;
                RS2::SnapMode snapMode;
index 5fcb0440ffcfaf6cfd1cd5a2d7ae7aad091eff9e..11eb76ab521e3358b79a407bf30258f8e4ba33dd 100644 (file)
 /**
  * Default constructor.
  */
-RS_Solid::RS_Solid(RS_EntityContainer * parent, const RS_SolidData & d):
-       RS_AtomicEntity(parent), data(d)
+Solid::Solid(EntityContainer * parent, const SolidData & d):
+       AtomicEntity(parent), data(d)
 {
        calculateBorders();
 }
 
-/*virtual*/ RS_Entity * RS_Solid::clone()
+/*virtual*/ Entity * Solid::clone()
 {
-       RS_Solid * s = new RS_Solid(*this);
+       Solid * s = new Solid(*this);
        s->initId();
        return s;
 }
 
 /**    @return RS_ENTITY_POINT */
-/*virtual*/ RS2::EntityType RS_Solid::rtti() const
+/*virtual*/ RS2::EntityType Solid::rtti() const
 {
        return RS2::EntitySolid;
 }
@@ -45,7 +45,7 @@ RS_Solid::RS_Solid(RS_EntityContainer * parent, const RS_SolidData & d):
 /**
  * @return Start point of the entity.
  */
-/*virtual*/ Vector RS_Solid::getStartpoint() const
+/*virtual*/ Vector Solid::getStartpoint() const
 {
        return Vector(false);
 }
@@ -53,19 +53,19 @@ RS_Solid::RS_Solid(RS_EntityContainer * parent, const RS_SolidData & d):
 /**
  * @return End point of the entity.
  */
-/*virtual*/ Vector RS_Solid::getEndpoint() const
+/*virtual*/ Vector Solid::getEndpoint() const
 {
        return Vector(false);
 }
 
 /** @return Copy of data that defines the point. */
-RS_SolidData RS_Solid::getData() const
+SolidData Solid::getData() const
 {
        return data;
 }
 
 /** @return true if this is a triangle. */
-bool RS_Solid::isTriangle()
+bool Solid::isTriangle()
 {
        return !data.corner[3].valid;
 }
@@ -73,13 +73,13 @@ bool RS_Solid::isTriangle()
 /**
  * @return Corner number 'num'.
  */
-Vector RS_Solid::getCorner(int num)
+Vector Solid::getCorner(int num)
 {
        if (num >= 0 && num < 4)
                return data.corner[num];
        else
        {
-               RS_DEBUG->print("Illegal corner requested from Solid", RS_Debug::D_WARNING);
+               DEBUG->print("Illegal corner requested from Solid", Debug::D_WARNING);
                return Vector(false);
        }
 }
@@ -91,7 +91,7 @@ Vector RS_Solid::getCorner(int num)
  * @param angle Direction of the arrow.
  * @param arrowSize Size of arrow (length).
  */
-void RS_Solid::shapeArrow(const Vector & point, double angle, double arrowSize)
+void Solid::shapeArrow(const Vector & point, double angle, double arrowSize)
 {
        double cosv1, sinv1, cosv2, sinv2;
        double arrowSide = arrowSize / cos(0.165);
@@ -109,7 +109,7 @@ void RS_Solid::shapeArrow(const Vector & point, double angle, double arrowSize)
        calculateBorders();
 }
 
-void RS_Solid::calculateBorders()
+void Solid::calculateBorders()
 {
        resetBorders();
 
@@ -123,7 +123,7 @@ void RS_Solid::calculateBorders()
        }
 }
 
-Vector RS_Solid::getNearestEndpoint(const Vector & coord, double * dist)
+Vector Solid::getNearestEndpoint(const Vector & coord, double * dist)
 {
        double minDist = RS_MAXDOUBLE;
        double curDist;
@@ -152,14 +152,14 @@ Vector RS_Solid::getNearestEndpoint(const Vector & coord, double * dist)
 /**
  * @todo Implement this.
  */
-Vector RS_Solid::getNearestPointOnEntity(const Vector & /*coord*/, bool /*onEntity*/,
-       double * /*dist*/, RS_Entity ** /*entity*/)
+Vector Solid::getNearestPointOnEntity(const Vector & /*coord*/, bool /*onEntity*/,
+       double * /*dist*/, Entity ** /*entity*/)
 {
        Vector ret(false);
        return ret;
 }
 
-Vector RS_Solid::getNearestCenter(const Vector & /*coord*/, double * dist)
+Vector Solid::getNearestCenter(const Vector & /*coord*/, double * dist)
 {
        if (dist)
                *dist = RS_MAXDOUBLE;
@@ -167,7 +167,7 @@ Vector RS_Solid::getNearestCenter(const Vector & /*coord*/, double * dist)
        return Vector(false);
 }
 
-Vector RS_Solid::getNearestMiddle(const Vector & /*coord*/, double * dist)
+Vector Solid::getNearestMiddle(const Vector & /*coord*/, double * dist)
 {
        if (dist)
                *dist = RS_MAXDOUBLE;
@@ -175,7 +175,7 @@ Vector RS_Solid::getNearestMiddle(const Vector & /*coord*/, double * dist)
        return Vector(false);
 }
 
-Vector RS_Solid::getNearestDist(double /*distance*/, const Vector & /*coord*/, double * dist)
+Vector Solid::getNearestDist(double /*distance*/, const Vector & /*coord*/, double * dist)
 {
        if (dist)
                *dist = RS_MAXDOUBLE;
@@ -188,13 +188,13 @@ Vector RS_Solid::getNearestDist(double /*distance*/, const Vector & /*coord*/, d
  *
  * @todo implement
  */
-double RS_Solid::getDistanceToPoint(const Vector & /*coord*/, RS_Entity ** /*entity*/,
+double Solid::getDistanceToPoint(const Vector & /*coord*/, Entity ** /*entity*/,
        RS2::ResolveLevel /*level*/, double /*solidDist*/)
 {
        return RS_MAXDOUBLE;
 }
 
-void RS_Solid::move(Vector offset)
+void Solid::move(Vector offset)
 {
        for(int i=0; i<4; ++i)
                data.corner[i].move(offset);
@@ -202,7 +202,7 @@ void RS_Solid::move(Vector offset)
        calculateBorders();
 }
 
-void RS_Solid::rotate(Vector center, double angle)
+void Solid::rotate(Vector center, double angle)
 {
        for(int i=0; i<4; ++i)
                data.corner[i].rotate(center, angle);
@@ -210,7 +210,7 @@ void RS_Solid::rotate(Vector center, double angle)
        calculateBorders();
 }
 
-void RS_Solid::scale(Vector center, Vector factor)
+void Solid::scale(Vector center, Vector factor)
 {
        for(int i=0; i<4; ++i)
                data.corner[i].scale(center, factor);
@@ -218,7 +218,7 @@ void RS_Solid::scale(Vector center, Vector factor)
        calculateBorders();
 }
 
-void RS_Solid::mirror(Vector axisPoint1, Vector axisPoint2)
+void Solid::mirror(Vector axisPoint1, Vector axisPoint2)
 {
        for(int i=0; i<4; ++i)
                data.corner[i].mirror(axisPoint1, axisPoint2);
@@ -226,12 +226,12 @@ void RS_Solid::mirror(Vector axisPoint1, Vector axisPoint2)
        calculateBorders();
 }
 
-void RS_Solid::draw(PaintInterface * painter, GraphicView * view, double /*patternOffset*/)
+void Solid::draw(PaintInterface * painter, GraphicView * view, double /*patternOffset*/)
 {
        if (!painter || !view)
                return;
 
-       RS_SolidData d = getData();
+       SolidData d = getData();
 
        if (isTriangle())
                painter->fillTriangle(view->toGui(getCorner(0)), view->toGui(getCorner(1)),
@@ -241,7 +241,7 @@ void RS_Solid::draw(PaintInterface * painter, GraphicView * view, double /*patte
 /**
  * Dumps the point's data to stdout.
  */
-std::ostream & operator<<(std::ostream & os, const RS_Solid & p)
+std::ostream & operator<<(std::ostream & os, const Solid & p)
 {
        os << " Solid: " << p.getData() << "\n";
        return os;
index a4b457895be161c77fcc83678995ce731cbec5d6..62de485e05c79ae5d8c0e8fe21a88acf3a8ff7d9 100644 (file)
@@ -7,13 +7,13 @@
 /**
  * Holds the data that defines a solid.
  */
-class RS_SolidData
+class SolidData
 {
        public:
                /**
                 * Default constructor. Leaves the data object uninitialized.
                 */
-               RS_SolidData()
+               SolidData()
                {
                        for(int i=0; i<4; ++i)
                                corner[i] = Vector(false);
@@ -22,7 +22,7 @@ class RS_SolidData
                /**
                 * Constructor for a solid with 3 corners.
                 */
-               RS_SolidData(const Vector & corner1, const Vector & corner2, const Vector & corner3)
+               SolidData(const Vector & corner1, const Vector & corner2, const Vector & corner3)
                {
                        corner[0] = corner1;
                        corner[1] = corner2;
@@ -33,7 +33,7 @@ class RS_SolidData
                /**
                 * Constructor for a solid with 4 corners.
                 */
-               RS_SolidData(const Vector & corner1, const Vector & corner2, const Vector & corner3, const Vector & corner4)
+               SolidData(const Vector & corner1, const Vector & corner2, const Vector & corner3, const Vector & corner4)
                {
                        corner[0] = corner1;
                        corner[1] = corner2;
@@ -41,9 +41,9 @@ class RS_SolidData
                        corner[3] = corner4;
                }
 
-               friend class RS_Solid;
+               friend class Solid;
 
-               friend std::ostream & operator<<(std::ostream & os, const RS_SolidData & pd)
+               friend std::ostream & operator<<(std::ostream & os, const SolidData & pd)
                {
                        os << "(";
 
@@ -63,27 +63,27 @@ class RS_SolidData
  *
  * @author Andrew Mustun
  */
-class RS_Solid: public RS_AtomicEntity
+class Solid: public AtomicEntity
 {
        public:
-               RS_Solid(RS_EntityContainer * parent, const RS_SolidData & d);
+               Solid(EntityContainer * parent, const SolidData & d);
 
-               virtual RS_Entity * clone();
+               virtual Entity * clone();
                virtual RS2::EntityType rtti() const;
                virtual Vector getStartpoint() const;
                virtual Vector getEndpoint() const;
-               RS_SolidData getData() const;
+               SolidData getData() const;
                bool isTriangle();
                Vector getCorner(int num);
                void shapeArrow(const Vector & point, double angle, double arrowSize);
 
                virtual Vector getNearestEndpoint(const Vector & coord, double * dist = NULL);
                virtual Vector getNearestPointOnEntity(const Vector & coord, bool onEntity = true,
-                       double * dist = NULL, RS_Entity ** entity = NULL);
+                       double * dist = NULL, Entity ** entity = NULL);
                virtual Vector getNearestCenter(const Vector & coord, double * dist = NULL);
                virtual Vector getNearestMiddle(const Vector & coord, double * dist = NULL);
                virtual Vector getNearestDist(double distance, const Vector & coord, double * dist = NULL);
-               virtual double getDistanceToPoint(const Vector & coord, RS_Entity ** entity = NULL,
+               virtual double getDistanceToPoint(const Vector & coord, Entity ** entity = NULL,
                        RS2::ResolveLevel level = RS2::ResolveNone, double solidDist = RS_MAXDOUBLE);
                virtual void move(Vector offset);
                virtual void rotate(Vector center, double angle);
@@ -91,13 +91,13 @@ class RS_Solid: public RS_AtomicEntity
                virtual void mirror(Vector axisPoint1, Vector axisPoint2);
                virtual void draw(PaintInterface * painter, GraphicView * view, double patternOffset = 0.0);
 
-               friend std::ostream & operator<<(std::ostream & os, const RS_Solid & p);
+               friend std::ostream & operator<<(std::ostream & os, const Solid & p);
 
                /** Recalculates the borders of this entity. */
                virtual void calculateBorders ();
 
        protected:
-               RS_SolidData data;
+               SolidData data;
 };
 
 #endif
index c28a2323d59a4e428ff40cd18bcbe97199dd6dd6..37d9ee0bddb8ace7bc7c23d59c045ce7087b8650 100644 (file)
@@ -24,8 +24,8 @@
 /**
  * Constructor.
  */
-RS_Spline::RS_Spline(RS_EntityContainer * parent, const RS_SplineData & d):
-       RS_EntityContainer(parent), data(d)
+Spline::Spline(EntityContainer * parent, const SplineData & d):
+       EntityContainer(parent), data(d)
 {
        calculateBorders();
 }
@@ -33,13 +33,13 @@ RS_Spline::RS_Spline(RS_EntityContainer * parent, const RS_SplineData & d):
 /**
  * Destructor.
  */
-RS_Spline::~RS_Spline()
+Spline::~Spline()
 {
 }
 
-RS_Entity * RS_Spline::clone()
+Entity * Spline::clone()
 {
-       RS_Spline * l = new RS_Spline(*this);
+       Spline * l = new Spline(*this);
 #warning "!!! Need to deal with setAutoDelete() Qt3->Qt4 !!!"
 //     l->entities.setAutoDelete(entities.autoDelete());
        l->initId();
@@ -48,44 +48,44 @@ RS_Entity * RS_Spline::clone()
 }
 
 /**    @return RS2::EntitySpline */
-/*virtual*/ RS2::EntityType RS_Spline::rtti() const
+/*virtual*/ RS2::EntityType Spline::rtti() const
 {
        return RS2::EntitySpline;
 }
 
 /** @return false */
-/*virtual*/ bool RS_Spline::isEdge() const
+/*virtual*/ bool Spline::isEdge() const
 {
        return false;
 }
 
 /** @return Copy of data that defines the spline. */
-RS_SplineData RS_Spline::getData() const
+SplineData Spline::getData() const
 {
        return data;
 }
 
 /** Sets the splines degree (1-3). */
-void RS_Spline::setDegree(int deg)
+void Spline::setDegree(int deg)
 {
        if (deg >= 1 && deg <= 3)
                data.degree = deg;
 }
 
 /** @return Degree of this spline curve (1-3).*/
-int RS_Spline::getDegree()
+int Spline::getDegree()
 {
        return data.degree;
 }
 
 /** @return 0. */
-int RS_Spline::getNumberOfKnots()
+int Spline::getNumberOfKnots()
 {
        return 0;
 }
 
 /** @return Number of control points. */
-int RS_Spline::getNumberOfControlPoints()
+int Spline::getNumberOfControlPoints()
 {
        return data.controlPoints.count();
 }
@@ -94,7 +94,7 @@ int RS_Spline::getNumberOfControlPoints()
  * @retval true if the spline is closed.
  * @retval false otherwise.
  */
-bool RS_Spline::isClosed()
+bool Spline::isClosed()
 {
        return data.closed;
 }
@@ -102,13 +102,13 @@ bool RS_Spline::isClosed()
 /**
  * Sets the closed falg of this spline.
  */
-void RS_Spline::setClosed(bool c)
+void Spline::setClosed(bool c)
 {
        data.closed = c;
        update();
 }
 
-void RS_Spline::calculateBorders()
+void Spline::calculateBorders()
 {
     /*minV = Vector::minimum(data.startpoint, data.endpoint);
     maxV = Vector::maximum(data.startpoint, data.endpoint);
@@ -123,7 +123,7 @@ void RS_Spline::calculateBorders()
     */
 }
 
-VectorSolutions RS_Spline::getRefPoints()
+VectorSolutions Spline::getRefPoints()
 {
        VectorSolutions ret(data.controlPoints.count());
 
@@ -138,25 +138,25 @@ VectorSolutions RS_Spline::getRefPoints()
        return ret;
 }
 
-Vector RS_Spline::getNearestRef(const Vector & coord, double * dist)
+Vector Spline::getNearestRef(const Vector & coord, double * dist)
 {
        //return getRefPoints().getClosest(coord, dist);
-       return RS_Entity::getNearestRef(coord, dist);
+       return Entity::getNearestRef(coord, dist);
 }
 
-Vector RS_Spline::getNearestSelectedRef(const Vector & coord, double * dist)
+Vector Spline::getNearestSelectedRef(const Vector & coord, double * dist)
 {
        //return getRefPoints().getClosest(coord, dist);
-       return RS_Entity::getNearestSelectedRef(coord, dist);
+       return Entity::getNearestSelectedRef(coord, dist);
 }
 
 /**
  * Updates the internal polygon of this spline. Called when the
  * spline or it's data, position, .. changes.
  */
-void RS_Spline::update()
+void Spline::update()
 {
-       RS_DEBUG->print("RS_Spline::update");
+       DEBUG->print("Spline::update");
 
        clear();
 
@@ -165,13 +165,13 @@ void RS_Spline::update()
 
        if (data.degree < 1 || data.degree > 3)
        {
-               RS_DEBUG->print("RS_Spline::update: invalid degree: %d", data.degree);
+               DEBUG->print("Spline::update: invalid degree: %d", data.degree);
                return;
        }
 
        if (data.controlPoints.count() < (uint)data.degree + 1)
        {
-               RS_DEBUG->print("RS_Spline::update: not enough control points");
+               DEBUG->print("Spline::update: not enough control points");
                return;
        }
 
@@ -207,7 +207,7 @@ void RS_Spline::update()
                b[i + 1] = (*it).y;
                b[i + 2] = 0.0;
 
-               RS_DEBUG->print("RS_Spline::update: b[%d]: %f/%f", i, b[i], b[i + 1]);
+               DEBUG->print("Spline::update: b[%d]: %f/%f", i, b[i], b[i + 1]);
                i += 3;
        }
 
@@ -229,9 +229,9 @@ void RS_Spline::update()
        {
                if (prev.valid)
                {
-                       RS_Line * line = new RS_Line(this, RS_LineData(prev, Vector(p[i], p[i + 1])));
+                       Line * line = new Line(this, LineData(prev, Vector(p[i], p[i + 1])));
                        line->setLayer(NULL);
-                       line->setPen(RS_Pen(RS2::FlagInvalid));
+                       line->setPen(Pen(RS2::FlagInvalid));
                        addEntity(line);
                }
 
@@ -245,7 +245,7 @@ void RS_Spline::update()
        delete[] p;
 }
 
-Vector RS_Spline::getNearestEndpoint(const Vector & coord, double * dist)
+Vector Spline::getNearestEndpoint(const Vector & coord, double * dist)
 {
     double minDist = RS_MAXDOUBLE;
     double d;
@@ -266,14 +266,14 @@ Vector RS_Spline::getNearestEndpoint(const Vector & coord, double * dist)
 }
 
 /*
-// The default implementation of RS_EntityContainer is inaccurate but
+// The default implementation of EntityContainer is inaccurate but
 //   has to do for now..
-Vector RS_Spline::getNearestPointOnEntity(const Vector& coord,
-        bool onEntity, double* dist, RS_Entity** entity) {
+Vector Spline::getNearestPointOnEntity(const Vector& coord,
+        bool onEntity, double* dist, Entity** entity) {
 }
 */
 
-Vector RS_Spline::getNearestCenter(const Vector & /*coord*/, double * dist)
+Vector Spline::getNearestCenter(const Vector & /*coord*/, double * dist)
 {
        if (dist != NULL)
                *dist = RS_MAXDOUBLE;
@@ -281,7 +281,7 @@ Vector RS_Spline::getNearestCenter(const Vector & /*coord*/, double * dist)
        return Vector(false);
 }
 
-Vector RS_Spline::getNearestMiddle(const Vector & /*coord*/, double * dist)
+Vector Spline::getNearestMiddle(const Vector & /*coord*/, double * dist)
 {
        if (dist!=NULL)
                *dist = RS_MAXDOUBLE;
@@ -289,7 +289,7 @@ Vector RS_Spline::getNearestMiddle(const Vector & /*coord*/, double * dist)
        return Vector(false);
 }
 
-Vector RS_Spline::getNearestDist(double /*distance*/, const Vector & /*coord*/, double * dist)
+Vector Spline::getNearestDist(double /*distance*/, const Vector & /*coord*/, double * dist)
 {
        if (dist != NULL)
                *dist = RS_MAXDOUBLE;
@@ -297,7 +297,7 @@ Vector RS_Spline::getNearestDist(double /*distance*/, const Vector & /*coord*/,
        return Vector(false);
 }
 
-void RS_Spline::move(Vector offset)
+void Spline::move(Vector offset)
 {
 //     Q3ValueList<Vector>::iterator it;
        QList<Vector>::iterator it;
@@ -308,7 +308,7 @@ void RS_Spline::move(Vector offset)
        update();
 }
 
-void RS_Spline::rotate(Vector center, double angle)
+void Spline::rotate(Vector center, double angle)
 {
 //     Q3ValueList<Vector>::iterator it;
        QList<Vector>::iterator it;
@@ -319,7 +319,7 @@ void RS_Spline::rotate(Vector center, double angle)
        update();
 }
 
-void RS_Spline::scale(Vector center, Vector factor)
+void Spline::scale(Vector center, Vector factor)
 {
 //     Q3ValueList<Vector>::iterator it;
        QList<Vector>::iterator it;
@@ -330,7 +330,7 @@ void RS_Spline::scale(Vector center, Vector factor)
        update();
 }
 
-void RS_Spline::mirror(Vector axisPoint1, Vector axisPoint2)
+void Spline::mirror(Vector axisPoint1, Vector axisPoint2)
 {
 //     Q3ValueList<Vector>::iterator it;
        QList<Vector>::iterator it;
@@ -341,7 +341,7 @@ void RS_Spline::mirror(Vector axisPoint1, Vector axisPoint2)
        update();
 }
 
-void RS_Spline::moveRef(const Vector & ref, const Vector & offset)
+void Spline::moveRef(const Vector & ref, const Vector & offset)
 {
 //     Q3ValueList<Vector>::iterator it;
        QList<Vector>::iterator it;
@@ -355,26 +355,26 @@ void RS_Spline::moveRef(const Vector & ref, const Vector & offset)
        update();
 }
 
-void RS_Spline::draw(PaintInterface * painter, GraphicView * view, double /*patternOffset*/)
+void Spline::draw(PaintInterface * painter, GraphicView * view, double /*patternOffset*/)
 {
        if (painter == NULL || view == NULL)
                return;
 
-       RS_Entity * e = firstEntity(RS2::ResolveNone);
+       Entity * e = firstEntity(RS2::ResolveNone);
        double offset = 0.0;
 
        if (e != NULL)
        {
                view->drawEntity(e);
                offset += e->getLength();
-               //RS_DEBUG->print("offset: %f\nlength was: %f", offset, e->getLength());
+               //DEBUG->print("offset: %f\nlength was: %f", offset, e->getLength());
        }
 
-       for (RS_Entity * e=nextEntity(RS2::ResolveNone); e!=NULL; e = nextEntity(RS2::ResolveNone))
+       for (Entity * e=nextEntity(RS2::ResolveNone); e!=NULL; e = nextEntity(RS2::ResolveNone))
        {
                view->drawEntityPlain(e, -offset);
                offset += e->getLength();
-               //RS_DEBUG->print("offset: %f\nlength was: %f", offset, e->getLength());
+               //DEBUG->print("offset: %f\nlength was: %f", offset, e->getLength());
        }
 }
 
@@ -382,7 +382,7 @@ void RS_Spline::draw(PaintInterface * painter, GraphicView * view, double /*patt
  * Todo: draw the spline, user patterns.
  */
 /*
-void RS_Spline::draw(RS_Painter* painter, GraphicView* view) {
+void Spline::draw(RS_Painter* painter, GraphicView* view) {
    if (painter==NULL || view==NULL) {
        return;
    }
@@ -419,7 +419,7 @@ void RS_Spline::draw(RS_Painter* painter, GraphicView* view) {
        b[i+1] = (*it).y;
        b[i+2] = 0.0;
 
-       RS_DEBUG->print("RS_Spline::draw: b[%d]: %f/%f", i, b[i], b[i+1]);
+       DEBUG->print("Spline::draw: b[%d]: %f/%f", i, b[i], b[i+1]);
        i+=3;
    }
 
@@ -449,8 +449,8 @@ void RS_Spline::draw(RS_Painter* painter, GraphicView* view) {
 /**
  * @return The reference points of the spline.
  */
-//Q3ValueList<Vector> RS_Spline::getControlPoints()
-QList<Vector> RS_Spline::getControlPoints()
+//Q3ValueList<Vector> Spline::getControlPoints()
+QList<Vector> Spline::getControlPoints()
 {
        return data.controlPoints;
 }
@@ -458,7 +458,7 @@ QList<Vector> RS_Spline::getControlPoints()
 /**
  * Appends the given point to the control points.
  */
-void RS_Spline::addControlPoint(const Vector & v)
+void Spline::addControlPoint(const Vector & v)
 {
        data.controlPoints.append(v);
 }
@@ -466,7 +466,7 @@ void RS_Spline::addControlPoint(const Vector & v)
 /**
  * Removes the control point that was last added.
  */
-void RS_Spline::removeLastControlPoint()
+void Spline::removeLastControlPoint()
 {
        data.controlPoints.pop_back();
 }
@@ -475,7 +475,7 @@ void RS_Spline::removeLastControlPoint()
  * Generates B-Spline open knot vector with multiplicity
  * equal to the order at the ends.
  */
-void RS_Spline::knot(int num, int order, int knotVector[])
+void Spline::knot(int num, int order, int knotVector[])
 {
        knotVector[1] = 0;
 
@@ -495,7 +495,7 @@ void RS_Spline::knot(int num, int order, int knotVector[])
 /**
  * Generates rational B-spline basis functions for an open knot vector.
  */
-void RS_Spline::rbasis(int c, double t, int npts, int x[], double h[], double r[])
+void Spline::rbasis(int c, double t, int npts, int x[], double h[], double r[])
 {
        int nplusc;
        int i, k;
@@ -563,7 +563,7 @@ void RS_Spline::rbasis(int c, double t, int npts, int x[], double h[], double r[
 /**
  * Generates a rational B-spline curve using a uniform open knot vector.
  */
-void RS_Spline::rbspline(int npts, int k, int p1, double b[], double h[], double p[])
+void Spline::rbspline(int npts, int k, int p1, double b[], double h[], double p[])
 {
        int i, j, icount, jcount;
        int i1;
@@ -628,7 +628,7 @@ void RS_Spline::rbspline(int npts, int k, int p1, double b[], double h[], double
        delete[] nbasis;
 }
 
-void RS_Spline::knotu(int num, int order, int knotVector[])
+void Spline::knotu(int num, int order, int knotVector[])
 {
        int nplusc = num + order;
        int nplus2 = num + 2;
@@ -638,7 +638,7 @@ void RS_Spline::knotu(int num, int order, int knotVector[])
                knotVector[i] = i - 1;
 }
 
-void RS_Spline::rbsplinu(int npts, int k, int p1, double b[], double h[], double p[])
+void Spline::rbsplinu(int npts, int k, int p1, double b[], double h[], double p[])
 {
        int i, j, icount, jcount;
        int i1;
@@ -731,7 +731,7 @@ void RS_Spline::rbsplinu(int npts, int k, int p1, double b[], double h[], double
 /**
  * Dumps the spline's data to stdout.
  */
-std::ostream & operator<<(std::ostream & os, const RS_Spline & l)
+std::ostream & operator<<(std::ostream & os, const Spline & l)
 {
        os << " Spline: " << l.getData() << "\n";
        return os;
index dd6470bf86fca47857d0f538aa335ad25bf20a3b..3ea3fb9ed5816e1b6a3f1eefdba095d31fc44b79 100644 (file)
@@ -7,21 +7,21 @@
 /**
  * Holds the data that defines a line.
  */
-class RS_SplineData
+class SplineData
 {
        public:
                /**
                 * Default constructor. Leaves the data object uninitialized.
                 */
-               RS_SplineData() {}
+               SplineData() {}
 
-               RS_SplineData(int degree, bool closed)
+               SplineData(int degree, bool closed)
                {
                        this->degree = degree;
                        this->closed = closed;
                }
 
-               friend std::ostream & operator<<(std::ostream & os, const RS_SplineData & ld)
+               friend std::ostream & operator<<(std::ostream & os, const SplineData & ld)
                {
                        os << "( degree: " << ld.degree << " closed: " << ld.closed << ")";
                        return os;
@@ -42,16 +42,16 @@ class RS_SplineData
  *
  * @author Andrew Mustun
  */
-class RS_Spline: public RS_EntityContainer
+class Spline: public EntityContainer
 {
 public:
-    RS_Spline(RS_EntityContainer * parent, const RS_SplineData & d);
-    virtual ~RS_Spline();
+    Spline(EntityContainer * parent, const SplineData & d);
+    virtual ~Spline();
 
-    virtual RS_Entity * clone();
+    virtual Entity * clone();
     virtual RS2::EntityType rtti() const;
     virtual bool isEdge() const;
-    RS_SplineData getData() const;
+    SplineData getData() const;
        void setDegree(int deg);
        int getDegree();
     int getNumberOfKnots();
@@ -76,7 +76,7 @@ public:
     virtual void draw(PaintInterface * painter, GraphicView * view, double patternOffset = 0.0);
        QList<Vector> getControlPoints();
 
-    friend std::ostream & operator<<(std::ostream & os, const RS_Spline & l);
+    friend std::ostream & operator<<(std::ostream & os, const Spline & l);
 
     virtual void calculateBorders();
 
@@ -87,7 +87,7 @@ public:
        static void rbsplinu(int npts, int k, int p1, double b[], double h[], double p[]);
 
 protected:
-    RS_SplineData data;
+    SplineData data;
 };
 
 #endif
index 76896efcbc8f1a857ac5245bca5c50905b83f143..e27ec5470171e2861be0fccb4668bbcdbaf6ee55 100644 (file)
@@ -31,11 +31,11 @@ just me. >:-)
  * @param w Width
  * @param h Height
  */
-RS_StaticGraphicView::RS_StaticGraphicView(int w, int h, PaintInterface * p): /*painter(p),*/ width(w), height(h)
+StaticGraphicView::StaticGraphicView(int w, int h, PaintInterface * p): /*painter(p),*/ width(w), height(h)
 {
 //#warning "!!! PaintInterface * p passed in constructor is IGNORED !!!"
 //Not strictly true: it sets painter down below there...
-       setBackground(RS_Color(255, 255, 255));
+       setBackground(Color(255, 255, 255));
        painter = p;
        setBorders(5, 5, 5, 5);
 }
@@ -43,14 +43,14 @@ RS_StaticGraphicView::RS_StaticGraphicView(int w, int h, PaintInterface * p): /*
 /**
  * Destructor
  */
-RS_StaticGraphicView::~RS_StaticGraphicView()
+StaticGraphicView::~StaticGraphicView()
 {
 }
 
 /**
  * @return width of widget.
  */
-int RS_StaticGraphicView::getWidth()
+int StaticGraphicView::getWidth()
 {
        return width;
 }
@@ -58,7 +58,7 @@ int RS_StaticGraphicView::getWidth()
 /**
  * @return height of widget.
  */
-int RS_StaticGraphicView::getHeight()
+int StaticGraphicView::getHeight()
 {
        return height;
 }
@@ -66,33 +66,33 @@ int RS_StaticGraphicView::getHeight()
 /**
  * Handles paint events by redrawing the graphic in this view.
  */
-void RS_StaticGraphicView::paint()
+void StaticGraphicView::paint()
 {
-       RS_DEBUG->print("RS_StaticGraphicView::paint begin");
+       DEBUG->print("StaticGraphicView::paint begin");
        drawIt();
-       RS_DEBUG->print("RS_StaticGraphicView::paint end");
+       DEBUG->print("StaticGraphicView::paint end");
 }
 
-/*virtual*/ void RS_StaticGraphicView::redraw()
+/*virtual*/ void StaticGraphicView::redraw()
 {
 }
 
-/*virtual*/ void RS_StaticGraphicView::adjustOffsetControls()
+/*virtual*/ void StaticGraphicView::adjustOffsetControls()
 {
 }
 
-/*virtual*/ void RS_StaticGraphicView::adjustZoomControls()
+/*virtual*/ void StaticGraphicView::adjustZoomControls()
 {
 }
 
-/*virtual*/ void RS_StaticGraphicView::setMouseCursor(RS2::CursorType)
+/*virtual*/ void StaticGraphicView::setMouseCursor(RS2::CursorType)
 {
 }
 
-/*virtual*/ void RS_StaticGraphicView::emulateMouseMoveEvent()
+/*virtual*/ void StaticGraphicView::emulateMouseMoveEvent()
 {
 }
 
-/*virtual*/ void RS_StaticGraphicView::updateGridStatusWidget(const QString &)
+/*virtual*/ void StaticGraphicView::updateGridStatusWidget(const QString &)
 {
 }
index e9341082a283140476641b9a024733b31586924d..ab99b6592a257339b30b20986db550efcaf08bef 100644 (file)
@@ -9,11 +9,11 @@ class PaintInterface;
  * This is an implementation of a graphic viewer with a fixed size
  * for drawing onto fixed devices (such as bitmaps).
  */
-class RS_StaticGraphicView: public GraphicView
+class StaticGraphicView: public GraphicView
 {
        public:
-               RS_StaticGraphicView(int w, int h, PaintInterface * p);
-               virtual ~RS_StaticGraphicView();
+               StaticGraphicView(int w, int h, PaintInterface * p);
+               virtual ~StaticGraphicView();
 
                virtual int getWidth();
                virtual int getHeight();
index c581e717d31ee3c73fadf3f80840f52e4d21588c..4b7c663c8565f93de916272aca9f125ea13a26cd 100644 (file)
 #include <QTranslator>
 #include "settings.h"
 
-RS_System * RS_System::uniqueInstance = NULL;
+System * System::uniqueInstance = NULL;
 
 // Constructor
-RS_System::RS_System()
+System::System()
 {
        initialized = false;
 }
@@ -30,10 +30,10 @@ RS_System::RS_System()
 /**
  * @return Instance to the unique system object.
  */
-/*static*/ RS_System * RS_System::instance()
+/*static*/ System * System::instance()
 {
        if (uniqueInstance == NULL)
-               uniqueInstance = new RS_System();
+               uniqueInstance = new System();
 
        return uniqueInstance;
 }
@@ -41,14 +41,14 @@ RS_System::RS_System()
 /**
  * Initializes the system.
  *
- * @param appName Application name (e.g. "QCad II")
+ * @param appName Application name (e.g. "Architektonas")
  * @param appVersion Application version (e.g. "1.2.3")
  * @param appDirName Application directory name used for
  *     subdirectories in /usr, /etc ~/.
  * @param appDir Absolute application directory (e.g. /opt/qcad)
  *                 defaults to current directory.
  */
-void RS_System::init(const QString & appName, const QString & appVersion,
+void System::init(const QString & appName, const QString & appVersion,
        const QString & appDirName, const QString & appDir)
 {
        this->appName = appName;
@@ -65,8 +65,8 @@ void RS_System::init(const QString & appName, const QString & appVersion,
                this->appDir = appDir;
        }
 
-       RS_DEBUG->print("RS_System::init: System %s initialized.", appName.toLatin1().data());
-       RS_DEBUG->print("RS_System::init: App dir: %s", appDir.toLatin1().data());
+       DEBUG->print("System::init: System %s initialized.", appName.toLatin1().data());
+       DEBUG->print("System::init: App dir: %s", appDir.toLatin1().data());
        initialized = true;
 
        initLanguageList();
@@ -75,9 +75,9 @@ void RS_System::init(const QString & appName, const QString & appVersion,
 /**
  * Initializes the list of available translations.
  */
-void RS_System::initLanguageList()
+void System::initLanguageList()
 {
-       RS_DEBUG->print("RS_System::initLanguageList");
+       DEBUG->print("System::initLanguageList");
        QStringList lst = getFileList("qm", "qm");
 
        settings.beginGroup("Paths");
@@ -87,7 +87,7 @@ void RS_System::initLanguageList()
 
        for(QStringList::Iterator it=lst.begin(); it!=lst.end(); ++it)
        {
-               RS_DEBUG->print("RS_System::initLanguageList: qm file: %s", (*it).toLatin1().data());
+               DEBUG->print("System::initLanguageList: qm file: %s", (*it).toLatin1().data());
 
 //             int i1 = (*it).findRev('_');
                int i1 = (*it).lastIndexOf('_');
@@ -98,18 +98,18 @@ void RS_System::initLanguageList()
 //             if (languageList.find(l) == languageList.end())
                if (languageList.indexOf(l) == -1)
                {
-                       RS_DEBUG->print("RS_System::initLanguageList: append language: %s", l.toLatin1().data());
+                       DEBUG->print("System::initLanguageList: append language: %s", l.toLatin1().data());
                        languageList.append(l);
                }
        }
 
-       RS_DEBUG->print("RS_System::initLanguageList: OK");
+       DEBUG->print("System::initLanguageList: OK");
 }
 
 /**
  * Loads a different translation for the application GUI.
  */
-void RS_System::loadTranslation(const QString & lang, const QString & langCmd)
+void System::loadTranslation(const QString & lang, const QString & langCmd)
 {
        static QTranslator * tQt = NULL;
        static QTranslator * tQCad = NULL;
@@ -258,12 +258,12 @@ void RS_System::loadTranslation(const QString & lang, const QString & langCmd)
  * Checks if the system has been initialized and prints a warning
  * otherwise to stderr.
  */
-bool RS_System::checkInit()
+bool System::checkInit()
 {
        if (!initialized)
        {
-               RS_DEBUG->print(RS_Debug::D_WARNING, "RS_System::checkInit: System not initialized.\n"
-                       "Use RS_SYSTEM->init(appname, appdirname) to do so.");
+               DEBUG->print(Debug::D_WARNING, "System::checkInit: System not initialized.\n"
+                       "Use SYSTEM->init(appname, appdirname) to do so.");
        }
 
        return initialized;
@@ -272,7 +272,7 @@ bool RS_System::checkInit()
 /**
  * Creates all given directories in the user's home.
  */
-bool RS_System::createHomePath(const QString & p)
+bool System::createHomePath(const QString & p)
 {
        QDir dr;
 
@@ -287,12 +287,12 @@ bool RS_System::createHomePath(const QString & p)
 //             if (created.isEmpty() || QFileInfo(created).isDir() || dr.mkdir(created, true))
                if (created.isEmpty() || QFileInfo(created).isDir() || dr.mkdir(created))
                {
-                       RS_DEBUG->print("RS_System::createHomePath: Created directory '%s'",
+                       DEBUG->print("System::createHomePath: Created directory '%s'",
                                created.toLatin1().data());
                }
                else
                {
-                       RS_DEBUG->print(RS_Debug::D_ERROR, "RS_System::createHomePath: Cannot create directory '%s'",
+                       DEBUG->print(Debug::D_ERROR, "System::createHomePath: Cannot create directory '%s'",
                                created.toLatin1().data());
                        return false;
                }
@@ -304,7 +304,7 @@ bool RS_System::createHomePath(const QString & p)
 /**
  * @return Users home directory.
  */
-QString RS_System::getHomeDir()
+QString System::getHomeDir()
 {
 //     return QDir::homeDirPath();
        return QDir::homePath();
@@ -313,7 +313,7 @@ QString RS_System::getHomeDir()
 /**
  * @return Current directory.
  */
-QString RS_System::getCurrentDir()
+QString System::getCurrentDir()
 {
 //     return QDir::currentDirPath();
        return QDir::currentPath();
@@ -322,7 +322,7 @@ QString RS_System::getCurrentDir()
 /**
  * @return Application directory.
  */
-QString RS_System::getAppDir()
+QString System::getAppDir()
 {
        return appDir;
 }
@@ -330,7 +330,7 @@ QString RS_System::getAppDir()
 /**
  * @return A list of absolute paths to all font files found.
  */
-QStringList RS_System::getFontList()
+QStringList System::getFontList()
 {
        QStringList ret = getFileList("fonts", "cxf");
        return ret;
@@ -339,7 +339,7 @@ QStringList RS_System::getFontList()
 /**
  * @return A list of absolute paths to all hatch pattern files found.
  */
-QStringList RS_System::getPatternList()
+QStringList System::getPatternList()
 {
        QStringList ret = getFileList("patterns", "dxf");
        return ret;
@@ -348,7 +348,7 @@ QStringList RS_System::getPatternList()
 /**
  * @return A list of absolute paths to all script files found.
  */
-QStringList RS_System::getScriptList()
+QStringList System::getScriptList()
 {
        QStringList ret = getFileList("scripts/qsa", "qs");
        return ret;
@@ -357,7 +357,7 @@ QStringList RS_System::getScriptList()
 /**
  * @return A list of absolute paths to all machine configuration files found.
  */
-QStringList RS_System::getMachineList()
+QStringList System::getMachineList()
 {
        QStringList ret = getFileList("machines", "cxm");
        return ret;
@@ -366,7 +366,7 @@ QStringList RS_System::getMachineList()
 /**
  * @return Absolute path to the documentation.
  */
-QString RS_System::getDocPath()
+QString System::getDocPath()
 {
        QStringList lst = getDirectoryList("doc");
        return lst.first();
@@ -375,7 +375,7 @@ QString RS_System::getDocPath()
 /**
  * @return The application name.
  */
-QString RS_System::getAppName()
+QString System::getAppName()
 {
        return appName;
 }
@@ -383,7 +383,7 @@ QString RS_System::getAppName()
 /**
  * @return The application version.
  */
-QString RS_System::getAppVersion()
+QString System::getAppVersion()
 {
        return appVersion;
 }
@@ -394,7 +394,7 @@ QString RS_System::getAppVersion()
  *
  * @return List of the absolute paths of the files found.
  */
-QStringList RS_System::getFileList(const QString & subDirectory, const QString & fileExtension)
+QStringList System::getFileList(const QString & subDirectory, const QString & fileExtension)
 {
        checkInit();
 
@@ -448,7 +448,7 @@ QStringList RS_System::getFileList(const QString & subDirectory, const QString &
  * @return List of all directories in subdirectory 'subDirectory' in
  * all possible QCad directories.
  */
-QStringList RS_System::getDirectoryList(const QString & subDirectory)
+QStringList System::getDirectoryList(const QString & subDirectory)
 {
        QStringList dirList;
 
@@ -513,14 +513,14 @@ QStringList RS_System::getDirectoryList(const QString & subDirectory)
 
        QStringList ret;
 
-       RS_DEBUG->print("RS_System::getDirectoryList: Paths:");
+       DEBUG->print("System::getDirectoryList: Paths:");
 
        for(QStringList::Iterator it=dirList.begin(); it!=dirList.end(); ++it)
        {
                if (QFileInfo(*it).isDir())
                {
                        ret += (*it);
-                       RS_DEBUG->print((*it).toLatin1().data());
+                       DEBUG->print((*it).toLatin1().data());
 //printf("System: *it=\"%s\"\n", (*it).toAscii().data());
                }
        }
@@ -528,7 +528,7 @@ QStringList RS_System::getDirectoryList(const QString & subDirectory)
        return ret;
 }
 
-QStringList RS_System::getLanguageList()
+QStringList System::getLanguageList()
 {
        return languageList;
 }
@@ -538,7 +538,7 @@ QStringList RS_System::getLanguageList()
  *
  * Supported languages: http://ftp.ics.uci.edu/pub/ietf/http/related/iso639.txt
  */
-QString RS_System::languageToSymbol(const QString& lang)
+QString System::languageToSymbol(const QString& lang)
 {
     QString l = lang.toLower();
 
@@ -972,7 +972,7 @@ QString RS_System::languageToSymbol(const QString& lang)
  * Converst a language two-letter-code into a readable string
  * (e.g. 'de' to Deutsch)
  */
-QString RS_System::symbolToLanguage(const QString & symb)
+QString System::symbolToLanguage(const QString & symb)
 {
        QString l = symb.toLower();
 
@@ -1403,7 +1403,7 @@ QString RS_System::symbolToLanguage(const QString & symb)
 /**
  * Tries to convert the given encoding string to an encoding Qt knows.
  */
-QString RS_System::getEncoding(const QString & str)
+QString System::getEncoding(const QString & str)
 {
     QString l=str.toLower();
 
@@ -1516,7 +1516,7 @@ QString RS_System::getEncoding(const QString & str)
 */
 static QMap<QString, QString> loc_map;
 
-QString RS_System::localeToISO(const QString & locale)
+QString System::localeToISO(const QString & locale)
 {
        if (loc_map.isEmpty())
        {
index be9c72952d18f947d4577f73621d1eb675ab8218..8933f28dc325c82e960dafe885a857277d38acb5 100644 (file)
@@ -5,7 +5,7 @@
 #include <QtCore>
 #include "debug.h"
 
-#define RS_SYSTEM RS_System::instance()
+#define SYSTEM System::instance()
 
 /**
  * Class for some system methods such as file system operations.
  * @author James Hammons
  * @author Andrew Mustun
  */
-class RS_System
+class System
 {
        protected:
-               RS_System();
+               System();
 
        public:
-               static RS_System * instance();
+               static System * instance();
                void init(const QString & appName, const QString & appVersion,
                        const QString & appDirName, const QString & appDir = "");
                void initLanguageList();
@@ -53,7 +53,7 @@ class RS_System
                static QString localeToISO(const QString & locale);
 
        protected:
-               static RS_System * uniqueInstance;
+               static System * uniqueInstance;
 
                QString appName;
                QString appVersion;
index 5a9df7aae4e19ceb6a6ab7b0d9536c66f28cd8f5..e665958e21aaa92b24c6bd5b40ca4610e821b7f5 100644 (file)
 /**
  * Constructor.
  */
-RS_Text::RS_Text(RS_EntityContainer * parent, const RS_TextData & d): RS_EntityContainer(parent), data(d)
+Text::Text(EntityContainer * parent, const TextData & d): EntityContainer(parent), data(d)
 {
        usedTextHeight = 0.0;
        usedTextWidth = 0.0;
        setText(data.text);
 }
 
-/*virtual*/ RS_Text::~RS_Text()
+/*virtual*/ Text::~Text()
 {
 }
 
-/*virtual*/ RS_Entity * RS_Text::clone()
+/*virtual*/ Entity * Text::clone()
 {
-       RS_Text * t = new RS_Text(*this);
+       Text * t = new Text(*this);
 #warning "!!! Need to deal with setAutoDelete() Qt3->Qt4 !!!"
 //     t->entities.setAutoDelete(entities.autoDelete());
        t->initId();
@@ -45,13 +45,13 @@ RS_Text::RS_Text(RS_EntityContainer * parent, const RS_TextData & d): RS_EntityC
 }
 
 /**    @return RS2::EntityText */
-/*virtual*/ RS2::EntityType RS_Text::rtti() const
+/*virtual*/ RS2::EntityType Text::rtti() const
 {
        return RS2::EntityText;
 }
 
 /** @return Copy of data that defines the text. */
-RS_TextData RS_Text::getData() const
+TextData Text::getData() const
 {
        return data;
 }
@@ -59,7 +59,7 @@ RS_TextData RS_Text::getData() const
 /**
  * @return Number of lines in this text entity.
  */
-int RS_Text::getNumberOfLines()
+int Text::getNumberOfLines()
 {
        int c = 1;
 
@@ -77,12 +77,12 @@ int RS_Text::getNumberOfLines()
  * text or it's data, position, alignment, .. changes.
  * This method also updates the usedTextWidth / usedTextHeight property.
  */
-void RS_Text::update()
+void Text::update()
 {
 #if 0
-printf("RS_Text::update(): ");
+printf("Text::update(): ");
 #endif
-       RS_DEBUG->print("RS_Text::update");
+       DEBUG->print("Text::update");
        clear();
 
 #if 0
@@ -97,7 +97,7 @@ printf("isUndone=%s, ", (isUndone() ? "true" : "false"));
 #if 0
 printf("data.style=\"%s\", ", data.style.toAscii().data());
 #endif
-       RS_Font * font = RS_FONTLIST->requestFont(data.style);
+       Font * font = FONTLIST->requestFont(data.style);
 
 #if 0
 printf("font=%08X\n", (unsigned int)font);
@@ -112,7 +112,7 @@ printf("font=%08X\n", (unsigned int)font);
 
        // Every single text line gets stored in this entity container
        //  so we can move the whole line around easely:
-       RS_EntityContainer * oneLine = new RS_EntityContainer(this);
+       EntityContainer * oneLine = new EntityContainer(this);
 
        // First every text line is created with
        //   alignement: top left
@@ -128,7 +128,7 @@ printf("font=%08X\n", (unsigned int)font);
                case 0x0A:
                        // line feed:
                        updateAddLine(oneLine, lineCounter++);
-                       oneLine = new RS_EntityContainer(this);
+                       oneLine = new EntityContainer(this);
                        letterPos = Vector(0.0, -9.0);
                        break;
 
@@ -147,7 +147,7 @@ printf("font=%08X\n", (unsigned int)font);
                        {
                        case 'P':
                                updateAddLine(oneLine, lineCounter++);
-                               oneLine = new RS_EntityContainer(this);
+                               oneLine = new EntityContainer(this);
                                letterPos = Vector(0.0, -9.0);
                                break;
 
@@ -183,20 +183,20 @@ printf("font=%08X\n", (unsigned int)font);
                                }
 
                                // add texts:
-                               RS_Text * upper = new RS_Text(oneLine,
-                                       RS_TextData(letterPos + Vector(0.0, 9.0), 4.0, 100.0,
+                               Text * upper = new Text(oneLine,
+                                       TextData(letterPos + Vector(0.0, 9.0), 4.0, 100.0,
                                                RS2::VAlignTop, RS2::HAlignLeft, RS2::LeftToRight,
                                                RS2::Exact, 1.0, up, data.style, 0.0, RS2::Update));
                                upper->setLayer(NULL);
-                               upper->setPen(RS_Pen(RS2::FlagInvalid));
+                               upper->setPen(Pen(RS2::FlagInvalid));
                                oneLine->addEntity(upper);
 
-                               RS_Text * lower = new RS_Text(oneLine,
-                                       RS_TextData(letterPos+Vector(0.0, 4.0), 4.0, 100.0,
+                               Text * lower = new Text(oneLine,
+                                       TextData(letterPos+Vector(0.0, 4.0), 4.0, 100.0,
                                                RS2::VAlignTop, RS2::HAlignLeft, RS2::LeftToRight,
                                                RS2::Exact, 1.0, dw, data.style, 0.0, RS2::Update));
                                lower->setLayer(NULL);
-                               lower->setPen(RS_Pen(RS2::FlagInvalid));
+                               lower->setPen(Pen(RS2::FlagInvalid));
                                oneLine->addEntity(lower);
 
                                // move cursor:
@@ -235,9 +235,9 @@ printf("font=%08X\n", (unsigned int)font);
 //We ain't getting here:
 /*
 About to draw TEXT entity... TEXT="107.25"
-RS_Dimension::updateCreateDimensionLine()...
+Dimension::updateCreateDimensionLine()...
 --> 107.25
-RS_Text::update(): isUndone=false, font=094C1020
+Text::update(): isUndone=false, font=094C1020
 --> default: pos=0, char=0031
 --> default: pos=1, char=0030
 --> default: pos=2, char=0037
@@ -246,12 +246,12 @@ RS_Text::update(): isUndone=false, font=094C1020
 --> default: pos=5, char=0035
 */
 //printf("             char=%s\n", QString(data.text.at(i)).toAscii().data());
-                               RS_DEBUG->print("RS_Text::update: insert a letter at pos: %f/%f", letterPos.x, letterPos.y);
-                               RS_InsertData d(QString(data.text.at(i)), letterPos, Vector(1.0, 1.0),
+                               DEBUG->print("Text::update: insert a letter at pos: %f/%f", letterPos.x, letterPos.y);
+                               InsertData d(QString(data.text.at(i)), letterPos, Vector(1.0, 1.0),
                                        0.0, 1, 1, Vector(0.0, 0.0), font->getLetterList(), RS2::NoUpdate);
 
-                               RS_Insert * letter = new RS_Insert(this, d);
-                               letter->setPen(RS_Pen(RS2::FlagInvalid));
+                               Insert * letter = new Insert(this, d);
+                               letter->setPen(Pen(RS2::FlagInvalid));
                                letter->setLayer(NULL);
                                letter->update();
                                letter->forcedCalculateBorders();
@@ -275,7 +275,7 @@ RS_Text::update(): isUndone=false, font=094C1020
        usedTextHeight -= data.height * data.lineSpacingFactor * 1.6 - data.height;
        forcedCalculateBorders();
 
-       RS_DEBUG->print("RS_Text::update: OK");
+       DEBUG->print("Text::update: OK");
 }
 
 /**
@@ -285,12 +285,12 @@ RS_Text::update(): isUndone=false, font=094C1020
  * @param textLine The text line.
  * @param lineCounter Line number.
  */
-void RS_Text::updateAddLine(RS_EntityContainer* textLine, int lineCounter)
+void Text::updateAddLine(EntityContainer* textLine, int lineCounter)
 {
-       RS_DEBUG->print("RS_Text::updateAddLine: width: %f", textLine->getSize().x);
+       DEBUG->print("Text::updateAddLine: width: %f", textLine->getSize().x);
 
        //textLine->forcedCalculateBorders();
-       //RS_DEBUG->print("RS_Text::updateAddLine: width 2: %f", textLine->getSize().x);
+       //DEBUG->print("Text::updateAddLine: width 2: %f", textLine->getSize().x);
 
        // Move to correct line position:
        textLine->move(Vector(0.0, -9.0 * lineCounter * data.lineSpacingFactor * 1.6));
@@ -298,13 +298,13 @@ void RS_Text::updateAddLine(RS_EntityContainer* textLine, int lineCounter)
        textLine->forcedCalculateBorders();
        Vector textSize = textLine->getSize();
 
-       RS_DEBUG->print("RS_Text::updateAddLine: width 2: %f", textSize.x);
+       DEBUG->print("Text::updateAddLine: width 2: %f", textSize.x);
 
        // Horizontal Align:
        switch (data.halign)
        {
        case RS2::HAlignCenter:
-               RS_DEBUG->print("RS_Text::updateAddLine: move by: %f", -textSize.x / 2.0);
+               DEBUG->print("Text::updateAddLine: move by: %f", -textSize.x / 2.0);
                textLine->move(Vector(-textSize.x / 2.0, 0.0));
                break;
 
@@ -349,29 +349,29 @@ void RS_Text::updateAddLine(RS_EntityContainer* textLine, int lineCounter)
 
        // Move:
        textLine->move(data.insertionPoint);
-       textLine->setPen(RS_Pen(RS2::FlagInvalid));
+       textLine->setPen(Pen(RS2::FlagInvalid));
        textLine->setLayer(NULL);
        textLine->forcedCalculateBorders();
 
        addEntity(textLine);
 }
 
-Vector RS_Text::getInsertionPoint()
+Vector Text::getInsertionPoint()
 {
        return data.insertionPoint;
 }
 
-double RS_Text::getHeight()
+double Text::getHeight()
 {
        return data.height;
 }
 
-void RS_Text::setHeight(double h)
+void Text::setHeight(double h)
 {
        data.height = h;
 }
 
-double RS_Text::getWidth()
+double Text::getWidth()
 {
        return data.width;
 }
@@ -381,7 +381,7 @@ double RS_Text::getWidth()
  *
  * @param a 1: top left ... 9: bottom right
  */
-void RS_Text::setAlignment(int a)
+void Text::setAlignment(int a)
 {
        switch (a % 3)
        {
@@ -417,7 +417,7 @@ void RS_Text::setAlignment(int a)
  *
  * @return  1: top left ... 9: bottom right
  */
-int RS_Text::getAlignment()
+int Text::getAlignment()
 {
        if (data.valign == RS2::VAlignTop)
        {
@@ -468,42 +468,42 @@ int RS_Text::getAlignment()
        return 1;
 }
 
-RS2::VAlign RS_Text::getVAlign()
+RS2::VAlign Text::getVAlign()
 {
        return data.valign;
 }
 
-void RS_Text::setVAlign(RS2::VAlign va)
+void Text::setVAlign(RS2::VAlign va)
 {
        data.valign = va;
 }
 
-RS2::HAlign RS_Text::getHAlign()
+RS2::HAlign Text::getHAlign()
 {
        return data.halign;
 }
 
-void RS_Text::setHAlign(RS2::HAlign ha)
+void Text::setHAlign(RS2::HAlign ha)
 {
        data.halign = ha;
 }
 
-RS2::TextDrawingDirection RS_Text::getDrawingDirection()
+RS2::TextDrawingDirection Text::getDrawingDirection()
 {
        return data.drawingDirection;
 }
 
-RS2::TextLineSpacingStyle RS_Text::getLineSpacingStyle()
+RS2::TextLineSpacingStyle Text::getLineSpacingStyle()
 {
        return data.lineSpacingStyle;
 }
 
-void RS_Text::setLineSpacingFactor(double f)
+void Text::setLineSpacingFactor(double f)
 {
        data.lineSpacingFactor = f;
 }
 
-double RS_Text::getLineSpacingFactor()
+double Text::getLineSpacingFactor()
 {
        return data.lineSpacingFactor;
 }
@@ -512,7 +512,7 @@ double RS_Text::getLineSpacingFactor()
  * Sets a new text. The entities representing the
  * text are updated.
  */
-void RS_Text::setText(const QString & t)
+void Text::setText(const QString & t)
 {
        data.text = t;
 
@@ -540,71 +540,71 @@ void RS_Text::setText(const QString & t)
        }
 }
 
-QString RS_Text::getText()
+QString Text::getText()
 {
        return data.text;
 }
 
-void RS_Text::setStyle(const QString & s)
+void Text::setStyle(const QString & s)
 {
        data.style = s;
 }
 
-QString RS_Text::getStyle()
+QString Text::getStyle()
 {
        return data.style;
 }
 
-void RS_Text::setAngle(double a)
+void Text::setAngle(double a)
 {
        data.angle = a;
 }
 
-double RS_Text::getAngle()
+double Text::getAngle()
 {
        return data.angle;
 }
 
-double RS_Text::getUsedTextWidth()
+double Text::getUsedTextWidth()
 {
        return usedTextWidth;
 }
 
-double RS_Text::getUsedTextHeight()
+double Text::getUsedTextHeight()
 {
        return usedTextHeight;
 }
 
-/*virtual*/ double RS_Text::getLength()
+/*virtual*/ double Text::getLength()
 {
        return -1.0;
 }
 
-VectorSolutions RS_Text::getRefPoints()
+VectorSolutions Text::getRefPoints()
 {
        VectorSolutions ret(data.insertionPoint);
        return ret;
 }
 
-Vector RS_Text::getNearestRef(const Vector & coord, double * dist)
+Vector Text::getNearestRef(const Vector & coord, double * dist)
 {
-       return RS_Entity::getNearestRef(coord, dist);
+       return Entity::getNearestRef(coord, dist);
 }
 
-void RS_Text::move(Vector offset)
+void Text::move(Vector offset)
 {
        data.insertionPoint.move(offset);
        update();
 }
 
-void RS_Text::rotate(Vector center, double angle)
+void Text::rotate(Vector center, double angle)
 {
        data.insertionPoint.rotate(center, angle);
-       data.angle = RS_Math::correctAngle(data.angle + angle);
+       data.angle = Math::correctAngle(data.angle + angle);
        update();
 }
 
-void RS_Text::scale(Vector center, Vector factor)
+void Text::scale(Vector center, Vector factor)
 {
        data.insertionPoint.scale(center, factor);
        data.width *= factor.x;
@@ -612,11 +612,11 @@ void RS_Text::scale(Vector center, Vector factor)
        update();
 }
 
-void RS_Text::mirror(Vector axisPoint1, Vector axisPoint2)
+void Text::mirror(Vector axisPoint1, Vector axisPoint2)
 {
        data.insertionPoint.mirror(axisPoint1, axisPoint2);
        //double ang = axisPoint1.angleTo(axisPoint2);
-       bool readable = RS_Math::isAngleReadable(data.angle);
+       bool readable = Math::isAngleReadable(data.angle);
 
        Vector vec;
        vec.setPolar(1.0, data.angle);
@@ -624,7 +624,7 @@ void RS_Text::mirror(Vector axisPoint1, Vector axisPoint2)
        data.angle = vec.angle();
 
        bool corr;
-       data.angle = RS_Math::makeAngleReadable(data.angle, readable, &corr);
+       data.angle = Math::makeAngleReadable(data.angle, readable, &corr);
 
        if (corr)
        {
@@ -652,7 +652,7 @@ void RS_Text::mirror(Vector axisPoint1, Vector axisPoint2)
        update();
 }
 
-bool RS_Text::hasEndpointsWithinWindow(Vector /*v1*/, Vector /*v2*/)
+bool Text::hasEndpointsWithinWindow(Vector /*v1*/, Vector /*v2*/)
 {
        return false;
 }
@@ -661,7 +661,7 @@ bool RS_Text::hasEndpointsWithinWindow(Vector /*v1*/, Vector /*v2*/)
  * Implementations must stretch the given range of the entity
  * by the given offset.
  */
-void RS_Text::stretch(Vector firstCorner, Vector secondCorner, Vector offset)
+void Text::stretch(Vector firstCorner, Vector secondCorner, Vector offset)
 {
        if (getMin().isInWindow(firstCorner, secondCorner)
                && getMax().isInWindow(firstCorner, secondCorner))
@@ -671,7 +671,7 @@ void RS_Text::stretch(Vector firstCorner, Vector secondCorner, Vector offset)
 /**
  * Dumps the point's data to stdout.
  */
-std::ostream & operator<<(std::ostream & os, const RS_Text & p)
+std::ostream & operator<<(std::ostream & os, const Text & p)
 {
        os << " Text: " << p.getData() << "\n";
        return os;
index 4149b71d54b1908cf28d64f59e35fa3e184d33d3..399cedb28b8da251e953dfb1297c7ebf974a9e81 100644 (file)
@@ -7,13 +7,13 @@
 /**
  * Holds the data that defines a text entity.
  */
-class RS_TextData
+class TextData
 {
        public:
                /**
                 * Default constructor. Leaves the data object uninitialized.
                 */
-               RS_TextData() {}
+               TextData() {}
 
                /**
                 * Constructor with initialisation.
@@ -35,7 +35,7 @@ class RS_TextData
                 *    often the case since you might want to adjust attributes
                 *    after creating a text entity.
                 */
-               RS_TextData(const Vector & insertionPoint, double height, double width,
+               TextData(const Vector & insertionPoint, double height, double width,
                        RS2::VAlign valign, RS2::HAlign halign, RS2::TextDrawingDirection drawingDirection,
                        RS2::TextLineSpacingStyle lineSpacingStyle, double lineSpacingFactor,
                        const QString& text, const QString & style, double angle,
@@ -55,9 +55,9 @@ class RS_TextData
                        this->updateMode = updateMode;
                }
 
-               friend class RS_Text;
+               friend class Text;
 
-               friend std::ostream & operator<<(std::ostream & os, const RS_TextData & td)
+               friend std::ostream & operator<<(std::ostream & os, const TextData & td)
                {
                        os << "(" << td.text.toLatin1().data() << ")";
                        return os;
@@ -98,17 +98,17 @@ class RS_TextData
  *
  * @author Andrew Mustun
  */
-class RS_Text: public RS_EntityContainer
+class Text: public EntityContainer
 {
        public:
-               RS_Text(RS_EntityContainer * parent, const RS_TextData & d);
-               virtual ~RS_Text();
+               Text(EntityContainer * parent, const TextData & d);
+               virtual ~Text();
 
-               virtual RS_Entity * clone();
+               virtual Entity * clone();
                virtual RS2::EntityType rtti() const;
-               RS_TextData getData() const;
+               TextData getData() const;
                void update();
-               void updateAddLine(RS_EntityContainer * textLine, int lineCounter);
+               void updateAddLine(EntityContainer * textLine, int lineCounter);
                int getNumberOfLines();
 
                Vector getInsertionPoint();
@@ -145,10 +145,10 @@ class RS_Text: public RS_EntityContainer
                virtual bool hasEndpointsWithinWindow(Vector v1, Vector v2);
                virtual void stretch(Vector firstCorner, Vector secondCorner, Vector offset);
 
-               friend std::ostream & operator<<(std::ostream & os, const RS_Text & p);
+               friend std::ostream & operator<<(std::ostream & os, const Text & p);
 
        protected:
-               RS_TextData data;
+               TextData data;
                /**
                * Text width used by the current contents of this text entity.
                * This property is updated by the update method.
index 703449320e813cc0d2c9332eb444cbbe072e9966..441545505dec02f7b9778b17370cc2a8285ab807 100644 (file)
@@ -22,7 +22,7 @@
 /**
  * Default constructor.
  */
-RS_Undo::RS_Undo()
+Undo::Undo()
 {
 #warning "!!! Need to deal with setAutoDelete() Qt3->Qt4 !!!"
 //     undoList.setAutoDelete(true);
@@ -30,7 +30,7 @@ RS_Undo::RS_Undo()
        currentCycle = NULL;
 }
 
-/*virtual*/ RS_Undo::~RS_Undo()
+/*virtual*/ Undo::~Undo()
 {
        while (!undoList.isEmpty())
                delete undoList.takeFirst();
@@ -39,9 +39,9 @@ RS_Undo::RS_Undo()
 /**
  * @return Number of Cycles that can be undone.
  */
-int RS_Undo::countUndoCycles()
+int Undo::countUndoCycles()
 {
-       RS_DEBUG->print("RS_Undo::countUndoCycles");
+       DEBUG->print("Undo::countUndoCycles");
 
        return undoPointer + 1;
 }
@@ -49,9 +49,9 @@ int RS_Undo::countUndoCycles()
 /**
  * @return Number of Cycles that can be redone.
  */
-int RS_Undo::countRedoCycles()
+int Undo::countRedoCycles()
 {
-       RS_DEBUG->print("RS_Undo::countRedoCycles");
+       DEBUG->print("Undo::countRedoCycles");
 
        return (int)undoList.count() - 1 - undoPointer;
 }
@@ -61,32 +61,32 @@ int RS_Undo::countRedoCycles()
  * All Cycles after the new one are removed and the Undoabels
  * on them deleted.
  */
-void RS_Undo::addUndoCycle(RS_UndoCycle * i)
+void Undo::addUndoCycle(UndoCycle * i)
 {
-       RS_DEBUG->print("RS_Undo::addUndoCycle");
+       DEBUG->print("Undo::addUndoCycle");
 
        undoList.insert(++undoPointer, i);
 
-       RS_DEBUG->print("RS_Undo::addUndoCycle: ok");
+       DEBUG->print("Undo::addUndoCycle: ok");
 }
 
 /**
  * Starts a new cycle for one undo step. Every undoable that is
  * added after calling this method goes into this cycle.
  */
-void RS_Undo::startUndoCycle()
+void Undo::startUndoCycle()
 {
-       RS_DEBUG->print("RS_Undo::startUndoCycle");
+       DEBUG->print("Undo::startUndoCycle");
 
        // definitely delete Undo Cycles and all Undoables in them
        //   that cannot be redone now:
        while ((int)undoList.count() > undoPointer + 1 && (int)undoList.count() > 0)
        {
-               RS_UndoCycle * l = undoList.last();
+               UndoCycle * l = undoList.last();
 
                if (l != NULL)
                {
-                       RS_Undoable * u = NULL;
+                       Undoable * u = NULL;
                        bool done = false;
 
                        do
@@ -96,7 +96,7 @@ void RS_Undo::startUndoCycle()
                                if (u != NULL)
                                {
                                        // Remove the pointer from _all_ cycles:
-//                                     for(RS_UndoCycle * l2=undoList.first(); l2!=NULL; l2=undoList.next())
+//                                     for(UndoCycle * l2=undoList.first(); l2!=NULL; l2=undoList.next())
 //                                             l2->removeUndoable(u);
                                        for(int i=0; i<undoList.size(); i++)
                                                undoList[i]->removeUndoable(u);
@@ -119,15 +119,15 @@ void RS_Undo::startUndoCycle()
                undoList.removeLast();
        }
 
-       currentCycle = new RS_UndoCycle();
+       currentCycle = new UndoCycle();
 }
 
 /**
  * Adds an undoable to the current undo cycle.
  */
-void RS_Undo::addUndoable(RS_Undoable * u)
+void Undo::addUndoable(Undoable * u)
 {
-       RS_DEBUG->print("RS_Undo::addUndoable");
+       DEBUG->print("Undo::addUndoable");
 
        if (currentCycle != NULL)
        {
@@ -135,14 +135,14 @@ void RS_Undo::addUndoable(RS_Undoable * u)
        }
        else
        {
-               RS_DEBUG->print(RS_Debug::D_WARNING, "RS_Undo::addUndoable(): No undo cycle active.");
+               DEBUG->print(Debug::D_WARNING, "Undo::addUndoable(): No undo cycle active.");
        }
 }
 
 /**
  * Ends the current undo cycle.
  */
-void RS_Undo::endUndoCycle()
+void Undo::endUndoCycle()
 {
        addUndoCycle(currentCycle);
        currentCycle = NULL;
@@ -151,17 +151,17 @@ void RS_Undo::endUndoCycle()
 /**
  * Undoes the last undo cycle.
  */
-void RS_Undo::undo()
+void Undo::undo()
 {
-       RS_DEBUG->print("RS_Undo::undo");
+       DEBUG->print("Undo::undo");
 
        if (undoPointer >= 0)
        {
-               RS_UndoCycle * i = undoList.at(undoPointer);
+               UndoCycle * i = undoList.at(undoPointer);
 
                if (i != NULL)
                {
-//                     for(RS_Undoable * u=i->undoables.first(); u!=NULL; u=i->undoables.next())
+//                     for(Undoable * u=i->undoables.first(); u!=NULL; u=i->undoables.next())
 //                             u->changeUndoState();
                        for(int j=0; j<i->undoables.size(); j++)
                                i->undoables[j]->changeUndoState();
@@ -174,18 +174,18 @@ void RS_Undo::undo()
 /**
  * Redoes the undo cycle which was at last undone.
  */
-void RS_Undo::redo()
+void Undo::redo()
 {
-       RS_DEBUG->print("RS_Undo::redo");
+       DEBUG->print("Undo::redo");
 
        if (undoPointer + 1 < (int)undoList.count())
        {
                undoPointer++;
-               RS_UndoCycle * i = undoList.at(undoPointer);
+               UndoCycle * i = undoList.at(undoPointer);
 
                if (i != NULL)
                {
-//            for(RS_Undoable * u=i->undoables.first(); u!=NULL; u=i->undoables.next())
+//            for(Undoable * u=i->undoables.first(); u!=NULL; u=i->undoables.next())
 //                u->changeUndoState();
                        for(int j=0; j<i->undoables.size(); j++)
                                i->undoables[j]->changeUndoState();
@@ -197,16 +197,16 @@ void RS_Undo::redo()
  * @return The undo item that is next if we're about to undo
  * or NULL.
  */
-RS_UndoCycle * RS_Undo::getUndoCycle()
+UndoCycle * Undo::getUndoCycle()
 {
-       RS_UndoCycle * ret = NULL;
+       UndoCycle * ret = NULL;
 
-       RS_DEBUG->print("RS_Undo::getUndoCycle");
+       DEBUG->print("Undo::getUndoCycle");
 
        if (undoPointer >= 0 && undoPointer < (int)undoList.count())
                ret = undoList.at(undoPointer);
 
-       RS_DEBUG->print("RS_Undo::getUndoCycle: OK");
+       DEBUG->print("Undo::getUndoCycle: OK");
 
        return ret;
 }
@@ -215,9 +215,9 @@ RS_UndoCycle * RS_Undo::getUndoCycle()
  * @return The redo item that is next if we're about to redo
  * or NULL.
  */
-RS_UndoCycle * RS_Undo::getRedoCycle()
+UndoCycle * Undo::getRedoCycle()
 {
-       RS_DEBUG->print("RS_Undo::getRedoCycle");
+       DEBUG->print("Undo::getRedoCycle");
 
        if (undoPointer + 1 >= 0 && undoPointer + 1 < (int)undoList.count())
                return undoList.at(undoPointer + 1);
@@ -228,15 +228,15 @@ RS_UndoCycle * RS_Undo::getRedoCycle()
 /**
  * Dumps the undo list to stdout.
  */
-std::ostream & operator<<(std::ostream & os, RS_Undo & l)
+std::ostream & operator<<(std::ostream & os, Undo & l)
 {
        os << "Undo List: " <<  "\n";
        os << " Pointer is at: " << l.undoPointer << "\n";
 
-//     for(RS_UndoCycle * i=l.undoList.first(); i!=NULL; i=l.undoList.next())
+//     for(UndoCycle * i=l.undoList.first(); i!=NULL; i=l.undoList.next())
        for(int j=0; j<l.undoList.size(); j++)
        {
-               RS_UndoCycle * i = l.undoList[j];
+               UndoCycle * i = l.undoList[j];
 
 //             if (l.undoList.at() == l.undoPointer)
                if (j == l.undoPointer)
@@ -256,25 +256,25 @@ std::ostream & operator<<(std::ostream & os, RS_Undo & l)
 /**
  * Testing Undoables, Undo Cycles and the Undo container.
  */
-/*static*/ bool RS_Undo::test()
+/*static*/ bool Undo::test()
 {
        int i, k;
-       RS_UndoStub undo;
-       //RS_UndoCycle * c1;
-       RS_Undoable * u1;
+       UndoStub undo;
+       //UndoCycle * c1;
+       Undoable * u1;
 
-       std::cout << "Testing RS_Undo\n";
+       std::cout << "Testing Undo\n";
        std::cout << "  Adding 500 cycles..";
 
        // Add 500 Undo Cycles with i Undoables in every Cycle
        for(i=1; i<=500; ++i)
        {
-               //c1 = new RS_UndoCycle();
+               //c1 = new UndoCycle();
                undo.startUndoCycle();
 
                for(k=1; k<=i; ++k)
                {
-                       u1 = new RS_Undoable();
+                       u1 = new Undoable();
                        //c1->
                        undo.addUndoable(u1);
                }
@@ -325,12 +325,12 @@ std::ostream & operator<<(std::ostream & os, RS_Undo & l)
 
        for(i=1; i<=10; ++i)
        {
-               //c1 = new RS_UndoCycle();
+               //c1 = new UndoCycle();
                undo.startUndoCycle();
 
                for(k=1; k<=10; ++k)
                {
-                       u1 = new RS_Undoable();
+                       u1 = new Undoable();
                        //c1->addUndoable(u1);
                        undo.addUndoable(u1);
                }
@@ -378,12 +378,12 @@ std::ostream & operator<<(std::ostream & os, RS_Undo & l)
 
        for(i=1; i<=1; ++i)
        {
-               //c1 = new RS_UndoCycle();
+               //c1 = new UndoCycle();
                undo.startUndoCycle();
 
                for(k=1; k<=10; ++k)
                {
-                       u1 = new RS_Undoable();
+                       u1 = new Undoable();
                        //c1->addUndoable(u1);
                        undo.addUndoable(u1);
                }
index f464d52e784674a6661069b157d991d10265195b..1d8b17974a592529ba5da3f98f9202421c7a57a2 100644 (file)
@@ -6,30 +6,30 @@
 
 /**
  * Undo / redo functionality. The internal undo list consists of
- * RS_UndoCycle entries.
+ * UndoCycle entries.
  *
- * @see RS_UndoCycle
+ * @see UndoCycle
  * @author Andrew Mustun
  */
-class RS_Undo
+class Undo
 {
 public:
-               RS_Undo();
-               virtual ~RS_Undo();
+               Undo();
+               virtual ~Undo();
 
-               void addUndoCycle(RS_UndoCycle * i);
+               void addUndoCycle(UndoCycle * i);
 
                virtual void undo();
                virtual void redo();
 
-               virtual RS_UndoCycle * getUndoCycle();
-               virtual RS_UndoCycle * getRedoCycle();
+               virtual UndoCycle * getUndoCycle();
+               virtual UndoCycle * getRedoCycle();
 
                virtual int countUndoCycles();
                virtual int countRedoCycles();
 
                virtual void startUndoCycle();
-               virtual void addUndoable(RS_Undoable * u);
+               virtual void addUndoable(Undoable * u);
                virtual void endUndoCycle();
 
                /**
@@ -37,9 +37,9 @@ public:
                * the given Undoable (unrecoverable). This method is called
                * for Undoables that are no longer in the undo buffer.
                */
-               virtual void removeUndoable(RS_Undoable * u) = 0;
+               virtual void removeUndoable(Undoable * u) = 0;
 
-               friend std::ostream & operator<<(std::ostream & os, RS_Undo & a);
+               friend std::ostream & operator<<(std::ostream & os, Undo & a);
 
 #ifdef RS_TEST
                static bool test(void);
@@ -47,8 +47,8 @@ public:
 
        protected:
                //! List of undo list items. every item is something that can be undone.
-//             Q3PtrList<RS_UndoCycle> undoList;
-               QList<RS_UndoCycle *> undoList;
+//             Q3PtrList<UndoCycle> undoList;
+               QList<UndoCycle *> undoList;
 
                /**
                * Index that points to the current position in the undo list.
@@ -61,16 +61,16 @@ public:
                /**
                * Current undo cycle.
                */
-               RS_UndoCycle * currentCycle;
+               UndoCycle * currentCycle;
 };
 
 #ifdef RS_TEST
 /**
- * Stub for testing the RS_Undo class.
+ * Stub for testing the Undo class.
  */
-class RS_UndoStub : public RS_Undo
+class UndoStub : public Undo
 {
-    virtual void removeUndoable(RS_Undoable * u)
+    virtual void removeUndoable(Undoable * u)
     {
         delete u;
         u = NULL;
index 04b8501ab408679b1fd9ebd352c6ba19ba9d97c9..aef2f026e53835b2b9a8c4e12f6f8beebff531e9 100644 (file)
@@ -21,7 +21,7 @@
 /**
  * Default constructor.
  */
-RS_Undoable::RS_Undoable()
+Undoable::Undoable()
 {
        cycle = NULL;
 }
@@ -30,7 +30,7 @@ RS_Undoable::RS_Undoable()
  * Destructor. Makes sure that this undoable is removed from
  * its undo cycle before it is deleted.
  */
-RS_Undoable::~RS_Undoable()
+Undoable::~Undoable()
 {
        if (cycle != NULL)
                cycle->removeUndoable(this);
@@ -41,7 +41,7 @@ RS_Undoable::~RS_Undoable()
  * Note that this is voluntarily. The default implementation
  * returns RS2::UndoableUnknown.
  */
-/*virtual*/ RS2::UndoableType RS_Undoable::undoRtti()
+/*virtual*/ RS2::UndoableType Undoable::undoRtti()
 {
        return RS2::UndoableUnknown;
 }
@@ -51,7 +51,7 @@ RS_Undoable::~RS_Undoable()
  * make sure the entity can remove itself from the cycle before
  * being deleted.
  */
-void RS_Undoable::setUndoCycle(RS_UndoCycle * cycle)
+void Undoable::setUndoCycle(UndoCycle * cycle)
 {
        this->cycle = cycle;
 }
@@ -60,7 +60,7 @@ void RS_Undoable::setUndoCycle(RS_UndoCycle * cycle)
  * The undoable thing gets activated if it was undone and
  * deactivated otherwise.
  */
-void RS_Undoable::changeUndoState()
+void Undoable::changeUndoState()
 {
        toggleFlag(RS2::FlagUndone);
        undoStateChanged(isUndone());
@@ -69,7 +69,7 @@ void RS_Undoable::changeUndoState()
 /**
  * Undoes or redoes an undoable.
  */
-void RS_Undoable::setUndoState(bool undone)
+void Undoable::setUndoState(bool undone)
 {
        if (undone)
                setFlag(RS2::FlagUndone);
@@ -82,7 +82,7 @@ void RS_Undoable::setUndoState(bool undone)
 /**
  * Is this entity in the Undo memory and not active?
  */
-bool RS_Undoable::isUndone() const
+bool Undoable::isUndone() const
 {
        return getFlag(RS2::FlagUndone);
 }
@@ -91,6 +91,6 @@ bool RS_Undoable::isUndone() const
  * Can be overwriten by the implementing class to be notified
  * when the undo state changes (the undoable becomes visible / invisible).
  */
-/*virtual*/ void RS_Undoable::undoStateChanged(bool /*undone*/)
+/*virtual*/ void Undoable::undoStateChanged(bool /*undone*/)
 {
 }
index c17a6b3c2863de21e77ef576f8d3ac335a8c523c..df5e5c0bdcad48dc0c02a65bfdaa0eab42545e3c 100644 (file)
@@ -1,34 +1,34 @@
 #ifndef __UNDOABLE_H__
 #define __UNDOABLE_H__
 
-#include "rs.h"
+#include "enums.h"
 #include "flags.h"
 
-class RS_UndoCycle;
+class UndoCycle;
 
 /**
  * Base class for something that can be added and deleted and every
  * addition and deletion can be undone.
  *
- * @see RS_Undo
+ * @see Undo
  * @author Andrew Mustun
  */
-class RS_Undoable: public RS_Flags
+class Undoable: public Flags
 {
        public:
-               RS_Undoable();
-               virtual ~RS_Undoable();
+               Undoable();
+               virtual ~Undoable();
 
                virtual RS2::UndoableType undoRtti();
-               virtual void setUndoCycle(RS_UndoCycle * cycle);
+               virtual void setUndoCycle(UndoCycle * cycle);
                virtual void changeUndoState();
                virtual void setUndoState(bool undone);
                virtual bool isUndone() const;
                virtual void undoStateChanged(bool /*undone*/);
-               //friend std::ostream& operator << (std::ostream& os, RS_Undoable& a);
+               //friend std::ostream& operator << (std::ostream& os, Undoable& a);
 
        private:
-               RS_UndoCycle * cycle;
+               UndoCycle * cycle;
 };
 
 #endif
index 979911aca70227e66ff71d991a63f45e7cc290ad..b2058b8f60e2046543fc806c9d15a3b3db736898 100644 (file)
@@ -22,7 +22,7 @@
 /**
  * @param type Type of undo item.
  */
-RS_UndoCycle::RS_UndoCycle(/*RS2::UndoType type*/): undoableIterator(undoables)
+UndoCycle::UndoCycle(/*RS2::UndoType type*/): undoableIterator(undoables)
 {
        //this->type = type;
 // Good, we don't have to worry about this...
@@ -33,7 +33,7 @@ RS_UndoCycle::RS_UndoCycle(/*RS2::UndoType type*/): undoableIterator(undoables)
  * Adds an Undoable to this Undo Cycle. Every Cycle can contain one or
  * more Undoables.
  */
-void RS_UndoCycle::addUndoable(RS_Undoable * u)
+void UndoCycle::addUndoable(Undoable * u)
 {
        undoables.append(u);
 }
@@ -41,7 +41,7 @@ void RS_UndoCycle::addUndoable(RS_Undoable * u)
 /**
  * Removes an undoable from the list.
  */
-void RS_UndoCycle::removeUndoable(RS_Undoable * u)
+void UndoCycle::removeUndoable(Undoable * u)
 {
 //     undoables.remove(u);
        int i = undoables.indexOf(u);
@@ -51,7 +51,7 @@ void RS_UndoCycle::removeUndoable(RS_Undoable * u)
 /**
  * Iteration through undoable elements in this item.
  */
-RS_Undoable * RS_UndoCycle::getFirstUndoable()
+Undoable * UndoCycle::getFirstUndoable()
 {
 //     return undoables.first();
        undoableIterator.toFront();
@@ -61,13 +61,13 @@ RS_Undoable * RS_UndoCycle::getFirstUndoable()
 /**
  * Iteration through undoable elements in this item.
  */
-RS_Undoable * RS_UndoCycle::getNextUndoable()
+Undoable * UndoCycle::getNextUndoable()
 {
 //     return undoables.next();
        return undoableIterator.next();
 }
 
-/*friend*/ std::ostream & operator<<(std::ostream & os, RS_UndoCycle & i)
+/*friend*/ std::ostream & operator<<(std::ostream & os, UndoCycle & i)
 {
        os << " Undo item: " << "\n";
        //os << "   Type: ";
@@ -81,11 +81,11 @@ RS_Undoable * RS_UndoCycle::getNextUndoable()
 }*/
        os << "   Undoable ids: ";
 
-       for(RS_Undoable * u=i.getFirstUndoable(); u!=NULL; u=i.getNextUndoable())
+       for(Undoable * u=i.getFirstUndoable(); u!=NULL; u=i.getNextUndoable())
        {
                if (u->undoRtti() == RS2::UndoableEntity)
                {
-                       RS_Entity * e = (RS_Entity *)u;
+                       Entity * e = (Entity *)u;
                        os << e->getId() << (u->isUndone() ? "*" : "") << " ";
                }
                else
index e51285eacf070c57fbf3f31f8eb8855e04a81ff4..7b4071da647dfd4e91866455a823d8f1e5e5e99e 100644 (file)
@@ -4,7 +4,7 @@
 #include <iostream>
 #include <QtCore>
 
-class RS_Undoable;
+class Undoable;
 
 /**
  * An Undo Cycle represents an action that was triggered and can
@@ -12,32 +12,32 @@ class RS_Undoable;
  * the action. Undoables are entities in a container that can be
  * created and deleted.
  *
- * Undo Cycles are stored within classes derrived from RS_Undo.
+ * Undo Cycles are stored within classes derrived from Undo.
  *
- * @see RS_Undoable
- * @see RS_Undo
+ * @see Undoable
+ * @see Undo
  *
  * @author Andrew Mustun
  */
-class RS_UndoCycle
+class UndoCycle
 {
-       friend class RS_Undo;
+       friend class Undo;
 
        public:
-               RS_UndoCycle(/*RS2::UndoType type*/);
-               void addUndoable(RS_Undoable * u);
-               void removeUndoable(RS_Undoable * u);
-               RS_Undoable * getFirstUndoable();
-               RS_Undoable * getNextUndoable();
-               friend std::ostream & operator<<(std::ostream & os, RS_UndoCycle & i);
+               UndoCycle(/*RS2::UndoType type*/);
+               void addUndoable(Undoable * u);
+               void removeUndoable(Undoable * u);
+               Undoable * getFirstUndoable();
+               Undoable * getNextUndoable();
+               friend std::ostream & operator<<(std::ostream & os, UndoCycle & i);
 
        private:
                //! Undo type:
                //RS2::UndoType type;
                //! List of entity id's that were affected by this action
-//             Q3PtrList<RS_Undoable> undoables;
-               QList<RS_Undoable *> undoables;
-               QListIterator<RS_Undoable *> undoableIterator;
+//             Q3PtrList<Undoable> undoables;
+               QList<Undoable *> undoables;
+               QListIterator<Undoable *> undoableIterator;
 };
 
 #endif
index eb34a077fe82381ba69412bd34bd6225ce57d1bb..5ee0d448b2d469fabceede896b06449fca5f3510 100644 (file)
@@ -23,7 +23,7 @@
 /**
  * Converts a DXF integer () to a Unit enum.
  */
-RS2::Unit RS_Units::dxfint2unit(int dxfint)
+RS2::Unit Units::dxfint2unit(int dxfint)
 {
     return (RS2::Unit)dxfint;
 
@@ -77,7 +77,7 @@ RS2::Unit RS_Units::dxfint2unit(int dxfint)
 /**
  * @return a short string representing the given unit (e.g. "mm")
  */
-QString RS_Units::unitToSign(RS2::Unit u)
+QString Units::unitToSign(RS2::Unit u)
 {
     QString ret = "";
 
@@ -159,7 +159,7 @@ QString RS_Units::unitToSign(RS2::Unit u)
  * @return a string representing the given unit (e.g. "Millimeter").
  *      translated if @a t is true (the default).
  */
-QString RS_Units::unitToString(RS2::Unit u, bool t)
+QString Units::unitToString(RS2::Unit u, bool t)
 {
     QString ret = "";
 
@@ -240,7 +240,7 @@ QString RS_Units::unitToString(RS2::Unit u, bool t)
 /**
  * Converts a string into a unit enum.
  */
-RS2::Unit RS_Units::stringToUnit(const QString & u)
+RS2::Unit Units::stringToUnit(const QString & u)
 {
        RS2::Unit ret = RS2::None;
 
@@ -293,7 +293,7 @@ RS2::Unit RS_Units::stringToUnit(const QString & u)
 /**
  * @return true: the unit is metric, false: the unit is imperial.
  */
-bool RS_Units::isMetric(RS2::Unit u)
+bool Units::isMetric(RS2::Unit u)
 {
        if (u == RS2::Millimeter || u == RS2::Centimeter || u == RS2::Meter
                || u == RS2::Kilometer || u == RS2::Angstrom || u == RS2::Nanometer
@@ -308,7 +308,7 @@ bool RS_Units::isMetric(RS2::Unit u)
 /**
  * @return factor to convert the given unit to Millimeters.
  */
-double RS_Units::getFactorToMM(RS2::Unit u)
+double Units::getFactorToMM(RS2::Unit u)
 {
        double ret = 1.0;
 
@@ -388,7 +388,7 @@ double RS_Units::getFactorToMM(RS2::Unit u)
 /**
  * Converts the given value 'val' from unit 'src' to unit 'dest'.
  */
-double RS_Units::convert(double val, RS2::Unit src, RS2::Unit dest)
+double Units::convert(double val, RS2::Unit src, RS2::Unit dest)
 {
        if (getFactorToMM(dest) > 0.0)
        {
@@ -396,7 +396,7 @@ double RS_Units::convert(double val, RS2::Unit src, RS2::Unit dest)
        }
        else
        {
-               RS_DEBUG->print(RS_Debug::D_WARNING, "RS_Units::convert: invalid factor");
+               DEBUG->print(Debug::D_WARNING, "Units::convert: invalid factor");
                return val;
        }
 }
@@ -404,7 +404,7 @@ double RS_Units::convert(double val, RS2::Unit src, RS2::Unit dest)
 /**
  * Converts the given vector 'val' from unit 'src' to unit 'dest'.
  */
-Vector RS_Units::convert(const Vector val, RS2::Unit src, RS2::Unit dest)
+Vector Units::convert(const Vector val, RS2::Unit src, RS2::Unit dest)
 {
        return Vector(convert(val.x, src, dest), convert(val.y, src, dest), convert(val.z, src, dest));
 }
@@ -417,7 +417,7 @@ Vector RS_Units::convert(const Vector val, RS2::Unit src, RS2::Unit dest)
  * @param prec Precisision of the value (e.g. 0.001 or 1/128 = 0.0078125)
  & @param showUnit Append unit to the value.
  */
-QString RS_Units::formatLinear(double length, RS2::Unit unit, RS2::LinearFormat format,
+QString Units::formatLinear(double length, RS2::Unit unit, RS2::LinearFormat format,
        int prec, bool showUnit)
 {
     QString ret;
@@ -452,8 +452,8 @@ QString RS_Units::formatLinear(double length, RS2::Unit unit, RS2::LinearFormat
                break;
 
        default:
-               RS_DEBUG->print(RS_Debug::D_WARNING,
-                       "RS_Units::formatLinear: Unknown format");
+               DEBUG->print(Debug::D_WARNING,
+                       "Units::formatLinear: Unknown format");
                ret = "";
                break;
        }
@@ -468,7 +468,7 @@ QString RS_Units::formatLinear(double length, RS2::Unit unit, RS2::LinearFormat
  * @param prec Precisision of the value (e.g. 0.001 or 1/128 = 0.0078125)
  & @param showUnit Append unit to the value.
  */
-QString RS_Units::formatScientific(double length, RS2::Unit unit, int prec, bool showUnit)
+QString Units::formatScientific(double length, RS2::Unit unit, int prec, bool showUnit)
 {
        QString ret;
 
@@ -492,7 +492,7 @@ QString RS_Units::formatScientific(double length, RS2::Unit unit, int prec, bool
  * @param prec Precisision of the value (e.g. 0.001)
  & @param showUnit Append unit to the value.
  */
-QString RS_Units::formatDecimal(double length, RS2::Unit unit, int prec, bool showUnit)
+QString Units::formatDecimal(double length, RS2::Unit unit, int prec, bool showUnit)
 {
        QString ret;
 
@@ -502,7 +502,7 @@ QString RS_Units::formatDecimal(double length, RS2::Unit unit, int prec, bool sh
        if (showUnit)
                unitString = unitToSign(unit);
 
-       ret = RS_Math::doubleToString(length, prec);
+       ret = Math::doubleToString(length, prec);
 
        if (showUnit)
                ret += unitString;
@@ -517,7 +517,7 @@ QString RS_Units::formatDecimal(double length, RS2::Unit unit, int prec, bool sh
  * @param prec Precisision of the value (e.g. 0.001 or 1/128 = 0.0078125)
  & @param showUnit Append unit to the value.
  */
-QString RS_Units::formatEngineering(double length, RS2::Unit /*unit*/, int prec, bool /*showUnit*/)
+QString Units::formatEngineering(double length, RS2::Unit /*unit*/, int prec, bool /*showUnit*/)
 {
        QString ret;
 
@@ -525,7 +525,7 @@ QString RS_Units::formatEngineering(double length, RS2::Unit /*unit*/, int prec,
        int feet = (int)floor(fabs(length) / 12);
        double inches = fabs(length) - feet * 12;
 
-       QString sInches = RS_Math::doubleToString(inches, prec);
+       QString sInches = Math::doubleToString(inches, prec);
 
        if (sInches == "12")
        {
@@ -555,7 +555,7 @@ QString RS_Units::formatEngineering(double length, RS2::Unit /*unit*/, int prec,
  * @param prec Precisision of the value (e.g. 0.001 or 1/128 = 0.0078125)
  & @param showUnit Append unit to the value.
  */
-QString RS_Units::formatArchitectural(double length, RS2::Unit /*unit*/, int prec, bool showUnit)
+QString Units::formatArchitectural(double length, RS2::Unit /*unit*/, int prec, bool showUnit)
 {
        QString ret;
        bool neg = (length < 0.0);
@@ -590,7 +590,7 @@ QString RS_Units::formatArchitectural(double length, RS2::Unit /*unit*/, int pre
  * @param prec Precisision of the value (e.g. 0.001 or 1/128 = 0.0078125)
  & @param showUnit Append unit to the value.
  */
-QString RS_Units::formatFractional(double length, RS2::Unit /*unit*/, int prec, bool /*showUnit*/)
+QString Units::formatFractional(double length, RS2::Unit /*unit*/, int prec, bool /*showUnit*/)
 {
        QString ret;
 
@@ -609,8 +609,8 @@ QString RS_Units::formatFractional(double length, RS2::Unit /*unit*/, int prec,
 
        num = (int)floor(length);
 
-       denominator = (int)RS_Math::pow(2, prec);
-       nominator = RS_Math::round((length - num) * denominator);
+       denominator = (int)Math::pow(2, prec);
+       nominator = Math::round((length - num) * denominator);
 
        // fraction rounds up to 1:
        if (nominator == denominator)
@@ -623,7 +623,7 @@ QString RS_Units::formatFractional(double length, RS2::Unit /*unit*/, int prec,
        // Simplify the fraction
        if (nominator != 0 && denominator != 0)
        {
-               int gcd = RS_Math::findGCD(nominator, denominator);
+               int gcd = Math::findGCD(nominator, denominator);
 
                if (gcd != 0)
                {
@@ -632,7 +632,7 @@ QString RS_Units::formatFractional(double length, RS2::Unit /*unit*/, int prec,
                }
                else
                {
-                       RS_DEBUG->print(RS_Debug::D_WARNING, "RS_Units::formatFractional: invalid gcd");
+                       DEBUG->print(Debug::D_WARNING, "Units::formatFractional: invalid gcd");
                        nominator = 0;
                        denominator = 0;
                }
@@ -667,7 +667,7 @@ QString RS_Units::formatFractional(double length, RS2::Unit /*unit*/, int prec,
  *
  * @ret String with the formatted angle.
  */
-QString RS_Units::formatAngle(double angle, RS2::AngleFormat format, int prec)
+QString Units::formatAngle(double angle, RS2::AngleFormat format, int prec)
 {
        QString ret;
        double value;
@@ -676,16 +676,16 @@ QString RS_Units::formatAngle(double angle, RS2::AngleFormat format, int prec)
        {
        case RS2::DegreesDecimal:
        case RS2::DegreesMinutesSeconds:
-               value = RS_Math::rad2deg(angle);
+               value = Math::rad2deg(angle);
                break;
        case RS2::Radians:
                value = angle;
                break;
        case RS2::Gradians:
-               value = RS_Math::rad2gra(angle);
+               value = Math::rad2gra(angle);
                break;
        default:
-               RS_DEBUG->print(RS_Debug::D_WARNING, "RS_Units::formatAngle: Unknown Angle Unit");
+               DEBUG->print(Debug::D_WARNING, "Units::formatAngle: Unknown Angle Unit");
                return "";
                break;
        }
@@ -695,7 +695,7 @@ QString RS_Units::formatAngle(double angle, RS2::AngleFormat format, int prec)
        case RS2::DegreesDecimal:
        case RS2::Radians:
        case RS2::Gradians:
-               ret = RS_Math::doubleToString(value, prec);
+               ret = Math::doubleToString(value, prec);
 
                if (format == RS2::DegreesDecimal)
                        ret += QChar(0xB0);
@@ -715,7 +715,7 @@ QString RS_Units::formatAngle(double angle, RS2::AngleFormat format, int prec)
                vMinutes = (int)floor((value - vDegrees) * 60.0);
                vSeconds = (value - vDegrees - (vMinutes / 60.0)) * 3600.0;
 
-               seconds = RS_Math::doubleToString(vSeconds, (prec > 1 ? prec - 2 : 0));
+               seconds = Math::doubleToString(vSeconds, (prec > 1 ? prec - 2 : 0));
 
                if (seconds == "60")
                {
@@ -766,7 +766,7 @@ QString RS_Units::formatAngle(double angle, RS2::AngleFormat format, int prec)
 /**
  * @return Size of the given paper format.
  */
-Vector RS_Units::paperFormatToSize(RS2::PaperFormat p)
+Vector Units::paperFormatToSize(RS2::PaperFormat p)
 {
        Vector ret(false);
 
@@ -917,14 +917,14 @@ Vector RS_Units::paperFormatToSize(RS2::PaperFormat p)
  * Gets the paper format which matches the given size. If no
  * format matches, RS2::Custom is returned.
  */
-RS2::PaperFormat RS_Units::paperSizeToFormat(const Vector s)
+RS2::PaperFormat Units::paperSizeToFormat(const Vector s)
 {
        Vector ts1;
        Vector ts2;
 
        for(int i=(int)RS2::Custom; i<=(int)RS2::NPageSize; ++i)
        {
-               ts1 = RS_Units::paperFormatToSize((RS2::PaperFormat)i);
+               ts1 = Units::paperFormatToSize((RS2::PaperFormat)i);
                ts2 = Vector(ts1.y, ts1.x);
 
                if (ts1.distanceTo(s) < 1.0e-4 || ts2.distanceTo(s) < 1.0e-4)
@@ -937,7 +937,7 @@ RS2::PaperFormat RS_Units::paperSizeToFormat(const Vector s)
 /**
  * Converts a paper format to a string (e.g. for a combobox).
  */
-QString RS_Units::paperFormatToString(RS2::PaperFormat p)
+QString Units::paperFormatToString(RS2::PaperFormat p)
 {
        QString ret = "";
 
@@ -1084,7 +1084,7 @@ QString RS_Units::paperFormatToString(RS2::PaperFormat p)
 /**
  * Converts a string to a paper format.
  */
-RS2::PaperFormat RS_Units::stringToPaperFormat(const QString & p)
+RS2::PaperFormat Units::stringToPaperFormat(const QString & p)
 {
        QString ls = p.toLower();
        RS2::PaperFormat ret = RS2::Custom;
@@ -1183,102 +1183,102 @@ RS2::PaperFormat RS_Units::stringToPaperFormat(const QString & p)
 /**
  * Performs some testing for the math class.
  */
-void RS_Units::test()
+void Units::test()
 {
        QString s;
        double v;
 
        /*
-       std::cout << "RS_Units::test: formatLinear (decimal):\n";
+       std::cout << "Units::test: formatLinear (decimal):\n";
        v = 0.1;
-       s = RS_Units::formatLinear(v, RS2::Millimeter, RS2::Decimal,
+       s = Units::formatLinear(v, RS2::Millimeter, RS2::Decimal,
                                                                3, false);
        std::cout << "s: " << s << "\n";
        assert(s=="0.1");
        v = 0.01;
-       s = RS_Units::formatLinear(v, RS2::Millimeter, RS2::Decimal,
+       s = Units::formatLinear(v, RS2::Millimeter, RS2::Decimal,
                                                                3, false);
        std::cout << "s: " << s << "\n";
        assert(s=="0.01");
        v = 0.001;
-       s = RS_Units::formatLinear(v, RS2::Millimeter, RS2::Decimal,
+       s = Units::formatLinear(v, RS2::Millimeter, RS2::Decimal,
                                                                3, false);
        std::cout << "s: " << s << "\n";
        assert(s=="0.001");
        v = 0.009;
-       s = RS_Units::formatLinear(v, RS2::Millimeter, RS2::Decimal,
+       s = Units::formatLinear(v, RS2::Millimeter, RS2::Decimal,
                                                                2, false);
        std::cout << "s: " << s << "\n";
        assert(s=="0.01");
        v = 0.005;
-       s = RS_Units::formatLinear(v, RS2::Millimeter, RS2::Decimal,
+       s = Units::formatLinear(v, RS2::Millimeter, RS2::Decimal,
                                                                2, false);
        std::cout << "s: " << s << "\n";
        assert(s=="0.01");
        v = 0.0049999;
-       s = RS_Units::formatLinear(v, RS2::Millimeter, RS2::Decimal,
+       s = Units::formatLinear(v, RS2::Millimeter, RS2::Decimal,
                                                                2, false);
        std::cout << "s: " << s << "\n";
        assert(s=="0");
 
        v = 0.1;
-       s = RS_Units::formatLinear(v, RS2::Millimeter, RS2::Decimal,
+       s = Units::formatLinear(v, RS2::Millimeter, RS2::Decimal,
                                                                4, true);
        std::cout << "s: " << s << "\n";
        assert(s=="0.1mm");
 
 
-       std::cout << "RS_Units::test: formatLinear (fractional):\n";
+       std::cout << "Units::test: formatLinear (fractional):\n";
        v = 1.2;
-       s = RS_Units::formatLinear(v, RS2::Inch, RS2::Fractional,
+       s = Units::formatLinear(v, RS2::Inch, RS2::Fractional,
                                                                6, false);
        std::cout << "s: " << s << "\n";
        assert(s=="1 13/64");
 
        v = 1.2;
-       s = RS_Units::formatLinear(v, RS2::Inch, RS2::Fractional,
+       s = Units::formatLinear(v, RS2::Inch, RS2::Fractional,
                                                                8, false);
        std::cout << "s: " << s << "\n";
        assert(s=="1 51/256");
 
        v = 0.2;
-       s = RS_Units::formatLinear(v, RS2::Inch, RS2::Fractional,
+       s = Units::formatLinear(v, RS2::Inch, RS2::Fractional,
                                                                8, false);
        std::cout << "s: " << s << "\n";
        assert(s=="51/256");
 
        v = 4.5;
-       s = RS_Units::formatLinear(v, RS2::Inch, RS2::Fractional,
+       s = Units::formatLinear(v, RS2::Inch, RS2::Fractional,
                                                                6, true);
        std::cout << "s: " << s << "\n";
        assert(s=="4 1/2");
 
        v = 0.001;
-       s = RS_Units::formatLinear(v, RS2::Inch, RS2::Fractional,
+       s = Units::formatLinear(v, RS2::Inch, RS2::Fractional,
                                                                0, false);
        std::cout << "s: " << s << "\n";
        assert(s=="0");
 
        v = 0.01;
-       s = RS_Units::formatLinear(v, RS2::Inch, RS2::Fractional,
+       s = Units::formatLinear(v, RS2::Inch, RS2::Fractional,
                                                                8, false);
        std::cout << "s: " << s << "\n";
        assert(s=="3/256");
 
        v = 0.0078125;
-       s = RS_Units::formatLinear(v, RS2::Inch, RS2::Fractional,
+       s = Units::formatLinear(v, RS2::Inch, RS2::Fractional,
                                                                8, false);
        std::cout << "s: " << s << "\n";
        assert(s=="1/128");
 
        v = 0.001;
-       s = RS_Units::formatLinear(v, RS2::Inch, RS2::Fractional,
+       s = Units::formatLinear(v, RS2::Inch, RS2::Fractional,
                                                                8, false);
        std::cout << "s: " << s << "\n";
        assert(s=="0");
 
        v = 9.9999;
-       s = RS_Units::formatLinear(v, RS2::Inch, RS2::Fractional,
+       s = Units::formatLinear(v, RS2::Inch, RS2::Fractional,
                                                                6, false);
        std::cout << "s: " << s << "\n";
        assert(s=="10");
@@ -1288,21 +1288,21 @@ void RS_Units::test()
        {
                for(int prec=0; prec<=6; ++prec)
                {
-                       s = RS_Units::formatLinear(v, RS2::Inch, RS2::Architectural, prec, true);
+                       s = Units::formatLinear(v, RS2::Inch, RS2::Architectural, prec, true);
                        std::cout << "prec: " << prec << " v: " << v << " s: " << s.toAscii().data() << "\n";
                }
        }
 
        /*for (v=0.0; v<10.0; v+=0.001) {
-               s = RS_Units::formatLinear(v, RS2::Foot, RS2::Fractional,
+               s = Units::formatLinear(v, RS2::Foot, RS2::Fractional,
                                                                1.0/128.0, true);
                std::cout << "v: " << v << " s: " << s << "\n";
 }*/
 
        /*
-       std::cout << "RS_Units::test: formatLinear (scientific):\n";
+       std::cout << "Units::test: formatLinear (scientific):\n";
        v = 0.001;
-       s = RS_Units::formatLinear(v, RS2::Millimeter, RS2::Scientific,
+       s = Units::formatLinear(v, RS2::Millimeter, RS2::Scientific,
                                                        0.0001, false);
        std::cout << "s: " << s << "\n";
        assert(s=="1.0e-3");
@@ -1310,31 +1310,31 @@ void RS_Units::test()
 
 
        /*
-       std::cout << "RS_Units::test: formatAngle (deg / decimal):\n";
+       std::cout << "Units::test: formatAngle (deg / decimal):\n";
        v = 0.0261799;
-       s = RS_Units::formatAngle(v, RS2::DegreesDecimal, 2);
+       s = Units::formatAngle(v, RS2::DegreesDecimal, 2);
        std::cout << "s: " << s << "\n";
        assert(s=="1.5�");
 
        v = 0;
-       s = RS_Units::formatAngle(v, RS2::DegreesDecimal, 2);
+       s = Units::formatAngle(v, RS2::DegreesDecimal, 2);
        std::cout << "s: " << s << "\n";
        assert(s=="0�");
 
        v = 1.5707963;
-       s = RS_Units::formatAngle(v, RS2::DegreesDecimal, 2);
+       s = Units::formatAngle(v, RS2::DegreesDecimal, 2);
        std::cout << "s: " << s << "\n";
        assert(s=="90�");
 
-       std::cout << "RS_Units::test: formatAngle (deg / d/m/s):\n";
+       std::cout << "Units::test: formatAngle (deg / d/m/s):\n";
 
        v = 0.0260926;
-       s = RS_Units::formatAngle(v, RS2::DegreesMinutesSeconds, 1);
+       s = Units::formatAngle(v, RS2::DegreesMinutesSeconds, 1);
        std::cout << "s: " << s << "\n";
        assert(s=="1� 29' 42\"");
 
        v = 0.0261799;
-       s = RS_Units::formatAngle(v, RS2::DegreesMinutesSeconds, 1);
+       s = Units::formatAngle(v, RS2::DegreesMinutesSeconds, 1);
        std::cout << "s: " << s << "\n";
        assert(s=="1� 30' 0\"");
        */
index f90c2d228cba39cc41897cbb8383d65c48f17194..a0916db79e14854b9dd65da3638f02ec1c642195 100644 (file)
@@ -2,7 +2,7 @@
 #define __UNITS_H__
 
 #include <QtCore>
-#include "rs.h"
+#include "enums.h"
 #include "vector.h"
 
 /**
@@ -10,7 +10,7 @@
  *
  * @author Andrew Mustun
  */
-class RS_Units
+class Units
 {
        public:
                //static char* unit2sign(RS2::Unit unit);
index e7b332ea1e8ef12571c9cbfcee15d10bce561e04..d5c10cdbc3055b2af5bbfb9a8352eba10f8e6c31 100644 (file)
@@ -20,7 +20,7 @@
  * Converts a double to a string cutting away unnecessary 0's.
  * e.g. 2.70000  -> 2.7
  */
-QString RS_Utility::doubleToString(double value, int precision/*= 6*/)
+QString Utility::doubleToString(double value, int precision/*= 6*/)
 {
        QString ret;
 
index c6e176dc4fa4781e74b1b899feca43855ca4acb8..2bfe233f52492b255a7b5c9d080f03e87ff0dcc2 100644 (file)
@@ -8,7 +8,7 @@
  *
  * @author Andrew Mustun
  */
-class RS_Utility
+class Utility
 {
        public:
                static QString doubleToString(double value, int precision = 6);
index edc0245677841765e6a239990d516e29b810ab2b..52e77ca3519d8255cb347f51edcce66eff930687 100644 (file)
 // We probably could replace all this crap with QVariant...
 #include "variable.h"
 
-RS_Variable::RS_Variable()
+Variable::Variable()
 {
        type = RS2::VariableVoid;
        code = 0;
 }
 
-RS_Variable::RS_Variable(const Vector & v, int c)
+Variable::Variable(const Vector & v, int c)
 {
        setVector(v);
        code = c;
 }
 
-RS_Variable::RS_Variable(const QString & v, int c)
+Variable::Variable(const QString & v, int c)
 {
        setString(v);
        code = c;
 }
 
-RS_Variable::RS_Variable(int v, int c)
+Variable::Variable(int v, int c)
 {
        setInt(v);
        code = c;
 }
 
-RS_Variable::RS_Variable(double v, int c)
+Variable::Variable(double v, int c)
 {
        setDouble(v);
        code = c;
 }
 
-/*virtual*/ RS_Variable::~RS_Variable()
+/*virtual*/ Variable::~Variable()
 {
 }
 
-void RS_Variable::setString(const QString & str)
+void Variable::setString(const QString & str)
 {
        contents.s = str;
        type = RS2::VariableString;
 }
 
-void RS_Variable::setInt(int i)
+void Variable::setInt(int i)
 {
        contents.i = i;
        type = RS2::VariableInt;
 }
 
-void RS_Variable::setDouble(double d)
+void Variable::setDouble(double d)
 {
        contents.d = d;
        type = RS2::VariableDouble;
 }
 
-void RS_Variable::setVector(const Vector & v)
+void Variable::setVector(const Vector & v)
 {
        contents.v = v;
        type = RS2::VariableVector;
 }
 
-QString RS_Variable::getString()
+QString Variable::getString()
 {
        return contents.s;
 }
 
-int RS_Variable::getInt()
+int Variable::getInt()
 {
        return contents.i;
 }
 
-double RS_Variable::getDouble()
+double Variable::getDouble()
 {
        return contents.d;
 }
 
-Vector RS_Variable::getVector()
+Vector Variable::getVector()
 {
        return contents.v;
 }
 
-RS2::VariableType RS_Variable::getType()
+RS2::VariableType Variable::getType()
 {
        return type;
 }
 
-int RS_Variable::getCode()
+int Variable::getCode()
 {
        return code;
 }
index 68319dd282bbb2d8575359e40ebbbebd4dafadef..b0c45950ba4c5d7b541528869d36667c708b3082 100644 (file)
@@ -2,7 +2,7 @@
 #define __VARIABLE_H__
 
 #include <QtCore>
-#include "rs.h"
+#include "enums.h"
 #include "vector.h"
 #include "debug.h"
 
@@ -13,7 +13,7 @@
  *
  * @author Andrew Mustun
  */
-class RS_Variable
+class Variable
 {
        public:
                typedef struct {
@@ -21,14 +21,14 @@ class RS_Variable
                        int i;
                        double d;
                        Vector v;
-               } RS_VariableContents;
+               } VariableContents;
 
-               RS_Variable();
-               RS_Variable(const Vector & v, int c);
-               RS_Variable(const QString & v, int c);
-               RS_Variable(int v, int c);
-               RS_Variable(double v, int c);
-               virtual ~RS_Variable();
+               Variable();
+               Variable(const Vector & v, int c);
+               Variable(const QString & v, int c);
+               Variable(int v, int c);
+               Variable(double v, int c);
+               virtual ~Variable();
 
                void setString(const QString & str);
                void setInt(int i);
@@ -41,10 +41,10 @@ class RS_Variable
                RS2::VariableType getType();
                int getCode();
 
-               //friend std::ostream& operator << (std::ostream& os, RS_Variable& v);
+               //friend std::ostream& operator << (std::ostream& os, Variable& v);
 
        private:
-               RS_VariableContents contents;
+               VariableContents contents;
                RS2::VariableType type;
                int code;
 };
index e3a32d50c14d2495757ee2c5a40c72c8caa88f5d..d880c58e760f08ec56d603b6ce323a94bff01f06 100644 (file)
 /**
  * Constructor.
  */
-RS_VariableDict::RS_VariableDict()
+VariableDict::VariableDict()
 {
 #warning "!!! Need to deal with setAutoDelete() Qt3->Qt4 !!!"
 //     variables.setAutoDelete(true);
 }
 
-/*virtual*/ RS_VariableDict::~RS_VariableDict()
+/*virtual*/ VariableDict::~VariableDict()
 {
 }
 
 /**
  * Removes all variables in the blocklist.
  */
-void RS_VariableDict::clear()
+void VariableDict::clear()
 {
        variables.clear();
 }
@@ -40,7 +40,7 @@ void RS_VariableDict::clear()
 /**
  * @return Number of variables available.
  */
-int RS_VariableDict::count()
+int VariableDict::count()
 {
        return variables.count();
 }
@@ -49,7 +49,7 @@ int RS_VariableDict::count()
  * Activates the given block.
  * Listeners are notified.
  */
-//void RS_VariableDict::activateBlock(const QString& name) {
+//void VariableDict::activateBlock(const QString& name) {
 //     activateBlock(findBlock(name));
 //}
 
@@ -57,11 +57,11 @@ int RS_VariableDict::count()
  * Activates the given block.
  * Listeners are notified.
  */
-/*void RS_VariableDict::activateBlock(RS_Block* block) {
+/*void VariableDict::activateBlock(Block* block) {
        activeBlock = block;
 
        for (uint i=0; i<blockListListeners.count(); ++i) {
-               RS_VariableDictListener* l = blockListListeners.at(i);
+               VariableDictListener* l = blockListListeners.at(i);
 
                l->blockActivated(activeBlock);
        }
@@ -71,68 +71,68 @@ int RS_VariableDict::count()
  * Adds a variable to the variable dictionary. If a variable with the
  * same name already exists, is will be overwritten.
  */
-void RS_VariableDict::add(const QString & key, const QString & value, int code)
+void VariableDict::add(const QString & key, const QString & value, int code)
 {
-       RS_DEBUG->print("RS_VariableDict::addVariable()");
+       DEBUG->print("VariableDict::addVariable()");
 
        if (key.isEmpty())
        {
-               RS_DEBUG->print("RS_VariableDict::addVariable(): No empty keys allowed.", RS_Debug::D_WARNING);
+               DEBUG->print("VariableDict::addVariable(): No empty keys allowed.", Debug::D_WARNING);
                return;
        }
 
-       variables.replace(key, new RS_Variable(value, code));
+       variables.replace(key, new Variable(value, code));
 }
 
 /**
  * Adds a variable to the variable dictionary. If a variable with the
  * same name already exists, is will be overwritten.
  */
-void RS_VariableDict::add(const QString & key, int value, int code)
+void VariableDict::add(const QString & key, int value, int code)
 {
-       RS_DEBUG->print("RS_VariableDict::addVariable()");
+       DEBUG->print("VariableDict::addVariable()");
 
        if (key.isEmpty())
        {
-               RS_DEBUG->print("RS_VariableDict::addVariable(): No empty keys allowed.", RS_Debug::D_WARNING);
+               DEBUG->print("VariableDict::addVariable(): No empty keys allowed.", Debug::D_WARNING);
                return;
        }
 
-       variables.replace(key, new RS_Variable(value, code));
+       variables.replace(key, new Variable(value, code));
 }
 
 /**
  * Adds a variable to the variable dictionary. If a variable with the
  * same name already exists, is will be overwritten.
  */
-void RS_VariableDict::add(const QString & key, double value, int code)
+void VariableDict::add(const QString & key, double value, int code)
 {
-       RS_DEBUG->print("RS_VariableDict::addVariable()");
+       DEBUG->print("VariableDict::addVariable()");
 
        if (key.isEmpty())
        {
-               RS_DEBUG->print("RS_VariableDict::addVariable(): No empty keys allowed.", RS_Debug::D_WARNING);
+               DEBUG->print("VariableDict::addVariable(): No empty keys allowed.", Debug::D_WARNING);
                return;
        }
 
-       variables.replace(key, new RS_Variable(value, code));
+       variables.replace(key, new Variable(value, code));
 }
 
 /**
  * Adds a variable to the variable dictionary. If a variable with the
  * same name already exists, is will be overwritten.
  */
-void RS_VariableDict::add(const QString & key, const Vector & value, int code)
+void VariableDict::add(const QString & key, const Vector & value, int code)
 {
-       RS_DEBUG->print("RS_VariableDict::addVariable()");
+       DEBUG->print("VariableDict::addVariable()");
 
        if (key.isEmpty())
        {
-               RS_DEBUG->print("RS_VariableDict::addVariable(): No empty keys allowed.", RS_Debug::D_WARNING);
+               DEBUG->print("VariableDict::addVariable(): No empty keys allowed.", Debug::D_WARNING);
                return;
        }
 
-       variables.replace(key, new RS_Variable(value, code));
+       variables.replace(key, new Variable(value, code));
 }
 
 /**
@@ -144,11 +144,11 @@ void RS_VariableDict::add(const QString & key, const Vector & value, int code)
  * @return The value for the given variable or the given default value
  * if the variable couldn't be found.
  */
-Vector RS_VariableDict::getVector(const QString & key, const Vector & def)
+Vector VariableDict::getVector(const QString & key, const Vector & def)
 {
        Vector ret;
-//     RS_Variable * ptr = variables.find(key);
-       RS_Variable * ptr = variables.value(key);
+//     Variable * ptr = variables.find(key);
+       Variable * ptr = variables.value(key);
 
        if (ptr == NULL || ptr->getType() != RS2::VariableVector)
                ret = def;
@@ -167,34 +167,34 @@ Vector RS_VariableDict::getVector(const QString & key, const Vector & def)
  * @return The value for the given variable or the given default value
  * if the variable couldn't be found.
  */
-QString RS_VariableDict::getString(const QString & key, const QString & def)
+QString VariableDict::getString(const QString & key, const QString & def)
 {
        QString ret;
 
-       RS_DEBUG->print("RS_VariableDict::getString: 001");
-       RS_DEBUG->print("RS_VariableDict::getString: key: '%s'", key.toLatin1().data());
+       DEBUG->print("VariableDict::getString: 001");
+       DEBUG->print("VariableDict::getString: key: '%s'", key.toLatin1().data());
 
-//     RS_Variable * ptr = variables.find(key);
-       RS_Variable * ptr = variables.value(key);
-       RS_DEBUG->print("RS_VariableDict::getString: 002");
+//     Variable * ptr = variables.find(key);
+       Variable * ptr = variables.value(key);
+       DEBUG->print("VariableDict::getString: 002");
 
        if (ptr == NULL)
        {
-               RS_DEBUG->print("RS_VariableDict::getString: 003");
+               DEBUG->print("VariableDict::getString: 003");
                ret = def;
        }
        else if (ptr->getType() != RS2::VariableString)
        {
-               RS_DEBUG->print("RS_VariableDict::getString: 004");
+               DEBUG->print("VariableDict::getString: 004");
                ret = def;
        }
        else
        {
-               RS_DEBUG->print("RS_VariableDict::getString: 005");
+               DEBUG->print("VariableDict::getString: 005");
                ret = ptr->getString();
        }
 
-       RS_DEBUG->print("RS_VariableDict::getString: 006");
+       DEBUG->print("VariableDict::getString: 006");
 
        return ret;
 }
@@ -208,11 +208,11 @@ QString RS_VariableDict::getString(const QString & key, const QString & def)
  * @return The value for the given variable or the given default value
  * if the variable couldn't be found.
  */
-int RS_VariableDict::getInt(const QString & key, int def)
+int VariableDict::getInt(const QString & key, int def)
 {
        int ret;
-//     RS_Variable * ptr = variables.find(key);
-       RS_Variable * ptr = variables.value(key);
+//     Variable * ptr = variables.find(key);
+       Variable * ptr = variables.value(key);
 
        if (ptr == NULL || ptr->getType() != RS2::VariableInt)
                ret = def;
@@ -231,11 +231,11 @@ int RS_VariableDict::getInt(const QString & key, int def)
  * @return The value for the given variable or the given default value
  * if the variable couldn't be found.
  */
-double RS_VariableDict::getDouble(const QString & key, double def)
+double VariableDict::getDouble(const QString & key, double def)
 {
        double ret;
-//     RS_Variable * ptr = variables.find(key);
-       RS_Variable * ptr = variables.value(key);
+//     Variable * ptr = variables.find(key);
+       Variable * ptr = variables.value(key);
 
        if (ptr == NULL || ptr->getType() != RS2::VariableDouble)
                ret = def;
@@ -250,9 +250,9 @@ double RS_VariableDict::getDouble(const QString & key, double def)
  * used after adding a lot of variables without auto-update.
  */
 /*
-void RS_VariableDict::addBlockNotification() {
+void VariableDict::addBlockNotification() {
     for (uint i=0; i<blockListListeners.count(); ++i) {
-        RS_VariableDictListener* l = blockListListeners.at(i);
+        VariableDictListener* l = blockListListeners.at(i);
         l->blockAdded(NULL);
     }
 }
@@ -263,16 +263,16 @@ void RS_VariableDict::addBlockNotification() {
  * TODO: Listeners are notified after the block was removed from
  * the list but before it gets deleted.
  */
-void RS_VariableDict::remove(const QString & key)
+void VariableDict::remove(const QString & key)
 {
-       RS_DEBUG->print("RS_VariableDict::removeVariable()");
+       DEBUG->print("VariableDict::removeVariable()");
 
        // here the block is removed from the list but not deleted
        variables.remove(key);
 }
 
-//Q3Dict<RS_Variable> & RS_VariableDict::getVariableDict()
-QMultiHash<QString, RS_Variable *> & RS_VariableDict::getVariableDict()
+//Q3Dict<Variable> & VariableDict::getVariableDict()
+QMultiHash<QString, Variable *> & VariableDict::getVariableDict()
 {
        return variables;
 }
@@ -280,11 +280,11 @@ QMultiHash<QString, RS_Variable *> & RS_VariableDict::getVariableDict()
 /**
  * Dumps the variables to stdout.
  */
-std::ostream & operator<<(std::ostream & os, RS_VariableDict & d)
+std::ostream & operator<<(std::ostream & os, VariableDict & d)
 {
        os << "Variables: \n";
-//     Q3DictIterator<RS_Variable> it(d.variables);
-       QHashIterator<QString, RS_Variable *> it(d.variables);
+//     Q3DictIterator<Variable> it(d.variables);
+       QHashIterator<QString, Variable *> it(d.variables);
 
        while (it.hasNext())
        {
index 5ac8f7a371fe95d427f9730ea9b22b0c344701f8..60468bfbc315e4846b13fe236f7e5e95e1e6709f 100644 (file)
  *
  * @author Andrew Mustun
  */
-class RS_VariableDict
+class VariableDict
 {
        public:
-               RS_VariableDict();
-               virtual ~RS_VariableDict();
+               VariableDict();
+               virtual ~VariableDict();
 
                void clear();
                int count();
@@ -31,17 +31,17 @@ class RS_VariableDict
                double getDouble(const QString & key, double def);
 
                virtual void remove(const QString & key);
-//             Q3Dict<RS_Variable> & getVariableDict();
-               QMultiHash<QString, RS_Variable *> & getVariableDict();
+//             Q3Dict<Variable> & getVariableDict();
+               QMultiHash<QString, Variable *> & getVariableDict();
 
-               //void addVariableDictListener(RS_VariableDictListener* listener);
+               //void addVariableDictListener(VariableDictListener* listener);
 
-               friend std::ostream & operator<<(std::ostream & os, RS_VariableDict & v);
+               friend std::ostream & operator<<(std::ostream & os, VariableDict & v);
 
        private:
                //! Variables for the graphic
-//             Q3Dict<RS_Variable> variables;
-               QMultiHash<QString, RS_Variable *> variables;
+//             Q3Dict<Variable> variables;
+               QMultiHash<QString, Variable *> variables;
 };
 
 #endif
index a733e732af4ddfeb671ab27ee9ceb79848cd7c76..0a98ba1fbcf015e6eac4f84c8494dafa75c0279c 100644 (file)
@@ -16,7 +16,7 @@
 
 #include "vector.h"
 
-#include "rs.h"                                                                        // For RS_MIN/MAXDOUBLE (!)
+#include "enums.h"                                                                     // For RS_MIN/MAXDOUBLE (!)
 #include "debug.h"
 #include "mathextra.h"
 
@@ -25,7 +25,7 @@
  */
 Vector::Vector()
 {
-    //RS_DEBUG->print("Vector::Vector");
+    //DEBUG->print("Vector::Vector");
     set(0.0, 0.0, 0.0);
 }
 
@@ -34,7 +34,7 @@ Vector::Vector()
  */
 Vector::Vector(double vx, double vy, double vz)
 {
-    //RS_DEBUG->print("Vector::Vector");
+    //DEBUG->print("Vector::Vector");
     set(vx, vy, vz);
 }
 
@@ -54,7 +54,7 @@ Vector::Vector(double vx, double vy, double vz)
  */
 Vector::Vector(bool valid)
 {
-       //RS_DEBUG->print("Vector::Vector");
+       //DEBUG->print("Vector::Vector");
        set(0.0, 0.0, 0.0);
        this->valid = valid;
 }
@@ -64,7 +64,7 @@ Vector::Vector(bool valid)
  */
 Vector::~Vector()
 {
-       //RS_DEBUG->print("Vector::~Vector");
+       //DEBUG->print("Vector::~Vector");
 }
 
 /**
@@ -100,7 +100,7 @@ double Vector::angle() const
        if (m > 1.0e-6)
        {
                double dp = dotP(*this, Vector(1.0, 0.0));
-               RS_DEBUG->print("Vector::angle: dp/m: %f/%f", dp, m);
+               DEBUG->print("Vector::angle: dp/m: %f/%f", dp, m);
 
                if (dp / m >= 1.0)
                        ret = 0.0;
@@ -141,7 +141,7 @@ double Vector::magnitude() const
        }
        else
        {
-               ret = sqrt(RS_Math::pow(x, 2) + RS_Math::pow(y, 2) + RS_Math::pow(z, 2));
+               ret = sqrt(Math::pow(x, 2) + Math::pow(y, 2) + Math::pow(z, 2));
        }
 
        return ret;
@@ -197,20 +197,20 @@ Vector Vector::move(Vector offset)
  */
 Vector Vector::rotate(double ang)
 {
-       RS_DEBUG->print("Vector::rotate: angle: %f", ang);
+       DEBUG->print("Vector::rotate: angle: %f", ang);
 
        double r = magnitude();
 
-       RS_DEBUG->print("Vector::rotate: r: %f", r);
+       DEBUG->print("Vector::rotate: r: %f", r);
 
        double a = angle() + ang;
 
-       RS_DEBUG->print("Vector::rotate: a: %f", a);
+       DEBUG->print("Vector::rotate: a: %f", a);
 
        x = cos(a) * r;
        y = sin(a) * r;
 
-       RS_DEBUG->print("Vector::rotate: x/y: %f/%f", x, y);
+       DEBUG->print("Vector::rotate: x/y: %f/%f", x, y);
 
        return *this;
 }
@@ -249,8 +249,8 @@ Vector Vector::scale(Vector center, Vector factor)
 Vector Vector::mirror(Vector axisPoint1, Vector axisPoint2)
 {
        /*
-       RS_ConstructionLine axis(NULL,
-               RS_ConstructionLineData(axisPoint1, axisPoint2));
+       ConstructionLine axis(NULL,
+               ConstructionLineData(axisPoint1, axisPoint2));
 
        Vector xp = axis.getNearestPointOnEntity(*this);
        xp = xp - (*this);
index d72a72a63ae1769b0f6de4751640f9860aa929cc..4566306991a89cd32e2aec83ec83d831bc4cca4b 100644 (file)
@@ -16,7 +16,7 @@
 
 #include "vectorsolutions.h"
 
-#include "rs.h"                                                                        // For RS_MIN/MAXDOUBLE (!)
+#include "enums.h"                                                                     // For RS_MIN/MAXDOUBLE (!)
 #include "mathextra.h"
 
 /**
index c241d1756254fee76b53a0f138fc9b32601d1e93..bd22b5ad8ab89245e8a5ffc9ec676b1ac263bfc9 100644 (file)
@@ -74,7 +74,7 @@ void ArcOptions::setAction(ActionInterface * a, bool update)
        }
        else
        {
-               RS_DEBUG->print(RS_Debug::D_ERROR, "QG_ArcOptions::setAction: wrong action type");
+               DEBUG->print(Debug::D_ERROR, "QG_ArcOptions::setAction: wrong action type");
                action = NULL;
        }
 }
index 23137ba9320a30e40c7a1b830fa56fecc3c390bb..99c5fac26b598205f793c2a23d0be3c377e317a5 100644 (file)
@@ -69,7 +69,7 @@ void ArcTangentialOptions::setAction(ActionInterface * a, bool update)
        }
        else
        {
-               RS_DEBUG->print(RS_Debug::D_ERROR,
+               DEBUG->print(Debug::D_ERROR,
                        "ArcTangentialOptions::setAction: wrong action type");
                action = NULL;
        }
@@ -84,7 +84,7 @@ void ArcTangentialOptions::setAction(ActionInterface * a, bool update)
     rbNeg->setChecked(reversed);
    }*/
 
-/*void ArcTangentialOptions::setData(RS_ArcData* d) {
+/*void ArcTangentialOptions::setData(ArcData* d) {
     data = d;
     updateDirection(false);
    }*/
@@ -92,6 +92,6 @@ void ArcTangentialOptions::setAction(ActionInterface * a, bool update)
 void ArcTangentialOptions::updateRadius(const QString & s)
 {
        if (action != NULL)
-               action->setRadius(RS_Math::eval(s));
+               action->setRadius(Math::eval(s));
 }
 
index 6d987374aa2add9301aed27bb743e9a6386b7e8b..d022a8b4fc732acfafec103a60cc397a6cda5157 100644 (file)
@@ -16,7 +16,7 @@
 
 #include "beveloptions.h"
 
-#include "rs.h"
+#include "enums.h"
 #include "actioninterface.h"
 #include "actionmodifybevel.h"
 #include "debug.h"
@@ -96,7 +96,7 @@ void BevelOptions::setAction(ActionInterface * a, bool update)
        }
        else
        {
-               RS_DEBUG->print(RS_Debug::D_ERROR, "BevelOptions::setAction: wrong action type");
+               DEBUG->print(Debug::D_ERROR, "BevelOptions::setAction: wrong action type");
                action = NULL;
        }
 }
@@ -106,7 +106,7 @@ void BevelOptions::updateData()
        if (action != NULL)
        {
                action->setTrim(cbTrim->isChecked());
-               action->setLength1(RS_Math::eval(leLength1->text()));
-               action->setLength2(RS_Math::eval(leLength2->text()));
+               action->setLength1(Math::eval(leLength1->text()));
+               action->setLength2(Math::eval(leLength2->text()));
        }
 }
index 335e5497b004fb8f7a3ccb98f308f5ad2151e45b..a97acbca92e7b3f0b1e38cfb388bcbbf202d8aa2 100644 (file)
@@ -29,26 +29,26 @@ BlockDialog::~BlockDialog()
 {
 }
 
-void BlockDialog::setBlockList(RS_BlockList * l)
+void BlockDialog::setBlockList(BlockList * l)
 {
-       RS_DEBUG->print("BlockDialog::setBlockList");
+       DEBUG->print("BlockDialog::setBlockList");
        blockList = l;
 
        if (blockList != NULL)
        {
-               RS_Block * block = blockList->getActive();
+               Block * block = blockList->getActive();
 
                if (block != NULL)
                        ui.leName->setText(block->getName());
                else
-                       RS_DEBUG->print(RS_Debug::D_ERROR, "BlockDialog::setBlockList: No block active.");
+                       DEBUG->print(Debug::D_ERROR, "BlockDialog::setBlockList: No block active.");
        }
 }
 
-RS_BlockData BlockDialog::getBlockData()
+BlockData BlockDialog::getBlockData()
 {
     /*if (blockList!=NULL) {
-      RS_Block* block = blockList->getActive();
+      Block* block = blockList->getActive();
         if (block!=NULL) {
            return blockList->rename(block, leName->text().latin1());
         }
@@ -56,7 +56,7 @@ RS_BlockData BlockDialog::getBlockData()
 
     return false;*/
 
-       return RS_BlockData(ui.leName->text(), Vector(0.0, 0.0), false);
+       return BlockData(ui.leName->text(), Vector(0.0, 0.0), false);
 }
 
 void BlockDialog::validate()
index 04863b2ba50ba0c37651ace10c03c255070079ea..64b49fa42e58358fb694ac1de97a43bb57e09f37 100644 (file)
@@ -4,7 +4,7 @@
 #include "ui_blockdialog.h"
 #include "block.h"
 
-class RS_BlockList;
+class BlockList;
 
 class BlockDialog : public QDialog
 {
@@ -14,15 +14,15 @@ class BlockDialog : public QDialog
                BlockDialog(QWidget * parent = 0, Qt::WindowFlags flags = 0);
                ~BlockDialog();
 
-               RS_BlockData getBlockData();
+               BlockData getBlockData();
 
        public slots:
-               void setBlockList(RS_BlockList * l);
+               void setBlockList(BlockList * l);
                void validate();
                void cancel();
 
        protected:
-               RS_BlockList * blockList;
+               BlockList * blockList;
 
        private:
                Ui::BlockDialog ui;
index d1ace027ae07b9ea6c48c8d72673d259ae07192c..e9cdcd436667747d28cf167c0cd303bd6e40b6f4 100644 (file)
@@ -29,7 +29,7 @@
 #include "cadtoolbarselect.h"
 #include "cadtoolbarsnap.h"
 #include "cadtoolbarsplines.h"
-#include "rs.h"
+#include "enums.h"
 
 CadToolBar::CadToolBar(QWidget * parent/*= 0*/, Qt::WindowFlags flags/*= 0*/):
        QWidget(parent, flags), actionHandler(NULL), currentTb(NULL), tbSplines(NULL),
index 85070233be56c1d699c2c124be328a23bec9b527..a0c38a423561270a22da22807613041593c6fe35 100644 (file)
@@ -16,7 +16,7 @@
 
 #include "circleoptions.h"
 
-#include "rs.h"
+#include "enums.h"
 #include "actioninterface.h"
 #include "actiondrawcirclecr.h"
 #include "debug.h"
@@ -72,7 +72,7 @@ void CircleOptions::setAction(ActionInterface * a, bool update)
        }
        else
        {
-               RS_DEBUG->print(RS_Debug::D_ERROR,
+               DEBUG->print(Debug::D_ERROR,
                        "CircleOptions::setAction: wrong action type");
                action = NULL;
        }
@@ -81,5 +81,5 @@ void CircleOptions::setAction(ActionInterface * a, bool update)
 void CircleOptions::updateRadius(const QString & r)
 {
        if (action != NULL)
-               action->setRadius(RS_Math::eval(r));
+               action->setRadius(Math::eval(r));
 }
index d4c342eee13d298075f42a049aa2f3a340eb4b0b..5f48d69761d7b4a3c132a2d787b249931470ecf2 100644 (file)
@@ -87,7 +87,7 @@ void CommandWidget::tabPressed()
                choice = actionHandler->getAvailableCommands();
 
                if (choice.count() == 0)
-                       choice = RS_COMMANDS->complete(typed);
+                       choice = COMMANDS->complete(typed);
 
                for(QStringList::Iterator it=choice.begin(); it!=choice.end(); ++it)
                {
index 8cbf7bbe93f19c4fb38d4e5e2a9f3362a92f6b20..0769812c633acf74a45d72c5379f59fd249c5a58 100644 (file)
@@ -21,7 +21,7 @@
 #include "units.h"
 
 CoordinateWidget::CoordinateWidget(QWidget * parent/*= 0*/, Qt::WindowFlags flags/*= 0*/):
-       QWidget(parent, flags)//, actionHandler(NULL), cadToolBar(NULL)
+       QWidget(parent, flags)
 {
        ui.setupUi(this);
 
@@ -76,7 +76,7 @@ void CoordinateWidget::setAbsCoordinates(const Vector& v) {
        str.sprintf("%.4f / %.4f", v.x, v.y);
        lCoord1->setText(str);
 
-       double ang = RS_Math::rad2deg(v.angle());
+       double ang = Math::rad2deg(v.angle());
        double rad = v.magnitude();
        str.sprintf("%.4f < %.4f", rad, ang);
        lCoord1b->setText(str);
@@ -96,7 +96,7 @@ void CoordinateWidget::setRelCoordinates(const Vector& v) {
        str.sprintf("@%.4f / %.4f", v.x, v.y);
        lCoord2->setText(str);
 
-       double ang = RS_Math::rad2deg(v.angle());
+       double ang = Math::rad2deg(v.angle());
        double rad = v.magnitude();
        str.sprintf("@%.4f < %.4f", rad, ang);
        lCoord2b->setText(str);
@@ -142,26 +142,26 @@ void CoordinateWidget::setCoordinates(double x, double y, double rx, double ry,
        }
 
        // abs / rel coordinates:
-       QString absX = RS_Units::formatLinear(x, graphic->getUnit(), format, prec);
-       QString absY = RS_Units::formatLinear(y, graphic->getUnit(), format, prec);
-       QString relX = RS_Units::formatLinear(rx, graphic->getUnit(), format, prec);
-       QString relY = RS_Units::formatLinear(ry, graphic->getUnit(), format, prec);
+       QString absX = Units::formatLinear(x, graphic->getUnit(), format, prec);
+       QString absY = Units::formatLinear(y, graphic->getUnit(), format, prec);
+       QString relX = Units::formatLinear(rx, graphic->getUnit(), format, prec);
+       QString relY = Units::formatLinear(ry, graphic->getUnit(), format, prec);
 
        ui.lCoord1->setText(absX + ", " + absY);
        ui.lCoord2->setText(relX + ", " + relY);
 
        // polar coordinates:
        Vector v = Vector(x, y);
-       QString rStr = RS_Units::formatLinear(v.magnitude(), graphic->getUnit(), format, prec);
-       QString aStr = RS_Units::formatAngle(v.angle(), aformat, aprec);
+       QString rStr = Units::formatLinear(v.magnitude(), graphic->getUnit(), format, prec);
+       QString aStr = Units::formatAngle(v.angle(), aformat, aprec);
 
        // U+2221 = Measured angle
        QString str = rStr + " " + QChar(0x2221) + aStr;
        ui.lCoord1b->setText(str);
 
        v = Vector(rx, ry);
-       rStr = RS_Units::formatLinear(v.magnitude(), graphic->getUnit(), format, prec);
-       aStr = RS_Units::formatAngle(v.angle(), aformat, aprec);
+       rStr = Units::formatLinear(v.magnitude(), graphic->getUnit(), format, prec);
+       aStr = Units::formatAngle(v.angle(), aformat, aprec);
        str = rStr + " " + QChar(0x2221) + aStr;
        ui.lCoord2b->setText(str);
 }
index 1dfee98752b33a5ff60d6f0b55876a74fb40eb0a..def785a55900b691a262ab82fd6f16b214b98588 100644 (file)
@@ -2,7 +2,7 @@
 #define __COORDINATEWIDGET_H__
 
 #include "ui_coordinatewidget.h"
-#include "rs.h"
+#include "enums.h"
 
 class Drawing;
 class Vector;
index 9ec74b66f2a38c0668d1b4070e402cc1b92fa49e..ad6ea75b9a678bea78415c3510ce58a244231a95 100644 (file)
@@ -68,7 +68,7 @@ void DimLinearOptions::setAction(ActionInterface * a, bool update)
                QString sa;
 
                if (update)
-                       sa = QString("%1").arg(RS_Math::rad2deg(action->getAngle()));
+                       sa = QString("%1").arg(Math::rad2deg(action->getAngle()));
                else
                {
                        settings.beginGroup("Dimension");
@@ -79,7 +79,7 @@ void DimLinearOptions::setAction(ActionInterface * a, bool update)
        }
        else
        {
-               RS_DEBUG->print(RS_Debug::D_ERROR, "DimLinearOptions::setAction: wrong action type");
+               DEBUG->print(Debug::D_ERROR, "DimLinearOptions::setAction: wrong action type");
                action = NULL;
        }
 }
@@ -87,7 +87,7 @@ void DimLinearOptions::setAction(ActionInterface * a, bool update)
 void DimLinearOptions::updateAngle(const QString & a)
 {
        if (action != NULL)
-               action->setAngle(RS_Math::deg2rad(RS_Math::eval(a)));
+               action->setAngle(Math::deg2rad(Math::eval(a)));
 }
 
 void DimLinearOptions::setHor()
index 7ea2c88b86cb8bf791dfa0e9afcf61cbb0bd343d..4859f0b14213b940cc489c7b3a50809013f05e0f 100644 (file)
@@ -118,7 +118,7 @@ void DimOptions::setAction(ActionInterface * a, bool update)
        }
        else
        {
-               RS_DEBUG->print(RS_Debug::D_ERROR, "DimensionOptions::setAction: wrong action type");
+               DEBUG->print(Debug::D_ERROR, "DimensionOptions::setAction: wrong action type");
                action = NULL;
        }
 }
index b5a194a548a0650b753693ebae8a9333411acde0..847667a96d5f2bb8601f7fbe41c08ed382781b74 100644 (file)
@@ -30,7 +30,7 @@ DlgArc::~DlgArc()
 {
 }
 
-void DlgArc::setArc(RS_Arc & a)
+void DlgArc::setArc(Arc & a)
 {
        arc = &a;
        //pen = arc->getPen();
@@ -40,7 +40,7 @@ void DlgArc::setArc(RS_Arc & a)
        if (graphic != NULL)
                ui.cbLayer->init(*(graphic->getLayerList()), false, false);
 
-       RS_Layer * lay = arc->getLayer(false);
+       Layer * lay = arc->getLayer(false);
 
        if (lay != NULL)
                ui.cbLayer->setLayer(*lay);
@@ -52,20 +52,20 @@ void DlgArc::setArc(RS_Arc & a)
        ui.leCenterY->setText(s);
        s.setNum(arc->getRadius());
        ui.leRadius->setText(s);
-       s.setNum(RS_Math::rad2deg(arc->getAngle1()));
+       s.setNum(Math::rad2deg(arc->getAngle1()));
        ui.leAngle1->setText(s);
-       s.setNum(RS_Math::rad2deg(arc->getAngle2()));
+       s.setNum(Math::rad2deg(arc->getAngle2()));
        ui.leAngle2->setText(s);
        ui.cbReversed->setChecked(arc->isReversed());
 }
 
 void DlgArc::updateArc()
 {
-       arc->setCenter(Vector(RS_Math::eval(ui.leCenterX->text()),
-               RS_Math::eval(ui.leCenterY->text())));
-       arc->setRadius(RS_Math::eval(ui.leRadius->text()));
-       arc->setAngle1(RS_Math::deg2rad(RS_Math::eval(ui.leAngle1->text())));
-       arc->setAngle2(RS_Math::deg2rad(RS_Math::eval(ui.leAngle2->text())));
+       arc->setCenter(Vector(Math::eval(ui.leCenterX->text()),
+               Math::eval(ui.leCenterY->text())));
+       arc->setRadius(Math::eval(ui.leRadius->text()));
+       arc->setAngle1(Math::deg2rad(Math::eval(ui.leAngle1->text())));
+       arc->setAngle2(Math::deg2rad(Math::eval(ui.leAngle2->text())));
        arc->setReversed(ui.cbReversed->isChecked());
        arc->setPen(ui.wPen->getPen());
        arc->setLayer(ui.cbLayer->currentText());
index adfa018c13dd7001c8e00bde38e2d0d7476725c9..6be9b2f9155f8709657d772503fa3322ad3b767d 100644 (file)
@@ -3,7 +3,7 @@
 
 #include "ui_dlgarc.h"
 
-class RS_Arc;
+class Arc;
 
 class DlgArc: public QDialog
 {
@@ -14,11 +14,11 @@ class DlgArc: public QDialog
                ~DlgArc();
 
        public slots:
-               void setArc(RS_Arc & a);
+               void setArc(Arc & a);
                void updateArc();
 
        private:
-               RS_Arc * arc;
+               Arc * arc;
 
        private:
                Ui::DlgArc ui;
index 322ae48fba1424d33511865a7dd19031a31cd957..bb47b865d450db44d7f83fc781ebac025ce80fda 100644 (file)
@@ -30,7 +30,7 @@ DlgAttributes::~DlgAttributes()
 {
 }
 
-void DlgAttributes::setData(RS_AttributesData * data, RS_LayerList & layerList)
+void DlgAttributes::setData(AttributesData * data, LayerList & layerList)
 {
        this->data = data;
 
@@ -42,7 +42,7 @@ void DlgAttributes::setData(RS_AttributesData * data, RS_LayerList & layerList)
        ui.cbLayer->init(layerList, false, true);
        //}
        //cbLayer->setLayer(data->layer);
-       //RS_Layer* lay = line->getLayer(false);
+       //Layer* lay = line->getLayer(false);
        //if (lay!=NULL) {
        //    cbLayer->setLayer(*lay);
        //}
index 85de35c1cc51b7d4c6ff7faf7fee0727fc1402f7..7d3dffd8ed4f2276f6d77495195deb8c2e8436a8 100644 (file)
@@ -4,8 +4,8 @@
 #include "ui_dlgattributes.h"
 #include "pen.h"
 
-class RS_AttributesData;
-class RS_LayerList;
+class AttributesData;
+class LayerList;
 
 class DlgAttributes: public QDialog
 {
@@ -16,12 +16,12 @@ class DlgAttributes: public QDialog
                ~DlgAttributes();
 
        public slots:
-               void setData(RS_AttributesData * data, RS_LayerList & layerList);
+               void setData(AttributesData * data, LayerList & layerList);
                void updateData();
 
        private:
-               RS_Pen pen;
-               RS_AttributesData * data;
+               Pen pen;
+               AttributesData * data;
 
        private:
                Ui::DlgAttributes ui;
index 277405dbc1e1d0645978b8bfa57fdec950ffed03..f332890c3731d12c194d5266634ad0ee1c5e9293 100644 (file)
@@ -30,7 +30,7 @@ DlgCircle::~DlgCircle()
 {
 }
 
-void DlgCircle::setCircle(RS_Circle & c)
+void DlgCircle::setCircle(Circle & c)
 {
        circle = &c;
        //pen = circle->getPen();
@@ -40,7 +40,7 @@ void DlgCircle::setCircle(RS_Circle & c)
        if (graphic != NULL)
                ui.cbLayer->init(*(graphic->getLayerList()), false, false);
 
-       RS_Layer * lay = circle->getLayer(false);
+       Layer * lay = circle->getLayer(false);
 
        if (lay != NULL)
                ui.cbLayer->setLayer(*lay);
@@ -56,9 +56,9 @@ void DlgCircle::setCircle(RS_Circle & c)
 
 void DlgCircle::updateCircle()
 {
-       circle->setCenter(Vector(RS_Math::eval(ui.leCenterX->text()),
-               RS_Math::eval(ui.leCenterY->text())));
-       circle->setRadius(RS_Math::eval(ui.leRadius->text()));
+       circle->setCenter(Vector(Math::eval(ui.leCenterX->text()),
+               Math::eval(ui.leCenterY->text())));
+       circle->setRadius(Math::eval(ui.leRadius->text()));
        circle->setPen(ui.wPen->getPen());
        circle->setLayer(ui.cbLayer->currentText());
        circle->calculateBorders();
index f72299139b455f4f3637116eb918b1867e3c004e..a457995b5f1d2b76c0703df0ef8d902188bbed97 100644 (file)
@@ -3,7 +3,7 @@
 
 #include "ui_dlgcircle.h"
 
-class RS_Circle;
+class Circle;
 
 class DlgCircle: public QDialog
 {
@@ -14,11 +14,11 @@ class DlgCircle: public QDialog
                ~DlgCircle();
 
        public slots:
-               void setCircle(RS_Circle & c);
+               void setCircle(Circle & c);
                void updateCircle();
 
        private:
-               RS_Circle * circle;
+               Circle * circle;
 
        private:
                Ui::DlgCircle ui;
index 23720c1229abf209e1d7431b9ad60648b9b2e6e9..11340adf78444070b34461d2f243ef46dd2abecd 100644 (file)
@@ -29,7 +29,7 @@ DlgDimension::~DlgDimension()
 {
 }
 
-void DlgDimension::setDim(RS_Dimension & d)
+void DlgDimension::setDim(Dimension & d)
 {
        dim = &d;
        ui.wPen->setPen(dim->getPen(false), true, false, "Pen");
@@ -38,7 +38,7 @@ void DlgDimension::setDim(RS_Dimension & d)
        if (graphic)
                ui.cbLayer->init(*(graphic->getLayerList()), false, false);
 
-       RS_Layer * lay = dim->getLayer(false);
+       Layer * lay = dim->getLayer(false);
 
        if (lay)
                ui.cbLayer->setLayer(*lay);
index f4bdaa29809f795dfcfa22fac257e4830b583557..4193d63b6b9d4905f02c8df87c0fb9258fab7cd8 100644 (file)
@@ -3,7 +3,7 @@
 
 #include "ui_dlgdimension.h"
 
-class RS_Dimension;
+class Dimension;
 
 class DlgDimension: public QDialog
 {
@@ -14,11 +14,11 @@ class DlgDimension: public QDialog
                ~DlgDimension();
 
        public slots:
-               void setDim(RS_Dimension & d);
+               void setDim(Dimension & d);
                void updateDim();
 
        private:
-               RS_Dimension * dim;
+               Dimension * dim;
 
        private:
                Ui::DlgDimension ui;
index b1f2cc7433c8063a030ed413c1944ffabc895c5a..ba92dec8a0e669e61b3090f05d1d874aa0360c1c 100644 (file)
@@ -30,7 +30,7 @@ DlgDimLinear::~DlgDimLinear()
 {
 }
 
-void DlgDimLinear::setDim(RS_DimLinear & d)
+void DlgDimLinear::setDim(DimLinear & d)
 {
        dim = &d;
        ui.wPen->setPen(dim->getPen(false), true, false, "Pen");
@@ -39,17 +39,17 @@ void DlgDimLinear::setDim(RS_DimLinear & d)
        if (graphic)
                ui.cbLayer->init(*(graphic->getLayerList()), false, false);
 
-       RS_Layer * lay = dim->getLayer(false);
+       Layer * lay = dim->getLayer(false);
 
        if (lay)
                ui.cbLayer->setLayer(*lay);
 
        ui.wLabel->setLabel(dim->getLabel(false));
-       ui.leAngle->setText(QString("%1").arg(RS_Math::rad2deg(dim->getAngle())));
+       ui.leAngle->setText(QString("%1").arg(Math::rad2deg(dim->getAngle())));
 }
 
 void DlgDimLinear::updateDim()
 {
        dim->setLabel(ui.wLabel->getLabel());
-       dim->setAngle(RS_Math::deg2rad(RS_Math::eval(ui.leAngle->text(), 0.0)));
+       dim->setAngle(Math::deg2rad(Math::eval(ui.leAngle->text(), 0.0)));
 }
index a6371e02d1fba2b8c85e6ec803790def19d1f6d1..89724765172426839e7188f99db2c9cf40bcb67f 100644 (file)
@@ -3,7 +3,7 @@
 
 #include "ui_dlgdimlinear.h"
 
-class RS_DimLinear;
+class DimLinear;
 
 class DlgDimLinear: public QDialog
 {
@@ -14,11 +14,11 @@ class DlgDimLinear: public QDialog
                ~DlgDimLinear();
 
        public slots:
-               void setDim(RS_DimLinear & d);
+               void setDim(DimLinear & d);
                void updateDim();
 
        private:
-               RS_DimLinear * dim;
+               DimLinear * dim;
 
        private:
                Ui::DlgDimLinear ui;
index ea82592190d3936ed151f0e29e1e0966e2de254b..2b4eda5ff7239e452151636723b17aee4c3f2956 100644 (file)
@@ -30,7 +30,7 @@ DlgEllipse::~DlgEllipse()
 {
 }
 
-void DlgEllipse::setEllipse(RS_Ellipse & e)
+void DlgEllipse::setEllipse(Ellipse & e)
 {
        ellipse = &e;
        //pen = ellipse->getPen();
@@ -40,7 +40,7 @@ void DlgEllipse::setEllipse(RS_Ellipse & e)
        if (graphic != NULL)
                ui.cbLayer->init(*(graphic->getLayerList()), false, false);
 
-       RS_Layer * lay = ellipse->getLayer(false);
+       Layer * lay = ellipse->getLayer(false);
 
        if (lay != NULL)
                ui.cbLayer->setLayer(*lay);
@@ -54,31 +54,31 @@ void DlgEllipse::setEllipse(RS_Ellipse & e)
        ui.leMajor->setText(s);
        s.setNum(ellipse->getMajorP().magnitude() * ellipse->getRatio());
        ui.leMinor->setText(s);
-       s.setNum(RS_Math::rad2deg(ellipse->getMajorP().angle()));
+       s.setNum(Math::rad2deg(ellipse->getMajorP().angle()));
        ui.leRotation->setText(s);
-       s.setNum(RS_Math::rad2deg(ellipse->getAngle1()));
+       s.setNum(Math::rad2deg(ellipse->getAngle1()));
        ui.leAngle1->setText(s);
-       s.setNum(RS_Math::rad2deg(ellipse->getAngle2()));
+       s.setNum(Math::rad2deg(ellipse->getAngle2()));
        ui.leAngle2->setText(s);
        ui.cbReversed->setChecked(ellipse->isReversed());
 }
 
 void DlgEllipse::updateEllipse()
 {
-       ellipse->setCenter(Vector(RS_Math::eval(ui.leCenterX->text()),
-               RS_Math::eval(ui.leCenterY->text())));
+       ellipse->setCenter(Vector(Math::eval(ui.leCenterX->text()),
+               Math::eval(ui.leCenterY->text())));
        Vector v;
-       v.setPolar(RS_Math::eval(ui.leMajor->text()),
-               RS_Math::deg2rad(RS_Math::eval(ui.leRotation->text())));
+       v.setPolar(Math::eval(ui.leMajor->text()),
+               Math::deg2rad(Math::eval(ui.leRotation->text())));
        ellipse->setMajorP(v);
 
-       if (RS_Math::eval(ui.leMajor->text()) > 1.0e-6)
-               ellipse->setRatio(RS_Math::eval(ui.leMinor->text()) / RS_Math::eval(ui.leMajor->text()));
+       if (Math::eval(ui.leMajor->text()) > 1.0e-6)
+               ellipse->setRatio(Math::eval(ui.leMinor->text()) / Math::eval(ui.leMajor->text()));
        else
                ellipse->setRatio(1.0);
 
-       ellipse->setAngle1(RS_Math::deg2rad(RS_Math::eval(ui.leAngle1->text())));
-       ellipse->setAngle2(RS_Math::deg2rad(RS_Math::eval(ui.leAngle2->text())));
+       ellipse->setAngle1(Math::deg2rad(Math::eval(ui.leAngle1->text())));
+       ellipse->setAngle2(Math::deg2rad(Math::eval(ui.leAngle2->text())));
        ellipse->setReversed(ui.cbReversed->isChecked());
        ellipse->setPen(ui.wPen->getPen());
        ellipse->setLayer(ui.cbLayer->currentText());
index 3af14c1337297e892f860d17980b67e5f0a86c90..db251b551b49a11138f504b1493cecf81abddc29 100644 (file)
@@ -3,7 +3,7 @@
 
 #include "ui_dlgellipse.h"
 
-class RS_Ellipse;
+class Ellipse;
 
 class DlgEllipse: public QDialog
 {
@@ -14,11 +14,11 @@ class DlgEllipse: public QDialog
                ~DlgEllipse();
 
        public slots:
-               void setEllipse(RS_Ellipse & e);
+               void setEllipse(Ellipse & e);
                void updateEllipse();
 
        private:
-               RS_Ellipse * ellipse;
+               Ellipse * ellipse;
 
        private:
                Ui::DlgEllipse ui;
index fa634d1790bc31d9c1feae51e861559ad8f7386b..514c32415966eb10680a16296048b6a33d4981d0 100644 (file)
@@ -31,7 +31,7 @@ DlgHatch::DlgHatch(QWidget * parent/*= NULL*/, Qt::WindowFlags flags/*= 0*/):
        hatch = NULL;
        isNew = false;
 
-       preview = new RS_EntityContainer();
+       preview = new EntityContainer();
        ui.gvPreview->setContainer(preview);
        ui.gvPreview->setBorders(15, 15, 15, 15);
 
@@ -67,7 +67,7 @@ void DlgHatch::showEvent(QShowEvent * e)
        ui.gvPreview->zoomAuto();
 }
 
-void DlgHatch::setHatch(RS_Hatch & h, bool isNew)
+void DlgHatch::setHatch(Hatch & h, bool isNew)
 {
        hatch = &h;
        this->isNew = isNew;
@@ -101,7 +101,7 @@ void DlgHatch::setHatch(RS_Hatch & h, bool isNew)
                QString s;
                s.setNum(hatch->getScale());
                ui.leScale->setText(s);
-               s.setNum(RS_Math::rad2deg(hatch->getAngle()));
+               s.setNum(Math::rad2deg(hatch->getAngle()));
                ui.leAngle->setText(s);
        }
 }
@@ -113,13 +113,13 @@ void DlgHatch::updateHatch()
 
        hatch->setSolid(ui.cbSolid->isChecked());
        hatch->setPattern(ui.cbPattern->currentText());
-       hatch->setScale(RS_Math::eval(ui.leScale->text()));
-       hatch->setAngle(RS_Math::deg2rad(RS_Math::eval(ui.leAngle->text())));
+       hatch->setScale(Math::eval(ui.leScale->text()));
+       hatch->setAngle(Math::deg2rad(Math::eval(ui.leAngle->text())));
 }
 
 void DlgHatch::setPattern(const QString & p)
 {
-       if (!RS_PATTERNLIST->contains(p))
+       if (!PATTERNLIST->contains(p))
 //             ui.cbPattern->insertItem(p);
                ui.cbPattern->addItem(p);
 
@@ -138,7 +138,7 @@ void DlgHatch::updatePreview()
        updatePreview(NULL);
 }
 
-void DlgHatch::updatePreview(RS_Pattern *)
+void DlgHatch::updatePreview(Pattern *)
 {
        if (!preview)
                return;
@@ -153,8 +153,8 @@ void DlgHatch::updatePreview(RS_Pattern *)
        QString patName = ui.cbPattern->currentText();
        bool isSolid = ui.cbSolid->isChecked();
        double prevSize;
-       //double scale = RS_Math::eval(leScale->text(), 1.0);
-       double angle = RS_Math::deg2rad(RS_Math::eval(ui.leAngle->text(), 0.0));
+       //double scale = Math::eval(leScale->text(), 1.0);
+       double angle = Math::deg2rad(Math::eval(ui.leAngle->text(), 0.0));
 
        if (pattern != NULL)
                prevSize = pattern->getSize().x * 10;
@@ -163,15 +163,15 @@ void DlgHatch::updatePreview(RS_Pattern *)
 
        preview->clear();
 
-       RS_Hatch * prevHatch = new RS_Hatch(preview, RS_HatchData(isSolid, 0.2, angle, patName));
+       Hatch * prevHatch = new Hatch(preview, HatchData(isSolid, 0.2, angle, patName));
        prevHatch->setPen(hatch->getPen());
 
-       RS_EntityContainer * loop = new RS_EntityContainer(prevHatch);
-       loop->setPen(RS_Pen(RS2::FlagInvalid));
-       loop->addEntity(new RS_Line(loop, RS_LineData(Vector(0.0, 0.0), Vector(10.0, 0.0))));
-       loop->addEntity(new RS_Line(loop, RS_LineData(Vector(10.0, 0.0), Vector(10.0, 10.0))));
-       loop->addEntity(new RS_Line(loop, RS_LineData(Vector(10.0, 10.0), Vector(0.0, 10.0))));
-       loop->addEntity(new RS_Line(loop, RS_LineData(Vector(0.0, 10.0), Vector(0.0, 0.0))));
+       EntityContainer * loop = new EntityContainer(prevHatch);
+       loop->setPen(Pen(RS2::FlagInvalid));
+       loop->addEntity(new Line(loop, LineData(Vector(0.0, 0.0), Vector(10.0, 0.0))));
+       loop->addEntity(new Line(loop, LineData(Vector(10.0, 0.0), Vector(10.0, 10.0))));
+       loop->addEntity(new Line(loop, LineData(Vector(10.0, 10.0), Vector(0.0, 10.0))));
+       loop->addEntity(new Line(loop, LineData(Vector(0.0, 10.0), Vector(0.0, 0.0))));
        prevHatch->addEntity(loop);
        preview->addEntity(prevHatch);
 
index a654d3097ea1f0e07032c17b7aed083471849c7c..12a1bbb0adb2de85540b204cc27deb304962299d 100644 (file)
@@ -3,9 +3,9 @@
 
 #include "ui_dlghatch.h"
 
-class RS_EntityContainer;
-class RS_Pattern;
-class RS_Hatch;
+class EntityContainer;
+class Pattern;
+class Hatch;
 
 class DlgHatch: public QDialog
 {
@@ -18,18 +18,18 @@ class DlgHatch: public QDialog
        public slots:
                void polish();
                void showEvent(QShowEvent * e);
-               void setHatch(RS_Hatch & h, bool isNew);
+               void setHatch(Hatch & h, bool isNew);
                void updateHatch();
                void setPattern(const QString & p);
                void resizeEvent(QResizeEvent *);
                void updatePreview();
-               void updatePreview(RS_Pattern *);
+               void updatePreview(Pattern *);
 
        private:
-               RS_EntityContainer * preview;
+               EntityContainer * preview;
                bool isNew;
-               RS_Pattern * pattern;
-               RS_Hatch * hatch;
+               Pattern * pattern;
+               Hatch * hatch;
 
        private:
                Ui::DlgHatch ui;
index 19e5f92f70231a379e91ad89e8c09ac906f4a70c..f06b9c0d84a4759000700fdad8b48b6b7cacf8e0 100644 (file)
@@ -72,13 +72,13 @@ void  ImageOptionsDialog::resolutionChanged()
        {
                updateEnabled = false;
                bool ok = false;
-               double res = RS_Math::eval(ui.cbResolution->currentText(), &ok);
+               double res = Math::eval(ui.cbResolution->currentText(), &ok);
 
                if (!ok)
                        res = 1.0;
 
-               int w = RS_Math::round(res * graphicSize.x);
-               int h = RS_Math::round(res * graphicSize.y);
+               int w = Math::round(res * graphicSize.x);
+               int h = Math::round(res * graphicSize.y);
                ui.leWidth->setText(QString("%1").arg(w));
                ui.leHeight->setText(QString("%1").arg(h));
                updateEnabled = true;
@@ -87,8 +87,8 @@ void  ImageOptionsDialog::resolutionChanged()
 
 QSize ImageOptionsDialog::getSize()
 {
-       return QSize(RS_Math::round(RS_Math::eval(ui.leWidth->text())),
-               RS_Math::round(RS_Math::eval(ui.leHeight->text())));
+       return QSize(Math::round(Math::eval(ui.leWidth->text())),
+               Math::round(Math::eval(ui.leHeight->text())));
 }
 
 bool ImageOptionsDialog::isBackgroundBlack()
index 3f0f19f4b6e0dc4c37bd4c94be3414e7ec87912b..f25d33c234b4f5ec1be3239db903411ca2ec5119 100644 (file)
@@ -16,7 +16,7 @@
 
 #include "dlginitial.h"
 
-#include "rs.h"
+#include "enums.h"
 #include "settings.h"
 #include "system.h"
 #include "units.h"
@@ -27,11 +27,11 @@ DlgInitial::DlgInitial(QWidget * parent/*= NULL*/, Qt::WindowFlags flags/*= 0*/)
        ui.setupUi(this);
 
        // Fill combobox with languages:
-       QStringList languageList = RS_SYSTEM->getLanguageList();
+       QStringList languageList = SYSTEM->getLanguageList();
 
        for(QStringList::Iterator it=languageList.begin(); it!=languageList.end(); it++)
        {
-               QString l = RS_SYSTEM->symbolToLanguage(*it);
+               QString l = SYSTEM->symbolToLanguage(*it);
 //             ui.cbLanguage->insertItem(l);
 //             ui.cbLanguageCmd->insertItem(l);
                ui.cbLanguage->addItem(l);
@@ -40,8 +40,8 @@ DlgInitial::DlgInitial(QWidget * parent/*= NULL*/, Qt::WindowFlags flags/*= 0*/)
 
        // units:
        for(int i=RS2::None; i<RS2::LastUnit; i++)
-//             ui.cbUnit->insertItem(RS_Units::unitToString((RS2::Unit)i));
-               ui.cbUnit->addItem(RS_Units::unitToString((RS2::Unit)i));
+//             ui.cbUnit->insertItem(Units::unitToString((RS2::Unit)i));
+               ui.cbUnit->addItem(Units::unitToString((RS2::Unit)i));
 
 //     ui.cbUnit->setCurrentText("Millimeter");
 //     ui.cbLanguage->setCurrentText("English");
@@ -68,8 +68,8 @@ void DlgInitial::setPixmap(const QPixmap & p)
 void DlgInitial::ok()
 {
        settings.beginGroup("Appearance");
-       settings.setValue("Language", RS_SYSTEM->languageToSymbol(ui.cbLanguage->currentText()));
-       settings.setValue("LanguageCmd", RS_SYSTEM->languageToSymbol(ui.cbLanguageCmd->currentText()));
+       settings.setValue("Language", SYSTEM->languageToSymbol(ui.cbLanguage->currentText()));
+       settings.setValue("LanguageCmd", SYSTEM->languageToSymbol(ui.cbLanguageCmd->currentText()));
        settings.endGroup();
 
        settings.beginGroup("Defaults");
index a9b82448911027e7d29b7c6e8df1553d9456f065..be029bf687057268022e2a96aaf840f0ec5d1bef 100644 (file)
@@ -30,7 +30,7 @@ DlgInsert::~DlgInsert()
 {
 }
 
-void DlgInsert::setInsert(RS_Insert & i)
+void DlgInsert::setInsert(Insert & i)
 {
        insert = &i;
        //pen = insert->getPen();
@@ -40,7 +40,7 @@ void DlgInsert::setInsert(RS_Insert & i)
        if (graphic)
                ui.cbLayer->init(*(graphic->getLayerList()), false, false);
 
-       RS_Layer * lay = insert->getLayer(false);
+       Layer * lay = insert->getLayer(false);
 
        if (lay)
                ui.cbLayer->setLayer(*lay);
@@ -52,7 +52,7 @@ void DlgInsert::setInsert(RS_Insert & i)
        ui.leInsertionPointY->setText(s);
        s.setNum(insert->getScale().x);
        ui.leScale->setText(s);
-       s.setNum(RS_Math::rad2deg(insert->getAngle()));
+       s.setNum(Math::rad2deg(insert->getAngle()));
        ui.leAngle->setText(s);
        s.setNum(insert->getRows());
        ui.leRows->setText(s);
@@ -66,15 +66,15 @@ void DlgInsert::setInsert(RS_Insert & i)
 
 void DlgInsert::updateInsert()
 {
-       insert->setInsertionPoint(Vector(RS_Math::eval(ui.leInsertionPointX->text()),
-               RS_Math::eval(ui.leInsertionPointY->text())));
-       insert->setScale(Vector(RS_Math::eval(ui.leScale->text()),
-               RS_Math::eval(ui.leScale->text())));
-       insert->setAngle(RS_Math::deg2rad(RS_Math::eval(ui.leAngle->text())));
-       insert->setRows(RS_Math::round(RS_Math::eval(ui.leRows->text())));
-       insert->setCols(RS_Math::round(RS_Math::eval(ui.leCols->text())));
-       insert->setSpacing(Vector(RS_Math::eval(ui.leRowSpacing->text()),
-               RS_Math::eval(ui.leColSpacing->text())));
+       insert->setInsertionPoint(Vector(Math::eval(ui.leInsertionPointX->text()),
+               Math::eval(ui.leInsertionPointY->text())));
+       insert->setScale(Vector(Math::eval(ui.leScale->text()),
+               Math::eval(ui.leScale->text())));
+       insert->setAngle(Math::deg2rad(Math::eval(ui.leAngle->text())));
+       insert->setRows(Math::round(Math::eval(ui.leRows->text())));
+       insert->setCols(Math::round(Math::eval(ui.leCols->text())));
+       insert->setSpacing(Vector(Math::eval(ui.leRowSpacing->text()),
+               Math::eval(ui.leColSpacing->text())));
        insert->setPen(ui.wPen->getPen());
        insert->setLayer(ui.cbLayer->currentText());
 }
index 225540267df268427aabbb29ea001f7a77fbd093..78893b6f047b346faac69c207d70af1363694ab6 100644 (file)
@@ -3,7 +3,7 @@
 
 #include "ui_dlginsert.h"
 
-class RS_Insert;
+class Insert;
 
 class DlgInsert: public QDialog
 {
@@ -14,11 +14,11 @@ class DlgInsert: public QDialog
                ~DlgInsert();
 
        public slots:
-               void setInsert(RS_Insert & i);
+               void setInsert(Insert & i);
                void updateInsert();
 
        private:
-               RS_Insert * insert;
+               Insert * insert;
 
        private:
                Ui::DlgInsert ui;
index 8493fd9fd5a77e42713f60bde5cfbf2a42541618..0374cb3e18d4eff1b0eb87d0e6afa9ba7ef7106f 100644 (file)
@@ -30,7 +30,7 @@ DlgLine::~DlgLine()
 {
 }
 
-void DlgLine::setLine(RS_Line & l)
+void DlgLine::setLine(Line & l)
 {
        line = &l;
        //pen = line->getPen();
@@ -40,7 +40,7 @@ void DlgLine::setLine(RS_Line & l)
        if (graphic)
                ui.cbLayer->init(*(graphic->getLayerList()), false, false);
 
-       RS_Layer * lay = line->getLayer(false);
+       Layer * lay = line->getLayer(false);
 
        if (lay)
                ui.cbLayer->setLayer(*lay);
@@ -58,10 +58,10 @@ void DlgLine::setLine(RS_Line & l)
 
 void DlgLine::updateLine()
 {
-       line->setStartpoint(Vector(RS_Math::eval(ui.leStartX->text()),
-               RS_Math::eval(ui.leStartY->text())));
-       line->setEndpoint(Vector(RS_Math::eval(ui.leEndX->text()),
-               RS_Math::eval(ui.leEndY->text())));
+       line->setStartpoint(Vector(Math::eval(ui.leStartX->text()),
+               Math::eval(ui.leStartY->text())));
+       line->setEndpoint(Vector(Math::eval(ui.leEndX->text()),
+               Math::eval(ui.leEndY->text())));
        line->setPen(ui.wPen->getPen());
        line->setLayer(ui.cbLayer->currentText());
 }
index 72d15abeee2e0b1311634aadc6b4b2a7df1ec392..3e6014a580b60fd44696c195d450e3575c9931a2 100644 (file)
@@ -3,7 +3,7 @@
 
 #include "ui_dlgline.h"
 
-class RS_Line;
+class Line;
 
 class DlgLine: public QDialog
 {
@@ -14,11 +14,11 @@ class DlgLine: public QDialog
                ~DlgLine();
 
        public slots:
-               void setLine(RS_Line & l);
+               void setLine(Line & l);
                void updateLine();
 
        private:
-               RS_Line * line;
+               Line * line;
 
        private:
                Ui::DlgLine ui;
index 68b79a80bd61750f453c5c52647d23a3550fa7a7..afa84c9e9cd8fe463292a36040b4b14c40636d4e 100644 (file)
@@ -65,7 +65,7 @@ DlgMirror::~DlgMirror()
        settings.endGroup();
 }
 
-void DlgMirror::setData(RS_MirrorData * d)
+void DlgMirror::setData(MirrorData * d)
 {
        data = d;
 }
index 4c4f03843ecb3c889b56df3ea59f28a9b5f16f02..92086fcb52aae551321377d0ff948ef59c20b0b4 100644 (file)
@@ -3,7 +3,7 @@
 
 #include "ui_dlgmirror.h"
 
-class RS_MirrorData;
+class MirrorData;
 
 class DlgMirror: public QDialog
 {
@@ -14,11 +14,11 @@ class DlgMirror: public QDialog
                ~DlgMirror();
 
        public slots:
-               void setData(RS_MirrorData * d);
+               void setData(MirrorData * d);
                void updateData();
 
        private:
-               RS_MirrorData * data;
+               MirrorData * data;
                QString copies;
                int numberMode;
                bool useCurrentLayer;
index 7ccb2e1d792f4015bcd5bb95e749d805fb74bad4..99fc497d1910df4888bafb90c8ed64965391c4b9 100644 (file)
@@ -72,7 +72,7 @@ DlgMove::~DlgMove()
        settings.endGroup();
 }
 
-void DlgMove::setData(RS_MoveData * d)
+void DlgMove::setData(MoveData * d)
 {
        data = d;
 }
index 39d47f74e769c0bebb662d592228da13cfda83c3..3363b4b6746f57dde3c86b731d10467c30f92391 100644 (file)
@@ -3,7 +3,7 @@
 
 #include "ui_dlgmove.h"
 
-class RS_MoveData;
+class MoveData;
 
 class DlgMove: public QDialog
 {
@@ -14,7 +14,7 @@ class DlgMove: public QDialog
                ~DlgMove();
 
        public slots:
-               void setData(RS_MoveData * d);
+               void setData(MoveData * d);
                void updateData();
 
        private:
@@ -22,7 +22,7 @@ class DlgMove: public QDialog
                bool useCurrentLayer;
                int numberMode;
                QString copies;
-               RS_MoveData * data;
+               MoveData * data;
 
        private:
                Ui::DlgMove ui;
index 53b1928c291ece06ee2bb4b85142992c9e592f75..298eceb312f5ae10ed133bebb07ab03fe03b892d 100644 (file)
@@ -75,10 +75,10 @@ DlgMoveRotate::~DlgMoveRotate()
        settings.endGroup();
 }
 
-void DlgMoveRotate::setData(RS_MoveRotateData * d)
+void DlgMoveRotate::setData(MoveRotateData * d)
 {
        data = d;
-       ui.leAngle->setText(QString("%1").arg(RS_Math::rad2deg(data->angle)));
+       ui.leAngle->setText(QString("%1").arg(Math::rad2deg(data->angle)));
 }
 
 void DlgMoveRotate::updateData()
@@ -90,7 +90,7 @@ void DlgMoveRotate::updateData()
        else
                data->number = ui.leNumber->text().toInt();
 
-       data->angle = RS_Math::deg2rad(RS_Math::eval(ui.leAngle->text()));
+       data->angle = Math::deg2rad(Math::eval(ui.leAngle->text()));
        data->useCurrentAttributes = ui.cbCurrentAttributes->isChecked();
        data->useCurrentLayer = ui.cbCurrentLayer->isChecked();
 }
index d54e4ac1710db71b8037fc9e95a5270089408310..10f758f27095b47082214f56f4dfff09272bf6ea 100644 (file)
@@ -3,7 +3,7 @@
 
 #include "ui_dlgmoverotate.h"
 
-class RS_MoveRotateData;
+class MoveRotateData;
 
 class DlgMoveRotate: public QDialog
 {
@@ -14,7 +14,7 @@ class DlgMoveRotate: public QDialog
                ~DlgMoveRotate();
 
        public slots:
-               void setData(RS_MoveRotateData * d);
+               void setData(MoveRotateData * d);
                void updateData();
 
        private:
@@ -22,7 +22,7 @@ class DlgMoveRotate: public QDialog
                bool useCurrentLayer;
                int numberMode;
                QString copies;
-               RS_MoveRotateData * data;
+               MoveRotateData * data;
                QString angle;
 
        private:
index 2ac2a87d178944ab25dcb09702036c92ebc242fb..4715e72a992bfae49ed94ab216d260ce850c9d8b 100644 (file)
@@ -16,7 +16,7 @@
 
 #include "dlgoptionsdrawing.h"
 
-#include "rs.h"
+#include "enums.h"
 #include "debug.h"
 #include "filterdxf.h"
 #include "drawing.h"
@@ -44,8 +44,8 @@ DlgOptionsDrawing::DlgOptionsDrawing(QWidget * parent/*= 0*/, Qt::WindowFlags fl
 
        // Main drawing unit:
        for(int i=RS2::None; i<RS2::LastUnit; i++)
-//             ui.cbUnit->insertItem(RS_Units::unitToString((RS2::Unit)i));
-               ui.cbUnit->addItem(RS_Units::unitToString((RS2::Unit)i));
+//             ui.cbUnit->insertItem(Units::unitToString((RS2::Unit)i));
+               ui.cbUnit->addItem(Units::unitToString((RS2::Unit)i));
 
        // init units combobox:
        QStringList unitList;
@@ -69,8 +69,8 @@ DlgOptionsDrawing::DlgOptionsDrawing(QWidget * parent/*= 0*/, Qt::WindowFlags fl
 
        // Paper format:
        for(int i=RS2::Custom; i<=RS2::NPageSize; i++)
-//             ui.cbPaperFormat->insertItem(RS_Units::paperFormatToString((RS2::PaperFormat)i));
-               ui.cbPaperFormat->addItem(RS_Units::paperFormatToString((RS2::PaperFormat)i));
+//             ui.cbPaperFormat->insertItem(Units::paperFormatToString((RS2::PaperFormat)i));
+               ui.cbPaperFormat->addItem(Units::paperFormatToString((RS2::PaperFormat)i));
 
        // Encodings:
        /*
@@ -138,9 +138,9 @@ void DlgOptionsDrawing::setGraphic(Drawing * g)
 
        // main drawing unit:
        int insunits = graphic->getVariableInt("$INSUNITS", 0);
-//     ui.cbUnit->setCurrentText(RS_Units::unitToString(RS_FilterDXF::numberToUnit(insunits)));
+//     ui.cbUnit->setCurrentText(Units::unitToString(FilterDXF::numberToUnit(insunits)));
        ui.cbUnit->setItemText(ui.cbUnit->currentIndex(),
-               RS_Units::unitToString(RS_FilterDXF::numberToUnit(insunits)));
+               Units::unitToString(FilterDXF::numberToUnit(insunits)));
 
        // units / length format:
        int lunits = graphic->getVariableInt("$LUNITS", 2);
@@ -167,7 +167,7 @@ void DlgOptionsDrawing::setGraphic(Drawing * g)
        // paper format:
        bool landscape;
        RS2::PaperFormat format = graphic->getPaperFormat(&landscape);
-       RS_DEBUG->print("DlgOptionsDrawing::setGraphic: paper format is: %d", (int)format);
+       DEBUG->print("DlgOptionsDrawing::setGraphic: paper format is: %d", (int)format);
 //     ui.cbPaperFormat->setCurrentItem((int)format);
        ui.cbPaperFormat->setCurrentIndex((int)format);
 
@@ -197,27 +197,27 @@ void DlgOptionsDrawing::setGraphic(Drawing * g)
        // dimension text height:
        RS2::Unit unit = (RS2::Unit)ui.cbUnit->currentIndex();
 
-       double dimtxt = graphic->getVariableDouble("$DIMTXT", RS_Units::convert(2.5, RS2::Millimeter, unit));
+       double dimtxt = graphic->getVariableDouble("$DIMTXT", Units::convert(2.5, RS2::Millimeter, unit));
 //     ui.cbDimTextHeight->setCurrentText(QString("%1").arg(dimtxt));
        ui.cbDimTextHeight->setItemText(ui.cbDimTextHeight->currentIndex(), QString("%1").arg(dimtxt));
 
        // dimension extension line extension:
-       double dimexe = graphic->getVariableDouble("$DIMEXE", RS_Units::convert(1.25, RS2::Millimeter, unit));
+       double dimexe = graphic->getVariableDouble("$DIMEXE", Units::convert(1.25, RS2::Millimeter, unit));
 //     ui.cbDimExe->setCurrentText(QString("%1").arg(dimexe));
        ui.cbDimExe->setItemText(ui.cbDimExe->currentIndex(), QString("%1").arg(dimexe));
 
        // dimension extension line offset:
-       double dimexo = graphic->getVariableDouble("$DIMEXO", RS_Units::convert(0.625, RS2::Millimeter, unit));
+       double dimexo = graphic->getVariableDouble("$DIMEXO", Units::convert(0.625, RS2::Millimeter, unit));
 //     ui.cbDimExo->setCurrentText(QString("%1").arg(dimexo));
        ui.cbDimExo->setItemText(ui.cbDimExo->currentIndex(), QString("%1").arg(dimexo));
 
        // dimension line gap:
-       double dimgap = graphic->getVariableDouble("$DIMGAP", RS_Units::convert(0.625, RS2::Millimeter, unit));
+       double dimgap = graphic->getVariableDouble("$DIMGAP", Units::convert(0.625, RS2::Millimeter, unit));
 //     ui.cbDimGap->setCurrentText(QString("%1").arg(dimgap));
        ui.cbDimGap->setItemText(ui.cbDimGap->currentIndex(), QString("%1").arg(dimgap));
 
        // dimension arrow size:
-       double dimasz = graphic->getVariableDouble("$DIMASZ", RS_Units::convert(2.5, RS2::Millimeter, unit));
+       double dimasz = graphic->getVariableDouble("$DIMASZ", Units::convert(2.5, RS2::Millimeter, unit));
 //     ui.cbDimAsz->setCurrentText(QString("%1").arg(dimasz));
        ui.cbDimAsz->setItemText(ui.cbDimAsz->currentIndex(), QString("%1").arg(dimasz));
 
@@ -226,13 +226,13 @@ void DlgOptionsDrawing::setGraphic(Drawing * g)
 //     ui.cbSplineSegs->setCurrentText(QString("%1").arg(splinesegs));
        ui.cbSplineSegs->setItemText(ui.cbSplineSegs->currentIndex(), QString("%1").arg(splinesegs));
 
-       RS_DEBUG->print("DlgOptionsDrawing::setGraphic: splinesegs is: %d", splinesegs);
+       DEBUG->print("DlgOptionsDrawing::setGraphic: splinesegs is: %d", splinesegs);
 
        // encoding:
        /*
        QString encoding = graphic->getVariableString("$DWGCODEPAGE",
                                                                                                "ANSI_1252");
-       encoding=RS_System::getEncoding(encoding);
+       encoding=System::getEncoding(encoding);
        cbEncoding->setCurrentText(encoding);
        */
 
@@ -250,7 +250,7 @@ void DlgOptionsDrawing::validate()
 
        if (f == RS2::Engineering || f == RS2::Architectural)
        {
-               if (RS_Units::stringToUnit(ui.cbUnit->currentText()) != RS2::Inch)
+               if (Units::stringToUnit(ui.cbUnit->currentText()) != RS2::Inch)
                {
                        QMessageBox::warning( this, tr("Options"),
                                tr("For the length formats 'Engineering' and 'Architectural', the unit must be set to Inch."), QMessageBox::Ok, Qt::NoButton);
@@ -279,8 +279,8 @@ void DlgOptionsDrawing::validate()
                // custom paper size:
                if ((RS2::PaperFormat)ui.cbPaperFormat->currentIndex() == RS2::Custom)
                {
-                       graphic->setPaperSize(Vector(RS_Math::eval(ui.lePaperWidth->text()),
-                               RS_Math::eval(ui.lePaperHeight->text())));
+                       graphic->setPaperSize(Vector(Math::eval(ui.lePaperWidth->text()),
+                               Math::eval(ui.lePaperHeight->text())));
                }
 
                // grid:
@@ -305,16 +305,16 @@ void DlgOptionsDrawing::validate()
                graphic->addVariable("$GRIDUNIT", spacing, 10);
 
                // dim:
-               graphic->addVariable("$DIMTXT", RS_Math::eval(ui.cbDimTextHeight->currentText()), 40);
-               graphic->addVariable("$DIMEXE", RS_Math::eval(ui.cbDimExe->currentText()), 40);
-               graphic->addVariable("$DIMEXO", RS_Math::eval(ui.cbDimExo->currentText()), 40);
-               graphic->addVariable("$DIMGAP", RS_Math::eval(ui.cbDimGap->currentText()), 40);
-               graphic->addVariable("$DIMASZ", RS_Math::eval(ui.cbDimAsz->currentText()), 40);
+               graphic->addVariable("$DIMTXT", Math::eval(ui.cbDimTextHeight->currentText()), 40);
+               graphic->addVariable("$DIMEXE", Math::eval(ui.cbDimExe->currentText()), 40);
+               graphic->addVariable("$DIMEXO", Math::eval(ui.cbDimExo->currentText()), 40);
+               graphic->addVariable("$DIMGAP", Math::eval(ui.cbDimGap->currentText()), 40);
+               graphic->addVariable("$DIMASZ", Math::eval(ui.cbDimAsz->currentText()), 40);
 
                // splines:
-               graphic->addVariable("$SPLINESEGS", (int)RS_Math::eval(ui.cbSplineSegs->currentText()), 70);
+               graphic->addVariable("$SPLINESEGS", (int)Math::eval(ui.cbSplineSegs->currentText()), 70);
 
-               RS_DEBUG->print("DlgOptionsDrawing::validate: splinesegs is: %s",
+               DEBUG->print("DlgOptionsDrawing::validate: splinesegs is: %s",
                        ui.cbSplineSegs->currentText().toLatin1().data());
 
                // update all dimension and spline entities in the graphic to match the new settings:
@@ -394,7 +394,7 @@ void DlgOptionsDrawing::updateLengthPrecision()
                break;
 
        default:
-               RS_DEBUG->print(RS_Debug::D_ERROR,
+               DEBUG->print(Debug::D_ERROR,
                        "DlgOptionsDrawing::updateLengthPrecision: error");
                break;
        }
@@ -479,13 +479,13 @@ void DlgOptionsDrawing::updateAnglePrecision()
 void DlgOptionsDrawing::updatePreview()
 {
        QString prev;
-       prev = RS_Units::formatLinear(14.43112351,
+       prev = Units::formatLinear(14.43112351,
                (RS2::Unit)ui.cbUnit->currentIndex(),
                (RS2::LinearFormat)(ui.cbLengthFormat->currentIndex()),
                ui.cbLengthPrecision->currentIndex());
        ui.lLinear->setText(prev);
 
-       prev = RS_Units::formatAngle(0.5327714,
+       prev = Units::formatAngle(0.5327714,
                (RS2::AngleFormat)ui.cbAngleFormat->currentIndex(),
                ui.cbAnglePrecision->currentIndex());
        ui.lAngular->setText(prev);
@@ -509,7 +509,7 @@ void DlgOptionsDrawing::updatePaperSize()
        }
        else
        {
-               Vector s = RS_Units::paperFormatToSize(format);
+               Vector s = Units::paperFormatToSize(format);
                ui.lePaperWidth->setText(QString("%1").arg(s.x));
                ui.lePaperHeight->setText(QString("%1").arg(s.y));
        }
@@ -532,7 +532,7 @@ void DlgOptionsDrawing::updatePaperSize()
 void DlgOptionsDrawing::updateUnitLabels()
 {
        RS2::Unit u = (RS2::Unit)ui.cbUnit->currentIndex();
-       QString sign = RS_Units::unitToSign(u);
+       QString sign = Units::unitToSign(u);
        ui.lDimUnit1->setText(sign);
        ui.lDimUnit2->setText(sign);
        ui.lDimUnit3->setText(sign);
index 03f45521cfac7323b5b9a7deb089fa9b16fb8f32..ae827ba1d25da6647296e22a0ce8f0979cffa948 100644 (file)
@@ -16,7 +16,7 @@
 
 #include "dlgoptionsgeneral.h"
 
-#include "rs.h"
+#include "enums.h"
 #include "debug.h"
 #include "settings.h"
 #include "system.h"
@@ -32,18 +32,18 @@ DlgOptionsGeneral::DlgOptionsGeneral(QWidget * parent/*= 0*/, Qt::WindowFlags fl
        Widget9Layout->addMultiCellWidget(bgGraphicView, 0, 2, 0, 0); //use empty space as well
 #endif
        // Fill combobox with languages:
-       QStringList languageList = RS_SYSTEM->getLanguageList();
+       QStringList languageList = SYSTEM->getLanguageList();
        languageList.prepend("en");
 
        for(QStringList::Iterator it=languageList.begin(); it!=languageList.end(); it++)
        {
-               RS_DEBUG->print("DlgOptionsGeneral::init: adding %s to combobox", (*it).toLatin1().data());
+               DEBUG->print("DlgOptionsGeneral::init: adding %s to combobox", (*it).toLatin1().data());
 
-               QString l = RS_SYSTEM->symbolToLanguage(*it);
+               QString l = SYSTEM->symbolToLanguage(*it);
 
                if (l.isEmpty() == false)
                {
-                       RS_DEBUG->print("DlgOptionsGeneral::init: %s", l.toLatin1().data());
+                       DEBUG->print("DlgOptionsGeneral::init: %s", l.toLatin1().data());
                        ui.cbLanguage->addItem(l);
                        ui.cbLanguageCmd->addItem(l);
                }
@@ -57,12 +57,12 @@ DlgOptionsGeneral::DlgOptionsGeneral(QWidget * parent/*= 0*/, Qt::WindowFlags fl
        def_lang = QC_PREDEFINED_LOCALE;
 #endif
        QString lang = settings.value("Language", def_lang).toString();
-//     ui.cbLanguage->setCurrentText(RS_SYSTEM->symbolToLanguage(lang));
-       ui.cbLanguage->setItemText(ui.cbLanguage->currentIndex(), RS_SYSTEM->symbolToLanguage(lang));
+//     ui.cbLanguage->setCurrentText(SYSTEM->symbolToLanguage(lang));
+       ui.cbLanguage->setItemText(ui.cbLanguage->currentIndex(), SYSTEM->symbolToLanguage(lang));
 
        QString langCmd = settings.value("LanguageCmd", def_lang).toString();
-//     ui.cbLanguageCmd->setCurrentText(RS_SYSTEM->symbolToLanguage(langCmd));
-       ui.cbLanguageCmd->setItemText(ui.cbLanguageCmd->currentIndex(), RS_SYSTEM->symbolToLanguage(langCmd));
+//     ui.cbLanguageCmd->setCurrentText(SYSTEM->symbolToLanguage(langCmd));
+       ui.cbLanguageCmd->setItemText(ui.cbLanguageCmd->currentIndex(), SYSTEM->symbolToLanguage(langCmd));
 
        // graphic view:
        // crosshairs:
@@ -119,7 +119,7 @@ DlgOptionsGeneral::DlgOptionsGeneral(QWidget * parent/*= 0*/, Qt::WindowFlags fl
        for(int i=RS2::None; i<RS2::LastUnit; i++)
        {
                if (i != (int)RS2::None)
-                       ui.cbUnit->addItem(RS_Units::unitToString((RS2::Unit)i));
+                       ui.cbUnit->addItem(Units::unitToString((RS2::Unit)i));
        }
 
 //should be [DONE]
@@ -128,7 +128,7 @@ DlgOptionsGeneral::DlgOptionsGeneral(QWidget * parent/*= 0*/, Qt::WindowFlags fl
 //     cbUnit->listBox()->sort();
 //#endif
        ui.cbUnit->setInsertPolicy(QComboBox::InsertAtBottom);
-       ui.cbUnit->addItem(RS_Units::unitToString(RS2::None), 0);
+       ui.cbUnit->addItem(Units::unitToString(RS2::None), 0);
 
        QString def_unit = "Millimeter";
 #ifdef QC_PREDEFINED_UNIT
@@ -154,10 +154,10 @@ void DlgOptionsGeneral::setRestartNeeded()
 
 void DlgOptionsGeneral::ok()
 {
-       //RS_SYSTEM->loadTranslation(cbLanguage->currentText());
+       //SYSTEM->loadTranslation(cbLanguage->currentText());
        settings.beginGroup("Appearance");
-       settings.setValue("Language", RS_SYSTEM->languageToSymbol(ui.cbLanguage->currentText()));
-       settings.setValue("LanguageCmd", RS_SYSTEM->languageToSymbol(ui.cbLanguageCmd->currentText()));
+       settings.setValue("Language", SYSTEM->languageToSymbol(ui.cbLanguage->currentText()));
+       settings.setValue("LanguageCmd", SYSTEM->languageToSymbol(ui.cbLanguageCmd->currentText()));
        settings.setValue("ShowCrosshairs", ui.cbShowCrosshairs->isChecked());
        settings.setValue("ScaleGrid", ui.cbScaleGrid->isChecked());
        settings.setValue("MinGridSpacing", ui.cbMinGridSpacing->currentText());
@@ -179,7 +179,7 @@ void DlgOptionsGeneral::ok()
        settings.endGroup();
 
        settings.beginGroup("Defaults");
-       settings.setValue("Unit", RS_Units::unitToString(RS_Units::stringToUnit(ui.cbUnit->currentText()), false/*untr.*/));
+       settings.setValue("Unit", Units::unitToString(Units::stringToUnit(ui.cbUnit->currentText()), false/*untr.*/));
        settings.endGroup();
 
        if (restartNeeded == true)
index d5761696dbd40f461335d187b58e889d7ed833e2..bb276ff8f5a0100ebf29f0c937accc05df32bb0b 100644 (file)
@@ -30,7 +30,7 @@ DlgPoint::~DlgPoint()
 {
 }
 
-void DlgPoint::setPoint(RS_Point & p)
+void DlgPoint::setPoint(Point & p)
 {
        point = &p;
 
@@ -40,7 +40,7 @@ void DlgPoint::setPoint(RS_Point & p)
        if (graphic)
                ui.cbLayer->init(*(graphic->getLayerList()), false, false);
 
-       RS_Layer * lay = point->getLayer(false);
+       Layer * lay = point->getLayer(false);
 
        if (lay)
                ui.cbLayer->setLayer(*lay);
@@ -54,8 +54,8 @@ void DlgPoint::setPoint(RS_Point & p)
 
 void DlgPoint::updatePoint()
 {
-       point->setPos(Vector(RS_Math::eval(ui.lePosX->text()),
-               RS_Math::eval(ui.lePosY->text())));
+       point->setPos(Vector(Math::eval(ui.lePosX->text()),
+               Math::eval(ui.lePosY->text())));
        point->setPen(ui.wPen->getPen());
        point->setLayer(ui.cbLayer->currentText());
 }
index 39573bc57a98de2c76ce6a99adf71872ff4ba98c..82c799da79599e21e5ab3fd38671a762a75cfaf9 100644 (file)
@@ -4,7 +4,7 @@
 #include "ui_dlgpoint.h"
 #include "pen.h"
 
-class RS_Point;
+class Point;
 
 class DlgPoint: public QDialog
 {
@@ -15,12 +15,12 @@ class DlgPoint: public QDialog
                ~DlgPoint();
 
        public slots:
-               void setPoint(RS_Point & p);
+               void setPoint(Point & p);
                void updatePoint();
 
        private:
-               RS_Pen pen;
-               RS_Point * point;
+               Pen pen;
+               Point * point;
 
        private:
                Ui::DlgPoint ui;
index d030ee87ad45a441b49989eab7a7cb1ba68d6666..1d2b2e7732e8acf53dd86c2ee191cfd8d64e213b 100644 (file)
@@ -75,7 +75,7 @@ DlgRotate::~DlgRotate()
        settings.endGroup();
 }
 
-void DlgRotate::setData(RS_RotateData * d)
+void DlgRotate::setData(RotateData * d)
 {
        data = d;
 }
@@ -89,7 +89,7 @@ void DlgRotate::updateData()
        else
                data->number = ui.leNumber->text().toInt();
 
-       data->angle = RS_Math::deg2rad(RS_Math::eval(ui.leAngle->text()));
+       data->angle = Math::deg2rad(Math::eval(ui.leAngle->text()));
        data->useCurrentAttributes = ui.cbCurrentAttributes->isChecked();
        data->useCurrentLayer = ui.cbCurrentLayer->isChecked();
 }
index ebc74682fe4166c7d8f1d200926346ddf9e1ca08..f4d96471a787c9b90c05b0a1d2e0b7b4d6fea868 100644 (file)
@@ -3,7 +3,7 @@
 
 #include "ui_dlgrotate.h"
 
-class RS_RotateData;
+class RotateData;
 
 class DlgRotate: public QDialog
 {
@@ -14,7 +14,7 @@ class DlgRotate: public QDialog
                ~DlgRotate();
 
        public slots:
-               void setData(RS_RotateData * d);
+               void setData(RotateData * d);
                void updateData();
 
        private:
@@ -22,7 +22,7 @@ class DlgRotate: public QDialog
                bool useCurrentLayer;
                int numberMode;
                QString copies;
-               RS_RotateData * data;
+               RotateData * data;
                QString angle;
 
        private:
index 97d80e516ffaae29e8da6cc4411580f13b1c2896..edae463d64a1356b8bc278715701b7ea3c4740e3 100644 (file)
@@ -78,12 +78,12 @@ DlgRotate2::~DlgRotate2()
        settings.endGroup();
 }
 
-void DlgRotate2::setData(RS_Rotate2Data * d)
+void DlgRotate2::setData(Rotate2Data * d)
 {
        data = d;
 
-       //leAngle1->setText(QString("%1").arg(RS_Math::rad2deg(data->angle1)));
-       //leAngle2->setText(QString("%1").arg(RS_Math::rad2deg(data->angle2)));
+       //leAngle1->setText(QString("%1").arg(Math::rad2deg(data->angle1)));
+       //leAngle2->setText(QString("%1").arg(Math::rad2deg(data->angle2)));
 }
 
 void DlgRotate2::updateData()
@@ -95,8 +95,8 @@ void DlgRotate2::updateData()
        else
                data->number = ui.leNumber->text().toInt();
 
-       data->angle1 = RS_Math::deg2rad(RS_Math::eval(ui.leAngle1->text()));
-       data->angle2 = RS_Math::deg2rad(RS_Math::eval(ui.leAngle2->text()));
+       data->angle1 = Math::deg2rad(Math::eval(ui.leAngle1->text()));
+       data->angle2 = Math::deg2rad(Math::eval(ui.leAngle2->text()));
        data->useCurrentAttributes = ui.cbCurrentAttributes->isChecked();
        data->useCurrentLayer = ui.cbCurrentLayer->isChecked();
 }
index c95199015138b3ef23f6b5297208cbcd5002de18..0a88a480d2a3c443f5972cacec46094282f22096 100644 (file)
@@ -3,7 +3,7 @@
 
 #include "ui_dlgrotate2.h"
 
-class RS_Rotate2Data;
+class Rotate2Data;
 
 class DlgRotate2: public QDialog
 {
@@ -14,7 +14,7 @@ class DlgRotate2: public QDialog
                ~DlgRotate2();
 
        public slots:
-               void setData(RS_Rotate2Data * d);
+               void setData(Rotate2Data * d);
                void updateData();
 
        protected:
@@ -26,7 +26,7 @@ class DlgRotate2: public QDialog
                bool useCurrentLayer;
                int numberMode;
                QString copies;
-               RS_Rotate2Data * data;
+               Rotate2Data * data;
                QString angle1;
 
        private:
index b58b3a55fcff9144a40c64220fff98ba5df33f08..97796bd12fd170ea34606509907f64c1affbfe68 100644 (file)
@@ -75,7 +75,7 @@ DlgScale::~DlgScale()
        settings.endGroup();
 }
 
-void DlgScale::setData(RS_ScaleData * d)
+void DlgScale::setData(ScaleData * d)
 {
        data = d;
 }
@@ -89,7 +89,7 @@ void DlgScale::updateData()
        else
                data->number = ui.leNumber->text().toInt();
 
-       data->factor = RS_Math::eval(ui.leFactor->text());
+       data->factor = Math::eval(ui.leFactor->text());
        data->useCurrentAttributes = ui.cbCurrentAttributes->isChecked();
        data->useCurrentLayer = ui.cbCurrentLayer->isChecked();
 }
index fb2bce66fdaaeb6ce7fbd55925288446aa680c1a..298ef46815a85400c352ed3727603958f6f3d949 100644 (file)
@@ -3,7 +3,7 @@
 
 #include "ui_dlgscale.h"
 
-class RS_ScaleData;
+class ScaleData;
 
 class DlgScale: public QDialog
 {
@@ -14,12 +14,12 @@ class DlgScale: public QDialog
                ~DlgScale();
 
        public slots:
-               void setData(RS_ScaleData * d);
+               void setData(ScaleData * d);
                void updateData();
 
        private:
                QString factor;
-               RS_ScaleData * data;
+               ScaleData * data;
                QString copies;
                int numberMode;
                bool useCurrentLayer;
index 783f68e8585a33a0f752ad252d9594e7c40d14be..7624a225997f3a7a1baf8691cafe4be4af051831 100644 (file)
@@ -29,13 +29,13 @@ DlgSpline::~DlgSpline()
 {
 }
 
-void DlgSpline::setSpline(RS_Spline & e)
+void DlgSpline::setSpline(Spline & e)
 {
        spline = &e;
        //pen = spline->getPen();
        ui.wPen->setPen(spline->getPen(false), true, false, "Pen");
        Drawing * graphic = spline->getGraphic();
-       RS_Layer * lay = spline->getLayer(false);
+       Layer * lay = spline->getLayer(false);
 
        if (graphic)
                ui.cbLayer->init(*(graphic->getLayerList()), false, false);
@@ -53,7 +53,7 @@ void DlgSpline::setSpline(RS_Spline & e)
 
 void DlgSpline::updateSpline()
 {
-       spline->setDegree(RS_Math::round(RS_Math::eval(ui.cbDegree->currentText())));
+       spline->setDegree(Math::round(Math::eval(ui.cbDegree->currentText())));
        spline->setClosed(ui.cbClosed->isChecked());
        spline->setPen(ui.wPen->getPen());
        spline->setLayer(ui.cbLayer->currentText());
index caf88527fe146863ca6735a8980bd81f51a9d743..40f20d5df2b403a50ac4869d276f1126d70f6d6c 100644 (file)
@@ -3,7 +3,7 @@
 
 #include "ui_dlgspline.h"
 
-class RS_Spline;
+class Spline;
 
 class DlgSpline: public QDialog
 {
@@ -14,11 +14,11 @@ class DlgSpline: public QDialog
                ~DlgSpline();
 
        public slots:
-               void setSpline(RS_Spline & e);
+               void setSpline(Spline & e);
                void updateSpline();
 
        private:
-               RS_Spline * spline;
+               Spline * spline;
 
        private:
                Ui::DlgSpline ui;
index 6b90d22397abbb2c44df60ddc990ac9266525fa8..5f72cbaa7abad8a56630f6737c8f38dea8fce7f3 100644 (file)
@@ -79,7 +79,7 @@ void DlgText::updateUniCharComboBox(int)
 /**
  * Sets the text entity represented by this dialog.
  */
-void DlgText::setText(RS_Text & t, bool isNew)
+void DlgText::setText(Text & t, bool isNew)
 {
        text = &t;
        this->isNew = isNew;
@@ -99,9 +99,9 @@ void DlgText::setText(RS_Text & t, bool isNew)
        {
                settings.beginGroup("Draw");
                //default font depending on locale
-//             Q3CString iso = RS_System::localeToISO( QTextCodec::locale() );
-//             QString iso = RS_System::localeToISO(QTextCodec::locale());
-               QString iso = RS_System::localeToISO(QLocale::system().name());
+//             Q3CString iso = System::localeToISO( QTextCodec::locale() );
+//             QString iso = System::localeToISO(QTextCodec::locale());
+               QString iso = System::localeToISO(QLocale::system().name());
 
                if (iso == "ISO8859-1")
                        fon = settings.value("TextFont", "normallatin1").toString();
@@ -147,7 +147,7 @@ void DlgText::setText(RS_Text & t, bool isNew)
 
                str = text->getText();
                //QString shape = settings.value("/TextShape", "0");
-               angle = QString("%1").arg(RS_Math::rad2deg(text->getAngle()));
+               angle = QString("%1").arg(Math::rad2deg(text->getAngle()));
        }
 
        ui.cbDefault->setChecked(def == "1");
@@ -186,12 +186,12 @@ void DlgText::updateText()
        {
                text->setStyle(ui.cbFont->currentText());
                text->setHeight(ui.leHeight->text().toDouble());
-//             text->setText(RS_FilterDXF::toNativeString(ui.teText->text()));
-               text->setText(RS_FilterDXF::toNativeString(ui.teText->toPlainText()));
+//             text->setText(FilterDXF::toNativeString(ui.teText->text()));
+               text->setText(FilterDXF::toNativeString(ui.teText->toPlainText()));
                //text->setLetterSpacing(leLetterSpacing.toDouble());
                text->setLineSpacingFactor(ui.leLineSpacingFactor->text().toDouble());
                text->setAlignment(getAlignment());
-               text->setAngle(RS_Math::deg2rad(ui.leAngle->text().toDouble()));
+               text->setAngle(Math::deg2rad(ui.leAngle->text().toDouble()));
        }
 }
 
index fe5476f3b98b4add95b52a539c628934ac822a8e..edc60d073993356a0579062b414523d8da3eb021 100644 (file)
@@ -3,8 +3,8 @@
 
 #include "ui_dlgtext.h"
 
-class RS_Text;
-class RS_Font;
+class Text;
+class Font;
 
 class DlgText: public QDialog
 {
@@ -18,7 +18,7 @@ class DlgText: public QDialog
 
        public slots:
                void updateUniCharComboBox(int);
-               void setText(RS_Text & t, bool isNew);
+               void setText(Text & t, bool isNew);
                void updateText();
                void setAlignmentTL();
                void setAlignmentTC();
@@ -42,8 +42,8 @@ class DlgText: public QDialog
 
        private:
                bool isNew;
-               RS_Text * text;
-               RS_Font * font;
+               Text * text;
+               Font * font;
 
        private:
                Ui::DlgText ui;
index 38033490d528981662ce7111ce3a7a04092fd825..be6c6613d7d32077bbbd8bb78261ebbc434203df 100644 (file)
@@ -16,7 +16,7 @@
 
 #include "imageoptions.h"
 
-#include "rs.h"
+#include "enums.h"
 #include "actiondrawimage.h"
 #include "actioninterface.h"
 #include "debug.h"
@@ -47,7 +47,7 @@ void ImageOptions::setAction(ActionInterface * a, bool update)
 
                if (update)
                {
-                       sAngle = QString("%1").arg(RS_Math::rad2deg(action->getAngle()));
+                       sAngle = QString("%1").arg(Math::rad2deg(action->getAngle()));
                        sFactor = QString("%1").arg(action->getFactor());
                }
                else
@@ -64,7 +64,7 @@ void ImageOptions::setAction(ActionInterface * a, bool update)
        }
        else
        {
-               RS_DEBUG->print(RS_Debug::D_ERROR, "ImageOptions::setAction: wrong action type");
+               DEBUG->print(Debug::D_ERROR, "ImageOptions::setAction: wrong action type");
                action = NULL;
        }
 }
@@ -73,7 +73,7 @@ void ImageOptions::updateData()
 {
        if (action != NULL)
        {
-               action->setAngle(RS_Math::deg2rad(RS_Math::eval(ui.leAngle->text())));
-               action->setFactor(RS_Math::eval(ui.leFactor->text()));
+               action->setAngle(Math::deg2rad(Math::eval(ui.leAngle->text())));
+               action->setFactor(Math::eval(ui.leFactor->text()));
        }
 }
index d559ce1deb823c10a8e09c2429b051b4ff1c7035..45b1909c64a2d7e16d715e6ba0745ac6e46f6658 100644 (file)
@@ -95,7 +95,7 @@ void InsertOptions::setAction(ActionInterface * a, bool update)
 
                if (update)
                {
-                       sAngle = QString("%1").arg(RS_Math::rad2deg(action->getAngle()));
+                       sAngle = QString("%1").arg(Math::rad2deg(action->getAngle()));
                        sFactor = QString("%1").arg(action->getFactor());
                        sColumns = QString("%1").arg(action->getColumns());
                        sRows = QString("%1").arg(action->getRows());
@@ -123,7 +123,7 @@ void InsertOptions::setAction(ActionInterface * a, bool update)
        }
        else
        {
-               RS_DEBUG->print(RS_Debug::D_ERROR, "InsertOptions::setAction: wrong action type");
+               DEBUG->print(Debug::D_ERROR, "InsertOptions::setAction: wrong action type");
                action = NULL;
        }
 }
@@ -132,11 +132,11 @@ void InsertOptions::updateData()
 {
        if (action != NULL)
        {
-               action->setAngle(RS_Math::deg2rad(RS_Math::eval(leAngle->text())));
-               action->setFactor(RS_Math::eval(leFactor->text()));
+               action->setAngle(Math::deg2rad(Math::eval(leAngle->text())));
+               action->setFactor(Math::eval(leFactor->text()));
                action->setColumns(sbColumns->value());
                action->setRows(sbRows->value());
-               action->setColumnSpacing(RS_Math::eval(leColumnSpacing->text()));
-               action->setRowSpacing(RS_Math::eval(leRowSpacing->text()));
+               action->setColumnSpacing(Math::eval(leColumnSpacing->text()));
+               action->setRowSpacing(Math::eval(leRowSpacing->text()));
        }
 }
index aa8d73576e63ac0d73bbec65e8e56f65d8ab4572..facdab7597a00d0671f4496d52fe3919a5a35fb1 100644 (file)
@@ -29,7 +29,7 @@ LayerDialog::~LayerDialog()
 {
 }
 
-void LayerDialog::setLayer(RS_Layer * l)
+void LayerDialog::setLayer(Layer * l)
 {
        layer = l;
        layerName = layer->getName();
@@ -40,7 +40,7 @@ void LayerDialog::setLayer(RS_Layer * l)
                ui.leName->setEnabled(false);
 }
 
-void LayerDialog::setLayerList(RS_LayerList * ll)
+void LayerDialog::setLayerList(LayerList * ll)
 {
        layerList = ll;
 }
@@ -56,10 +56,10 @@ void LayerDialog::updateLayer()
        layer->setPen(ui.wPen->getPen());
 #if 0
 //OK, the problem is the color widget is misreporting the color that's been set.
-RS_Color c = ui.wPen->getPen().getColor();
+Color c = ui.wPen->getPen().getColor();
 printf("LayerDialog::updateLayer() -> selected pen is %u, %u, %u\n", c.red(), c.green(), c.blue());
 std::cout << ui.wPen->getPen();
-RS_Pen p = layer->getPen();
+Pen p = layer->getPen();
 c = p.getColor();
 printf("LayerDialog::updateLayer() -> selected pen is %u, %u, %u\n", c.red(), c.green(), c.blue());
 std::cout << ui.wPen->getPen();
@@ -70,7 +70,7 @@ void LayerDialog::validate()
 {
        if (layerList && (!editLayer || layerName != ui.leName->text()))
        {
-               RS_Layer * l = layerList->find(ui.leName->text().toLatin1());
+               Layer * l = layerList->find(ui.leName->text().toLatin1());
 
                if (l)
                {
index 2b8d69add326d1cca914e6e847296f88f3b18803..03b1040defe891508a82a3d9c44d0530e2dfbd8c 100644 (file)
@@ -3,8 +3,8 @@
 
 #include "ui_layerdialog.h"
 
-class RS_Layer;
-class RS_LayerList;
+class Layer;
+class LayerList;
 
 class LayerDialog: public QDialog
 {
@@ -15,15 +15,15 @@ class LayerDialog: public QDialog
                ~LayerDialog();
 
        public slots:
-               void setLayer(RS_Layer * l);
-               void setLayerList(RS_LayerList * ll);
+               void setLayer(Layer * l);
+               void setLayerList(LayerList * ll);
                void setEditLayer(bool el);
                void updateLayer();
                void validate();
 
        protected:
-               RS_Layer * layer;
-               RS_LayerList * layerList;
+               Layer * layer;
+               LayerList * layerList;
                QString layerName;
                bool editLayer;
 
index b0725a9e54736c4f30b8d3d66c42e3817ea359b9..febdf230e6b1afd950a08af80642082cdaee296d 100644 (file)
@@ -65,7 +65,7 @@ void LibraryInsertOptions::setAction(ActionInterface * a, bool update)
 
                if (update)
                {
-                       sAngle = QString("%1").arg(RS_Math::rad2deg(action->getAngle()));
+                       sAngle = QString("%1").arg(Math::rad2deg(action->getAngle()));
                        sFactor = QString("%1").arg(action->getFactor());
                }
                else
@@ -81,7 +81,7 @@ void LibraryInsertOptions::setAction(ActionInterface * a, bool update)
        }
        else
        {
-               RS_DEBUG->print(RS_Debug::D_ERROR, "LibraryInsertOptions::setAction: wrong action type");
+               DEBUG->print(Debug::D_ERROR, "LibraryInsertOptions::setAction: wrong action type");
                action = NULL;
        }
 }
@@ -90,8 +90,8 @@ void LibraryInsertOptions::updateData()
 {
        if (action != NULL)
        {
-               action->setAngle(RS_Math::deg2rad(RS_Math::eval(leAngle->text())));
-               action->setFactor(RS_Math::eval(leFactor->text()));
+               action->setAngle(Math::deg2rad(Math::eval(leAngle->text())));
+               action->setFactor(Math::eval(leFactor->text()));
        }
 }
 
index 607b5a1ad040d29021e1e36326c6188176f706cd..19a194dd1feff2c60931e27edad4fcf00e5b8485 100644 (file)
@@ -44,7 +44,7 @@ std::cout << "LibraryWidget::LibraryWidget()" << std::endl;
        ui.setupUi(this);
        ui.lvDirectory->setColumnCount(1);
 
-       QStringList directoryList = RS_SYSTEM->getDirectoryList("library");
+       QStringList directoryList = SYSTEM->getDirectoryList("library");
 #if 0
 std::cout << "directorySize = " << directoryList.size() << std::endl;
 
@@ -105,14 +105,14 @@ void LibraryWidget::insert()
                        }
                        else
                        {
-                               RS_DEBUG->print(RS_Debug::D_ERROR, "LibraryWidget::insert:"
+                               DEBUG->print(Debug::D_ERROR, "LibraryWidget::insert:"
                                        "Cannot create action ActionLibraryInsert");
                        }
                }
        }
        else
        {
-               RS_DEBUG->print(RS_Debug::D_ERROR,
+               DEBUG->print(Debug::D_ERROR,
                        "LibraryWidget::insert: Can't read file: '%s'", dxfPath.toLatin1().data());
        }
 }
@@ -186,7 +186,7 @@ void LibraryWidget::updatePreview(QTreeWidgetItem * item, int /*column*/)
        ui.ivPreview->clear();
 
        // List of all directories that contain part libraries:
-       QStringList directoryList = RS_SYSTEM->getDirectoryList("library");
+       QStringList directoryList = SYSTEM->getDirectoryList("library");
        QStringList::Iterator it;
        QDir itemDir;
        QStringList itemPathList;
@@ -253,7 +253,7 @@ QString LibraryWidget::getItemPath(QListWidgetItem * item)
        if (item)
        {
                // List of all directories that contain part libraries:
-               QStringList directoryList = RS_SYSTEM->getDirectoryList("library");
+               QStringList directoryList = SYSTEM->getDirectoryList("library");
                QStringList::Iterator it;
                QDir itemDir;
 
@@ -305,12 +305,12 @@ QPixmap LibraryWidget::getPixmap(const QString & dir, const QString & dxfFile,
 QString LibraryWidget::getPathToPixmap(const QString & dir, const QString & dxfFile,
        const QString & dxfPath)
 {
-       RS_DEBUG->print("LibraryWidget::getPathToPixmap: dir: '%s' dxfFile: '%s' dxfPath: '%s'",
+       DEBUG->print("LibraryWidget::getPathToPixmap: dir: '%s' dxfFile: '%s' dxfPath: '%s'",
                dir.toLatin1().data(), dxfFile.toLatin1().data(), dxfPath.toLatin1().data());
 
        // List of all directories that contain part libraries:
-       QStringList directoryList = RS_SYSTEM->getDirectoryList("library");
-       directoryList.prepend(RS_SYSTEM->getHomeDir() + "/.architektonas/library");
+       QStringList directoryList = SYSTEM->getDirectoryList("library");
+       directoryList.prepend(SYSTEM->getHomeDir() + "/.architektonas/library");
        QStringList::Iterator it;
 
        QFileInfo fiDxf(dxfPath);
@@ -323,25 +323,25 @@ QString LibraryWidget::getPathToPixmap(const QString & dir, const QString & dxfF
        {
                itemDir = (*it) + dir;
                pngPath = itemDir + "/" + fiDxf.completeBaseName() + ".png";
-               RS_DEBUG->print("LibraryWidget::getPathToPixmap: checking: '%s'",
+               DEBUG->print("LibraryWidget::getPathToPixmap: checking: '%s'",
                        pngPath.toLatin1().data());
                QFileInfo fiPng(pngPath);
 
                // the thumbnail exists:
                if (fiPng.isFile())
                {
-                       RS_DEBUG->print("LibraryWidget::getPathToPixmap: dxf date: %s, png date: %s",
+                       DEBUG->print("LibraryWidget::getPathToPixmap: dxf date: %s, png date: %s",
                                fiDxf.lastModified().toString().toLatin1().data(), fiPng.lastModified().toString().toLatin1().data());
 
                        if (fiPng.lastModified() > fiDxf.lastModified())
                        {
-                               RS_DEBUG->print("LibraryWidget::getPathToPixmap: thumbnail found: '%s'",
+                               DEBUG->print("LibraryWidget::getPathToPixmap: thumbnail found: '%s'",
                                        pngPath.toLatin1().data());
                                return pngPath;
                        }
                        else
                        {
-                               RS_DEBUG->print("LibraryWidget::getPathToPixmap: thumbnail needs to be updated: '%s'",
+                               DEBUG->print("LibraryWidget::getPathToPixmap: thumbnail needs to be updated: '%s'",
                                        pngPath.toLatin1().data());
                        }
                }
@@ -349,8 +349,8 @@ QString LibraryWidget::getPathToPixmap(const QString & dir, const QString & dxfF
 
        // The thumbnail must be created in the user's home.
        // So, create all directories needed:
-       RS_SYSTEM->createHomePath("/.architektonas/library" + dir);
-       QString d = RS_SYSTEM->getHomeDir() + "/.architektonas/library" + dir;
+       SYSTEM->createHomePath("/.architektonas/library" + dir);
+       QString d = SYSTEM->getHomeDir() + "/.architektonas/library" + dir;
        pngPath = d + "/" + fiDxf.completeBaseName() + ".png";
 
        QPixmap buffer(128, 128);
@@ -359,17 +359,17 @@ QString LibraryWidget::getPathToPixmap(const QString & dir, const QString & dxfF
        qpntr.setBackground(Qt::white);
        qpntr.eraseRect(0, 0, 128, 128);
 
-       RS_StaticGraphicView view(128, 128, painter);
+       StaticGraphicView view(128, 128, painter);
        Drawing drawing;
 
        if (drawing.open(dxfPath, RS2::FormatUnknown))
        {
-               RS_Color black(0, 0, 0);
+               Color black(0, 0, 0);
 
                // Set all pens in the drawing to BLACK
-               for(RS_Entity * e=drawing.firstEntity(RS2::ResolveAll); e!=NULL; e=drawing.nextEntity(RS2::ResolveAll))
+               for(Entity * e=drawing.firstEntity(RS2::ResolveAll); e!=NULL; e=drawing.nextEntity(RS2::ResolveAll))
                {
-                       RS_Pen pen = e->getPen();
+                       Pen pen = e->getPen();
                        pen.setColor(black);
                        e->setPen(pen);
                }
@@ -386,7 +386,7 @@ QString LibraryWidget::getPathToPixmap(const QString & dir, const QString & dxfF
 
                if (!writer.write(image))
                {
-                       RS_DEBUG->print(RS_Debug::D_ERROR,
+                       DEBUG->print(Debug::D_ERROR,
                                "LibraryWidget::getPathToPixmap: Cannot write thumbnail: '%s'",
                                pngPath.toLatin1().data());
                        pngPath = "";
@@ -394,7 +394,7 @@ QString LibraryWidget::getPathToPixmap(const QString & dir, const QString & dxfF
        }
        else
        {
-               RS_DEBUG->print(RS_Debug::D_ERROR, "LibraryWidget::getPathToPixmap: Cannot open file: '%s'", dxfPath.toLatin1().data());
+               DEBUG->print(Debug::D_ERROR, "LibraryWidget::getPathToPixmap: Cannot open file: '%s'", dxfPath.toLatin1().data());
        }
 
        delete painter;
index 5fd69d5121ca1d5c03e8532ce390b53bdb271b7c..7e80f02e9802e6aaa19471593160c3dda5015fc6 100644 (file)
@@ -63,7 +63,7 @@ LineAngleOptions::~LineAngleOptions()
                settings.beginGroup("Draw");
 
                if (!action->hasFixedAngle())
-                       settings.setValue("LineAngleAngle", RS_Math::rad2deg(action->getAngle()));
+                       settings.setValue("LineAngleAngle", Math::rad2deg(action->getAngle()));
 
                settings.setValue("LineAngleLength", action->getLength());
                settings.setValue("LineAngleSnapPoint", action->getSnapPoint());
@@ -89,7 +89,7 @@ void LineAngleOptions::setAction(ActionInterface * a, bool update)
                // settings from action:
                if (update)
                {
-                       sa = QString("%1").arg(RS_Math::rad2deg(action->getAngle()));
+                       sa = QString("%1").arg(Math::rad2deg(action->getAngle()));
                        sl = QString("%1").arg(action->getLength());
                        sp = action->getSnapPoint();
                }
@@ -115,7 +115,7 @@ void LineAngleOptions::setAction(ActionInterface * a, bool update)
        }
        else
        {
-               RS_DEBUG->print(RS_Debug::D_ERROR, "LineAngleOptions::setAction: wrong action type");
+               DEBUG->print(Debug::D_ERROR, "LineAngleOptions::setAction: wrong action type");
                this->action = NULL;
        }
 }
@@ -123,13 +123,13 @@ void LineAngleOptions::setAction(ActionInterface * a, bool update)
 void LineAngleOptions::updateAngle(const QString & a)
 {
        if (action && !action->hasFixedAngle())
-               action->setAngle(RS_Math::deg2rad(RS_Math::eval(a)));
+               action->setAngle(Math::deg2rad(Math::eval(a)));
 }
 
 void LineAngleOptions::updateLength(const QString & l)
 {
        if (action)
-               action->setLength(RS_Math::eval(l));
+               action->setLength(Math::eval(l));
 }
 
 void LineAngleOptions::updateSnapPoint(int sp)
index f6031382874c34584f19249f8d48f11a0c0e3a8d..6d09a7fe8af92fc2690fee9eee4cb57fcbbc9a8e 100644 (file)
@@ -81,7 +81,7 @@ void LineBisectorOptions::setAction(ActionInterface * a, bool update)
        }
        else
        {
-               RS_DEBUG->print(RS_Debug::D_ERROR, "LineBisectorOptions::setAction: wrong action type");
+               DEBUG->print(Debug::D_ERROR, "LineBisectorOptions::setAction: wrong action type");
                action = NULL;
        }
 }
@@ -89,7 +89,7 @@ void LineBisectorOptions::setAction(ActionInterface * a, bool update)
 void LineBisectorOptions::updateLength(const QString & l)
 {
        if (action != NULL)
-               action->setLength(RS_Math::eval(l));
+               action->setLength(Math::eval(l));
 }
 
 void LineBisectorOptions::updateNumber(int n)
index 5f3696ceab82dfea6fcaf3b6b0196758669053ea..11ec4212c0d351b810408f9904df5489ff4d9508 100644 (file)
@@ -16,7 +16,7 @@
 
 #include "lineoptions.h"
 
-#include "rs.h"
+#include "enums.h"
 #include "actiondrawline.h"
 #include "actioninterface.h"
 #include "debug.h"
@@ -57,7 +57,7 @@ void LineOptions::setAction(ActionInterface * a)
        }
        else
        {
-               RS_DEBUG->print(RS_Debug::D_ERROR, "QG_LineOptions::setAction: wrong action type");
+               DEBUG->print(Debug::D_ERROR, "QG_LineOptions::setAction: wrong action type");
                action = NULL;
        }
 }
index ba4f27d3f7d9edb52d08d1cc3d894b4e373e2a32..39637ec16ca05cbbf7bfacd201d31ade916b5d5e 100644 (file)
@@ -81,7 +81,7 @@ void LineParallelOptions::setAction(ActionInterface * a, bool update)
        }
        else
        {
-               RS_DEBUG->print(RS_Debug::D_ERROR, "LineParallelOptions::setAction: wrong action type");
+               DEBUG->print(Debug::D_ERROR, "LineParallelOptions::setAction: wrong action type");
                action = NULL;
        }
 }
@@ -89,7 +89,7 @@ void LineParallelOptions::setAction(ActionInterface * a, bool update)
 void LineParallelOptions::updateDist(const QString & d)
 {
        if (action != NULL)
-               action->setDistance(RS_Math::eval(d));
+               action->setDistance(Math::eval(d));
 }
 
 void LineParallelOptions::updateNumber(int n)
index 782f31b76af3e91c5610c16b0a52bebbc886aed0..8e96d5fc6be7ef40ca077722c100c0c858a1339d 100644 (file)
@@ -69,7 +69,7 @@ void LineParallelThroughOptions::setAction(ActionInterface * a, bool update)
        }
        else
        {
-               RS_DEBUG->print(RS_Debug::D_ERROR, "LineParallelThroughOptions::setAction: wrong action type");
+               DEBUG->print(Debug::D_ERROR, "LineParallelThroughOptions::setAction: wrong action type");
                action = NULL;
        }
 }
index f43e70daf7c54dc9df27854d99e8403c983a3ee5..1a9f6e6d0e18e5b473add1760a79705828653bf1 100644 (file)
@@ -69,7 +69,7 @@ void LinePolygon2Options::setAction(ActionInterface * a, bool update)
        }
        else
        {
-               RS_DEBUG->print(RS_Debug::D_ERROR, "LinePolygon2Options::setAction: wrong action type");
+               DEBUG->print(Debug::D_ERROR, "LinePolygon2Options::setAction: wrong action type");
                action = NULL;
        }
 }
index 69b8f62d806552439f796ceaf75831a91acf0ed8..1a4b3220f2b1916efbb174ebc27d8945f704cf27 100644 (file)
@@ -69,7 +69,7 @@ void LinePolygonOptions::setAction(ActionInterface * a, bool update)
        }
        else
        {
-               RS_DEBUG->print(RS_Debug::D_ERROR, "LinePolygonOptions::setAction: wrong action type");
+               DEBUG->print(Debug::D_ERROR, "LinePolygonOptions::setAction: wrong action type");
                action = NULL;
        }
 }
index ed197694d9d25ea2e64e5ca7cad7098eb1276f3d..24134938b7900f59b985540234a9b77e2362c64c 100644 (file)
@@ -54,7 +54,7 @@ LineRelAngleOptions::~LineRelAngleOptions()
                settings.beginGroup("Draw");
 
                if (!action->hasFixedAngle())
-                       settings.value("LineRelAngleAngle", RS_Math::rad2deg(action->getAngle()));
+                       settings.value("LineRelAngleAngle", Math::rad2deg(action->getAngle()));
 
                settings.value("LineRelAngleLength", action->getLength());
                settings.endGroup();
@@ -79,7 +79,7 @@ void LineRelAngleOptions::setAction(ActionInterface * a, bool update)
                // settings from action:
                if (update)
                {
-                       sa = QString("%1").arg(RS_Math::rad2deg(action->getAngle()));
+                       sa = QString("%1").arg(Math::rad2deg(action->getAngle()));
                        sl = QString("%1").arg(action->getLength());
                }
                // settings from config file:
@@ -90,7 +90,7 @@ void LineRelAngleOptions::setAction(ActionInterface * a, bool update)
                        if (!action->hasFixedAngle())
                                sa = settings.value("LineRelAngleAngle", "30.0").toString();
                        else
-                               sa = QString("%1").arg(RS_Math::rad2deg(action->getAngle()));
+                               sa = QString("%1").arg(Math::rad2deg(action->getAngle()));
 
                        sl = settings.value("LineRelAngleLength", "10.0").toString();
                        settings.endGroup();
@@ -101,7 +101,7 @@ void LineRelAngleOptions::setAction(ActionInterface * a, bool update)
        }
        else
        {
-               RS_DEBUG->print(RS_Debug::D_ERROR,
+               DEBUG->print(Debug::D_ERROR,
                        "LineRelAngleOptions::setAction: wrong action type");
                this->action = NULL;
        }
@@ -110,11 +110,11 @@ void LineRelAngleOptions::setAction(ActionInterface * a, bool update)
 void LineRelAngleOptions::updateAngle(const QString & a)
 {
        if (action != NULL && !action->hasFixedAngle())
-               action->setAngle(RS_Math::deg2rad(RS_Math::eval(a)));
+               action->setAngle(Math::deg2rad(Math::eval(a)));
 }
 
 void LineRelAngleOptions::updateLength(const QString & l)
 {
        if (action != NULL)
-               action->setLength(RS_Math::eval(l));
+               action->setLength(Math::eval(l));
 }
index de280f525d940fb0c21b5b0a393583fc06a9b548..b807989c239f9deca83031f4b591755bb72bc693 100644 (file)
@@ -57,20 +57,20 @@ void MoveRotateOptions::setAction(ActionInterface * a, bool update)
                QString sa;
 
                if (update)
-                       sa = QString("%1").arg(RS_Math::rad2deg(action->getAngle()));
+                       sa = QString("%1").arg(Math::rad2deg(action->getAngle()));
                else
                {
                        settings.beginGroup("Modify");
                        sa = settings.value("MoveRotate", "30").toString();
                        settings.endGroup();
-                       action->setAngle(RS_Math::deg2rad(sa.toDouble()));
+                       action->setAngle(Math::deg2rad(sa.toDouble()));
                }
 
                leAngle->setText(sa);
        }
        else
        {
-               RS_DEBUG->print(RS_Debug::D_ERROR, "CircleOptions::setAction: wrong action type");
+               DEBUG->print(Debug::D_ERROR, "CircleOptions::setAction: wrong action type");
                action = NULL;
        }
 }
@@ -78,6 +78,6 @@ void MoveRotateOptions::setAction(ActionInterface * a, bool update)
 void MoveRotateOptions::updateAngle(const QString & a)
 {
        if (action != NULL)
-               action->setAngle(RS_Math::deg2rad(RS_Math::eval(a)));
+               action->setAngle(Math::deg2rad(Math::eval(a)));
 }
 
index a5e6893581671210038717772486de5983517c0b..07dbf7ad81c531b6c684814d540659bda6d0019c 100644 (file)
@@ -16,7 +16,7 @@
 
 #include "printpreviewoptions.h"
 
-#include "rs.h"
+#include "enums.h"
 #include "actioninterface.h"
 #include "actionprintpreview.h"
 #include "debug.h"
@@ -96,7 +96,7 @@ void PrintPreviewOptions::setAction(ActionInterface * a, bool/*update*/)
                QString sAngle;
                QString sFactor;
                if (update) {
-                       sAngle = QString("%1").arg(RS_Math::rad2deg(action->getAngle()));
+                       sAngle = QString("%1").arg(Math::rad2deg(action->getAngle()));
                        sFactor = QString("%1").arg(action->getFactor());
        } else {
                        RS_SETTINGS->beginGroup("/PrintPreview");
@@ -111,7 +111,7 @@ void PrintPreviewOptions::setAction(ActionInterface * a, bool/*update*/)
        }
        else
        {
-               RS_DEBUG->print(RS_Debug::D_ERROR, "QG_PrintPreviewOptions::setAction: wrong action type");
+               DEBUG->print(Debug::D_ERROR, "QG_PrintPreviewOptions::setAction: wrong action type");
                action = NULL;
        }
 }
@@ -121,8 +121,8 @@ void PrintPreviewOptions::updateData()
        if (action != NULL)
        {
                /*
-               action->setAngle(RS_Math::deg2rad(RS_Math::eval(leAngle->text())));
-               action->setFactor(RS_Math::eval(leFactor->text()));
+               action->setAngle(Math::deg2rad(Math::eval(leAngle->text())));
+               action->setFactor(Math::eval(leFactor->text()));
                */
        }
 }
@@ -173,7 +173,7 @@ void PrintPreviewOptions::scale(const QString & s)
        else
        {
                bool ok = false;
-               double f = RS_Math::eval(s, &ok);
+               double f = Math::eval(s, &ok);
 
                if (ok)
                        action->setScale(f);
index 6b4fdc0d51b81d20cefb8b92c1dd7b27aba77d44..1084835ba7961d3e0f4eec16158d6a5ef5a75542 100644 (file)
@@ -83,7 +83,7 @@ void RoundOptions::setAction(ActionInterface * a, bool update)
        }
        else
        {
-               RS_DEBUG->print(RS_Debug::D_ERROR, "LineParallelOptions::setAction: wrong action type");
+               DEBUG->print(Debug::D_ERROR, "LineParallelOptions::setAction: wrong action type");
                action = NULL;
        }
 }
@@ -93,7 +93,7 @@ void RoundOptions::updateData()
        if (action != NULL)
        {
                action->setTrim(cbTrim->isChecked());
-               action->setRadius(RS_Math::eval(leRadius->text()));
+               action->setRadius(Math::eval(leRadius->text()));
        }
 }
 
index 759b27cb3a605ef783ea61aa0dd2d5b4089c867c..d4885d21185491f45827e0d46b771cdca002e6ec 100644 (file)
@@ -61,5 +61,5 @@ void SnapDistOptions::setDist(double * d)
 void SnapDistOptions::updateDist(const QString & d)
 {
        if (dist)
-               *dist = RS_Math::eval(d, 1.0);
+               *dist = Math::eval(d, 1.0);
 }
index dad1687ba03ff33b90e1399827de926f18764c0e..af6148b235a675c267fcd8cdb9c2fa1ffa18d5cc 100644 (file)
@@ -89,7 +89,7 @@ void SplineOptions::setAction(ActionInterface * a, bool update)
        }
        else
        {
-               RS_DEBUG->print(RS_Debug::D_ERROR, "SplineOptions::setAction: wrong action type");
+               DEBUG->print(Debug::D_ERROR, "SplineOptions::setAction: wrong action type");
                action = NULL;
        }
 }
index 86af4219cfeda9204f0ce522a5fad5019fa35bd3..3275a9510f6c0333c765156cda1c9ba75bcb984a 100644 (file)
@@ -47,7 +47,7 @@ void TextOptions::setAction(ActionInterface * a, bool update)
                if (update)
                {
                        st = action->getText();
-                       sa = QString("%1").arg(RS_Math::rad2deg(action->getAngle()));
+                       sa = QString("%1").arg(Math::rad2deg(action->getAngle()));
                }
                else
                {
@@ -60,7 +60,7 @@ void TextOptions::setAction(ActionInterface * a, bool update)
        }
        else
        {
-               RS_DEBUG->print(RS_Debug::D_ERROR, "TextOptions::setAction: wrong action type");
+               DEBUG->print(Debug::D_ERROR, "TextOptions::setAction: wrong action type");
                action = NULL;
        }
 }
@@ -74,5 +74,5 @@ void TextOptions::updateText()
 void TextOptions::updateAngle()
 {
        if (action != NULL)
-               action->setAngle(RS_Math::deg2rad(RS_Math::eval(ui.leAngle->text())));
+               action->setAngle(Math::deg2rad(Math::eval(ui.leAngle->text())));
 }
index 45b325c2edfbcfa9398b72e208256eb4d05d91c9..71c532916b85ef16ab795db77a6af5ad317bb6d1 100644 (file)
@@ -73,7 +73,7 @@ void TrimAmountOptions::setAction(ActionInterface * a, bool update)
        }
        else
        {
-               RS_DEBUG->print(RS_Debug::D_ERROR, "ModifyTrimAmountOptions::setAction: wrong action type");
+               DEBUG->print(Debug::D_ERROR, "ModifyTrimAmountOptions::setAction: wrong action type");
                this->action = NULL;
        }
 }
@@ -81,5 +81,5 @@ void TrimAmountOptions::setAction(ActionInterface * a, bool update)
 void TrimAmountOptions::updateDist(const QString & d)
 {
        if (action != NULL)
-               action->setDistance(RS_Math::eval(d, 1.0));
+               action->setDistance(Math::eval(d, 1.0));
 }
index 694b402c1a3cfa2bfdf42d1883a14223ef716a22..0e11c5daeceb6259a673f3847e37bbb27cd60972 100644 (file)
@@ -26,7 +26,7 @@ WidgetPen::~WidgetPen()
 {
 }
 
-void WidgetPen::setPen(RS_Pen pen, bool showByLayer, bool showUnchanged, const QString & title)
+void WidgetPen::setPen(Pen pen, bool showByLayer, bool showUnchanged, const QString & title)
 {
        ui.cbColor->init(showByLayer, showUnchanged);
        ui.cbWidth->init(showByLayer, showUnchanged);
@@ -43,9 +43,9 @@ void WidgetPen::setPen(RS_Pen pen, bool showByLayer, bool showUnchanged, const Q
                ui.bgPen->setTitle(title);
 }
 
-RS_Pen WidgetPen::getPen()
+Pen WidgetPen::getPen()
 {
-       RS_Pen pen;
+       Pen pen;
 
        pen.setColor(ui.cbColor->getColor());
        pen.setWidth(ui.cbWidth->getWidth());
index 996bbf913fd63ad0e9973023cac4332f21de0005..27474ddecaad61aa55a373c36b2bd6ae4c72d3e7 100644 (file)
@@ -17,8 +17,8 @@ class WidgetPen: public QWidget
                bool isWidthUnchanged();
 
        public slots:
-               void setPen(RS_Pen pen, bool showByLayer, bool showUnchanged, const QString & title);
-               RS_Pen getPen();
+               void setPen(Pen pen, bool showByLayer, bool showUnchanged, const QString & title);
+               Pen getPen();
 
        private:
                Ui::WidgetPen ui;
index baf8ffc115e881543fc3ad47aede841520568f6e..ad10a5c8cbf8c4be7eab06f76ac38fdd538278c3 100644 (file)
@@ -82,56 +82,56 @@ 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("ApplicationWindow::ApplicationWindow");
+       DEBUG->print("ApplicationWindow::ApplicationWindow");
 
        appWindow = this;
 //no    assistant = NULL;
        workspace = NULL;
 
-       RS_DEBUG->print("ApplicationWindow::ApplicationWindow: setting icon");
+       DEBUG->print("ApplicationWindow::ApplicationWindow: setting icon");
 //     setIcon(qPixmapFromMimeSource(QC_APP_ICON));
 //     setWindowIcon(qPixmapFromMimeSource(QC_APP_ICON));
        setWindowIcon(QIcon(":/res/" QC_APP_ICON));
        CreateQtActions(this);
 
-       RS_DEBUG->print("ApplicationWindow::ApplicationWindow: creating action handler");
+       DEBUG->print("ApplicationWindow::ApplicationWindow: creating action handler");
        actionHandler = new ActionHandler(this);
-       RS_DEBUG->print("ApplicationWindow::ApplicationWindow: creating action handler: OK");
+       DEBUG->print("ApplicationWindow::ApplicationWindow: creating action handler: OK");
 
-#ifdef RS_SCRIPTING
-       RS_DEBUG->print("ApplicationWindow::ApplicationWindow: creating scripter");
+#ifdef SCRIPTING
+       DEBUG->print("ApplicationWindow::ApplicationWindow: creating scripter");
        scripter = new QS_Scripter(this, this);
-       RS_DEBUG->print("ApplicationWindow::ApplicationWindow: creating scripter: OK");
+       DEBUG->print("ApplicationWindow::ApplicationWindow: creating scripter: OK");
 #endif
 
-       RS_DEBUG->print("ApplicationWindow::ApplicationWindow: init view");
+       DEBUG->print("ApplicationWindow::ApplicationWindow: init view");
        initView();
-       RS_DEBUG->print("ApplicationWindow::ApplicationWindow: init toolbar");
+       DEBUG->print("ApplicationWindow::ApplicationWindow: init toolbar");
        initToolBar();
-       RS_DEBUG->print("ApplicationWindow::ApplicationWindow: init actions");
+       DEBUG->print("ApplicationWindow::ApplicationWindow: init actions");
        initActions();
-       RS_DEBUG->print("ApplicationWindow::ApplicationWindow: init menu bar");
+       DEBUG->print("ApplicationWindow::ApplicationWindow: init menu bar");
        initMenuBar();
-       RS_DEBUG->print("ApplicationWindow::ApplicationWindow: init status bar");
+       DEBUG->print("ApplicationWindow::ApplicationWindow: init status bar");
        initStatusBar();
 
-       RS_DEBUG->print("ApplicationWindow::ApplicationWindow: creating dialogFactory");
+       DEBUG->print("ApplicationWindow::ApplicationWindow: creating dialogFactory");
        dialogFactory = new QC_DialogFactory(this, optionWidget);
-       RS_DEBUG->print("ApplicationWindow::ApplicationWindow: creating dialogFactory: OK");
-       RS_DEBUG->print("setting dialog factory object");
+       DEBUG->print("ApplicationWindow::ApplicationWindow: creating dialogFactory: OK");
+       DEBUG->print("setting dialog factory object");
 
-       if (RS_DialogFactory::instance() == NULL)
-               RS_DEBUG->print("no RS_DialogFactory instance");
+       if (DialogFactory::instance() == NULL)
+               DEBUG->print("no DialogFactory instance");
        else
-               RS_DEBUG->print("got RS_DialogFactory instance");
+               DEBUG->print("got DialogFactory instance");
 
-       RS_DialogFactory::instance()->setFactoryObject(dialogFactory);
-       RS_DEBUG->print("setting dialog factory object: OK");
+       DialogFactory::instance()->setFactoryObject(dialogFactory);
+       DEBUG->print("setting dialog factory object: OK");
 
-       RS_DEBUG->print("ApplicationWindow::ApplicationWindow: init settings");
+       DEBUG->print("ApplicationWindow::ApplicationWindow: init settings");
        initSettings();
 
-       RS_DEBUG->print("ApplicationWindow::ApplicationWindow: init MDI");
+       DEBUG->print("ApplicationWindow::ApplicationWindow: init MDI");
        initMDI();
 
        // Disable menu and toolbar items
@@ -147,29 +147,29 @@ ApplicationWindow::ApplicationWindow():
  */
 ApplicationWindow::~ApplicationWindow()
 {
-       RS_DEBUG->print("ApplicationWindow::~ApplicationWindow");
-#ifdef RS_SCRIPTING
-       RS_DEBUG->print("ApplicationWindow::~ApplicationWindow: deleting scripter");
+       DEBUG->print("ApplicationWindow::~ApplicationWindow");
+#ifdef SCRIPTING
+       DEBUG->print("ApplicationWindow::~ApplicationWindow: deleting scripter");
        delete scripter;
-       RS_DEBUG->print("ApplicationWindow::~ApplicationWindow: deleting scripter: OK");
+       DEBUG->print("ApplicationWindow::~ApplicationWindow: deleting scripter: OK");
 #endif
 
-       RS_DEBUG->print("ApplicationWindow::~ApplicationWindow: deleting action handler");
+       DEBUG->print("ApplicationWindow::~ApplicationWindow: deleting action handler");
        delete actionHandler;
-       RS_DEBUG->print("ApplicationWindow::~ApplicationWindow: deleting action handler: OK");
+       DEBUG->print("ApplicationWindow::~ApplicationWindow: deleting action handler: OK");
 
-       RS_DEBUG->print("ApplicationWindow::~ApplicationWindow: deleting dialog factory");
+       DEBUG->print("ApplicationWindow::~ApplicationWindow: deleting dialog factory");
        delete dialogFactory;
-       RS_DEBUG->print("ApplicationWindow::~ApplicationWindow: deleting dialog factory: OK");
+       DEBUG->print("ApplicationWindow::~ApplicationWindow: deleting dialog factory: OK");
 
-//no    RS_DEBUG->print("ApplicationWindow::~ApplicationWindow: "
+//no    DEBUG->print("ApplicationWindow::~ApplicationWindow: "
 //                    "deleting assistant..");
 //    if (assistant!=NULL) {
 //        delete assistant;
 //    }
-//    RS_DEBUG->print("ApplicationWindow::~ApplicationWindow: "
+//    DEBUG->print("ApplicationWindow::~ApplicationWindow: "
 //                    "deleting assistant: OK");
-       RS_DEBUG->print("ApplicationWindow::~ApplicationWindow: OK");
+       DEBUG->print("ApplicationWindow::~ApplicationWindow: OK");
 }
 
 /**
@@ -186,14 +186,14 @@ void ApplicationWindow::slotRunStartScript()
  */
 void ApplicationWindow::slotRunScript()
 {
-       RS_DEBUG->print("ApplicationWindow::slotRunScript");
+       DEBUG->print("ApplicationWindow::slotRunScript");
 
        const QObject * s = sender();
 
        if (s != NULL)
        {
                QString script = ((QAction *)s)->text();
-               RS_DEBUG->print("ApplicationWindow::slotRunScript: %s", script.toLatin1().data());
+               DEBUG->print("ApplicationWindow::slotRunScript: %s", script.toLatin1().data());
                slotRunScript(script);
        }
 }
@@ -203,28 +203,28 @@ void ApplicationWindow::slotRunScript()
  */
 void ApplicationWindow::slotRunScript(const QString & name)
 {
-#ifdef RS_SCRIPTING
-       RS_DEBUG->print("ApplicationWindow::slotRunScript");
+#ifdef SCRIPTING
+       DEBUG->print("ApplicationWindow::slotRunScript");
 
        if (scripter == NULL)
        {
-               RS_DEBUG->print(RS_Debug::D_WARNING, "ApplicationWindow::slotRunScript: scripter not initialized");
+               DEBUG->print(Debug::D_WARNING, "ApplicationWindow::slotRunScript: scripter not initialized");
                return;
        }
 
     statusBar()->showMessage(tr("Running script '%1'").arg(name), 2000);
 
-       QStringList scriptList = RS_SYSTEM->getScriptList();
-       scriptList.append(RS_SYSTEM->getHomeDir() + "/.architektonas/" + name);
+       QStringList scriptList = SYSTEM->getScriptList();
+       scriptList.append(SYSTEM->getHomeDir() + "/.architektonas/" + name);
 
        for (QStringList::Iterator it = scriptList.begin(); it!=scriptList.end(); ++it)
        {
-               RS_DEBUG->print("ApplicationWindow::slotRunScript: checking script '%s'", (*it).toLatin1().data();
+               DEBUG->print("ApplicationWindow::slotRunScript: checking script '%s'", (*it).toLatin1().data();
                QFileInfo fi(*it);
 
                if (fi.exists() && fi.fileName() == name)
                {
-                       RS_DEBUG->print("ApplicationWindow::slotRunScript: running '%s'", (*it).toLatin1().data());
+                       DEBUG->print("ApplicationWindow::slotRunScript: running '%s'", (*it).toLatin1().data());
                        scripter->runScript(*it, "main");
                }
        }
@@ -242,7 +242,7 @@ void ApplicationWindow::slotInsertBlock()
        if (s != NULL)
        {
                QString block = ((QAction *)s)->text();
-               RS_DEBUG->print("ApplicationWindow::slotInsertBlock: %s", block.toLatin1().data());
+               DEBUG->print("ApplicationWindow::slotInsertBlock: %s", block.toLatin1().data());
                slotInsertBlock(block);
        }
 }
@@ -252,12 +252,12 @@ void ApplicationWindow::slotInsertBlock()
  */
 void ApplicationWindow::slotInsertBlock(const QString & name)
 {
-       RS_DEBUG->print("ApplicationWindow::slotInsertBlock: '%s'", name.toLatin1().data());
+       DEBUG->print("ApplicationWindow::slotInsertBlock: '%s'", name.toLatin1().data());
 
        statusBar()->showMessage(tr("Inserting block '%1'").arg(name), 2000);
 
        GraphicView * graphicView = getGraphicView();
-       RS_Document * document = getDocument();
+       Document * document = getDocument();
 
        if (graphicView && document)
        {
@@ -314,9 +314,9 @@ void ApplicationWindow::finishSplashScreen()
  */
 void ApplicationWindow::closeEvent(QCloseEvent * /*ce*/)
 {
-       RS_DEBUG->print("ApplicationWindow::closeEvent()");
+       DEBUG->print("ApplicationWindow::closeEvent()");
        slotFileQuit();
-       RS_DEBUG->print("ApplicationWindow::closeEvent(): OK");
+       DEBUG->print("ApplicationWindow::closeEvent(): OK");
 }
 
 /**
@@ -335,7 +335,7 @@ void ApplicationWindow::mouseReleaseEvent(QMouseEvent * e)
  */
 void ApplicationWindow::initMDI()
 {
-       RS_DEBUG->print("ApplicationWindow::initMDI() begin");
+       DEBUG->print("ApplicationWindow::initMDI() begin");
 
 /* Could use QVBoxLayout instead of Q3VBox, but do we even need to? */
 //     Q3VBox * vb = new Q3VBox(this);
@@ -345,14 +345,14 @@ void ApplicationWindow::initMDI()
 //     workspace->setScrollBarsEnabled(true);
 //     setCentralWidget(vb);
        setCentralWidget(workspace);//JLH:hmm. (Yes, it works! \o/)
-       RS_DEBUG->print("ApplicationWindow::initMDI(): workspace=%08X", workspace);
+       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("ApplicationWindow::initMDI() end");
+       DEBUG->print("ApplicationWindow::initMDI() end");
 }
 
 /**
@@ -362,7 +362,7 @@ void ApplicationWindow::initMDI()
  */
 void ApplicationWindow::initActions()
 {
-       RS_DEBUG->print("ApplicationWindow::initActions()");
+       DEBUG->print("ApplicationWindow::initActions()");
 
        //
        // File actions:
@@ -1113,7 +1113,7 @@ void ApplicationWindow::initActions()
        addToolBar(Qt::TopToolBarArea, (QToolBar *)penToolBar); // hmm.
        addToolBar(Qt::TopToolBarArea, optionWidget);
 
-#ifdef RS_SCRIPTING
+#ifdef SCRIPTING
        // Scripts menu:
        //
        scriptMenu = new QMenu(this);
@@ -1211,7 +1211,7 @@ void ApplicationWindow::initActions()
  */
 void ApplicationWindow::initMenuBar()
 {
-       RS_DEBUG->print("ApplicationWindow::initMenuBar()");
+       DEBUG->print("ApplicationWindow::initMenuBar()");
 
        // menuBar entry windowsMenu
        windowsMenu = new QMenu(tr("&Window"), this);
@@ -1251,7 +1251,7 @@ void ApplicationWindow::initMenuBar()
        testMenu->addAction(testResize1024);//testResize1024->addTo(testMenu);
 
        // menuBar configuration
-#ifdef RS_SCRIPTING
+#ifdef SCRIPTING
 //     menuBar()->insertItem(tr("&Scripts"), scriptMenu);
        menuBar()->addMenu(scriptMenu);
 #endif
@@ -1274,7 +1274,7 @@ void ApplicationWindow::initMenuBar()
  */
 void ApplicationWindow::initToolBar()
 {
-       RS_DEBUG->print("ApplicationWindow::initToolBar()");
+       DEBUG->print("ApplicationWindow::initToolBar()");
 
 //     fileToolBar = new Q3ToolBar(this, "File Operations");
        fileToolBar = addToolBar(tr("File Operations"));
@@ -1288,7 +1288,7 @@ void ApplicationWindow::initToolBar()
        penToolBar = new PenToolBar(this, "Pen Selection");
        penToolBar->setObjectName("pen");
 
-       connect(penToolBar, SIGNAL(penChanged(RS_Pen)), this, SLOT(slotPenChanged(RS_Pen)));
+       connect(penToolBar, SIGNAL(penChanged(Pen)), this, SLOT(slotPenChanged(Pen)));
 
 //     optionWidget = new Q3ToolBar(this, "Tool Options");
 //addToolBarBreak() does nothing...
@@ -1335,7 +1335,7 @@ void ApplicationWindow::initToolBar()
  */
 void ApplicationWindow::initStatusBar()
 {
-       RS_DEBUG->print("ApplicationWindow::initStatusBar()");
+       DEBUG->print("ApplicationWindow::initStatusBar()");
 
        statusBar()->setMinimumHeight(32);
        coordinateWidget = new CoordinateWidget(statusBar());//, "coordinates");
@@ -1352,7 +1352,7 @@ void ApplicationWindow::initStatusBar()
  */
 void ApplicationWindow::initSettings()
 {
-       RS_DEBUG->print("ApplicationWindow::initSettings()");
+       DEBUG->print("ApplicationWindow::initSettings()");
        settings.beginGroup("RecentFiles");
 
        for(int i=0; i<recentFiles->Maximum(); ++i)
@@ -1392,7 +1392,7 @@ void ApplicationWindow::initSettings()
  */
 void ApplicationWindow::storeSettings()
 {
-       RS_DEBUG->print("ApplicationWindow::storeSettings()");
+       DEBUG->print("ApplicationWindow::storeSettings()");
 
        settings.beginGroup("RecentFiles");
 
@@ -1407,7 +1407,7 @@ void ApplicationWindow::storeSettings()
        settings.setValue("DockWindows", saveState());
        settings.endGroup();
 
-       RS_DEBUG->print("ApplicationWindow::storeSettings(): OK");
+       DEBUG->print("ApplicationWindow::storeSettings(): OK");
 }
 
 /**
@@ -1415,9 +1415,9 @@ void ApplicationWindow::storeSettings()
  */
 void ApplicationWindow::initView()
 {
-       RS_DEBUG->print("ApplicationWindow::initView()");
+       DEBUG->print("ApplicationWindow::initView()");
 
-       RS_DEBUG->print("init view..");
+       DEBUG->print("init view..");
        QDockWidget * dw;
        layerWidget = NULL;
        blockWidget = NULL;
@@ -1428,7 +1428,7 @@ void ApplicationWindow::initView()
 #endif
 
 #ifdef RS_CAM
-       RS_DEBUG->print("  simulation widget..");
+       DEBUG->print("  simulation widget..");
        dw = new QDockWidget(QDockWidget::InDock, this, "Simulation");
        simulationControls = new RS_SimulationControls(dw, "Simulation");
        simulationControls->setFocusPolicy(Qt::NoFocus);
@@ -1446,7 +1446,7 @@ void ApplicationWindow::initView()
        //simulationDockWindow->hide();
 #endif
 
-       RS_DEBUG->print("  layer widget..");
+       DEBUG->print("  layer widget..");
 //     dw = new QDockWidget(QDockWidget::InDock, this, "Layer");
        dw = new QDockWidget(tr("Layer List"), this);
        dw->setObjectName("layer");
@@ -1463,7 +1463,7 @@ void ApplicationWindow::initView()
        addDockWidget(Qt::RightDockWidgetArea, dw);
        layerDockWindow = dw;
 
-       RS_DEBUG->print("  block widget..");
+       DEBUG->print("  block widget..");
 //     dw = new QDockWidget(QDockWidget::InDock, this, "Block");
        dw = new QDockWidget(tr("Block List"), this);
        dw->setObjectName("block");
@@ -1480,7 +1480,7 @@ void ApplicationWindow::initView()
        addDockWidget(Qt::RightDockWidgetArea, dw);
        blockDockWindow = dw;
 
-       RS_DEBUG->print("  library widget..");
+       DEBUG->print("  library widget..");
 //     dw = new QDockWidget(QDockWidget::OutsideDock, this, "Library");
        dw = new QDockWidget(tr("Library Browser"), this);
        dw->setObjectName("library");
@@ -1504,7 +1504,7 @@ void ApplicationWindow::initView()
        libraryDockWindow = dw;
 //     libraryDockWindow->hide();
 
-       RS_DEBUG->print("  command widget..");
+       DEBUG->print("  command widget..");
 //     dw = new QDockWidget(QDockWidget::InDock, this, "Command");
        dw = new QDockWidget(tr("Command line"), this);
        dw->setObjectName("command");
@@ -1523,7 +1523,7 @@ void ApplicationWindow::initView()
        commandDockWindow = dw;
        addDockWidget(Qt::BottomDockWidgetArea, dw);
 
-       RS_DEBUG->print("  done");
+       DEBUG->print("  done");
 }
 
 /**
@@ -1623,21 +1623,21 @@ void ApplicationWindow::slotFocus()
  */
 void ApplicationWindow::slotWindowActivated(QMdiSubWindow * /*w*/)
 {
-       RS_DEBUG->print("ApplicationWindow::slotWindowActivated begin");
+       DEBUG->print("ApplicationWindow::slotWindowActivated begin");
 
 //the following does: return (MDIWindow *)workspace->activeSubWindow();
 //which means the subwindow is NOT being activated!!!
        MDIWindow * m = getMDIWindow();
-       RS_DEBUG->print(/*RS_Debug::D_CRITICAL,*/ "ApplicationWindow::slotWindowActivated m=%08X", m);
+       DEBUG->print(/*Debug::D_CRITICAL,*/ "ApplicationWindow::slotWindowActivated m=%08X", m);
 
        if (m)
-               RS_DEBUG->print(/*RS_Debug::D_CRITICAL,*/ "ApplicationWindow::slotWindowActivated m->getDoc=%08X", m->getDocument());
+               DEBUG->print(/*Debug::D_CRITICAL,*/ "ApplicationWindow::slotWindowActivated m->getDoc=%08X", m->getDocument());
 
        if (m && m->getDocument())
        {
                //m->setWindowState(WindowMaximized);
 
-               RS_DEBUG->print("ApplicationWindow::slotWindowActivated: document: %d", m->getDocument()->getId());
+               DEBUG->print("ApplicationWindow::slotWindowActivated: document: %d", m->getDocument()->getId());
 
                bool showByBlock = m->getDocument()->rtti() == RS2::EntityBlock;
                layerWidget->setLayerList(m->getDocument()->getLayerList(), showByBlock);
@@ -1676,7 +1676,7 @@ void ApplicationWindow::slotWindowActivated(QMdiSubWindow * /*w*/)
        // Disable/Enable menu and toolbar items
        emit windowsChanged(m != NULL && m->getDocument() != NULL);
 
-       RS_DEBUG->print("ApplicationWindow::slotWindowActivated end");
+       DEBUG->print("ApplicationWindow::slotWindowActivated end");
 }
 
 /**
@@ -1685,7 +1685,7 @@ void ApplicationWindow::slotWindowActivated(QMdiSubWindow * /*w*/)
  */
 void ApplicationWindow::slotWindowsMenuAboutToShow()
 {
-       RS_DEBUG->print("ApplicationWindow::slotWindowsMenuAboutToShow");
+       DEBUG->print("ApplicationWindow::slotWindowsMenuAboutToShow");
 
        windowsMenu->clear();
 #if 0
@@ -1742,7 +1742,7 @@ void ApplicationWindow::slotWindowsMenuAboutToShow()
  */
 void ApplicationWindow::slotWindowsMenuActivated(QAction * id)
 {
-       RS_DEBUG->print("ApplicationWindow::slotWindowsMenuActivated");
+       DEBUG->print("ApplicationWindow::slotWindowsMenuActivated");
 
 //     QMdiSubWindow * w = workspace->subWindowList().at(id);
        QMdiSubWindow * w = workspace->subWindowList().at(id->data().toInt());
@@ -1757,7 +1757,7 @@ void ApplicationWindow::slotWindowsMenuActivated(QAction * id)
  */
 void ApplicationWindow::slotTileHorizontal()
 {
-       RS_DEBUG->print("ApplicationWindow::slotTileHorizontal");
+       DEBUG->print("ApplicationWindow::slotTileHorizontal");
 
 #if 0
        // primitive horizontal tiling
@@ -1843,7 +1843,7 @@ void ApplicationWindow::slotTileVertical()
 void ApplicationWindow::slotCamExportAuto() {
     printf("CAM export..\n");
 
-    RS_Document* d = getDocument();
+    Document* d = getDocument();
     if (d!=NULL) {
         Drawing* graphic = (Drawing*)d;
 
@@ -1858,25 +1858,25 @@ void ApplicationWindow::slotCamExportAuto() {
  * Called when something changed in the pen tool bar
  * (e.g. color, width, style).
  */
-void ApplicationWindow::slotPenChanged(RS_Pen pen)
+void ApplicationWindow::slotPenChanged(Pen pen)
 {
-       RS_DEBUG->print("ApplicationWindow::slotPenChanged() begin");
-       RS_DEBUG->print("Setting active pen...");
+       DEBUG->print("ApplicationWindow::slotPenChanged() begin");
+       DEBUG->print("Setting active pen...");
        MDIWindow * m = getMDIWindow();
 
        if (m != NULL)
                m->slotPenChanged(pen);
 
-       RS_DEBUG->print("ApplicationWindow::slotPenChanged() end");
+       DEBUG->print("ApplicationWindow::slotPenChanged() end");
 }
 
 /**
  * Creates a new MDI window with the given document or a new
  *  document if 'doc' is NULL.
  */
-MDIWindow * ApplicationWindow::slotFileNew(RS_Document * doc)
+MDIWindow * ApplicationWindow::slotFileNew(Document * doc)
 {
-       RS_DEBUG->print("ApplicationWindow::slotFileNew() begin");
+       DEBUG->print("ApplicationWindow::slotFileNew() begin");
 
        static int id = 0;
        id++;
@@ -1884,7 +1884,7 @@ MDIWindow * ApplicationWindow::slotFileNew(RS_Document * doc)
        statusBar()->showMessage(tr("Creating new file..."));
 
 #warning "QWidget::setMinimumSize: (/QMdi::ControlLabel) Negative sizes (-1,-1) are not possible"
-       RS_DEBUG->print("  creating MDI window");
+       DEBUG->print("  creating MDI window");
 //     MDIWindow * w = new MDIWindow(doc, workspace, 0, Qt::WA_DeleteOnClose);
        MDIWindow * w = new MDIWindow(doc, workspace, 0, Qt::SubWindow);
        w->setAttribute(Qt::WA_DeleteOnClose);
@@ -1892,8 +1892,8 @@ MDIWindow * ApplicationWindow::slotFileNew(RS_Document * doc)
        connect(w, SIGNAL(signalClosing()), this, SLOT(slotFileClosing()));
 
        if (w->getDocument()->rtti() == RS2::EntityBlock)
-//             w->setCaption(tr("Block '%1'").arg(((RS_Block *)(w->getDocument()))->getName()));
-               w->setWindowTitle(tr("Block '%1'").arg(((RS_Block *)(w->getDocument()))->getName()));
+//             w->setCaption(tr("Block '%1'").arg(((Block *)(w->getDocument()))->getName()));
+               w->setWindowTitle(tr("Block '%1'").arg(((Block *)(w->getDocument()))->getName()));
        else
 //             w->setCaption(tr("unnamed document %1").arg(id));
                w->setWindowTitle(tr("unnamed document %1").arg(id));
@@ -1903,7 +1903,7 @@ MDIWindow * ApplicationWindow::slotFileNew(RS_Document * doc)
        w->setWindowIcon(QIcon(":/res/document.png"));
 
        // only graphics offer block lists, blocks don't
-       RS_DEBUG->print("  adding listeners");
+       DEBUG->print("  adding listeners");
        Drawing * graphic = w->getDocument()->getGraphic();
 
 #if 0
@@ -1933,12 +1933,12 @@ MDIWindow * ApplicationWindow::slotFileNew(RS_Document * doc)
        QG_DIALOGFACTORY->setMainWindow(this);
 
 #if 1 //bugfix for Qt3->4 conversion
-       RS_DEBUG->print(/*RS_Debug::D_CRITICAL,*/ "ApplicationWindow::slotFileNew: adding window to workspace...");
+       DEBUG->print(/*Debug::D_CRITICAL,*/ "ApplicationWindow::slotFileNew: adding window to workspace...");
 //     workspace->addWindow(w);
        workspace->addSubWindow(w);
 #endif
 
-       RS_DEBUG->print("  showing MDI window");
+       DEBUG->print("  showing MDI window");
 
 #if 0
 #warning "w->showMaximized() doesn't seem to do anything here..."
@@ -1960,7 +1960,7 @@ MDIWindow * ApplicationWindow::slotFileNew(RS_Document * doc)
        slotWindowActivated(w);
        statusBar()->showMessage(tr("New Drawing created."), 2000);
 
-       RS_DEBUG->print("ApplicationWindow::slotFileNew() OK");
+       DEBUG->print("ApplicationWindow::slotFileNew() OK");
        setFocus();
 
        return w;
@@ -1971,15 +1971,15 @@ MDIWindow * ApplicationWindow::slotFileNew(RS_Document * doc)
  */
 void ApplicationWindow::slotFileOpen()
 {
-       RS_DEBUG->print("ApplicationWindow::slotFileOpen()");
+       DEBUG->print("ApplicationWindow::slotFileOpen()");
 
-       RS_DEBUG->print("ApplicationWindow::slotFileOpen() 001");
+       DEBUG->print("ApplicationWindow::slotFileOpen() 001");
        RS2::FormatType type = RS2::FormatUnknown;
-       RS_DEBUG->print("ApplicationWindow::slotFileOpen() 002");
+       DEBUG->print("ApplicationWindow::slotFileOpen() 002");
        QString fileName = FileDialog::getOpenFileName(this, &type);
-       RS_DEBUG->print("ApplicationWindow::slotFileOpen() 003");
+       DEBUG->print("ApplicationWindow::slotFileOpen() 003");
        slotFileOpen(fileName, type);
-       RS_DEBUG->print("ApplicationWindow::slotFileOpen(): OK");
+       DEBUG->print("ApplicationWindow::slotFileOpen(): OK");
 }
 
 /**
@@ -1989,7 +1989,7 @@ void ApplicationWindow::slotFileOpen()
 void ApplicationWindow::slotFileOpenRecent(void)
 {
 #if 0
-       RS_DEBUG->print("ApplicationWindow::slotFileOpenRecent()");
+       DEBUG->print("ApplicationWindow::slotFileOpenRecent()");
 
        statusBar()->showMessage(tr("Opening recent file..."));
        QString fileName = recentFiles->get(id);
@@ -2020,15 +2020,15 @@ void ApplicationWindow::slotFileOpenRecent(void)
  */
 void ApplicationWindow::slotFileOpen(const QString & fileName, RS2::FormatType type)
 {
-       RS_DEBUG->print("ApplicationWindow::slotFileOpen(..)");
+       DEBUG->print("ApplicationWindow::slotFileOpen(..)");
        QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
 
        if (!fileName.isEmpty())
        {
-               RS_DEBUG->print("ApplicationWindow::slotFileOpen: creating new doc window");
+               DEBUG->print("ApplicationWindow::slotFileOpen: creating new doc window");
                // Create new document window:
                MDIWindow * w = slotFileNew();
-               RS_DEBUG->print("ApplicationWindow::slotFileOpen: linking layer list");
+               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:
@@ -2039,7 +2039,7 @@ void ApplicationWindow::slotFileOpen(const QString & fileName, RS2::FormatType t
                // link the layer widget to the new document:
                simulationControls->setGraphicView(w->getGraphicView());
 #endif
-               RS_DEBUG->print("ApplicationWindow::slotFileOpen: open file");
+               DEBUG->print("ApplicationWindow::slotFileOpen: open file");
 
                // Open the file in the new view:
                if (!w->slotFileOpen(fileName, type))
@@ -2053,8 +2053,8 @@ void ApplicationWindow::slotFileOpen(const QString & fileName, RS2::FormatType t
                        return;
                }
 
-               RS_DEBUG->print("ApplicationWindow::slotFileOpen: open file: OK");
-               RS_DEBUG->print("ApplicationWindow::slotFileOpen: update recent file menu: 1");
+               DEBUG->print("ApplicationWindow::slotFileOpen: open file: OK");
+               DEBUG->print("ApplicationWindow::slotFileOpen: update recent file menu: 1");
 
                // update recent files menu:
                if (type == RS2::FormatDXF1)
@@ -2062,17 +2062,17 @@ void ApplicationWindow::slotFileOpen(const QString & fileName, RS2::FormatType t
                else
                        recentFiles->add(fileName);
 
-               RS_DEBUG->print("ApplicationWindow::slotFileOpen: update recent file menu: 2");
+               DEBUG->print("ApplicationWindow::slotFileOpen: update recent file menu: 2");
                recentFiles->UpdateGUI();
-               RS_DEBUG->print("ApplicationWindow::slotFileOpen: update recent file menu: OK");
-               RS_DEBUG->print("ApplicationWindow::slotFileOpen: set caption");
+               DEBUG->print("ApplicationWindow::slotFileOpen: update recent file menu: OK");
+               DEBUG->print("ApplicationWindow::slotFileOpen: set caption");
                // update caption:
                w->setWindowTitle(fileName);
-               RS_DEBUG->print("ApplicationWindow::slotFileOpen: set caption: OK");
-               RS_DEBUG->print("ApplicationWindow::slotFileOpen: update coordinate widget");
+               DEBUG->print("ApplicationWindow::slotFileOpen: set caption: OK");
+               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("ApplicationWindow::slotFileOpen: update coordinate widget: OK");
+               DIALOGFACTORY->updateCoordinateWidget(Vector(0.0, 0.0), Vector(0.0, 0.0), true);
+               DEBUG->print("ApplicationWindow::slotFileOpen: update coordinate widget: OK");
                // Update the layer and block widgets (document just loaded may have some)
                layerWidget->update();
                blockWidget->update();
@@ -2087,7 +2087,7 @@ void ApplicationWindow::slotFileOpen(const QString & fileName, RS2::FormatType t
        }
 
        QApplication::restoreOverrideCursor();
-       RS_DEBUG->print("ApplicationWindow::slotFileOpen(..) OK");
+       DEBUG->print("ApplicationWindow::slotFileOpen(..) OK");
 }
 
 /**
@@ -2095,7 +2095,7 @@ void ApplicationWindow::slotFileOpen(const QString & fileName, RS2::FormatType t
  */
 void ApplicationWindow::slotFileSave()
 {
-       RS_DEBUG->print("ApplicationWindow::slotFileSave()");
+       DEBUG->print("ApplicationWindow::slotFileSave()");
 
        statusBar()->showMessage(tr("Saving drawing..."));
 
@@ -2134,7 +2134,7 @@ void ApplicationWindow::slotFileSave()
  */
 void ApplicationWindow::slotFileSaveAs()
 {
-       RS_DEBUG->print("ApplicationWindow::slotFileSaveAs()");
+       DEBUG->print("ApplicationWindow::slotFileSaveAs()");
 
        statusBar()->showMessage(tr("Saving drawing under new filename..."));
 
@@ -2176,7 +2176,7 @@ void ApplicationWindow::slotFileSaveAs()
  */
 void ApplicationWindow::slotFileExport()
 {
-       RS_DEBUG->print("ApplicationWindow::slotFileExport()");
+       DEBUG->print("ApplicationWindow::slotFileExport()");
        statusBar()->showMessage(tr("Exporting drawing..."));
        MDIWindow * w = getMDIWindow();
 
@@ -2185,7 +2185,7 @@ void ApplicationWindow::slotFileExport()
                QString fn;
                // read default settings:
                settings.beginGroup("Paths");
-               QString defDir = settings.value("ExportImage", RS_SYSTEM->getHomeDir()).toString();
+               QString defDir = settings.value("ExportImage", SYSTEM->getHomeDir()).toString();
                QString defFilter = settings.value("ExportImageFilter", "Portable Network Graphic (*.png)").toString();
                settings.endGroup();
 
@@ -2312,7 +2312,7 @@ bool ApplicationWindow::slotFileExport(const QString & name, const QString & for
 
        if (!w)
        {
-               RS_DEBUG->print(RS_Debug::D_WARNING, "ApplicationWindow::slotFileExport: no window opened");
+               DEBUG->print(Debug::D_WARNING, "ApplicationWindow::slotFileExport: no window opened");
                return false;
        }
 
@@ -2320,7 +2320,7 @@ bool ApplicationWindow::slotFileExport(const QString & name, const QString & for
 
        if (!graphic)
        {
-               RS_DEBUG->print(RS_Debug::D_WARNING, "ApplicationWindow::slotFileExport: no graphic");
+               DEBUG->print(Debug::D_WARNING, "ApplicationWindow::slotFileExport: no graphic");
                return false;
        }
 
@@ -2335,13 +2335,13 @@ bool ApplicationWindow::slotFileExport(const QString & name, const QString & for
 
        // black background:
        if (black)
-//             painter->setBackgroundColor(RS_Color(0, 0, 0));
-//             qpntr.setBackgroundColor(RS_Color(0, 0, 0));
+//             painter->setBackgroundColor(Color(0, 0, 0));
+//             qpntr.setBackgroundColor(Color(0, 0, 0));
                qpntr.setBackground(QBrush(QColor(0, 0, 0)));
        // white background:
        else
-//             painter->setBackgroundColor(RS_Color(255, 255, 255));
-//             qpntr.setBackgroundColor(RS_Color(255, 255, 255));
+//             painter->setBackgroundColor(Color(255, 255, 255));
+//             qpntr.setBackgroundColor(Color(255, 255, 255));
                qpntr.setBackground(QBrush(QColor(255, 255, 255)));
 
        // black/white:
@@ -2351,12 +2351,12 @@ bool ApplicationWindow::slotFileExport(const QString & name, const QString & for
 //     painter->eraseRect(0, 0, size.width(), size.height());
        qpntr.eraseRect(0, 0, size.width(), size.height());
 
-       RS_StaticGraphicView gv(size.width(), size.height(), painter);
+       StaticGraphicView gv(size.width(), size.height(), painter);
 
        if (black)
-               gv.setBackground(RS_Color(0, 0, 0));
+               gv.setBackground(Color(0, 0, 0));
        else
-               gv.setBackground(RS_Color(255, 255, 255));
+               gv.setBackground(Color(255, 255, 255));
 
        gv.setContainer(graphic);
        gv.zoomAuto(false);
@@ -2399,7 +2399,7 @@ bool ApplicationWindow::slotFileExport(const QString & name, const QString & for
  */
 void ApplicationWindow::slotFileClose()
 {
-       RS_DEBUG->print("ApplicationWindow::slotFileClose()");
+       DEBUG->print("ApplicationWindow::slotFileClose()");
 
        MDIWindow * m = getMDIWindow();
 
@@ -2422,9 +2422,9 @@ void ApplicationWindow::slotFileClose()
  */
 void ApplicationWindow::slotFileClosing()
 {
-       RS_DEBUG->print("ApplicationWindow::slotFileClosing()");
+       DEBUG->print("ApplicationWindow::slotFileClosing()");
 
-       RS_DEBUG->print("detaching lists");
+       DEBUG->print("detaching lists");
        layerWidget->setLayerList(NULL, false);
        blockWidget->setBlockList(NULL);
        coordinateWidget->setGraphic(NULL);
@@ -2438,13 +2438,13 @@ void ApplicationWindow::slotFileClosing()
  */
 void ApplicationWindow::slotFilePrint()
 {
-       RS_DEBUG->print("ApplicationWindow::slotFilePrint()");
+       DEBUG->print("ApplicationWindow::slotFilePrint()");
 
        MDIWindow * w = getMDIWindow();
 
        if (w == NULL)
        {
-               RS_DEBUG->print(RS_Debug::D_WARNING, "ApplicationWindow::slotFilePrint: no window opened");
+               DEBUG->print(Debug::D_WARNING, "ApplicationWindow::slotFilePrint: no window opened");
                return;
        }
 
@@ -2452,7 +2452,7 @@ void ApplicationWindow::slotFilePrint()
 
        if (graphic == NULL)
        {
-               RS_DEBUG->print(RS_Debug::D_WARNING, "ApplicationWindow::slotFilePrint: no graphic");
+               DEBUG->print(Debug::D_WARNING, "ApplicationWindow::slotFilePrint: no graphic");
                return;
        }
 
@@ -2492,15 +2492,15 @@ void ApplicationWindow::slotFilePrint()
                PaintInterface * painter = new PaintInterface(&qpntr);
                painter->setDrawingMode(w->getGraphicView()->getDrawingMode());
 
-//             RS_StaticGraphicView gv(metr.width(), metr.height(), painter);
-               RS_StaticGraphicView gv(printer->width(), printer->height(), painter);
+//             StaticGraphicView gv(metr.width(), metr.height(), painter);
+               StaticGraphicView gv(printer->width(), printer->height(), painter);
                gv.setPrinting(true);
                gv.setBorders(0, 0, 0, 0);
 
-//             double fx = (double)metr.width() / metr.widthMM() * RS_Units::getFactorToMM(graphic->getUnit());
-//             double fy = (double)metr.height() / metr.heightMM() * RS_Units::getFactorToMM(graphic->getUnit());
-               double fx = (double)printer->width() / printer->widthMM() * RS_Units::getFactorToMM(graphic->getUnit());
-               double fy = (double)printer->height() / printer->heightMM() * RS_Units::getFactorToMM(graphic->getUnit());
+//             double fx = (double)metr.width() / metr.widthMM() * Units::getFactorToMM(graphic->getUnit());
+//             double fy = (double)metr.height() / metr.heightMM() * Units::getFactorToMM(graphic->getUnit());
+               double fx = (double)printer->width() / printer->widthMM() * Units::getFactorToMM(graphic->getUnit());
+               double fy = (double)printer->height() / printer->heightMM() * Units::getFactorToMM(graphic->getUnit());
                double f = (fx + fy) / 2;
                double scale = graphic->getPaperScale();
 
@@ -2534,25 +2534,25 @@ void ApplicationWindow::slotFilePrint()
  */
 void ApplicationWindow::slotFilePrintPreview(bool on)
 {
-       RS_DEBUG->print("ApplicationWindow::slotFilePrintPreview()");
+       DEBUG->print("ApplicationWindow::slotFilePrintPreview()");
 
-       RS_DEBUG->print("  creating MDI window");
+       DEBUG->print("  creating MDI window");
        MDIWindow * parent = getMDIWindow();
 
        if (!parent)
        {
-               RS_DEBUG->print(RS_Debug::D_WARNING, "ApplicationWindow::slotFilePrintPreview: no window opened");
+               DEBUG->print(Debug::D_WARNING, "ApplicationWindow::slotFilePrintPreview: no window opened");
                return;
        }
 
        // close print preview:
        if (!on)
        {
-               RS_DEBUG->print("ApplicationWindow::slotFilePrintPreview(): off");
+               DEBUG->print("ApplicationWindow::slotFilePrintPreview(): off");
 
                if (parent->getGraphicView()->isPrintPreview())
                {
-                       RS_DEBUG->print("ApplicationWindow::slotFilePrintPreview(): close");
+                       DEBUG->print("ApplicationWindow::slotFilePrintPreview(): close");
                        slotFileClose();
                }
        }
@@ -2564,7 +2564,7 @@ void ApplicationWindow::slotFilePrintPreview(bool on)
 
                if (ppv != NULL)
                {
-                       RS_DEBUG->print("ApplicationWindow::slotFilePrintPreview(): show existing");
+                       DEBUG->print("ApplicationWindow::slotFilePrintPreview(): show existing");
                        slotWindowActivated(ppv);
                        ppv->showNormal();
                }
@@ -2572,7 +2572,7 @@ void ApplicationWindow::slotFilePrintPreview(bool on)
                {
                        if (!parent->getGraphicView()->isPrintPreview())
                        {
-                               RS_DEBUG->print("ApplicationWindow::slotFilePrintPreview(): create");
+                               DEBUG->print("ApplicationWindow::slotFilePrintPreview(): create");
 
                                MDIWindow * w = new MDIWindow(parent->getDocument(), workspace, 0, Qt::SubWindow);
                                w->setAttribute(Qt::WA_DeleteOnClose);
@@ -2586,11 +2586,11 @@ void ApplicationWindow::slotFilePrintPreview(bool on)
 //                             w->setWindowIcon(qPixmapFromMimeSource("document.png"));
                                w->setWindowIcon(QIcon(":/res/document.png"));
                                w->getGraphicView()->setPrintPreview(true);
-                               w->getGraphicView()->setBackground(RS_Color(255, 255, 255));
+                               w->getGraphicView()->setBackground(Color(255, 255, 255));
                                w->getGraphicView()->setDefaultAction(new ActionPrintPreview(*w->getDocument(), *w->getGraphicView()));
 
                                // only graphics offer block lists, blocks don't
-                               RS_DEBUG->print("  adding listeners");
+                               DEBUG->print("  adding listeners");
                                Drawing * graphic = w->getDocument()->getGraphic();
 
                                if (graphic)
@@ -2619,7 +2619,7 @@ void ApplicationWindow::slotFilePrintPreview(bool on)
                                // Link the graphic view to the command widget:
                                QG_DIALOGFACTORY->setCommandWidget(commandWidget);
 
-                               RS_DEBUG->print("  showing MDI window");
+                               DEBUG->print("  showing MDI window");
 
                                if (workspace->subWindowList().isEmpty())
                                        w->showMaximized();
@@ -2640,7 +2640,7 @@ void ApplicationWindow::slotFilePrintPreview(bool on)
  */
 void ApplicationWindow::slotFileQuit()
 {
-       RS_DEBUG->print("ApplicationWindow::slotFileQuit()");
+       DEBUG->print("ApplicationWindow::slotFileQuit()");
 
        statusBar()->showMessage(tr("Exiting application..."));
 
@@ -2668,7 +2668,7 @@ void ApplicationWindow::slotFileDemoQuit()
  */
 void ApplicationWindow::slotViewGrid(bool toggle)
 {
-       RS_DEBUG->print("ApplicationWindow::slotViewGrid()");
+       DEBUG->print("ApplicationWindow::slotViewGrid()");
 
        MDIWindow * m = getMDIWindow();
 
@@ -2683,7 +2683,7 @@ void ApplicationWindow::slotViewGrid(bool toggle)
        updateGrids();
        redrawAll();
 
-       RS_DEBUG->print("ApplicationWindow::slotViewGrid() OK");
+       DEBUG->print("ApplicationWindow::slotViewGrid() OK");
 }
 
 /**
@@ -2693,7 +2693,7 @@ void ApplicationWindow::slotViewGrid(bool toggle)
  */
 void ApplicationWindow::slotViewDraft(bool toggle)
 {
-       RS_DEBUG->print("ApplicationWindow::slotViewDraft()");
+       DEBUG->print("ApplicationWindow::slotViewDraft()");
 
     /*MDIWindow* m = getMDIWindow();
     if (m!=NULL) {
@@ -2765,7 +2765,7 @@ void ApplicationWindow::updateGrids()
  */
 void ApplicationWindow::slotViewStatusBar(bool showSB)
 {
-       RS_DEBUG->print("ApplicationWindow::slotViewStatusBar()");
+       DEBUG->print("ApplicationWindow::slotViewStatusBar()");
 
        if (showSB)
                statusBar()->show();
@@ -2779,7 +2779,7 @@ void ApplicationWindow::slotViewStatusBar(bool showSB)
  * @param toggle true: show, false: hide.
  */
 /*void ApplicationWindow::slotViewLayerList(bool toggle) {
-    RS_DEBUG->print("ApplicationWindow::slotViewLayerList()");
+    DEBUG->print("ApplicationWindow::slotViewLayerList()");
 
     if (toggle==false) {
         layerDockWindow->hide();
@@ -2796,7 +2796,7 @@ void ApplicationWindow::slotViewStatusBar(bool showSB)
  */
 /*
 void ApplicationWindow::slotViewBlockList(bool toggle) {
-    RS_DEBUG->print("ApplicationWindow::slotViewBlockList()");
+    DEBUG->print("ApplicationWindow::slotViewBlockList()");
 
     if (toggle==false) {
         blockDockWindow->hide();
@@ -2813,7 +2813,7 @@ void ApplicationWindow::slotViewBlockList(bool toggle) {
  */
 /*
 void ApplicationWindow::slotViewCommandLine(bool toggle) {
-    RS_DEBUG->print("ApplicationWindow::slotViewCommandLine()");
+    DEBUG->print("ApplicationWindow::slotViewCommandLine()");
 
     if (toggle==false) {
         commandDockWindow->hide();
@@ -2835,7 +2835,7 @@ void ApplicationWindow::slotViewCommandLine(bool toggle) {
  */
 /*
 void ApplicationWindow::slotViewOptionToolbar(bool toggle) {
-    RS_DEBUG->print("ApplicationWindow::slotViewOptionToolbar()");
+    DEBUG->print("ApplicationWindow::slotViewOptionToolbar()");
 
     if (toggle==false) {
         optionWidget->hide();
@@ -2850,13 +2850,13 @@ void ApplicationWindow::slotViewOptionToolbar(bool toggle) {
  */
 /*
 void ApplicationWindow::slotBlocksEdit() {
-    RS_DEBUG->print("ApplicationWindow::slotBlocksEdit()");
+    DEBUG->print("ApplicationWindow::slotBlocksEdit()");
 
     MDIWindow* parent = getMDIWindow();
     if (parent!=NULL) {
-        RS_BlockList* blist = blockWidget->getBlockList();
+        BlockList* blist = blockWidget->getBlockList();
         if (blist!=NULL) {
-            RS_Block* blk = blist->getActiveBlock();
+            Block* blk = blist->getActiveBlock();
             if (blk!=NULL) {
                 MDIWindow* w = slotFileNew(blk);
                 // the parent needs a pointer to the block window and
@@ -2874,7 +2874,7 @@ void ApplicationWindow::slotBlocksEdit() {
  */
 void ApplicationWindow::slotOptionsGeneral()
 {
-       RS_DIALOGFACTORY->requestOptionsGeneralDialog();
+       DIALOGFACTORY->requestOptionsGeneralDialog();
 
        // update background color of all open drawings:
        settings.beginGroup("Appearance");
@@ -2914,7 +2914,7 @@ void ApplicationWindow::slotOptionsGeneral()
  */
 void ApplicationWindow::slotScriptOpenIDE()
 {
-#ifdef RS_SCRIPTING
+#ifdef SCRIPTING
        scripter->openIDE();
 #endif
 }
@@ -2924,7 +2924,7 @@ void ApplicationWindow::slotScriptOpenIDE()
  */
 void ApplicationWindow::slotScriptRun()
 {
-#ifdef RS_SCRIPTING
+#ifdef SCRIPTING
        scripter->runScript();
 #endif
 }
@@ -2934,14 +2934,14 @@ void ApplicationWindow::slotScriptRun()
  */
 void ApplicationWindow::slotHelpAbout()
 {
-       RS_DEBUG->print("ApplicationWindow::slotHelpAbout()");
+       DEBUG->print("ApplicationWindow::slotHelpAbout()");
        QStringList modules;
 
 #ifdef RS_CAM
        modules += "CAM";
 #endif
 
-#ifdef RS_SCRIPTING
+#ifdef SCRIPTING
        modules += "Scripting";
 #endif
 
@@ -2989,17 +2989,17 @@ void ApplicationWindow::slotHelpManual()
 {
 #warning "No help system ported to Qt4... !!! FIX !!!"
 #if 0
-    RS_DEBUG->print("ApplicationWindow::slotHelpManual()");
+    DEBUG->print("ApplicationWindow::slotHelpManual()");
 
     if (assistant == NULL)
        {
-        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);
+        DEBUG->print("ApplicationWindow::slotHelpManual(): appdir: %s", SYSTEM->getAppDir().toLatin1().data());
+        DEBUG->print("ApplicationWindow::slotHelpManual(): appdir: %s", SYSTEM->getAppDir().toLatin1().data());
+        assistant = new QAssistantClient(SYSTEM->getAppDir()+"/bin", this);
                connect(assistant, SIGNAL(error(const QString&)), this, SLOT(slotError(const QString&)));
         QStringList args;
         args << "-profile";
-        args << QDir::convertSeparators(RS_SYSTEM->getDocPath() + "/qcaddoc.adp");
+        args << QDir::convertSeparators(SYSTEM->getDocPath() + "/qcaddoc.adp");
 //        args << QString("doc") + QDir::separator() + QString("qcaddoc.adp");
 
 #if QT_VERSION>=0x030200
@@ -3014,9 +3014,9 @@ void ApplicationWindow::slotHelpManual()
 /**
  * Testing function.
  */
-void ApplicationWindow::slotTestDumpEntities(RS_EntityContainer * d)
+void ApplicationWindow::slotTestDumpEntities(EntityContainer * d)
 {
-       RS_DEBUG->print("ApplicationWindow::slotTestDumpEntities()");
+       DEBUG->print("ApplicationWindow::slotTestDumpEntities()");
        static int level = 0;
        std::ofstream dumpFile;
 
@@ -3040,7 +3040,7 @@ void ApplicationWindow::slotTestDumpEntities(RS_EntityContainer * d)
                        dumpFile << "<body>\n";
                }
 
-               for (RS_Entity* e=d->firstEntity();
+               for (Entity* e=d->firstEntity();
                                e!=NULL;
                                e=d->nextEntity())
                {
@@ -3072,7 +3072,7 @@ void ApplicationWindow::slotTestDumpEntities(RS_EntityContainer * d)
                        {
                        case RS2::EntityPoint:
                        {
-                                       RS_Point* p = (RS_Point*)e;
+                                       Point* p = (Point*)e;
                                        dumpFile
                                        << "<table><tr><td>"
                                        << "<b>Point:</b>"
@@ -3088,7 +3088,7 @@ void ApplicationWindow::slotTestDumpEntities(RS_EntityContainer * d)
 
                        case RS2::EntityLine:
                        {
-                                       RS_Line* l = (RS_Line*)e;
+                                       Line* l = (Line*)e;
                                        dumpFile
                                        << "<table><tr><td>"
                                        << "<b>Line:</b>"
@@ -3106,7 +3106,7 @@ void ApplicationWindow::slotTestDumpEntities(RS_EntityContainer * d)
                                break;
 
                        case RS2::EntityArc: {
-                                       RS_Arc* a = (RS_Arc*)e;
+                                       Arc* a = (Arc*)e;
                                        dumpFile
                                        << "<table><tr><td>"
                                        << "<b>Arc:</b>"
@@ -3139,7 +3139,7 @@ void ApplicationWindow::slotTestDumpEntities(RS_EntityContainer * d)
                                break;
 
                        case RS2::EntityCircle: {
-                                       RS_Circle* c = (RS_Circle*)e;
+                                       Circle* c = (Circle*)e;
                                        dumpFile
                                        << "<table><tr><td>"
                                        << "<b>Circle:</b>"
@@ -3157,7 +3157,7 @@ void ApplicationWindow::slotTestDumpEntities(RS_EntityContainer * d)
                                break;
 
                        case RS2::EntityDimAligned: {
-                                       RS_DimAligned* d = (RS_DimAligned*)e;
+                                       DimAligned* d = (DimAligned*)e;
                                        dumpFile
                                        << "<table><tr><td>"
                                        << "<b>Dimension / Aligned:</b>"
@@ -3185,7 +3185,7 @@ void ApplicationWindow::slotTestDumpEntities(RS_EntityContainer * d)
 
                        case RS2::EntityDimLinear:
                        {
-                                       RS_DimLinear* d = (RS_DimLinear*)e;
+                                       DimLinear* d = (DimLinear*)e;
                                        dumpFile
                                        << "<table><tr><td>"
                                        << "<b>Dimension / Linear:</b>"
@@ -3212,7 +3212,7 @@ void ApplicationWindow::slotTestDumpEntities(RS_EntityContainer * d)
                                break;
 
                        case RS2::EntityInsert: {
-                                       RS_Insert* i = (RS_Insert*)e;
+                                       Insert* i = (Insert*)e;
                                        dumpFile
                                        << "<table><tr><td>"
                                        << "<b>Insert:</b>"
@@ -3227,7 +3227,7 @@ void ApplicationWindow::slotTestDumpEntities(RS_EntityContainer * d)
                                break;
 
                        case RS2::EntityText: {
-                                       RS_Text* t = (RS_Text*)e;
+                                       Text* t = (Text*)e;
                                        dumpFile
                                        << "<table><tr><td>"
                                        << "<b>Text:</b>"
@@ -3245,7 +3245,7 @@ void ApplicationWindow::slotTestDumpEntities(RS_EntityContainer * d)
                                break;
 
                        case RS2::EntityHatch: {
-                                       RS_Hatch* h = (RS_Hatch*)e;
+                                       Hatch* h = (Hatch*)e;
                                        dumpFile
                                        << "<table><tr><td>"
                                        << "<b>Hatch:</b>"
@@ -3274,7 +3274,7 @@ void ApplicationWindow::slotTestDumpEntities(RS_EntityContainer * d)
                        }
 
                        if (e->isContainer() || e->rtti()==RS2::EntityHatch) {
-                               RS_EntityContainer* ec = (RS_EntityContainer*)e;
+                               EntityContainer* ec = (EntityContainer*)e;
                                dumpFile << "<table><tr><td valign=\"top\">&nbsp;&nbsp;&nbsp;&nbsp;Contents:</td><td>\n";
                                dumpFile.close();
                                slotTestDumpEntities(ec);
@@ -3302,13 +3302,13 @@ void ApplicationWindow::slotTestDumpEntities(RS_EntityContainer * d)
  */
 void ApplicationWindow::slotTestDumpUndo()
 {
-       RS_DEBUG->print("ApplicationWindow::slotTestDumpUndo()");
+       DEBUG->print("ApplicationWindow::slotTestDumpUndo()");
 
-       RS_Document * d = getDocument();
+       Document * d = getDocument();
 
        if (d != NULL)
        {
-               std::cout << *(RS_Undo*)d;
+               std::cout << *(Undo*)d;
                std::cout << std::endl;
        }
 }
@@ -3318,9 +3318,9 @@ void ApplicationWindow::slotTestDumpUndo()
  */
 void ApplicationWindow::slotTestUpdateInserts()
 {
-       RS_DEBUG->print("ApplicationWindow::slotTestUpdateInserts()");
+       DEBUG->print("ApplicationWindow::slotTestUpdateInserts()");
 
-       RS_Document * d = getDocument();
+       Document * d = getDocument();
 
        if (d != NULL)
                d->updateInserts();
@@ -3331,7 +3331,7 @@ void ApplicationWindow::slotTestUpdateInserts()
  */
 void ApplicationWindow::slotTestDrawFreehand()
 {
-       RS_DEBUG->print("ApplicationWindow::slotTestDrawFreehand()");
+       DEBUG->print("ApplicationWindow::slotTestDrawFreehand()");
 
     //Drawing* g = document->getMarking();
     /*
@@ -3388,9 +3388,9 @@ void ApplicationWindow::slotTestDrawFreehand()
  */
 void ApplicationWindow::slotTestInsertBlock()
 {
-       RS_DEBUG->print("ApplicationWindow::slotTestInsertBlock()");
+       DEBUG->print("ApplicationWindow::slotTestInsertBlock()");
 
-       RS_Document * d = getDocument();
+       Document * d = getDocument();
 
        if (d != NULL && d->rtti() == RS2::EntityGraphic)
        {
@@ -3399,81 +3399,81 @@ void ApplicationWindow::slotTestInsertBlock()
                if (graphic == NULL)
                        return;
 
-               graphic->addLayer(new RS_Layer("default"));
-               RS_Block * block = new RS_Block(graphic, RS_BlockData("debugblock", Vector(0.0, 0.0), true));
+               graphic->addLayer(new Layer("default"));
+               Block * block = new Block(graphic, BlockData("debugblock", Vector(0.0, 0.0), true));
 
-               RS_Line * line;
-               RS_Arc * arc;
-               RS_Circle * circle;
+               Line * line;
+               Arc * arc;
+               Circle * circle;
 
                // Add one red line:
-               line = new RS_Line(block, RS_LineData(Vector(0.0, 0.0), Vector(50.0, 0.0)));
+               line = new Line(block, LineData(Vector(0.0, 0.0), Vector(50.0, 0.0)));
                line->setLayerToActive();
-               line->setPen(RS_Pen(RS_Color(255, 0, 0), RS2::Width01, RS2::SolidLine));
+               line->setPen(Pen(Color(255, 0, 0), RS2::Width01, RS2::SolidLine));
                block->addEntity(line);
 
                // Add one line with attributes from block:
-               line = new RS_Line(block, RS_LineData(Vector(50.0, 0.0), Vector(50.0, 50.0)));
-               line->setPen(RS_Pen(RS_Color(RS2::FlagByBlock), RS2::WidthByBlock, RS2::LineByBlock));
+               line = new Line(block, LineData(Vector(50.0, 0.0), Vector(50.0, 50.0)));
+               line->setPen(Pen(Color(RS2::FlagByBlock), RS2::WidthByBlock, RS2::LineByBlock));
                block->addEntity(line);
 
                // Add one arc with attributes from block:
-               RS_ArcData d(Vector(50.0, 0.0), 50.0, M_PI / 2.0, M_PI, false);
-               arc = new RS_Arc(block, d);
-               arc->setPen(RS_Pen(RS_Color(RS2::FlagByBlock), RS2::WidthByBlock, RS2::LineByBlock));
+               ArcData d(Vector(50.0, 0.0), 50.0, M_PI / 2.0, M_PI, false);
+               arc = new Arc(block, d);
+               arc->setPen(Pen(Color(RS2::FlagByBlock), RS2::WidthByBlock, RS2::LineByBlock));
                block->addEntity(arc);
 
                // Add one blue circle:
-               RS_CircleData circleData(Vector(20.0, 15.0), 12.5);
-               circle = new RS_Circle(block, circleData);
+               CircleData circleData(Vector(20.0, 15.0), 12.5);
+               circle = new Circle(block, circleData);
                circle->setLayerToActive();
-               circle->setPen(RS_Pen(RS_Color(0, 0, 255), RS2::Width01, RS2::SolidLine));
+               circle->setPen(Pen(Color(0, 0, 255), RS2::Width01, RS2::SolidLine));
                block->addEntity(circle);
 
                graphic->addBlock(block);
 
-               RS_Insert * ins;
-               RS_InsertData insData("debugblock", Vector(0.0, 0.0), Vector(1.0, 1.0), 0.0, 1, 1, Vector(0.0, 0.0), NULL, RS2::NoUpdate);
+               Insert * ins;
+               InsertData insData("debugblock", Vector(0.0, 0.0), Vector(1.0, 1.0), 0.0, 1, 1, Vector(0.0, 0.0), NULL, RS2::NoUpdate);
 
                // insert one magenta instance of the block (original):
-               ins = new RS_Insert(graphic, insData);
+               ins = new Insert(graphic, insData);
                ins->setLayerToActive();
-               ins->setPen(RS_Pen(RS_Color(255, 0, 255), RS2::Width02, RS2::SolidLine));
+               ins->setPen(Pen(Color(255, 0, 255), RS2::Width02, RS2::SolidLine));
                ins->update();
                graphic->addEntity(ins);
 
                // insert one green instance of the block (rotate):
-               insData = RS_InsertData("debugblock", Vector(-50.0, 20.0), Vector(1.0, 1.0), 30.0 / ARAD, 1, 1, Vector(0.0, 0.0), NULL, RS2::NoUpdate);
-               ins = new RS_Insert(graphic, insData);
+               insData = InsertData("debugblock", Vector(-50.0, 20.0), Vector(1.0, 1.0), 30.0 / ARAD, 1, 1, Vector(0.0, 0.0), NULL, RS2::NoUpdate);
+               ins = new Insert(graphic, insData);
                ins->setLayerToActive();
-               ins->setPen(RS_Pen(RS_Color(0, 255, 0), RS2::Width02, RS2::SolidLine));
+               ins->setPen(Pen(Color(0, 255, 0), RS2::Width02, RS2::SolidLine));
                ins->update();
                graphic->addEntity(ins);
 
                // insert one cyan instance of the block (move):
-               insData = RS_InsertData("debugblock", Vector(10.0, 20.0), Vector(1.0, 1.0), 0.0, 1, 1, Vector(0.0, 0.0), NULL, RS2::NoUpdate);
-               ins = new RS_Insert(graphic, insData);
+               insData = InsertData("debugblock", Vector(10.0, 20.0), Vector(1.0, 1.0), 0.0, 1, 1, Vector(0.0, 0.0), NULL, RS2::NoUpdate);
+               ins = new Insert(graphic, insData);
                ins->setLayerToActive();
-               ins->setPen(RS_Pen(RS_Color(0, 255, 255), RS2::Width02, RS2::SolidLine));
+               ins->setPen(Pen(Color(0, 255, 255), RS2::Width02, RS2::SolidLine));
                ins->update();
                graphic->addEntity(ins);
 
                // insert one blue instance of the block:
                for(double a=0.0; a<360.0; a+=45.0)
                {
-                       insData = RS_InsertData("debugblock", Vector(60.0, 0.0), Vector(2.0 / 5, 2.0 / 5), a/ARAD, 1, 1, Vector(0.0, 0.0), NULL, RS2::NoUpdate);
-                       ins = new RS_Insert(graphic, insData);
+                       insData = InsertData("debugblock", Vector(60.0, 0.0), Vector(2.0 / 5, 2.0 / 5), a/ARAD, 1, 1, Vector(0.0, 0.0), NULL, RS2::NoUpdate);
+                       ins = new Insert(graphic, insData);
                        ins->setLayerToActive();
-                       ins->setPen(RS_Pen(RS_Color(0, 0, 255), RS2::Width05, RS2::SolidLine));
+                       ins->setPen(Pen(Color(0, 0, 255), RS2::Width05, RS2::SolidLine));
                        ins->update();
                        graphic->addEntity(ins);
                }
 
                // insert an array of yellow instances of the block:
-               insData = RS_InsertData("debugblock", Vector(-100.0, -100.0), Vector(0.2, 0.2), M_PI / 6.0, 6, 4, Vector(100.0, 100.0), NULL, RS2::NoUpdate);
-               ins = new RS_Insert(graphic, insData);
+               insData = InsertData("debugblock", Vector(-100.0, -100.0), Vector(0.2, 0.2), M_PI / 6.0, 6, 4, Vector(100.0, 100.0), NULL, RS2::NoUpdate);
+               ins = new Insert(graphic, insData);
                ins->setLayerToActive();
-               ins->setPen(RS_Pen(RS_Color(255, 255, 0), RS2::Width01, RS2::SolidLine));
+               ins->setPen(Pen(Color(255, 255, 0), RS2::Width01, RS2::SolidLine));
                ins->update();
                graphic->addEntity(ins);
 
@@ -3489,9 +3489,9 @@ void ApplicationWindow::slotTestInsertBlock()
  */
 void ApplicationWindow::slotTestInsertEllipse()
 {
-       RS_DEBUG->print("ApplicationWindow::slotTestInsertEllipse()");
+       DEBUG->print("ApplicationWindow::slotTestInsertEllipse()");
 
-       RS_Document * d = getDocument();
+       Document * d = getDocument();
 
        if (d != NULL)
        {
@@ -3500,8 +3500,8 @@ void ApplicationWindow::slotTestInsertEllipse()
                if (graphic == NULL)
                        return;
 
-               RS_Ellipse * ellipse;
-               RS_Line * line;
+               Ellipse * ellipse;
+               Line * line;
 
                for (double a=0.0; a<2*M_PI; a+=0.1)
                {
@@ -3509,39 +3509,39 @@ void ApplicationWindow::slotTestInsertEllipse()
                        v.setPolar(50.0, a);
                        double xp = 1000.0*a;
 
-                       RS_EllipseData ellipseData(Vector(xp, 0.0), v, 0.5, 0.0, 2 * M_PI, false);
-                       ellipse = new RS_Ellipse(graphic, ellipseData);
+                       EllipseData ellipseData(Vector(xp, 0.0), v, 0.5, 0.0, 2 * M_PI, false);
+                       ellipse = new Ellipse(graphic, ellipseData);
 
-                       ellipse->setPen(RS_Pen(RS_Color(255, 0, 255), RS2::Width01, RS2::SolidLine));
+                       ellipse->setPen(Pen(Color(255, 0, 255), RS2::Width01, RS2::SolidLine));
 
                        graphic->addEntity(ellipse);
-                       //graphic->addEntity(new RS_Point(graphic, ellipse->getMax()));
-                       //graphic->addEntity(new RS_Point(graphic, ellipse->getMin()));
+                       //graphic->addEntity(new Point(graphic, ellipse->getMax()));
+                       //graphic->addEntity(new Point(graphic, ellipse->getMin()));
 
-                       line = new RS_Line(graphic, RS_LineData(Vector(xp, 0.0), Vector(xp, 0.0) + v));
-                       line->setPen(RS_Pen(RS_Color(128, 128, 128), RS2::Width01, RS2::SolidLine));
+                       line = new Line(graphic, LineData(Vector(xp, 0.0), Vector(xp, 0.0) + v));
+                       line->setPen(Pen(Color(128, 128, 128), RS2::Width01, RS2::SolidLine));
                        graphic->addEntity(line);
 
 /*
                        for (double mx=-60.0; mx<60.0; mx+=1.0) {
                                //for (double mx=0.0; mx<1.0; mx+=2.5) {
                                VectorSolutions sol = ellipse->mapX(xp + mx);
-                               //graphic->addEntity(new RS_Point(graphic,
+                               //graphic->addEntity(new Point(graphic,
                                //                   sol.vector2 + Vector(a*500.0, 0.0)));
-                               //graphic->addEntity(new RS_Point(graphic,
+                               //graphic->addEntity(new Point(graphic,
                                //                   sol.vector3 + Vector(a*500.0, 0.0)));
-                               //graphic->addEntity(new RS_Point(graphic,
+                               //graphic->addEntity(new Point(graphic,
                                //                   sol.vector4 + Vector(a*500.0, 0.0)));
 
-                               line = new RS_Line(graphic,
-                                                               RS_LineData(Vector(xp+mx,-50.0),
+                               line = new Line(graphic,
+                                                               LineData(Vector(xp+mx,-50.0),
                                                                                        Vector(xp+mx,50.0)));
-                               line->setPen(RS_Pen(RS_Color(60, 60, 60),
+                               line->setPen(Pen(Color(60, 60, 60),
                                                                        RS2::Width01,
                                                                        RS2::SolidLine));
                                graphic->addEntity(line);
 
-                               graphic->addEntity(new RS_Point(graphic,
+                               graphic->addEntity(new Point(graphic,
                                                                                                sol.get(0)));
                        }
 */
@@ -3554,22 +3554,22 @@ void ApplicationWindow::slotTestInsertEllipse()
                                        for (x=-250.0; x<=250.0; x+=50.0) {
                                                Vector v(x, y);
 
-                                               ellipse = new RS_Ellipse(graphic,
+                                               ellipse = new Ellipse(graphic,
                                                                                                v,
                                                                                                Vector((x/5+50.0)/2.0, 0.0),
                                                                                        fabs(x/y),
                                                                                                0.0, 2*M_PI,
                                                                                                false);
 
-                               ellipse->setPen(RS_Pen(RS_Color(255, 255, 0),
+                               ellipse->setPen(Pen(Color(255, 255, 0),
                                                                                RS2::Width01,
                                                                                RS2::DashDotLine));
 
                                                graphic->addEntity(ellipse);
-                                               graphic->addEntity(new RS_Point(graphic, ellipse->getMax()));
-                                               graphic->addEntity(new RS_Point(graphic, ellipse->getMin()));
+                                               graphic->addEntity(new Point(graphic, ellipse->getMax()));
+                                               graphic->addEntity(new Point(graphic, ellipse->getMin()));
 
-                               ellipse = new RS_Ellipse(graphic,
+                               ellipse = new Ellipse(graphic,
                                                                                                v + Vector(750.0, 0.0),
                                                                                                Vector((x/5+50.0)/2.0, 0.0),
                                                                                                fabs(x/y),
@@ -3577,8 +3577,8 @@ void ApplicationWindow::slotTestInsertEllipse()
                                                                                                true);
 
                                                graphic->addEntity(ellipse);
-                                               graphic->addEntity(new RS_Point(graphic, ellipse->getMax()));
-                                               graphic->addEntity(new RS_Point(graphic, ellipse->getMin()));
+                                               graphic->addEntity(new Point(graphic, ellipse->getMax()));
+                                               graphic->addEntity(new Point(graphic, ellipse->getMin()));
                                        }
                                }
                */
@@ -3587,15 +3587,15 @@ void ApplicationWindow::slotTestInsertEllipse()
                                // different rotation angles:
                                double rot;
                                for (rot=0.0; rot<=2*M_PI+0.1; rot+=(M_PI/8)) {
-                                       ellipse = new RS_Ellipse(graphic,
+                                       ellipse = new Ellipse(graphic,
                                                                                        Vector(rot*200, 500.0),
                                                                                        Vector(50.0, 0.0).rotate(rot),
                                                                                        0.3,
                                                                                        0.0, 2*M_PI,
                                                                                        false);
                                        graphic->addEntity(ellipse);
-                                       graphic->addEntity(new RS_Point(graphic, ellipse->getMax()));
-                                       graphic->addEntity(new RS_Point(graphic, ellipse->getMin()));
+                                       graphic->addEntity(new Point(graphic, ellipse->getMax()));
+                                       graphic->addEntity(new Point(graphic, ellipse->getMin()));
                                }
 
 
@@ -3604,7 +3604,7 @@ void ApplicationWindow::slotTestInsertEllipse()
                                for (rot=0.0; rot<=2*M_PI+0.1; rot+=(M_PI/8)) {
                                        for (a1=0.0; a1<=2*M_PI+0.1; a1+=(M_PI/8)) {
                                                for (a2=a1+M_PI/8; a2<=2*M_PI+a1+0.1; a2+=(M_PI/8)) {
-                                                       ellipse = new RS_Ellipse(graphic,
+                                                       ellipse = new Ellipse(graphic,
                                                                                                        Vector(-500.0-a1*200.0-5000.0*rot,
                                                                                                                                500.0-a2*200.0),
                                                                                                        Vector(50.0, 0.0).rotate(rot),
@@ -3612,8 +3612,8 @@ void ApplicationWindow::slotTestInsertEllipse()
                                                                                                        a1, a2,
                                                                                                        false);
                                                        graphic->addEntity(ellipse);
-                                                       graphic->addEntity(new RS_Point(graphic, ellipse->getMax()));
-                                                       graphic->addEntity(new RS_Point(graphic, ellipse->getMin()));
+                                                       graphic->addEntity(new Point(graphic, ellipse->getMax()));
+                                                       graphic->addEntity(new Point(graphic, ellipse->getMin()));
                                                }
                                        }
                                }
@@ -3631,9 +3631,9 @@ void ApplicationWindow::slotTestInsertEllipse()
  */
 void ApplicationWindow::slotTestInsertText()
 {
-       RS_DEBUG->print("ApplicationWindow::slotTestInsertText()");
+       DEBUG->print("ApplicationWindow::slotTestInsertText()");
 
-       RS_Document * d = getDocument();
+       Document * d = getDocument();
 
        if (d != NULL)
        {
@@ -3642,13 +3642,13 @@ void ApplicationWindow::slotTestInsertText()
                if (graphic == NULL)
                        return;
 
-               RS_Text * text;
-               RS_TextData textData;
+               Text * text;
+               TextData textData;
 
-               textData = RS_TextData(Vector(10.0, 10.0), 10.0, 100.0, RS2::VAlignTop, RS2::HAlignLeft, RS2::LeftToRight, RS2::Exact, 1.0, "Andrew", "normal", 0.0);
-               text = new RS_Text(graphic, textData);
+               textData = TextData(Vector(10.0, 10.0), 10.0, 100.0, RS2::VAlignTop, RS2::HAlignLeft, RS2::LeftToRight, RS2::Exact, 1.0, "Andrew", "normal", 0.0);
+               text = new Text(graphic, textData);
                text->setLayerToActive();
-               text->setPen(RS_Pen(RS_Color(255, 0, 0), RS2::Width01, RS2::SolidLine));
+               text->setPen(Pen(Color(255, 0, 0), RS2::Width01, RS2::SolidLine));
                graphic->addEntity(text);
 
 /*
@@ -3657,7 +3657,7 @@ void ApplicationWindow::slotTestInsertText()
                        for (x=-250.0; x<=250.0; x+=50.0) {
                                Vector v(x, y);
 
-                               textData = RS_TextData(v,
+                               textData = TextData(v,
                                                                                10.0, 100.0,
                                                                                RS2::VAlignTop,
                                                                                RS2::HAlignLeft,
@@ -3668,28 +3668,28 @@ void ApplicationWindow::slotTestInsertText()
                                                                                "normal",
                                                                                0.0);
 
-                               text = new RS_Text(graphic, textData);
+                               text = new Text(graphic, textData);
 
                                text->setLayerToActive();
-                               text->setPen(RS_Pen(RS_Color(255, 0, 0),
+                               text->setPen(Pen(Color(255, 0, 0),
                                                                        RS2::Width01,
                                                                        RS2::SolidLine));
                                graphic->addEntity(text);
                        }
                }
 
-               RS_Line* line;
+               Line* line;
                for (x=0.0; x<M_PI*2.0; x+=0.2) {
                        Vector v(600.0+cos(x)*50.0, 0.0+sin(x)*50.0);
 
-                       line = new RS_Line(graphic,
-                                                               RS_LineData(Vector(600.0,0.0),
+                       line = new Line(graphic,
+                                                               LineData(Vector(600.0,0.0),
                                                                                        v));
                        line->setLayerToActive();
                        line->setPenToActive();
                        graphic->addEntity(line);
 
-                       textData = RS_TextData(v,
+                       textData = TextData(v,
                                                                        5.0, 50.0,
                                                                        RS2::VAlignTop,
                                                                        RS2::HAlignLeft,
@@ -3700,23 +3700,23 @@ void ApplicationWindow::slotTestInsertText()
                                                                        "normal",
                                                                        x);
 
-                       text = new RS_Text(graphic, textData);
+                       text = new Text(graphic, textData);
 
                        text->setLayerToActive();
-                       text->setPen(RS_Pen(RS_Color(255, 0, 0),
+                       text->setPen(Pen(Color(255, 0, 0),
                                                                RS2::Width01,
                                                                RS2::SolidLine));
                        graphic->addEntity(text);
                }
 
-               RS_SolidData solidData = RS_SolidData(Vector(5.0, 10.0),
+               SolidData solidData = SolidData(Vector(5.0, 10.0),
                                                                                        Vector(25.0, 15.0),
                                                                                        Vector(15.0, 30.0));
 
-               RS_Solid* s = new RS_Solid(graphic, solidData);
+               Solid* s = new Solid(graphic, solidData);
 
                s->setLayerToActive();
-               s->setPen(RS_Pen(RS_Color(255, 255, 0),
+               s->setPen(Pen(Color(255, 255, 0),
                                                RS2::Width01,
                                                RS2::SolidLine));
                graphic->addEntity(s);
@@ -3734,9 +3734,9 @@ void ApplicationWindow::slotTestInsertText()
  */
 void ApplicationWindow::slotTestInsertImage()
 {
-       RS_DEBUG->print("ApplicationWindow::slotTestInsertImage()");
+       DEBUG->print("ApplicationWindow::slotTestInsertImage()");
 
-       RS_Document * d = getDocument();
+       Document * d = getDocument();
 
        if (d != NULL)
        {
@@ -3745,14 +3745,14 @@ void ApplicationWindow::slotTestInsertImage()
                if (graphic == NULL)
                        return;
 
-               RS_Image * image;
-               RS_ImageData imageData;
+               Image * image;
+               ImageData imageData;
 
-               imageData = RS_ImageData(0, Vector(50.0, 30.0), Vector(0.5, 0.5), Vector(-0.5, 0.5), Vector(640, 480), "/home/andrew/data/image.png", 50, 50, 0);
-               image = new RS_Image(graphic, imageData);
+               imageData = ImageData(0, Vector(50.0, 30.0), Vector(0.5, 0.5), Vector(-0.5, 0.5), Vector(640, 480), "/home/andrew/data/image.png", 50, 50, 0);
+               image = new Image(graphic, imageData);
 
                image->setLayerToActive();
-               image->setPen(RS_Pen(RS_Color(255, 0, 0), RS2::Width01, RS2::SolidLine));
+               image->setPen(Pen(Color(255, 0, 0), RS2::Width01, RS2::SolidLine));
                graphic->addEntity(image);
        }
 }
@@ -3762,17 +3762,17 @@ void ApplicationWindow::slotTestInsertImage()
  */
 void ApplicationWindow::slotTestUnicode()
 {
-    RS_DEBUG->print("ApplicationWindow::slotTestUnicode()");
+    DEBUG->print("ApplicationWindow::slotTestUnicode()");
 
     slotFileOpen("./fonts/unicode.cxf", RS2::FormatCXF);
-    RS_Document* d = getDocument();
+    Document* d = getDocument();
     if (d!=NULL) {
         Drawing* graphic = (Drawing*)d;
         if (graphic==NULL) {
             return;
         }
 
-        RS_Insert* ins;
+        Insert* ins;
 
         int col;
         int row;
@@ -3796,14 +3796,14 @@ void ApplicationWindow::slotTestUnicode()
                 strCode = "[" + strCode + "] " + uCode;
 
                 if (graphic->findBlock(strCode)!=NULL) {
-                    RS_InsertData d(strCode,
+                    InsertData d(strCode,
                                     Vector(col/0x10*20.0,row*20.0),
                                     Vector(1.0,1.0), 0.0,
                                     1, 1, Vector(0.0, 0.0),
                                     NULL, RS2::NoUpdate);
-                    ins = new RS_Insert(graphic, d);
+                    ins = new Insert(graphic, d);
                     ins->setLayerToActive();
-                    ins->setPen(RS_Pen(RS_Color(255, 255, 255),
+                    ins->setPen(Pen(Color(255, 255, 255),
                                        RS2::Width01,
                                        RS2::SolidLine));
                     ins->update();
@@ -3821,9 +3821,9 @@ void ApplicationWindow::slotTestUnicode()
  */
 void ApplicationWindow::slotTestMath01()
 {
-    RS_DEBUG->print("ApplicationWindow::slotTestMath01()");
+    DEBUG->print("ApplicationWindow::slotTestMath01()");
 
-    RS_Document* d = getDocument();
+    Document* d = getDocument();
     if (d!=NULL) {
         Drawing* graphic = (Drawing*)d;
         if (graphic==NULL) {
@@ -3831,11 +3831,11 @@ void ApplicationWindow::slotTestMath01()
         }
 
         // axis
-        graphic->addEntity(new RS_Line(graphic,
-                                       RS_LineData(Vector(0.0,0.0),
+        graphic->addEntity(new Line(graphic,
+                                       LineData(Vector(0.0,0.0),
                                                    Vector(2*M_PI,0.0))));
-        graphic->addEntity(new RS_Line(graphic,
-                                       RS_LineData(Vector(0.0,-1.0),
+        graphic->addEntity(new Line(graphic,
+                                       LineData(Vector(0.0,-1.0),
                                                    Vector(0.0,1.0))));
 
         // cos
@@ -3844,29 +3844,29 @@ void ApplicationWindow::slotTestMath01()
         double x_0 = 60.0/ARAD;
         for (a=0.01; a<2*M_PI; a+=0.01) {
             // cos curve:
-            RS_Line* line = new RS_Line(graphic,
-                                        RS_LineData(Vector(a-0.01, cos(a-0.01)),
+            Line* line = new Line(graphic,
+                                        LineData(Vector(a-0.01, cos(a-0.01)),
                                                     Vector(a, cos(a))));
             graphic->addEntity(line);
 
             // tangent:
-            graphic->addEntity(new RS_Line(graphic,
-                                           RS_LineData(Vector(a-0.01,cos(x_0)-sin(x_0)*(a-0.01-x_0)),
+            graphic->addEntity(new Line(graphic,
+                                           LineData(Vector(a-0.01,cos(x_0)-sin(x_0)*(a-0.01-x_0)),
                                                        Vector(a,cos(x_0)-sin(x_0)*(a-x_0)))));
         }
 
         // 59.0 deg
-        graphic->addEntity(new RS_Line(graphic,
-                                       RS_LineData(Vector(x,0.0),
+        graphic->addEntity(new Line(graphic,
+                                       LineData(Vector(x,0.0),
                                                    Vector(x,1.0))));
 
         // 60.0 deg
-        graphic->addEntity(new RS_Line(graphic,
-                                       RS_LineData(Vector(x_0,0.0),
+        graphic->addEntity(new Line(graphic,
+                                       LineData(Vector(x_0,0.0),
                                                    Vector(x_0,1.0))));
 
         // tangent
-        //graphic->addEntity(new RS_Line(graphic,
+        //graphic->addEntity(new Line(graphic,
         //                   Vector(0.0,cos(x_0)-sin(x_0)*(0.0-x_0)),
         //                   Vector(6.0,cos(x_0)-sin(x_0)*(6.0-x_0))));
 
@@ -3883,7 +3883,7 @@ void ApplicationWindow::slotTestMath01()
  */
 void ApplicationWindow::slotTestResize640()
 {
-    RS_DEBUG->print("ApplicationWindow::slotTestResize640()");
+    DEBUG->print("ApplicationWindow::slotTestResize640()");
 
     resize(640, 480);
 }
@@ -3893,7 +3893,7 @@ void ApplicationWindow::slotTestResize640()
  */
 void ApplicationWindow::slotTestResize800()
 {
-    RS_DEBUG->print("ApplicationWindow::slotTestResize800()");
+    DEBUG->print("ApplicationWindow::slotTestResize800()");
 
     resize(800, 600);
 }
@@ -3903,7 +3903,7 @@ void ApplicationWindow::slotTestResize800()
  */
 void ApplicationWindow::slotTestResize1024()
 {
-    RS_DEBUG->print("ApplicationWindow::slotTestResize1024()");
+    DEBUG->print("ApplicationWindow::slotTestResize1024()");
 
     resize(1024, 768);
 }
@@ -3913,7 +3913,7 @@ void ApplicationWindow::slotTestResize1024()
  */
 bool ApplicationWindow::queryExit(bool force)
 {
-       RS_DEBUG->print("ApplicationWindow::queryExit()");
+       DEBUG->print("ApplicationWindow::queryExit()");
 
        bool succ = true;
 
@@ -3951,7 +3951,7 @@ bool ApplicationWindow::queryExit(bool force)
        if (succ)
                storeSettings();
 
-       RS_DEBUG->print("ApplicationWindow::queryExit(): OK");
+       DEBUG->print("ApplicationWindow::queryExit(): OK");
 
        return succ;
 }
@@ -4106,20 +4106,20 @@ QMdiArea * ApplicationWindow::getWorkspace()
  */
 MDIWindow * ApplicationWindow::getMDIWindow()
 {
-       RS_DEBUG->print(/*RS_Debug::D_CRITICAL,*/ "ApplicationWindow::getMDIWindow: workspace=%08X", workspace);
+       DEBUG->print(/*Debug::D_CRITICAL,*/ "ApplicationWindow::getMDIWindow: workspace=%08X", workspace);
 
        if (workspace)
        {
-               RS_DEBUG->print("ApplicationWindow::getMDIWindow: activeSubWindow=%08X", workspace->activeSubWindow());
+               DEBUG->print("ApplicationWindow::getMDIWindow: activeSubWindow=%08X", workspace->activeSubWindow());
                return (MDIWindow *)workspace->activeSubWindow();
        }
 
-       RS_DEBUG->print("ApplicationWindow::getMDIWindow: activeSubWindow=??? (workspace == NULL)");
+       DEBUG->print("ApplicationWindow::getMDIWindow: activeSubWindow=??? (workspace == NULL)");
        return NULL;
 }
 
 /**
- * Implementation from RS_MainWindowInterface (and QS_ScripterHostInterface).
+ * Implementation from MainWindowInterface (and QS_ScripterHostInterface).
  *
  * @return Pointer to the graphic view of the currently active document
  * window or NULL if no window is available.
@@ -4132,12 +4132,12 @@ MDIWindow * ApplicationWindow::getMDIWindow()
 }
 
 /**
- * Implementation from RS_MainWindowInterface (and QS_ScripterHostInterface).
+ * Implementation from MainWindowInterface (and QS_ScripterHostInterface).
  *
  * @return Pointer to the graphic document of the currently active document
  * window or NULL if no window is available.
  */
-/*virtual*/ RS_Document * ApplicationWindow::getDocument()
+/*virtual*/ Document * ApplicationWindow::getDocument()
 {
        MDIWindow * m = getMDIWindow();
 
@@ -4145,10 +4145,10 @@ MDIWindow * ApplicationWindow::getMDIWindow()
 }
 
 /**
- * Creates a new document. Implementation from RS_MainWindowInterface.
+ * Creates a new document. Implementation from MainWindowInterface.
  */
 /*virtual*/ void ApplicationWindow::createNewDocument(const QString & fileName/*= QString::null*/,
-       RS_Document * doc/*= NULL*/)
+       Document * doc/*= NULL*/)
 {
        slotFileNew(doc);
 
@@ -4184,7 +4184,7 @@ MDIWindow * ApplicationWindow::getMDIWindow()
 #endif
 }
 
-#ifdef RS_SCRIPTING
+#ifdef SCRIPTING
 /**
  * @return Pointer to the qsa object.
  */
index 82273ed8b4adfbd0825d1dc5a79d899ee8e8d7ee..6423c2830985917481fba853f5659d84cabc9aa9 100644 (file)
@@ -15,7 +15,7 @@
 #include "commandwidget.h"
 #include "librarywidget.h"
 
-#ifdef RS_SCRIPTING
+#ifdef SCRIPTING
 #include "qs_scripter.h"
 #include <qsproject.h>
 #endif
@@ -70,10 +70,10 @@ class ApplicationWindow: public QMainWindow, public QG_MainWindowInterface
                void slotTileHorizontal();
                void slotTileVertical();
 
-               void slotPenChanged(RS_Pen p);
+               void slotPenChanged(Pen p);
 
                /** generates a new document for a graphic. */
-               MDIWindow * slotFileNew(RS_Document * doc = NULL);
+               MDIWindow * slotFileNew(Document * doc = NULL);
                /** opens a document */
                void slotFileOpen();
                /**
@@ -142,7 +142,7 @@ class ApplicationWindow: public QMainWindow, public QG_MainWindowInterface
                void slotHelpManual();
 
                /** dumps entities to file */
-               void slotTestDumpEntities(RS_EntityContainer * d = NULL);
+               void slotTestDumpEntities(EntityContainer * d = NULL);
                /** dumps undo info to stdout */
                void slotTestDumpUndo();
                /** updates all inserts */
@@ -179,8 +179,8 @@ class ApplicationWindow: public QMainWindow, public QG_MainWindowInterface
                QMdiArea * getWorkspace();
                MDIWindow * getMDIWindow();
                virtual GraphicView * getGraphicView();
-               virtual RS_Document * getDocument();
-               virtual void createNewDocument(const QString & fileName = QString::null, RS_Document * doc = NULL);
+               virtual Document * getDocument();
+               virtual void createNewDocument(const QString & fileName = QString::null, Document * doc = NULL);
                virtual QMainWindow * GetMainWindow();
                virtual ActionHandler * getActionHandler();
                virtual void showSimulationControls();
@@ -188,7 +188,7 @@ class ApplicationWindow: public QMainWindow, public QG_MainWindowInterface
                /**
                * @return Pointer to the qsa object.
                */
-#ifdef RS_SCRIPTING
+#ifdef SCRIPTING
                QSProject * getQSAProject();
 #endif
 
@@ -256,7 +256,7 @@ class ApplicationWindow: public QMainWindow, public QG_MainWindowInterface
                /** Action handler. */
                ActionHandler * actionHandler;
 
-#ifdef RS_SCRIPTING
+#ifdef SCRIPTING
                /** Scripting interface. */
                QS_Scripter * scripter;
 #endif
index f2460e013db010800bcc6c795023fe13e3c31b68..083d45fa6509e109976680ee8282bddea899fce8 100644 (file)
@@ -209,18 +209,18 @@ RS2::ActionType Commands::cmdToAction(const QString & cmd)
 //             if (*it.current() == ret)
                if (*it.value() == ret)
                {
-                       if (RS_DialogFactory::instance() != NULL)
+                       if (DialogFactory::instance() != NULL)
                        {
-                               //if (RS_DIALOGFACTORY!=NULL) {
-                               RS_DEBUG->print("Commands::cmdToAction: commandMessage");
-                                       //RS_DIALOGFACTORY->commandMessage(tr("Command: %1")
+                               //if (DIALOGFACTORY!=NULL) {
+                               DEBUG->print("Commands::cmdToAction: commandMessage");
+                                       //DIALOGFACTORY->commandMessage(tr("Command: %1")
                                        //      .arg(full));
-                               RS_DialogFactory::instance()->commandMessage(tr("Command: %1").arg(full));
-                               RS_DEBUG->print("Commands::cmdToAction: commandMessage: ok");
+                               DialogFactory::instance()->commandMessage(tr("Command: %1").arg(full));
+                               DEBUG->print("Commands::cmdToAction: commandMessage: ok");
                                //}
                        }
                        else
-                               RS_DEBUG->print("Commands::cmdToAction: dialog factory instance is NULL");
+                               DEBUG->print("Commands::cmdToAction: dialog factory instance is NULL");
 
                        break;
                }
@@ -391,8 +391,8 @@ QString Commands::command(const QString & cmd)
        else if (cmd == "undo")
                return tr("undo");
 
-//     RS_DEBUG->print(RS_Debug::D_WARNING, "Commands::command: command '%s' unknown", cmd.latin1());
-       RS_DEBUG->print(RS_Debug::D_WARNING, "Commands::command: command '%s' unknown", cmd.toLatin1().data());
+//     DEBUG->print(Debug::D_WARNING, "Commands::command: command '%s' unknown", cmd.latin1());
+       DEBUG->print(Debug::D_WARNING, "Commands::command: command '%s' unknown", cmd.toLatin1().data());
        return "";
 }
 
index abe6c44d7ca4b59d83e96492d0c4deeb640def03..05d84c96ebad66772e9d46db73df339fee561d59 100644 (file)
@@ -2,9 +2,9 @@
 #define __COMMANDS_H__
 
 #include <QtCore>
-#include "rs.h"
+#include "enums.h"
 
-#define RS_COMMANDS Commands::instance()
+#define COMMANDS Commands::instance()
 
 /**
  * Class which holds all commands for the command line. This
index afb20a0d1ecc3ef133c6cb6cf77995eaf4f009d6..4c8ba107be210da42b9afbcfab09937f1ea8ec5e 100644 (file)
@@ -41,10 +41,10 @@ GraphicView::GraphicView(): background(), foreground()
        previousOffsetX = 0;
        previousOffsetY = 0;
        container = NULL;
-       eventHandler = new RS_EventHandler(this);
+       eventHandler = new EventHandler(this);
        gridColor = Qt::gray;
-       metaGridColor = RS_Color(64, 64, 64);
-       grid = new RS_Grid(this);
+       metaGridColor = Color(64, 64, 64);
+       grid = new Grid(this);
        updateEnabled = 0;
        zoomFrozen = false;
        draftMode = false;
@@ -157,23 +157,23 @@ void GraphicView::adjustZoomControls()
  * Sets the background color. Note that applying the background
  * color for the widget is up to the implementing class.
  */
-void GraphicView::setBackground(const RS_Color & bg)
+void GraphicView::setBackground(const Color & bg)
 {
        background = bg;
 
        // bright background:
        if (bg.red() + bg.green() + bg.blue() > 380)
 //             foreground = Qt::black;
-               foreground = RS_Color(0, 0, 0);
+               foreground = Color(0, 0, 0);
        else
 //             foreground = Qt::white;
-               foreground = RS_Color(255, 255, 255);
+               foreground = Color(255, 255, 255);
 }
 
 /**
  * @return Current background color.
  */
-RS_Color GraphicView::getBackground()
+Color GraphicView::getBackground()
 {
        return background;
 }
@@ -181,7 +181,7 @@ RS_Color GraphicView::getBackground()
 /**
  * @return Current foreground color.
  */
-RS_Color GraphicView::getForeground()
+Color GraphicView::getForeground()
 {
        return foreground;
 }
@@ -189,7 +189,7 @@ RS_Color GraphicView::getForeground()
 /**
  * Sets the grid color.
  */
-void GraphicView::setGridColor(const RS_Color & c)
+void GraphicView::setGridColor(const Color & c)
 {
        gridColor = c;
 }
@@ -197,7 +197,7 @@ void GraphicView::setGridColor(const RS_Color & c)
 /**
  * Sets the meta grid color.
  */
-void GraphicView::setMetaGridColor(const RS_Color & c)
+void GraphicView::setMetaGridColor(const Color & c)
 {
        metaGridColor = c;
 }
@@ -205,7 +205,7 @@ void GraphicView::setMetaGridColor(const RS_Color & c)
 /**
  * Sets the selection color.
  */
-void GraphicView::setSelectedColor(const RS_Color & c)
+void GraphicView::setSelectedColor(const Color & c)
 {
        selectedColor = c;
 }
@@ -213,7 +213,7 @@ void GraphicView::setSelectedColor(const RS_Color & c)
 /**
  * Sets the highlight color.
  */
-void GraphicView::setHighlightedColor(const RS_Color & c)
+void GraphicView::setHighlightedColor(const Color & c)
 {
        highlightedColor = c;
 }
@@ -226,7 +226,7 @@ void GraphicView::setMouseCursor(RS2::CursorType /*c*/)
 {
 }
 
-RS_EntityContainer * GraphicView::getContainer()
+EntityContainer * GraphicView::getContainer()
 {
        return container;
 }
@@ -333,7 +333,7 @@ bool GraphicView::isZoomFrozen()
  * Sets the pointer to the graphic which contains the entities
  * which are visualized by this widget.
  */
-void GraphicView::setContainer(RS_EntityContainer * container)
+void GraphicView::setContainer(EntityContainer * container)
 {
        this->container = container;
 }
@@ -465,12 +465,12 @@ ActionInterface * GraphicView::getCurrentAction()
  */
 void GraphicView::setCurrentAction(ActionInterface * action)
 {
-       RS_DEBUG->print("GraphicView::setCurrentAction");
+       DEBUG->print("GraphicView::setCurrentAction");
 
        if (eventHandler)
                eventHandler->setCurrentAction(action);
 
-       RS_DEBUG->print("GraphicView::setCurrentAction: OK");
+       DEBUG->print("GraphicView::setCurrentAction: OK");
 }
 
 /**
@@ -499,8 +499,8 @@ void GraphicView::back()
 {
        if (eventHandler && eventHandler->hasAction())
                eventHandler->back();
-       else if (RS_DIALOGFACTORY)
-               RS_DIALOGFACTORY->requestPreviousMenu();
+       else if (DIALOGFACTORY)
+               DIALOGFACTORY->requestPreviousMenu();
 }
 
 /**
@@ -528,7 +528,7 @@ void GraphicView::mousePressEvent(QMouseEvent * e)
  */
 void GraphicView::mouseReleaseEvent(QMouseEvent * e)
 {
-       RS_DEBUG->print("GraphicView::mouseReleaseEvent");
+       DEBUG->print("GraphicView::mouseReleaseEvent");
 
        if (!eventHandler)
                return;
@@ -543,7 +543,7 @@ void GraphicView::mouseReleaseEvent(QMouseEvent * e)
                e->accept();
        }
 
-       RS_DEBUG->print("GraphicView::mouseReleaseEvent: OK");
+       DEBUG->print("GraphicView::mouseReleaseEvent: OK");
 }
 
 /**
@@ -552,14 +552,14 @@ void GraphicView::mouseReleaseEvent(QMouseEvent * e)
  */
 void GraphicView::mouseMoveEvent(QMouseEvent * e)
 {
-       RS_DEBUG->print("GraphicView::mouseMoveEvent begin");
+       DEBUG->print("GraphicView::mouseMoveEvent begin");
 
        Drawing * graphic = NULL;
 
        if (container->rtti() == RS2::EntityGraphic)
                graphic = (Drawing *)container;
 
-       RS_DEBUG->print("GraphicView::mouseMoveEvent 001");
+       DEBUG->print("GraphicView::mouseMoveEvent 001");
 
        if (e)
        {
@@ -567,23 +567,23 @@ void GraphicView::mouseMoveEvent(QMouseEvent * e)
                my = e->y();
        }
 
-       RS_DEBUG->print("GraphicView::mouseMoveEvent 002");
+       DEBUG->print("GraphicView::mouseMoveEvent 002");
 
        if (eventHandler)
                eventHandler->mouseMoveEvent(e);
 
-       RS_DEBUG->print("GraphicView::mouseMoveEvent 003");
+       DEBUG->print("GraphicView::mouseMoveEvent 003");
 
        if (!eventHandler || !eventHandler->hasAction() && graphic)
        {
                Vector mouse = toGraph(Vector(mx, my));
                Vector relMouse = mouse - getRelativeZero();
 
-               if (RS_DIALOGFACTORY)
-                       RS_DIALOGFACTORY->updateCoordinateWidget(mouse, relMouse);
+               if (DIALOGFACTORY)
+                       DIALOGFACTORY->updateCoordinateWidget(mouse, relMouse);
        }
 
-       RS_DEBUG->print("GraphicView::mouseMoveEvent end");
+       DEBUG->print("GraphicView::mouseMoveEvent end");
 }
 
 /**
@@ -629,7 +629,7 @@ void GraphicView::keyReleaseEvent(QKeyEvent * e)
 /**
  * Called by the actual GUI class which implements a command line.
  */
-void GraphicView::commandEvent(RS_CommandEvent * e)
+void GraphicView::commandEvent(CommandEvent * e)
 {
        if (eventHandler)
                eventHandler->commandEvent(e);
@@ -660,7 +660,7 @@ void GraphicView::zoomIn(double f, const Vector & center)
 {
        if (f < 1.0e-6)
        {
-               RS_DEBUG->print(RS_Debug::D_WARNING, "GraphicView::zoomIn: invalid factor");
+               DEBUG->print(Debug::D_WARNING, "GraphicView::zoomIn: invalid factor");
                return;
        }
 
@@ -714,7 +714,7 @@ void GraphicView::zoomOut(double f, const Vector & center)
 {
        if (f < 1.0e-6)
        {
-               RS_DEBUG->print(RS_Debug::D_WARNING,
+               DEBUG->print(Debug::D_WARNING,
                        "GraphicView::zoomOut: invalid factor");
                return;
        }
@@ -732,7 +732,7 @@ void GraphicView::zoomOutX(double f)
 {
        if (f < 1.0e-6)
        {
-               RS_DEBUG->print(RS_Debug::D_WARNING,
+               DEBUG->print(Debug::D_WARNING,
                        "GraphicView::zoomOutX: invalid factor");
                return;
        }
@@ -755,7 +755,7 @@ void GraphicView::zoomOutY(double f)
 {
        if (f < 1.0e-6)
        {
-               RS_DEBUG->print(RS_Debug::D_WARNING, "GraphicView::zoomOutY: invalid factor");
+               DEBUG->print(Debug::D_WARNING, "GraphicView::zoomOutY: invalid factor");
                return;
        }
 
@@ -779,7 +779,7 @@ void GraphicView::zoomOutY(double f)
  */
 void GraphicView::zoomAuto(bool axis, bool keepAspectRatio)
 {
-       RS_DEBUG->print("GraphicView::zoomAuto");
+       DEBUG->print("GraphicView::zoomAuto");
 
        if (simulationRunning)
                return;
@@ -814,12 +814,12 @@ void GraphicView::zoomAuto(bool axis, bool keepAspectRatio)
                else
                        fy = 1.0;
 
-               RS_DEBUG->print("f: %f/%f", fx, fy);
+               DEBUG->print("f: %f/%f", fx, fy);
 
                if (keepAspectRatio)
                        fx = fy = std::min(fx, fy);
 
-               RS_DEBUG->print("f: %f/%f", fx, fy);
+               DEBUG->print("f: %f/%f", fx, fy);
 
                if (fx < RS_TOLERANCE)
                        fx = fy = 1.0;
@@ -827,22 +827,22 @@ void GraphicView::zoomAuto(bool axis, bool keepAspectRatio)
                setFactorX(fx);
                setFactorY(fy);
 
-               RS_DEBUG->print("f: %f/%f", fx, fy);
+               DEBUG->print("f: %f/%f", fx, fy);
 
-               RS_DEBUG->print("adjustOffsetControls");
+               DEBUG->print("adjustOffsetControls");
                adjustOffsetControls();
-               RS_DEBUG->print("adjustZoomControls");
+               DEBUG->print("adjustZoomControls");
                adjustZoomControls();
-               RS_DEBUG->print("centerOffsetX");
+               DEBUG->print("centerOffsetX");
                centerOffsetX();
-               RS_DEBUG->print("centerOffsetY");
+               DEBUG->print("centerOffsetY");
                centerOffsetY();
-               RS_DEBUG->print("updateGrid");
+               DEBUG->print("updateGrid");
                updateGrid();
                redraw();
        }
 
-       RS_DEBUG->print("GraphicView::zoomAuto OK");
+       DEBUG->print("GraphicView::zoomAuto OK");
 }
 
 /**
@@ -850,7 +850,7 @@ void GraphicView::zoomAuto(bool axis, bool keepAspectRatio)
  */
 void GraphicView::zoomPrevious()
 {
-       RS_DEBUG->print("GraphicView::zoomPrevious");
+       DEBUG->print("GraphicView::zoomPrevious");
 
        if (simulationRunning)
                return;
@@ -909,12 +909,12 @@ void GraphicView::zoomAutoY(bool axis)
                double maxY = RS_MINDOUBLE;
                bool noChange = false;
 
-               for(RS_Entity * e=container->firstEntity(RS2::ResolveNone);
+               for(Entity * e=container->firstEntity(RS2::ResolveNone);
                        e!=NULL; e = container->nextEntity(RS2::ResolveNone))
                {
                        if (e->rtti() == RS2::EntityLine)
                        {
-                               RS_Line * l = (RS_Line *)e;
+                               Line * l = (Line *)e;
                                double x1, x2;
                                x1 = toGuiX(l->getStartpoint().x);
                                x2 = toGuiX(l->getEndpoint().x);
@@ -958,7 +958,7 @@ void GraphicView::zoomAutoY(bool axis)
                        updateGrid();
                }
 
-               RS_DEBUG->print("Auto zoom y ok");
+               DEBUG->print("Auto zoom y ok");
        }
 }
 
@@ -1101,7 +1101,7 @@ void GraphicView::zoomScroll(RS2::Direction direction)
  */
 void GraphicView::zoomPage()
 {
-       RS_DEBUG->print("GraphicView::zoomPage");
+       DEBUG->print("GraphicView::zoomPage");
 
        if (container == NULL)
                return;
@@ -1129,11 +1129,11 @@ void GraphicView::zoomPage()
        else
                fy = 1.0;
 
-       RS_DEBUG->print("f: %f/%f", fx, fy);
+       DEBUG->print("f: %f/%f", fx, fy);
 
        fx = fy = std::min(fx, fy);
 
-       RS_DEBUG->print("f: %f/%f", fx, fy);
+       DEBUG->print("f: %f/%f", fx, fy);
 
        if (fx < RS_TOLERANCE)
                fx = fy = 1.0;
@@ -1141,7 +1141,7 @@ void GraphicView::zoomPage()
        setFactorX(fx);
        setFactorY(fy);
 
-       RS_DEBUG->print("f: %f/%f", fx, fy);
+       DEBUG->print("f: %f/%f", fx, fy);
 
        centerOffsetX();
        centerOffsetY();
@@ -1156,14 +1156,14 @@ void GraphicView::zoomPage()
  */
 void GraphicView::drawWindow(Vector v1, Vector v2)
 {
-       RS_DEBUG->print("GraphicView::drawWindow() begin");
+       DEBUG->print("GraphicView::drawWindow() begin");
 
        if (simulationRunning)
                return;
 
        if (container)
        {
-               for(RS_Entity * se=container->firstEntity(RS2::ResolveNone); se!=NULL;
+               for(Entity * se=container->firstEntity(RS2::ResolveNone); se!=NULL;
                        se=container->nextEntity(RS2::ResolveNone))
                {
                        if (se->isInWindow(v1, v2))
@@ -1171,7 +1171,7 @@ void GraphicView::drawWindow(Vector v1, Vector v2)
                }
        }
 
-       RS_DEBUG->print("GraphicView::drawWindow() end");
+       DEBUG->print("GraphicView::drawWindow() end");
 }
 
 /**
@@ -1212,7 +1212,7 @@ void GraphicView::drawIt()
                drawMetaGrid();
 
        // drawing entities:
-//#warning "!!! This looks like a bug, no match for 'drawEntity(RS_Entity *, bool) !!!"
+//#warning "!!! This looks like a bug, no match for 'drawEntity(Entity *, bool) !!!"
 // and indeed it *is* a bug... true is converted to 1.0 here. Dumb, dumb, dumb.
        drawEntity(container);//, true);
 
@@ -1232,7 +1232,7 @@ void GraphicView::drawIt()
  * Sets the pen of the painter object to the suitable pen for the given
  * entity.
  */
-void GraphicView::setPenForEntity(RS_Entity * e)
+void GraphicView::setPenForEntity(Entity * e)
 {
        if (drawingMode == RS2::ModePreview /*|| draftMode==true*/)
                return;
@@ -1242,7 +1242,7 @@ void GraphicView::setPenForEntity(RS_Entity * e)
 
        // set color of entity
        // Getting pen from entity (or layer)
-       RS_Pen pen = e->getPen(true);
+       Pen pen = e->getPen(true);
 
        int w = pen.getWidth();
 
@@ -1258,7 +1258,7 @@ void GraphicView::setPenForEntity(RS_Entity * e)
 
                if (graphic)
                {
-                       uf = RS_Units::convert(1.0, RS2::Millimeter, graphic->getUnit());
+                       uf = Units::convert(1.0, RS2::Millimeter, graphic->getUnit());
 
                        if ((isPrinting() || isPrintPreview()) && graphic->getPaperScale() > 1.0e-6)
                                wf = 1.0 / graphic->getPaperScale();
@@ -1273,7 +1273,7 @@ void GraphicView::setPenForEntity(RS_Entity * e)
        }
 
        // prevent drawing with 1-width which is slow:
-       if (RS_Math::round(pen.getScreenWidth()) == 1)
+       if (Math::round(pen.getScreenWidth()) == 1)
                pen.setScreenWidth(0.0);
 
        // prevent background color on background drawing:
@@ -1284,14 +1284,14 @@ void GraphicView::setPenForEntity(RS_Entity * e)
        if (e->isSelected())
        {
                pen.setLineType(RS2::DotLine);
-               //pen.setColor(RS_Color(0xa5,0x47,0x47));
+               //pen.setColor(Color(0xa5,0x47,0x47));
                pen.setColor(selectedColor);
        }
 
        // this entity is highlighted:
        if (e->isHighlighted())
        {
-               //pen.setColor(RS_Color(0x73, 0x93, 0x73));
+               //pen.setColor(Color(0x73, 0x93, 0x73));
                pen.setColor(highlightedColor);
        }
 
@@ -1311,9 +1311,9 @@ void GraphicView::setPenForEntity(RS_Entity * e)
  *        lines e.g. in splines).
  * @param db Double buffering on (recommended) / off
  */
-void GraphicView::drawEntity(RS_Entity * e, double patternOffset, bool db)
+void GraphicView::drawEntity(Entity * e, double patternOffset, bool db)
 {
-       //RS_DEBUG->print("GraphicView::drawEntity() begin");
+       //DEBUG->print("GraphicView::drawEntity() begin");
 
        // update is diabled:
        if (!isUpdateEnabled())
@@ -1338,18 +1338,18 @@ void GraphicView::drawEntity(RS_Entity * e, double patternOffset, bool db)
 //}
 
        //drawRecursion++;
-       //RS_DEBUG->print("recursion 1: %d", drawRecursion);
+       //DEBUG->print("recursion 1: %d", drawRecursion);
 
        // set pen (color):
        setPenForEntity(e);
 
-       //RS_DEBUG->print("draw plain");
+       //DEBUG->print("draw plain");
        if (draftMode)
        {
                // large texts as rectangles:
                if (e->rtti() == RS2::EntityText)
                {
-                       if (toGuiDX(((RS_Text *)e)->getHeight()) < 4 || e->countDeep() > 100)
+                       if (toGuiDX(((Text *)e)->getHeight()) < 4 || e->countDeep() > 100)
                                painter->drawRect(toGui(e->getMin()), toGui(e->getMax()));
                        else
                                drawEntityPlain(e, patternOffset);
@@ -1378,7 +1378,7 @@ void GraphicView::drawEntity(RS_Entity * e, double patternOffset, bool db)
                        for(int i=0; i<s.getNumber(); ++i)
                        {
                                int sz = -1;
-                               RS_Color col = RS_Color(0, 0, 255);
+                               Color col = Color(0, 0, 255);
 
                                if (e->rtti() == RS2::EntityPolyline)
                                {
@@ -1388,13 +1388,13 @@ void GraphicView::drawEntity(RS_Entity * e, double patternOffset, bool db)
                                                {
                                                        sz = 4;
 //                                                     col = QColor(0, 64, 255);
-                                                       col = RS_Color(0, 64, 255);
+                                                       col = Color(0, 64, 255);
                                                }
                                                else
                                                {
                                                        sz = 3;
 //                                                     col = QColor(0, 0, 128);
-                                                       col = RS_Color(0, 0, 128);
+                                                       col = Color(0, 0, 128);
                                                }
                                        }
                                }
@@ -1407,15 +1407,15 @@ void GraphicView::drawEntity(RS_Entity * e, double patternOffset, bool db)
                }
        }
 
-       //RS_DEBUG->print("draw plain OK");
-       //RS_DEBUG->print("GraphicView::drawEntity() end");
+       //DEBUG->print("draw plain OK");
+       //DEBUG->print("GraphicView::drawEntity() end");
 }
 
 /**
  * Draws an entity.
  * The painter must be initialized and all the attributes (pen) must be set.
  */
-void GraphicView::drawEntityPlain(RS_Entity * e, double patternOffset/*= 0.0*/)
+void GraphicView::drawEntityPlain(Entity * e, double patternOffset/*= 0.0*/)
 {
 //Problems can still occur here when passing in a deleted object... It won't be
 //NULL, but it will cause a segfault here...
@@ -1455,7 +1455,7 @@ void GraphicView::simulateIt()
                drawGrid();
 
        // drawing entities:
-       RS_Pen pen(foreground, RS2::Width00, RS2::SolidLine);
+       Pen pen(foreground, RS2::Width00, RS2::SolidLine);
        simulateEntity(container, pen);
 
        // drawing zero points:
@@ -1473,16 +1473,16 @@ void GraphicView::simulateIt()
  *
  * @param smooth If true, the entity will be drawn slowly (pixel by pixel).
  */
-void GraphicView::simulateEntity(RS_Entity * e, const RS_Pen & pen)
+void GraphicView::simulateEntity(Entity * e, const Pen & pen)
 {
        if (!painter || !e)
                return;
 
        if (e->isContainer())
        {
-               RS_EntityContainer * ec = (RS_EntityContainer *)e;
+               EntityContainer * ec = (EntityContainer *)e;
 
-               for(RS_Entity * en=ec->firstEntity(RS2::ResolveNone);
+               for(Entity * en=ec->firstEntity(RS2::ResolveNone);
                        en!=NULL; en=ec->nextEntity(RS2::ResolveNone))
                {
                        if (en->isVisible() && en->isUndone() == false)
@@ -1490,26 +1490,26 @@ void GraphicView::simulateEntity(RS_Entity * e, const RS_Pen & pen)
                                // draw rapid move:
                                if (en->isAtomic() && simulationRapid)
                                {
-                                       Vector sp = ((RS_AtomicEntity *)en)->getStartpoint();
+                                       Vector sp = ((AtomicEntity *)en)->getStartpoint();
 
                                        if (sp.distanceTo(simulationLast) > 1.0e-4)
                                        {
-                                               RS_Pen rpen(RS_Color(0, 0, 255), RS2::Width00, RS2::SolidLine);
-                                               RS_Line rapidLine(NULL, RS_LineData(simulationLast, sp));
+                                               Pen rpen(Color(0, 0, 255), RS2::Width00, RS2::SolidLine);
+                                               Line rapidLine(NULL, LineData(simulationLast, sp));
                                                simulateEntity(&rapidLine, rpen);
                                        }
                                }
 
                                if (en->isHighlighted())
                                {
-                                       RS_Pen hpen(highlightedColor, RS2::Width00, RS2::SolidLine);
+                                       Pen hpen(highlightedColor, RS2::Width00, RS2::SolidLine);
                                        simulateEntity(en, hpen);
                                }
                                else
                                        simulateEntity(en, pen);
 
                                if (en->isAtomic())
-                                       simulationLast = ((RS_AtomicEntity *)en)->getEndpoint();
+                                       simulationLast = ((AtomicEntity *)en)->getEndpoint();
 
                                if (!simulationSmooth)
                                        simulationDelay(true);
@@ -1524,7 +1524,7 @@ void GraphicView::simulateEntity(RS_Entity * e, const RS_Pen & pen)
                        {
                        case RS2::EntityLine:
                        {
-                               RS_Line * line = (RS_Line *)e;
+                               Line * line = (Line *)e;
                                drawLineSmooth(toGui(line->getStartpoint()), toGui(line->getEndpoint()), pen);
                                        //simulationSpeed);
                        }
@@ -1532,7 +1532,7 @@ void GraphicView::simulateEntity(RS_Entity * e, const RS_Pen & pen)
 
                        case RS2::EntityArc:
                        {
-                               RS_Arc * arc = (RS_Arc *)e;
+                               Arc * arc = (Arc *)e;
                                drawArcSmooth(toGui(arc->getCenter()), toGuiDX(arc->getRadius()),
                                        arc->getAngle1(), arc->getAngle2(), arc->isReversed(), pen);
                        }
@@ -1540,7 +1540,7 @@ void GraphicView::simulateEntity(RS_Entity * e, const RS_Pen & pen)
 
                        case RS2::EntityCircle:
                        {
-                               RS_Circle * circle = (RS_Circle *)e;
+                               Circle * circle = (Circle *)e;
                                drawArcSmooth(toGui(circle->getCenter()), toGuiDX(circle->getRadius()),
                                        0.0, 2.0 * M_PI, false, pen);
                        }
@@ -1607,31 +1607,31 @@ void GraphicView::simulationDelay(bool step)
 /**
  * Draws a line slowly from (x1, y1) to (x2, y2). This is used for simulation only.
  */
-void GraphicView::drawLineSmooth(const Vector & p1, const Vector & p2, const RS_Pen & pen)
+void GraphicView::drawLineSmooth(const Vector & p1, const Vector & p2, const Pen & pen)
 {
        double alpha = p1.angleTo(p2);
        double xStep, yStep;
        bool  xIsOne;
 
-       if (RS_Math::cmpDouble(alpha, 0.0) || RS_Math::cmpDouble(alpha, 2 * M_PI))
+       if (Math::cmpDouble(alpha, 0.0) || Math::cmpDouble(alpha, 2 * M_PI))
        {
                xStep = 1.0;
                yStep = 0.0;
                xIsOne = true;
        }
-       else if (RS_Math::cmpDouble(alpha, M_PI / 2.0))
+       else if (Math::cmpDouble(alpha, M_PI / 2.0))
        {
                xStep = 0.0;
                yStep = 1.0;
                xIsOne = false;
        }
-       else if (RS_Math::cmpDouble(alpha, M_PI))
+       else if (Math::cmpDouble(alpha, M_PI))
        {
                xStep = -1.0;
                yStep = 0.0;
                xIsOne = true;
        }
-       else if (RS_Math::cmpDouble(alpha, M_PI / 2.0 * 3.0))
+       else if (Math::cmpDouble(alpha, M_PI / 2.0 * 3.0))
        {
                xStep = 0.0;
                yStep = -1.0;
@@ -1680,7 +1680,7 @@ void GraphicView::drawLineSmooth(const Vector & p1, const Vector & p2, const RS_
 }
 
 void GraphicView::drawArcSmooth(const Vector & center, double radius, double a1, double a2, bool rev,
-       const RS_Pen & pen)
+       const Pen & pen)
 {
        if (radius <= 1.4)
        {
@@ -1689,10 +1689,10 @@ void GraphicView::drawArcSmooth(const Vector & center, double radius, double a1,
        }
        else
        {
-               int ix1 = RS_Math::round(center.x + cos(a1) * radius);
-               int iy1 = RS_Math::round(center.y - sin(a1) * radius);
-               int ix2 = RS_Math::round(center.x + cos(a2) * radius);
-               int iy2 = RS_Math::round(center.y - sin(a2) * radius);
+               int ix1 = Math::round(center.x + cos(a1) * radius);
+               int iy1 = Math::round(center.y - sin(a1) * radius);
+               int ix2 = Math::round(center.x + cos(a2) * radius);
+               int iy2 = Math::round(center.y - sin(a2) * radius);
                int k2x = 0;            // Next point on circle
                int k2y = 0;            //
                int k1x = ix1;          // Prev point on circle
@@ -1718,8 +1718,8 @@ void GraphicView::drawArcSmooth(const Vector & center, double radius, double a1,
 
                        for(a=a1+aStep; a<=a2cp; a+=aStep)
                        {
-                               k2x = RS_Math::round(center.x+cos(a)*radius);
-                               k2y = RS_Math::round(center.y-sin(a)*radius);
+                               k2x = Math::round(center.x+cos(a)*radius);
+                               k2y = Math::round(center.y-sin(a)*radius);
                                painter->setPen(pen);
 
                                if ((k2x >= 0 && k2x <= painter->getWidth()
@@ -1747,8 +1747,8 @@ void GraphicView::drawArcSmooth(const Vector & center, double radius, double a1,
 
                        for(a=a1-aStep; a>=a2cp; a-=aStep)
                        {
-                               k2x = RS_Math::round(center.x + cos(a) * radius);
-                               k2y = RS_Math::round(center.y - sin(a) * radius);
+                               k2x = Math::round(center.x + cos(a) * radius);
+                               k2y = Math::round(center.y - sin(a) * radius);
                                painter->setPen(pen);
 
                                if ((k2x >=0 && k2x <= painter->getWidth()
@@ -1774,7 +1774,7 @@ void GraphicView::drawArcSmooth(const Vector & center, double radius, double a1,
  * @return Pointer to the static pattern struct that belongs to the
  * given pattern type or NULL.
  */
-RS_LineTypePattern * GraphicView::getPattern(RS2::LineType t)
+LineTypePattern * GraphicView::getPattern(RS2::LineType t)
 {
        switch (t)
        {
@@ -1873,10 +1873,10 @@ void GraphicView::drawAbsoluteZero()
 
        int zr = 20;
 
-//     RS_Pen p(Qt::red, RS2::Width00, RS2::SolidLine);
+//     Pen p(Qt::red, RS2::Width00, RS2::SolidLine);
 //Using Qt::red doesn't seem to work here...
-//It's because Qt colors and RS_Color are not 100% compatible...
-       RS_Pen p(RS_Color(255, 0, 0), RS2::Width00, RS2::SolidLine);
+//It's because Qt colors and Color are not 100% compatible...
+       Pen p(Color(255, 0, 0), RS2::Width00, RS2::SolidLine);
        painter->setPen(p);
 
        painter->drawLine(Vector(toGuiX(0.0) - zr, toGuiY(0.0)),
@@ -1911,7 +1911,7 @@ void GraphicView::drawRelativeZero()
 #endif
 
 //Using Qt::red doesn't seem to work here...
-       RS_Pen p(RS_Color(255, 0, 0), RS2::Width00, RS2::SolidLine);
+       Pen p(Color(255, 0, 0), RS2::Width00, RS2::SolidLine);
        painter->setPen(p);
 //This doesn't work--this is NOT a QPainter!
 //     painter->setBrush(Qt::NoBrush);
@@ -1951,7 +1951,7 @@ void GraphicView::drawPaper()
                return;
 
        // draw paper:
-       painter->setPen(RS_Pen(Qt::gray));
+       painter->setPen(Pen(Qt::gray));
 
        Vector pinsbase = graphic->getPaperInsertionBase();
        Vector size = graphic->getPaperSize();
@@ -1961,19 +1961,19 @@ void GraphicView::drawPaper()
        Vector v2 = toGui((size - pinsbase) / scale);
 
        // gray background:
-       painter->fillRect(0,0, getWidth(), getHeight(), RS_Color(200, 200, 200));
+       painter->fillRect(0,0, getWidth(), getHeight(), Color(200, 200, 200));
 
        // shadow
        painter->fillRect((int)(v1.x) + 6, (int)(v1.y) + 6,
-               (int)((v2.x - v1.x)), (int)((v2.y - v1.y)), RS_Color(64, 64, 64));
+               (int)((v2.x - v1.x)), (int)((v2.y - v1.y)), Color(64, 64, 64));
 
        // border:
        painter->fillRect((int)(v1.x), (int)(v1.y),
-               (int)((v2.x - v1.x)), (int)((v2.y - v1.y)), RS_Color(64, 64, 64));
+               (int)((v2.x - v1.x)), (int)((v2.y - v1.y)), Color(64, 64, 64));
 
        // paper
        painter->fillRect((int)(v1.x) + 1, (int)(v1.y) - 1,
-               (int)((v2.x - v1.x)) - 2, (int)((v2.y - v1.y)) + 2, RS_Color(255, 255, 255));
+               (int)((v2.x - v1.x)) - 2, (int)((v2.y - v1.y)) + 2, Color(255, 255, 255));
 }
 
 /**
@@ -2021,7 +2021,7 @@ void GraphicView::drawMetaGrid()
        if (!painter)
                return;
 
-       RS_Pen pen(metaGridColor, RS2::Width00, RS2::DotLine);
+       Pen pen(metaGridColor, RS2::Width00, RS2::DotLine);
        painter->setPen(pen);
 
        // draw meta grid:
@@ -2050,7 +2050,7 @@ void GraphicView::updateGrid()
                grid->update();
 }
 
-RS_Grid * GraphicView::getGrid()
+Grid * GraphicView::getGrid()
 {
        return grid;
 }
@@ -2080,7 +2080,7 @@ void GraphicView::setDefaultSnapMode(RS2::SnapMode sm)
                eventHandler->setSnapMode(sm);
 
        //OK, the above sets the snap mode in the snapper that's derived from
-       //the RS_ActionInterface and RS_Snapper. So the following should fix
+       //the RS_ActionInterface and Snapper. So the following should fix
        //us up, hm notwithstanding. [and it does. :-)]
        //hm.
        snapper.setSnapMode(sm);
@@ -2154,7 +2154,7 @@ double GraphicView::toGuiDY(double d)
  */
 Vector GraphicView::toGraph(Vector v)
 {
-       return Vector(toGraphX(RS_Math::round(v.x)), toGraphY(RS_Math::round(v.y)), 0.0);
+       return Vector(toGraphX(Math::round(v.x)), toGraphY(Math::round(v.y)), 0.0);
 }
 
 /**
@@ -2243,7 +2243,7 @@ void GraphicView::moveRelativeZero(const Vector & pos)
        setRelativeZero(pos);
 }
 
-RS_EventHandler * GraphicView::getEventHandler()
+EventHandler * GraphicView::getEventHandler()
 {
        return eventHandler;
 }
index 4b997de3a8f1939aa3111ad5410a7268c3f9d6a9..863b7d6311a5f7d08eace23ad616c411051414ab 100644 (file)
@@ -2,22 +2,22 @@
 #define __GRAPHICVIEW_H__
 
 #include <QtGui>
-#include "rs.h"
+#include "enums.h"
 #include "color.h"
 #include "preview.h"
 #include "snapper.h"
 #include "vector.h"
 
 class ActionInterface;
-class RS_CommandEvent;
+class CommandEvent;
 class Drawing;
 class PaintInterface;
-class RS_Entity;
-class RS_EntityContainer;
-class RS_EventHandler;
-class RS_Grid;
-class RS_LineTypePattern;
-class RS_Pen;
+class Entity;
+class EntityContainer;
+class EventHandler;
+class Grid;
+class LineTypePattern;
+class Pen;
 
 class GraphicView
 {
@@ -50,16 +50,16 @@ class GraphicView
                called whenever the view changed */
                virtual void adjustZoomControls();
 
-               virtual void setBackground(const RS_Color & bg);
-               RS_Color getBackground();
-               RS_Color getForeground();
-               void setGridColor(const RS_Color & c);
-               void setMetaGridColor(const RS_Color & c);
-               void setSelectedColor(const RS_Color & c);
-               void setHighlightedColor(const RS_Color & c);
+               virtual void setBackground(const Color & bg);
+               Color getBackground();
+               Color getForeground();
+               void setGridColor(const Color & c);
+               void setMetaGridColor(const Color & c);
+               void setSelectedColor(const Color & c);
+               void setHighlightedColor(const Color & c);
                virtual void setMouseCursor(RS2::CursorType /*c*/);
-               void setContainer(RS_EntityContainer * container);
-               RS_EntityContainer * getContainer();
+               void setContainer(EntityContainer * container);
+               EntityContainer * getContainer();
                void setFactor(double f);
                void setFactorX(double f);
                void setFactorY(double f);
@@ -111,7 +111,7 @@ class GraphicView
                void mouseEnterEvent();
                void keyPressEvent(QKeyEvent * e);
                void keyReleaseEvent(QKeyEvent * e);
-               void commandEvent(RS_CommandEvent * e);
+               void commandEvent(CommandEvent * e);
                void enableCoordinateInput();
                void disableCoordinateInput();
 
@@ -134,18 +134,18 @@ class GraphicView
 
                virtual void drawWindow(Vector v1, Vector v2);
                virtual void drawIt();
-               virtual void drawEntity(RS_Entity * e, double patternOffset = 0.0, bool db = false);
-               virtual void drawEntityPlain(RS_Entity * e, double patternOffset = 0.0);
-               virtual void setPenForEntity(RS_Entity * e);
+               virtual void drawEntity(Entity * e, double patternOffset = 0.0, bool db = false);
+               virtual void drawEntityPlain(Entity * e, double patternOffset = 0.0);
+               virtual void setPenForEntity(Entity * e);
 
                void simulateIt();
-               void simulateEntity(RS_Entity * e, const RS_Pen & pen);
-               void drawLineSmooth(const Vector & p1, const Vector & p2, const RS_Pen & pen);
+               void simulateEntity(Entity * e, const Pen & pen);
+               void drawLineSmooth(const Vector & p1, const Vector & p2, const Pen & pen);
                void drawArcSmooth(const Vector & center, double radius,
-                       double a1, double a2, bool rev, const RS_Pen & pen);
+                       double a1, double a2, bool rev, const Pen & pen);
                void simulationDelay(bool step = false);
 
-               virtual RS_LineTypePattern * getPattern(RS2::LineType t);
+               virtual LineTypePattern * getPattern(RS2::LineType t);
 
                virtual void drawAbsoluteZero();
                virtual void drawRelativeZero();
@@ -153,7 +153,7 @@ class GraphicView
                virtual void drawGrid();
                virtual void drawMetaGrid();
                virtual void updateGrid();
-               RS_Grid * getGrid();
+               Grid * getGrid();
                virtual void updateGridStatusWidget(const QString & /*text*/);
 
                void setDefaultSnapMode(RS2::SnapMode sm);
@@ -195,7 +195,7 @@ Having this class derive from that one *might* make sense... *Maybe*. Not sure.
                void setRelativeZero(const Vector & pos);
                void moveRelativeZero(const Vector & pos);
 
-               RS_EventHandler * getEventHandler();
+               EventHandler * getEventHandler();
                void setPrintPreview(bool pv);
                bool isPrintPreview();
                void setPrinting(bool p);
@@ -208,18 +208,18 @@ Having this class derive from that one *might* make sense... *Maybe*. Not sure.
                bool getSimulationRapid();
 
        protected:
-               RS_EntityContainer * container;
-               RS_EventHandler * eventHandler;
+               EntityContainer * container;
+               EventHandler * eventHandler;
                int mx;                                                         //!< Last known mouse cursor position
                int my;                                                         //!< Last known mouse cursor position
                PaintInterface * painter;
-               RS_Color background;                            //! background color (any color)
-               RS_Color foreground;                            //! foreground color (black or white)
-               RS_Color gridColor;                                     //! grid color
-               RS_Color metaGridColor;                         //! meta grid color
-               RS_Color selectedColor;                         //! selected color
-               RS_Color highlightedColor;                      //! highlighted color
-               RS_Grid * grid;                                         //! Grid
+               Color background;                               //! background color (any color)
+               Color foreground;                               //! foreground color (black or white)
+               Color gridColor;                                        //! grid color
+               Color metaGridColor;                            //! meta grid color
+               Color selectedColor;                            //! selected color
+               Color highlightedColor;                 //! highlighted color
+               Grid * grid;                                            //! Grid
                /**
                 * Current default snap mode for this graphic view. Used for new
                 * actions.
@@ -265,8 +265,8 @@ Having this class derive from that one *might* make sense... *Maybe*. Not sure.
        public://for now
                // We use this here instead of deriving ActionInterface from it because
                // this makes more sense.
-               RS_Snapper snapper;
-               RS_Preview preview;
+               Snapper snapper;
+               Preview preview;
 
 //QG
        protected:
@@ -300,7 +300,7 @@ class QG_GraphicView: public QWidget, public RS_GraphicView
                virtual void redraw();
                virtual void adjustOffsetControls();
                virtual void adjustZoomControls();
-               virtual void setBackground(const RS_Color & bg);
+               virtual void setBackground(const Color & bg);
                virtual void setMouseCursor(RS2::CursorType c);
                virtual void updateGridStatusWidget(const QString & text);
 
index 72eac0e96f335bfe51968eaa6aa566569330d86f..c205e292d476b6185f5244e0f50a5a32c8d03b4f 100644 (file)
@@ -24,7 +24,7 @@
 
 QSplashScreen * splash = 0;
 
-#ifdef RS_SCRIPTING
+#ifdef SCRIPTING
 #include <qsproject.h>
 #endif
 
@@ -76,8 +76,8 @@ int main(int argc, char * argv[])
        // Init compiled-in resources
        Q_INIT_RESOURCE(architektonas);
 
-       RS_DEBUG->setLevel(RS_Debug::D_WARNING);
-       RS_DEBUG->print("param 0: %s", argv[0]);
+       DEBUG->setLevel(Debug::D_WARNING);
+       DEBUG->print("param 0: %s", argv[0]);
 
        // avoid . / , confusion on German environments
        setlocale(LC_ALL, "C");
@@ -86,19 +86,19 @@ int main(int argc, char * argv[])
 
        for(int i=0; i<app.argc(); i++)
                if (QString("--debug") == app.argv()[i])
-                       RS_DEBUG->setLevel(RS_Debug::D_DEBUGGING);
+                       DEBUG->setLevel(Debug::D_DEBUGGING);
 
        QFileInfo prgInfo(QFile::decodeName(argv[0]));
        QString prgDir(prgInfo.absolutePath());
-//fail RS_SYSTEM->init(QC_APPNAME, QC_VERSION, QC_APPDIR, prgDir);
-//     RS_SYSTEM->init("Architektonas", QC_VERSION, "qcad", prgDir);
-       RS_SYSTEM->init("Architektonas", QC_VERSION, "architektonas", prgDir);
+//fail SYSTEM->init(QC_APPNAME, QC_VERSION, QC_APPDIR, prgDir);
+//     SYSTEM->init("Architektonas", QC_VERSION, "qcad", prgDir);
+       SYSTEM->init("Architektonas", QC_VERSION, "architektonas", prgDir);
 
-       RS_FILEIO->registerFilter(new RS_FilterCXF());
-       RS_FILEIO->registerFilter(new RS_FilterDXF());
-       RS_FILEIO->registerFilter(new RS_FilterDXF1());
+       FILEIO->registerFilter(new FilterCXF());
+       FILEIO->registerFilter(new FilterDXF());
+       FILEIO->registerFilter(new FilterDXF1());
 #ifdef RS_OPT_CAM
-       RS_FILEIO->registerFilter(new RS_FilterCAM());
+       FILEIO->registerFilter(new FilterCAM());
 #endif
 
        // parse command line arguments that might not need a launched program:
@@ -119,7 +119,7 @@ int main(int argc, char * argv[])
        // show initial config dialog:
        if (unit == "Invalid")
        {
-               RS_DEBUG->print("main: show initial config dialog..");
+               DEBUG->print("main: show initial config dialog..");
                DlgInitial di(NULL);
                di.setText("<font size=\"+1\"><b>Welcome to Architektonas</b></font>"
                "<br>"
@@ -137,11 +137,11 @@ int main(int argc, char * argv[])
                settings.endGroup();
                }
 
-               RS_DEBUG->print("main: show initial config dialog: OK");
+               DEBUG->print("main: show initial config dialog: OK");
        }
 
 #ifdef QSPLASHSCREEN_H
-       RS_DEBUG->print("main: splashscreen..");
+       DEBUG->print("main: splashscreen..");
 
 //# ifdef QC_CUSTOM_SPLASH
 //     QPixmap * pixmap = new QPixmap(qPixmapFromMimeSource(QC_CUSTOM_SPLASH));
@@ -156,23 +156,23 @@ int main(int argc, char * argv[])
        splash->show();
        splash->message(app.tr("Loading.."),
                Qt::AlignRight|Qt::AlignBottom, QC_SPLASH_TXTCOL);
-       RS_DEBUG->print("main: splashscreen: OK");
+       DEBUG->print("main: splashscreen: OK");
 */
 #endif
 
-       RS_DEBUG->print("main: init fontlist..");
-    RS_FONTLIST->init();
-       RS_DEBUG->print("main: init fontlist: OK");
+       DEBUG->print("main: init fontlist..");
+    FONTLIST->init();
+       DEBUG->print("main: init fontlist: OK");
 
-       RS_DEBUG->print("main: init patternlist..");
-    RS_PATTERNLIST->init();
-       RS_DEBUG->print("main: init patternlist: OK");
+       DEBUG->print("main: init patternlist..");
+    PATTERNLIST->init();
+       DEBUG->print("main: init patternlist: OK");
 
-       RS_DEBUG->print("main: init scriptlist..");
-    RS_SCRIPTLIST->init();
-       RS_DEBUG->print("main: init scriptlist: OK");
+       DEBUG->print("main: init scriptlist..");
+    SCRIPTLIST->init();
+       DEBUG->print("main: init scriptlist: OK");
 
-       RS_DEBUG->print("main: loading translation..");
+       DEBUG->print("main: loading translation..");
        settings.beginGroup("Appearance");
 #ifdef QC_PREDEFINED_LOCALE
        lang = settings.value("Language", "").toString();
@@ -196,15 +196,15 @@ int main(int argc, char * argv[])
 #endif
        settings.endGroup();
 
-       RS_SYSTEM->loadTranslation(lang, langCmd);
-       RS_DEBUG->print("main: loading translation: OK");
+       SYSTEM->loadTranslation(lang, langCmd);
+       DEBUG->print("main: loading translation: OK");
 
 #ifdef QSPLASHSCREEN_H
        splash = new QSplashScreen(*pixmap);
        splash->show();
 //     splash->message(QObject::tr("Loading.."), Qt::AlignRight | Qt::AlignBottom, QC_SPLASH_TXTCOL);
        splash->showMessage(QObject::tr("Loading..."), Qt::AlignRight | Qt::AlignBottom, QC_SPLASH_TXTCOL);
-       RS_DEBUG->print("main: splashscreen: OK");
+       DEBUG->print("main: splashscreen: OK");
 #endif
 
        //QApplication::setStyle(new QWindowsStyle());
@@ -214,35 +214,35 @@ int main(int argc, char * argv[])
 #endif
 
 #ifdef QC_BUILTIN_STYLE //js:
-       RS_DEBUG->print("main: applying built in style..");
+       DEBUG->print("main: applying built in style..");
        applyBuiltinStyle();
 #endif
 
-       RS_DEBUG->print("main: creating main window..");
+       DEBUG->print("main: creating main window..");
     ApplicationWindow * appWin = new ApplicationWindow();
-       RS_DEBUG->print("main: setting caption");
+       DEBUG->print("main: setting caption");
     appWin->setWindowTitle("Architektonas");
-       RS_DEBUG->print("main: show main window");
+       DEBUG->print("main: show main window");
     appWin->show();
-       RS_DEBUG->print("main: set focus");
+       DEBUG->print("main: set focus");
        appWin->setFocus();
-       RS_DEBUG->print("main: creating main window: OK");
+       DEBUG->print("main: creating main window: OK");
 
 #ifdef QSPLASHSCREEN_H
        if (splash)
        {
-               RS_DEBUG->print("main: updating splash..");
+               DEBUG->print("main: updating splash..");
 //             splash->message(QObject::tr("Loading Library Paths.."),
                splash->showMessage(QObject::tr("Loading Library Paths.."),
                        Qt::AlignRight | Qt::AlignBottom, QC_SPLASH_TXTCOL);
-               RS_DEBUG->print("main: processing events");
+               DEBUG->print("main: processing events");
                qApp->processEvents();
-               RS_DEBUG->print("main: updating splash: OK");
+               DEBUG->print("main: updating splash: OK");
        }
 #endif
 
        // loading files:
-       RS_DEBUG->print("main: loading files..");
+       DEBUG->print("main: loading files..");
        bool files_loaded = false;
 
        for(QStringList::Iterator it=fileList.begin(); it!=fileList.end(); ++it)
@@ -260,7 +260,7 @@ int main(int argc, char * argv[])
                        files_loaded = true;
        }
 
-       RS_DEBUG->print("main: loading files: OK");
+       DEBUG->print("main: loading files: OK");
 
 //none of this demo shit
 //#ifdef RS_DEMO
@@ -285,7 +285,7 @@ int main(int argc, char * argv[])
        //setlocale(LC_NUMERIC, "C");
        setlocale(LC_ALL, "C");
 
-       RS_DEBUG->print("main: app.exec()");
+       DEBUG->print("main: app.exec()");
 
        if (!files_loaded)
                appWin->slotFileNew();
@@ -296,7 +296,7 @@ int main(int argc, char * argv[])
 
        delete appWin;
 
-       RS_DEBUG->print("main: finished");
+       DEBUG->print("main: finished");
 
        return r;
 }
@@ -308,7 +308,7 @@ int main(int argc, char * argv[])
  */
 QStringList handleArgs(int argc, char * argv[])
 {
-       RS_DEBUG->print("main: handling args..");
+       DEBUG->print("main: handling args..");
        QStringList ret;
 
        bool doexit = false;
@@ -337,7 +337,7 @@ QStringList handleArgs(int argc, char * argv[])
                                machine = QString(argv[i]);
                        else
                        {
-                               RS_DEBUG->print(RS_Debug::D_WARNING, "No machine configuration given after --convert. Aborting..");
+                               DEBUG->print(Debug::D_WARNING, "No machine configuration given after --convert. Aborting..");
                                exit(1);
                        }
 
@@ -347,7 +347,7 @@ QStringList handleArgs(int argc, char * argv[])
                                input = QString(argv[i]);
                        else
                        {
-                               RS_DEBUG->print(RS_Debug::D_WARNING, "No input given after --convert. Aborting..");
+                               DEBUG->print(Debug::D_WARNING, "No input given after --convert. Aborting..");
                                exit(1);
                        }
 
@@ -357,7 +357,7 @@ QStringList handleArgs(int argc, char * argv[])
                                output = QString(argv[i]);
                        else
                        {
-                               RS_DEBUG->print(RS_Debug::D_WARNING, "No output given after --convert. Aborting..");
+                               DEBUG->print(Debug::D_WARNING, "No output given after --convert. Aborting..");
                                exit(1);
                        }
                }
@@ -368,9 +368,9 @@ QStringList handleArgs(int argc, char * argv[])
        // auto cam convert
        if (machine.isEmpty() == false && input.isEmpty() == false && output.isEmpty() == false)
        {
-               RS_FilterCAM fc;
+               FilterCAM fc;
                Drawing gr;
-               RS_FILEIO->fileImport(gr, input, RS2::FormatUnknown);
+               FILEIO->fileImport(gr, input, RS2::FormatUnknown);
                RS_CamDialog dlg(gr, NULL);
                dlg.activateMachineGenerator(machine);
                dlg.externalOK();
@@ -382,6 +382,6 @@ QStringList handleArgs(int argc, char * argv[])
        if (doexit)
                exit(0);
 
-       RS_DEBUG->print("main: handling args: OK");
+       DEBUG->print("main: handling args: OK");
        return ret;
 }
index 1bac26e838ce5b48c90c2eabc144cdd583df6b2b..d20e4e7055659bc165e3aae64771ce3970725291 100644 (file)
@@ -32,7 +32,7 @@ int MDIWindow::idCounter = 0;
  *   document shall be created for this window.
  * @param parent Parent widget. Usually a workspace.
  */
-MDIWindow::MDIWindow(RS_Document * doc, QWidget * parent, const char * name/*= NULL*/,
+MDIWindow::MDIWindow(Document * doc, QWidget * parent, const char * name/*= NULL*/,
        Qt::WindowFlags wflags/*= Qt::WDestructiveClose*/):
        QMdiSubWindow(parent, Qt::SubWindow), owner(false), forceClosing(false)
 #warning "!!! wflags is ignored !!!"
@@ -90,12 +90,12 @@ MDIWindow::~MDIWindow()
  */
 void MDIWindow::addChildWindow(MDIWindow * w)
 {
-    RS_DEBUG->print("RS_MDIWindow::addChildWindow()");
+    DEBUG->print("RS_MDIWindow::addChildWindow()");
 
     childWindows.append(w);
     w->setParentWindow(this);
 
-    RS_DEBUG->print("children: %d", childWindows.count());
+    DEBUG->print("children: %d", childWindows.count());
 }
 
 /**
@@ -105,13 +105,13 @@ void MDIWindow::addChildWindow(MDIWindow * w)
  */
 void MDIWindow::removeChildWindow(MDIWindow * w)
 {
-    RS_DEBUG->print("RS_MDIWindow::removeChildWindow()");
+    DEBUG->print("RS_MDIWindow::removeChildWindow()");
 
 //    bool suc = childWindows.remove(w);
     bool suc = childWindows.removeOne(w);
-    RS_DEBUG->print("successfully removed child window: %d", (int)suc);
+    DEBUG->print("successfully removed child window: %d", (int)suc);
 
-    RS_DEBUG->print("children: %d", childWindows.count());
+    DEBUG->print("children: %d", childWindows.count());
 }
 
 /**
@@ -147,11 +147,11 @@ bool MDIWindow::closeMDI(bool force, bool ask)
        // since it's still available in the parent drawing after closing.
        if (isBlock)
        {
-               RS_DEBUG->print("  closing block");
+               DEBUG->print("  closing block");
                // tell parent window we're not here anymore.
                if (parentWindow)
                {
-                       RS_DEBUG->print("    notifying parent about closing this window");
+                       DEBUG->print("    notifying parent about closing this window");
                        parentWindow->removeChildWindow(this);
                }
 
@@ -161,7 +161,7 @@ bool MDIWindow::closeMDI(bool force, bool ask)
        // This is a graphic document. ask user for closing.
        else if (!ask || slotFileClose(force))
        {
-               RS_DEBUG->print("  closing graphic");
+               DEBUG->print("  closing graphic");
                // close all child windows:
                bool done;
 
@@ -190,14 +190,14 @@ bool MDIWindow::closeMDI(bool force, bool ask)
  */
 void MDIWindow::closeEvent(QCloseEvent * ce)
 {
-    RS_DEBUG->print("MDIWindow::closeEvent begin");
+    DEBUG->print("MDIWindow::closeEvent begin");
 
     if (closeMDI(false, !forceClosing))
         ce->accept();
     else
         ce->ignore();
 
-    RS_DEBUG->print("MDIWindow::closeEvent end");
+    DEBUG->print("MDIWindow::closeEvent end");
 }
 
 /**
@@ -207,9 +207,9 @@ void MDIWindow::closeEvent(QCloseEvent * ce)
  * @param container Entity container to be used as document or NULL
  * if a new document should be created.
  */
-void MDIWindow::initDoc(RS_Document * doc)
+void MDIWindow::initDoc(Document * doc)
 {
-       RS_DEBUG->print("MDIWindow::initDoc()");
+       DEBUG->print("MDIWindow::initDoc()");
 
        if (!doc)
        {
@@ -229,7 +229,7 @@ void MDIWindow::initDoc(RS_Document * doc)
  */
 void MDIWindow::initView()
 {
-       RS_DEBUG->print("MDIWindow::initView()");
+       DEBUG->print("MDIWindow::initView()");
 
 //     graphicView = new QC_GraphicView(document, this);
        graphicView = new QG_GraphicView(document, this);
@@ -241,14 +241,14 @@ void MDIWindow::initView()
  * Called when the current pen (color, style, width) has changed.
  * Sets the active pen for the document in this MDI window.
  */
-void MDIWindow::slotPenChanged(RS_Pen pen)
+void MDIWindow::slotPenChanged(Pen pen)
 {
-       RS_DEBUG->print("MDIWindow::slotPenChanged() begin");
+       DEBUG->print("MDIWindow::slotPenChanged() begin");
 
        if (document)
                document->setActivePen(pen);
 
-       RS_DEBUG->print("MDIWindow::slotPenChanged() end");
+       DEBUG->print("MDIWindow::slotPenChanged() end");
 }
 
 /**
@@ -256,7 +256,7 @@ void MDIWindow::slotPenChanged(RS_Pen pen)
  */
 void MDIWindow::slotFileNew()
 {
-       RS_DEBUG->print("MDIWindow::slotFileNew begin");
+       DEBUG->print("MDIWindow::slotFileNew begin");
 
        if (document && graphicView)
        {
@@ -264,7 +264,7 @@ void MDIWindow::slotFileNew()
                graphicView->redraw();
        }
 
-       RS_DEBUG->print("MDIWindow::slotFileNew end");
+       DEBUG->print("MDIWindow::slotFileNew end");
 }
 
 /**
@@ -272,7 +272,7 @@ void MDIWindow::slotFileNew()
  */
 bool MDIWindow::slotFileOpen(const QString & fileName, RS2::FormatType type)
 {
-       RS_DEBUG->print("MDIWindow::slotFileOpen");
+       DEBUG->print("MDIWindow::slotFileOpen");
        bool ret = false;
 
        if (document != NULL && !fileName.isEmpty())
@@ -285,22 +285,22 @@ bool MDIWindow::slotFileOpen(const QString & fileName, RS2::FormatType type)
                        //QString message=tr("Loaded document: ")+fileName;
                        //statusBar()->message(message, 2000);
 
-                       RS_DEBUG->print("MDIWindow::slotFileOpen: autoZoom");
+                       DEBUG->print("MDIWindow::slotFileOpen: autoZoom");
                        graphicView->zoomAuto(false);
-                       RS_DEBUG->print("MDIWindow::slotFileOpen: autoZoom: OK");
+                       DEBUG->print("MDIWindow::slotFileOpen: autoZoom: OK");
                }
                else
                {
-                       RS_DEBUG->print("MDIWindow::slotFileOpen: failed");
+                       DEBUG->print("MDIWindow::slotFileOpen: failed");
                }
        }
        else
        {
-               RS_DEBUG->print("MDIWindow::slotFileOpen: cancelled");
+               DEBUG->print("MDIWindow::slotFileOpen: cancelled");
                //statusBar()->message(tr("Opening aborted"), 2000);
        }
 
-       RS_DEBUG->print("MDIWindow::slotFileOpen: OK");
+       DEBUG->print("MDIWindow::slotFileOpen: OK");
 
        return ret;
 }
@@ -314,7 +314,7 @@ bool MDIWindow::slotFileOpen(const QString & fileName, RS2::FormatType type)
  */
 bool MDIWindow::slotFileSave(bool & cancelled)
 {
-       RS_DEBUG->print("MDIWindow::slotFileSave()");
+       DEBUG->print("MDIWindow::slotFileSave()");
        bool ret = false;
        cancelled = false;
 
@@ -343,7 +343,7 @@ bool MDIWindow::slotFileSave(bool & cancelled)
  */
 bool MDIWindow::slotFileSaveAs(bool & cancelled)
 {
-       RS_DEBUG->print("MDIWindow::slotFileSaveAs");
+       DEBUG->print("MDIWindow::slotFileSaveAs");
        bool ret = false;
        cancelled = false;
        RS2::FormatType t = RS2::FormatDXF;
@@ -373,7 +373,7 @@ bool MDIWindow::slotFileSaveAs(bool & cancelled)
  */
 bool MDIWindow::slotFileClose(bool force)
 {
-       RS_DEBUG->print("MDIWindow::slotFileClose()");
+       DEBUG->print("MDIWindow::slotFileClose()");
 
        bool succ = true;
        int exit = 0;
@@ -437,7 +437,7 @@ bool MDIWindow::slotFileClose(bool force)
 
 void MDIWindow::slotFilePrint()
 {
-       RS_DEBUG->print("MDIWindow::slotFilePrint");
+       DEBUG->print("MDIWindow::slotFilePrint");
 
        //statusBar()->message(tr("Printing..."));
        QPrinter printer;
@@ -467,7 +467,7 @@ QG_GraphicView * MDIWindow::getGraphicView()
 }
 
 /** @return Pointer to document */
-RS_Document * MDIWindow::getDocument()
+Document * MDIWindow::getDocument()
 {
        return document;
 }
@@ -479,7 +479,7 @@ Drawing * MDIWindow::getGraphic()
 }
 
 /** @return Pointer to current event handler */
-RS_EventHandler * MDIWindow::getEventHandler()
+EventHandler * MDIWindow::getEventHandler()
 {
        if (graphicView)
                return graphicView->getEventHandler();
@@ -492,7 +492,7 @@ RS_EventHandler * MDIWindow::getEventHandler()
  */
 void MDIWindow::setParentWindow(MDIWindow * p)
 {
-       RS_DEBUG->print("setParentWindow");
+       DEBUG->print("setParentWindow");
        parentWindow = p;
 }
 
index 13afe6c7d0b365f1d5c2f88af28becf9cc3c211c..4b6943b82932f301e7fdf4b1b87d3f779819607e 100644 (file)
@@ -6,7 +6,7 @@
 #include "layerwidget.h"
 #include "pentoolbar.h"
 
-class RS_EventHandler;
+class EventHandler;
 class QG_GraphicView;
 
 /**
@@ -19,15 +19,15 @@ class MDIWindow: public QMdiSubWindow
        Q_OBJECT
 
        public:
-               MDIWindow(RS_Document * doc, QWidget * parent, const char * name = NULL,
+               MDIWindow(Document * doc, QWidget * parent, const char * name = NULL,
                        Qt::WindowFlags wflags = Qt::SubWindow);
                ~MDIWindow();
 
-               void initDoc(RS_Document * doc = NULL);
+               void initDoc(Document * doc = NULL);
                void initView();
 
        public slots:
-               void slotPenChanged(RS_Pen p);
+               void slotPenChanged(Pen p);
                void slotFileNew();
                bool slotFileOpen(const QString & fileName, RS2::FormatType type);
                bool slotFileSave(bool & cancelled);
@@ -37,9 +37,9 @@ class MDIWindow: public QMdiSubWindow
 
        public:
                QG_GraphicView * getGraphicView();
-               RS_Document * getDocument();
+               Document * getDocument();
                Drawing * getGraphic();
-               RS_EventHandler * getEventHandler();
+               EventHandler * getEventHandler();
                void addChildWindow(MDIWindow * w);
                void removeChildWindow(MDIWindow * w);
                MDIWindow * getPrintPreview();
@@ -65,7 +65,7 @@ class MDIWindow: public QMdiSubWindow
 //let's see if we can get rid of this...
                QG_GraphicView * graphicView;
                /** Document */
-               RS_Document * document;
+               Document * document;
                /** Does the window own the document? */
                bool owner;
                /**
index 6f8bdcf9e8fc4aa9cc0e05746f5db549ad51a8b4..a9fe3a6eb61dcd1febae03dd906900ee081785f2 100644 (file)
@@ -31,16 +31,16 @@ QC_DialogFactory::QC_DialogFactory(QWidget * parent, QToolBar * ow): QG_DialogFa
 /**
  * Provides a new window for editing the active block.
  */
-void QC_DialogFactory::requestEditBlockWindow(RS_BlockList * blockList)
+void QC_DialogFactory::requestEditBlockWindow(BlockList * blockList)
 {
-       RS_DEBUG->print("QC_DialogFactory::requestEditBlockWindow()");
+       DEBUG->print("QC_DialogFactory::requestEditBlockWindow()");
 
        ApplicationWindow * appWindow = ApplicationWindow::getAppWindow();
        MDIWindow * parent = appWindow->getMDIWindow();
 
        if (parent && blockList)
        {
-               RS_Block * block = blockList->getActive();
+               Block * block = blockList->getActive();
 
                if (block)
                {
@@ -55,31 +55,31 @@ void QC_DialogFactory::requestEditBlockWindow(RS_BlockList * blockList)
 /**
  * Closes all windows that are editing the given block.
  */
-void QC_DialogFactory::closeEditBlockWindow(RS_Block * block)
+void QC_DialogFactory::closeEditBlockWindow(Block * block)
 {
-       RS_DEBUG->print("QC_DialogFactory::closeEditBlockWindow");
+       DEBUG->print("QC_DialogFactory::closeEditBlockWindow");
 
        ApplicationWindow * appWindow = ApplicationWindow::getAppWindow();
        QMdiArea * workspace = appWindow->getWorkspace();
 
        if (workspace)
        {
-               RS_DEBUG->print("QC_DialogFactory::closeEditBlockWindow: workspace found");
+               DEBUG->print("QC_DialogFactory::closeEditBlockWindow: workspace found");
 
                QList<QMdiSubWindow *> windows = workspace->subWindowList();
 
                for(int i=0; i<windows.count(); i++)
                {
-                       RS_DEBUG->print("QC_DialogFactory::closeEditBlockWindow: window: %d", i);
+                       DEBUG->print("QC_DialogFactory::closeEditBlockWindow: window: %d", i);
                        MDIWindow * m = (MDIWindow *)windows.at(i);
 
                        if (m)
                        {
-                               RS_DEBUG->print("QC_DialogFactory::closeEditBlockWindow: got mdi");
+                               DEBUG->print("QC_DialogFactory::closeEditBlockWindow: got mdi");
 
                                if (m->getDocument() == block)
                                {
-                                       RS_DEBUG->print("QC_DialogFactory::closeEditBlockWindow: closing mdi");
+                                       DEBUG->print("QC_DialogFactory::closeEditBlockWindow: closing mdi");
                                        //m->closeMDI(true, false);
 //                                     m->close(true);
                                        m->close();
@@ -90,5 +90,5 @@ void QC_DialogFactory::closeEditBlockWindow(RS_Block * block)
 
        appWindow->slotWindowActivated(NULL);
 
-       RS_DEBUG->print("QC_DialogFactory::closeEditBlockWindow: OK");
+       DEBUG->print("QC_DialogFactory::closeEditBlockWindow: OK");
 }
index 50d8b3fe8871fb9f980ec16c5c9dd0f8549c41a4..8d7765a91d7f0799f12220e99886d21f36413adb 100644 (file)
@@ -15,8 +15,8 @@ class QC_DialogFactory: public QG_DialogFactory
                QC_DialogFactory(QWidget * parent, QToolBar * ow);
                virtual ~QC_DialogFactory();
 
-               virtual void requestEditBlockWindow(RS_BlockList * blockList = NULL);
-               virtual void closeEditBlockWindow(RS_Block * block = NULL);
+               virtual void requestEditBlockWindow(BlockList * blockList = NULL);
+               virtual void closeEditBlockWindow(Block * block = NULL);
 };
 
 #endif
index d26327ba746cb2a26190a6a787bbf0e423dd15dd..5765d9750dfdea22b0eed14bd78643e019ed6cdf 100644 (file)
  */
 ActionHandler::ActionHandler(QG_MainWindowInterface * mw)
 {
-       RS_DEBUG->print("ActionHandler::ActionHandler");
+       DEBUG->print("ActionHandler::ActionHandler");
        mainWindow = mw;
 
        snapFree = NULL;
@@ -157,7 +157,7 @@ ActionHandler::ActionHandler(QG_MainWindowInterface * mw)
        restrictVertical = NULL;
 
        lockRelativeZero = NULL;
-       RS_DEBUG->print("ActionHandler::ActionHandler: OK");
+       DEBUG->print("ActionHandler::ActionHandler: OK");
 }
 
 /**
@@ -165,8 +165,8 @@ ActionHandler::ActionHandler(QG_MainWindowInterface * mw)
  */
 ActionHandler::~ActionHandler()
 {
-       RS_DEBUG->print("ActionHandler::~ActionHandler");
-       RS_DEBUG->print("ActionHandler::~ActionHandler: OK");
+       DEBUG->print("ActionHandler::~ActionHandler");
+       DEBUG->print("ActionHandler::~ActionHandler: OK");
 }
 
 /**
@@ -199,7 +199,7 @@ Instead of the following giant switch statement, you could something like the fo
 ActionInterface * ActionHandler::setCurrentAction(ActionInterface * action)
 {
        GraphicView * gv = mainWindow->getGraphicView();
-       RS_Document * doc = mainWindow->getDocument();
+       Document * doc = mainWindow->getDocument();
 
        // only global options are allowed without a document:
        if (gv == NULL || doc == NULL)
@@ -232,16 +232,16 @@ Well... The problem is the action, they're all different...
  */
 ActionInterface * ActionHandler::setCurrentAction(RS2::ActionType id)
 {
-       RS_DEBUG->print("ActionHandler::setCurrentAction()");
+       DEBUG->print("ActionHandler::setCurrentAction()");
 
        GraphicView * gv = mainWindow->getGraphicView();
-       RS_Document * doc = mainWindow->getDocument();
+       Document * doc = mainWindow->getDocument();
        ActionInterface * a = NULL;
 
        // only global options are allowed without a document:
        if (gv == NULL || doc == NULL)
        {
-               RS_DEBUG->print(RS_Debug::D_WARNING,
+               DEBUG->print(Debug::D_WARNING,
                        "ActionHandler::setCurrentAction: graphic view or document is NULL");
                return NULL;
        }
@@ -775,7 +775,7 @@ ActionInterface * ActionHandler::setCurrentAction(RS2::ActionType id)
 #endif
 
        default:
-               RS_DEBUG->print(RS_Debug::D_WARNING,
+               DEBUG->print(Debug::D_WARNING,
                        "ActionHandler::setCurrentAction(): No such action found.");
                break;
        }
@@ -783,7 +783,7 @@ ActionInterface * ActionHandler::setCurrentAction(RS2::ActionType id)
        if (a)
                gv->setCurrentAction(a);
 
-       RS_DEBUG->print("ActionHandler::setCurrentAction(): OK");
+       DEBUG->print("ActionHandler::setCurrentAction(): OK");
 
        return a;
 }
@@ -829,7 +829,7 @@ bool ActionHandler::keycode(const QString & code)
        //   it might be intended to launch a new keycode
        //if (!e.isAccepted()) {
        // keycode for new action:
-       RS2::ActionType type = RS_COMMANDS->keycodeToAction(code);
+       RS2::ActionType type = COMMANDS->keycodeToAction(code);
        if (type != RS2::ActionNone)
        {
                // some actions require special handling (GUI update):
@@ -896,7 +896,7 @@ bool ActionHandler::keycode(const QString & code)
  */
 bool ActionHandler::command(const QString & cmd)
 {
-       RS_DEBUG->print("ActionHandler::command: %s", cmd.toLatin1().data());
+       DEBUG->print("ActionHandler::command: %s", cmd.toLatin1().data());
        QString c = cmd.toLower();
 
        if (c == "\n")
@@ -906,18 +906,18 @@ bool ActionHandler::command(const QString & cmd)
                if (gv)
                        gv->back();
 
-               RS_DEBUG->print("ActionHandler::command: back");
+               DEBUG->print("ActionHandler::command: back");
                return true;
        }
 
        // pass command on to running action:
-       RS_CommandEvent e(cmd);
+       CommandEvent e(cmd);
 
        GraphicView * gv = mainWindow->getGraphicView();
 
        if (gv)
        {
-               RS_DEBUG->print("ActionHandler::command: trigger command event in graphic view");
+               DEBUG->print("ActionHandler::command: trigger command event in graphic view");
                gv->commandEvent(&e);
        }
 
@@ -925,20 +925,20 @@ bool ActionHandler::command(const QString & cmd)
        //   it might be intended to launch a new command
        if (!e.isAccepted())
        {
-               RS_DEBUG->print("ActionHandler::command: convert cmd to action type");
+               DEBUG->print("ActionHandler::command: convert cmd to action type");
                // command for new action:
-               RS2::ActionType type = RS_COMMANDS->cmdToAction(cmd);
+               RS2::ActionType type = COMMANDS->cmdToAction(cmd);
 
                if (type != RS2::ActionNone)
                {
-                       RS_DEBUG->print("ActionHandler::command: setting current action");
+                       DEBUG->print("ActionHandler::command: setting current action");
                        setCurrentAction(type);
-                       RS_DEBUG->print("ActionHandler::command: current action set");
+                       DEBUG->print("ActionHandler::command: current action set");
                        return true;
                }
        }
 
-       RS_DEBUG->print("ActionHandler::command: current action not set");
+       DEBUG->print("ActionHandler::command: current action not set");
        return false;
 }
 
index 1d9ce52651f979adcd4c46271ac0de379be08035..e70ecae521ff28b32713de11fe5813ec030a444a 100644 (file)
@@ -2,7 +2,7 @@
 #define __ACTIONHANDLER_H__
 
 #include <QtGui>
-#include "rs.h"
+#include "enums.h"
 
 class QG_MainWindowInterface;
 class CadToolBarSnap;
index 34e0542f5ad3cb3d1315844c8071946c9bb2cff4..a6b2e47df5c4247c9b223fdd6a897c5ffdf875d4 100644 (file)
@@ -155,13 +155,13 @@ BlockWidget::~BlockWidget()
        delete listBox;
 }
 
-void BlockWidget::setBlockList(RS_BlockList * blockList)
+void BlockWidget::setBlockList(BlockList * blockList)
 {
        this->blockList = blockList;
        update();
 }
 
-RS_BlockList * BlockWidget::getBlockList()
+BlockList * BlockWidget::getBlockList()
 {
        return blockList;
 }
@@ -171,12 +171,12 @@ RS_BlockList * BlockWidget::getBlockList()
  */
 void BlockWidget::update()
 {
-       RS_DEBUG->print("BlockWidget::update()");
+       DEBUG->print("BlockWidget::update()");
 
 #warning "!!!"
 //     int yPos = listBox->contentsY();
 
-       RS_Block * activeBlock = NULL;
+       Block * activeBlock = NULL;
 
        if (blockList)
                activeBlock = blockList->getActive();
@@ -185,13 +185,13 @@ void BlockWidget::update()
 
        if (!blockList)
        {
-               RS_DEBUG->print("BlockWidget::update(): blockList is NULL");
+               DEBUG->print("BlockWidget::update(): blockList is NULL");
                return;
        }
 
        for(uint i=0; i<blockList->count(); ++i)
        {
-               RS_Block * blk = blockList->at(i);
+               Block * blk = blockList->at(i);
 
                if (!blk->isFrozen())
 //                     listBox->insertItem(pxmVisible, blk->getName());
@@ -204,7 +204,7 @@ void BlockWidget::update()
 //     listBox->sort();
        listBox->sortItems(Qt::AscendingOrder);
 
-       RS_Block * b = lastBlock;
+       Block * b = lastBlock;
        highlightBlock(activeBlock);
        lastBlock = b;
 #warning "!!!"
@@ -212,16 +212,16 @@ void BlockWidget::update()
 
        //highlightBlock(blockList->getActiveBlock());
        //listBox->setContentsPos(0, yPos);
-       RS_DEBUG->print("BlockWidget::update() done");
+       DEBUG->print("BlockWidget::update() done");
 }
 
 /**
  * Highlights (activates) the given block and makes it
  * the active block in the blocklist.
  */
-void BlockWidget::highlightBlock(RS_Block * block)
+void BlockWidget::highlightBlock(Block * block)
 {
-       RS_DEBUG->print("BlockWidget::highlightBlock()");
+       DEBUG->print("BlockWidget::highlightBlock()");
 
        if (!block || !listBox)
                return;
@@ -241,22 +241,22 @@ void BlockWidget::highlightBlock(RS_Block * block)
        }
 }
 
-/*virtual*/ void BlockWidget::blockAdded(RS_Block *)
+/*virtual*/ void BlockWidget::blockAdded(Block *)
 {
        update();
 }
 
-/*virtual*/ void BlockWidget::blockEdited(RS_Block *)
+/*virtual*/ void BlockWidget::blockEdited(Block *)
 {
        update();
 }
 
-/*virtual*/ void BlockWidget::blockRemoved(RS_Block *)
+/*virtual*/ void BlockWidget::blockRemoved(Block *)
 {
        update();
 }
 
-/*virtual*/ void BlockWidget::blockToggled(RS_Block *)
+/*virtual*/ void BlockWidget::blockToggled(Block *)
 {
        update();
 }
@@ -267,14 +267,14 @@ void BlockWidget::highlightBlock(RS_Block * block)
  */
 /*
 void BlockWidget::slotToggleView(QListBoxItem* item) {
-    RS_DEBUG->print("BlockWidget::slotToggleView()");
+    DEBUG->print("BlockWidget::slotToggleView()");
 
     if (item==NULL || blockList==NULL) {
         return;
     }
 
     int index = listBox->index(item);
-    RS_Block* block = blockList->find(item->text());
+    Block* block = blockList->find(item->text());
 
     if (block!=NULL) {
         blockList->toggleBlock(item->text());
@@ -295,7 +295,7 @@ void BlockWidget::slotToggleView(QListBoxItem* item) {
 void BlockWidget::slotActivated(void)
 {
        QString blockName = listBox->currentItem()->text();
-       RS_DEBUG->print("BlockWidget::slotActivated(): %s", blockName.toLatin1().data());
+       DEBUG->print("BlockWidget::slotActivated(): %s", blockName.toLatin1().data());
 
        if (!blockList)
                return;
@@ -311,7 +311,7 @@ void BlockWidget::slotActivated(void)
 void BlockWidget::slotMouseButtonClicked(QListWidgetItem * item)
 {
        QPoint p = mapFromGlobal(QCursor::pos());
-       RS_Block * b = lastBlock;
+       Block * b = lastBlock;
 
 //This is crap. We need to fix this so it's not so shitty.
        if (p.x() < 23)
index 804d4eeac391b519a7bf4cbbee0228082cfff98f..e358fad6f6502ddfc92262fdb35944746abf24d8 100644 (file)
@@ -3,8 +3,8 @@
 
 #include <QtGui>
 
-class RS_Block;
-class RS_BlockList;
+class Block;
+class BlockList;
 class ActionHandler;
 
 /**
@@ -20,15 +20,15 @@ class BlockWidget: public QWidget
                        const char * name = 0, Qt::WFlags f = 0);
                ~BlockWidget();
 
-               void setBlockList(RS_BlockList * blockList);
-               RS_BlockList * getBlockList();
+               void setBlockList(BlockList * blockList);
+               BlockList * getBlockList();
                void update();
-               void highlightBlock(RS_Block * block);
+               void highlightBlock(Block * block);
 
-               virtual void blockAdded(RS_Block *);
-               virtual void blockEdited(RS_Block *);
-               virtual void blockRemoved(RS_Block *);
-               virtual void blockToggled(RS_Block *);
+               virtual void blockAdded(Block *);
+               virtual void blockEdited(Block *);
+               virtual void blockRemoved(Block *);
+               virtual void blockToggled(Block *);
 
        signals:
                void escape();
@@ -45,10 +45,10 @@ class BlockWidget: public QWidget
                virtual void keyPressEvent(QKeyEvent * e);
 
        private:
-               RS_BlockList * blockList;
+               BlockList * blockList;
 //             Q3ListBox * listBox;
                QListWidget * listBox;
-               RS_Block * lastBlock;
+               Block * lastBlock;
                QPixmap pxmVisible;
                QPixmap pxmHidden;
                QPixmap pxmAdd;
index 6be82573e72367521f86b4b4d0619e262c6b0e24..f1377b83c31d7f1c247ee41a96617e325e7f3f0b 100644 (file)
@@ -16,7 +16,7 @@
 
 #include "colorbox.h"
 
-#include "rs.h"
+#include "enums.h"
 
 /**
  * Default Constructor. You must call init manually if you choose
@@ -50,7 +50,7 @@ ColorBox::~ColorBox()
 {
 }
 
-RS_Color ColorBox::getColor()
+Color ColorBox::getColor()
 {
        return currentColor;
 }
@@ -119,13 +119,13 @@ bool ColorBox::isUnchanged()
 /**
  * Sets the color shown in the combobox to the given color.
  */
-void ColorBox::setColor(const RS_Color & color)
+void ColorBox::setColor(const Color & color)
 {
 //#warning "!!! Color is being misreported here !!!"
 /*
-And fuck. Probably because the operator== in RS_Color doesn't know how to
+And fuck. Probably because the operator== in Color doesn't know how to
 convert between Qt:: style colors and RGB. Either way, have to fix this shit
-Look at Red: Have to convert them all to RS_Color...
+Look at Red: Have to convert them all to Color...
 */
        currentColor = color;
 
@@ -133,24 +133,24 @@ Look at Red: Have to convert them all to RS_Color...
                setCurrentIndex(0);
        else if (color.isByBlock() && showByLayer)
                setCurrentIndex(1);
-       else if (color == RS_Color(255, 0, 0))          //Qt::red)
+       else if (color == Color(255, 0, 0))             //Qt::red)
                setCurrentIndex(0 + (int)showByLayer * 2 + (int)showUnchanged);
-       else if (color == RS_Color(255, 255, 0))        //Qt::yellow)
+       else if (color == Color(255, 255, 0))   //Qt::yellow)
                setCurrentIndex(1 + (int)showByLayer * 2 + (int)showUnchanged);
-       else if (color == RS_Color(0, 255, 0))          //Qt::green)
+       else if (color == Color(0, 255, 0))             //Qt::green)
                setCurrentIndex(2 + (int)showByLayer * 2 + (int)showUnchanged);
-       else if (color == RS_Color(0, 255, 255))        //Qt::cyan)
+       else if (color == Color(0, 255, 255))   //Qt::cyan)
                setCurrentIndex(3 + (int)showByLayer * 2 + (int)showUnchanged);
-       else if (color == RS_Color(0, 0, 255))          //Qt::blue)
+       else if (color == Color(0, 0, 255))             //Qt::blue)
                setCurrentIndex(4 + (int)showByLayer * 2 + (int)showUnchanged);
-       else if (color == RS_Color(255, 0, 255))        //Qt::magenta)
+       else if (color == Color(255, 0, 255))   //Qt::magenta)
                setCurrentIndex(5 + (int)showByLayer * 2 + (int)showUnchanged);
 //     else if (color == Qt::white || color == Qt::black)
-       else if (color == RS_Color(255, 255, 255) || color == RS_Color(0, 0, 0))
+       else if (color == Color(255, 255, 255) || color == Color(0, 0, 0))
                setCurrentIndex(6 + (int)showByLayer * 2 + (int)showUnchanged);
-       else if (color == RS_Color(127, 127, 127))      //Qt::gray)
+       else if (color == Color(127, 127, 127)) //Qt::gray)
                setCurrentIndex(7 + (int)showByLayer * 2 + (int)showUnchanged);
-       else if (color == RS_Color(191, 191, 191))
+       else if (color == Color(191, 191, 191))
                setCurrentIndex(8 + (int)showByLayer * 2 + (int)showUnchanged);
        else
                setCurrentIndex(9 + (int)showByLayer * 2 + (int)showUnchanged);
@@ -163,7 +163,7 @@ Look at Red: Have to convert them all to RS_Color...
  * Sets the color of the pixmap next to the "By Layer" item
  * to the given color.
  */
-void ColorBox::setLayerColor(const RS_Color & color)
+void ColorBox::setLayerColor(const Color & color)
 {
        if (showByLayer)
        {
@@ -217,10 +217,10 @@ void ColorBox::slotColorChanged(int index)
                switch (index - (int)showUnchanged)
                {
                case 0:
-                       currentColor = RS_Color(RS2::FlagByLayer);
+                       currentColor = Color(RS2::FlagByLayer);
                        break;
                case 1:
-                       currentColor = RS_Color(RS2::FlagByBlock);
+                       currentColor = Color(RS2::FlagByBlock);
                        break;
                default:
                        break;
index 1db675fccc1469c398929fa7aafff3614d0adfde..7ca67373f64103aa4676e1d55bbf050c1c1c53da 100644 (file)
@@ -17,9 +17,9 @@ class ColorBox: public QComboBox
                        QWidget * parent = 0, const char * name = 0);
                virtual ~ColorBox();
 
-               RS_Color getColor();
-               void setColor(const RS_Color & color);
-               void setLayerColor(const RS_Color & color);
+               Color getColor();
+               void setColor(const Color & color);
+               void setLayerColor(const Color & color);
                void init(bool showByLayer, bool showUnchanged);
                bool isUnchanged();
 
@@ -27,10 +27,10 @@ class ColorBox: public QComboBox
                void slotColorChanged(int index);
 
        signals:
-               void colorChanged(const RS_Color & color);
+               void colorChanged(const Color & color);
 
        private:
-               RS_Color currentColor;
+               Color currentColor;
                bool showByLayer;
                bool showUnchanged;
                bool unchanged;
index 6af5269c77ae08661ff71536b865d66da21fb0ae..78c8a2452de41d22513bee7977dcd8478cba3dd9 100644 (file)
@@ -35,7 +35,7 @@ QString FileDialog::getSaveFileName(QWidget * parent, RS2::FormatType * type)
 {
        // read default settings:
        settings.beginGroup("Paths");
-       QString defDir = settings.value("/Save", RS_SYSTEM->getHomeDir()).toString();
+       QString defDir = settings.value("/Save", SYSTEM->getHomeDir()).toString();
        QString defFilter = settings.value("/SaveFilter", "Drawing Exchange DXF 2000 (*.dxf)").toString();
        //QString defFilter = "Drawing Exchange (*.dxf)";
        settings.endGroup();
@@ -155,26 +155,26 @@ QString FileDialog::getSaveFileName(QWidget * parent, RS2::FormatType * type)
  */
 QString FileDialog::getOpenFileName(QWidget * parent, RS2::FormatType * type)
 {
-       RS_DEBUG->print("FileDialog::getOpenFileName");
+       DEBUG->print("FileDialog::getOpenFileName");
 
        // read default settings:
        settings.beginGroup("/Paths");
-       QString defDir = settings.value("/Open", RS_SYSTEM->getHomeDir()).toString();
+       QString defDir = settings.value("/Open", SYSTEM->getHomeDir()).toString();
        //QString defFilter = RS_SETTINGS->readEntry("/OpenFilter",
        //                      "Drawing Exchange (*.dxf *.DXF)");
        QString defFilter = "Drawing Exchange (*.dxf *.DXF)";
        settings.endGroup();
 
-       RS_DEBUG->print("defDir: %s", defDir.toLatin1().data());
-       RS_DEBUG->print("defFilter: %s", defFilter.toLatin1().data());
+       DEBUG->print("defDir: %s", defDir.toLatin1().data());
+       DEBUG->print("defFilter: %s", defFilter.toLatin1().data());
 
        QString fDxf(QObject::tr("Drawing Exchange %1").arg("(*.dxf *.DXF)"));
        QString fDxf1(QObject::tr("QCad 1.x file %1").arg("(*.dxf *.DXF)"));
        QString fCxf(QObject::tr("Font %1").arg("(*.cxf)"));
 
-       RS_DEBUG->print("fDxf: %s", fDxf.toLatin1().data());
-       RS_DEBUG->print("fDxf1: %s", fDxf1.toLatin1().data());
-       RS_DEBUG->print("fCxf: %s", fCxf.toLatin1().data());
+       DEBUG->print("fDxf: %s", fDxf.toLatin1().data());
+       DEBUG->print("fDxf1: %s", fDxf1.toLatin1().data());
+       DEBUG->print("fCxf: %s", fCxf.toLatin1().data());
 
        QString fn = "";
        bool cancel = false;
@@ -251,8 +251,8 @@ QString FileDialog::getOpenFileName(QWidget * parent, RS2::FormatType * type)
                settings.endGroup();
        }
 
-       RS_DEBUG->print("FileDialog::getOpenFileName: fileName: %s", fn.toLatin1().data());
-       RS_DEBUG->print("FileDialog::getOpenFileName: OK");
+       DEBUG->print("FileDialog::getOpenFileName: fileName: %s", fn.toLatin1().data());
+       DEBUG->print("FileDialog::getOpenFileName: OK");
 
        delete prev;
        delete gr;
index 6414f89366ca884b3e51c5f1816bd7755d421a9e..88e6c21de0af710cdfd49b45896e9d28e0598868 100644 (file)
@@ -2,7 +2,7 @@
 #define __FILEDIALOG_H__
 
 #include <QtGui>
-#include "rs.h"
+#include "enums.h"
 
 /**
  * File Open / Save dialogs.
index b12812b406ef2588a5d06cc0fcb9ec043a310850..1e987cb8a5069230c474137585a3644f7b187276 100644 (file)
@@ -43,7 +43,7 @@ void FontBox::init()
 {
        QStringList fonts;
 
-       for(RS_Font * f=RS_FONTLIST->firstFont(); f!=NULL; f=RS_FONTLIST->nextFont())
+       for(Font * f=FONTLIST->firstFont(); f!=NULL; f=FONTLIST->nextFont())
                fonts.append(f->getFileName());
 
        fonts.sort();
@@ -58,7 +58,7 @@ void FontBox::init()
        slotFontChanged(currentIndex());
 }
 
-RS_Font * FontBox::getFont()
+Font * FontBox::getFont()
 {
        return currentFont;
 }
@@ -68,7 +68,7 @@ RS_Font * FontBox::getFont()
  */
 void FontBox::setFont(const QString & fName)
 {
-       RS_DEBUG->print("FontBox::setFont %s\n", fName.toLatin1().data());
+       DEBUG->print("FontBox::setFont %s\n", fName.toLatin1().data());
 //     setCurrentText(fName);
        setItemText(currentIndex(), fName);
 //     slotFontChanged(currentItem());
@@ -81,11 +81,11 @@ void FontBox::setFont(const QString & fName)
  */
 void FontBox::slotFontChanged(int index)
 {
-    RS_DEBUG->print("FontBox::slotFontChanged %d\n", index);
-    currentFont = RS_FONTLIST->requestFont(currentText());
+    DEBUG->print("FontBox::slotFontChanged %d\n", index);
+    currentFont = FONTLIST->requestFont(currentText());
 
     if (currentFont != NULL)
-        RS_DEBUG->print("Current font is (%d): %s\n", index, currentFont->getFileName().toLatin1().data());
+        DEBUG->print("Current font is (%d): %s\n", index, currentFont->getFileName().toLatin1().data());
 
     emit fontChanged(currentFont);
 }
index ef39fe513baf5eaac3a08e5759cb58e2955c510d..0de568f0d0e9cee1d9f85aac74163a1a704a9282 100644 (file)
@@ -3,7 +3,7 @@
 
 #include <QtGui>
 
-class RS_Font;
+class Font;
 
 /**
  * A combobox for choosing a font name.
@@ -17,17 +17,17 @@ class FontBox: public QComboBox
                virtual ~FontBox();
 
                void init();
-               RS_Font * getFont();
+               Font * getFont();
                void setFont(const QString & fName);
 
        private slots:
                void slotFontChanged(int index);
 
        signals:
-               void fontChanged(RS_Font * font);
+               void fontChanged(Font * font);
 
        private:
-               RS_Font * currentFont;
+               Font * currentFont;
 };
 
 #endif // __FONTBOX_H__
index 8024476fbf27765806d0be33f453a0b73bb834ea..b6e865aac175620e900dd81ab66687f444be3604 100644 (file)
@@ -39,7 +39,7 @@ LayerBox::~LayerBox()
 {
 }
 
-RS_Layer * LayerBox::getLayer()
+Layer * LayerBox::getLayer()
 {
        return currentLayer;
 }
@@ -51,7 +51,7 @@ RS_Layer * LayerBox::getLayer()
  *                  available.
  * @param showByBlock true: Show attribute ByBlock.
  */
-void LayerBox::init(RS_LayerList & layerList, bool showByBlock, bool showUnchanged)
+void LayerBox::init(LayerList & layerList, bool showByBlock, bool showUnchanged)
 {
        this->showByBlock = showByBlock;
        this->showUnchanged = showUnchanged;
@@ -63,7 +63,7 @@ void LayerBox::init(RS_LayerList & layerList, bool showByBlock, bool showUnchang
 
        for(uint i=0; i<layerList.count(); ++i)
        {
-               RS_Layer * lay = layerList.at(i);
+               Layer * lay = layerList.at(i);
 
                if (lay != NULL && (lay->getName() != "ByBlock" || showByBlock))
 //                     insertItem(lay->getName());
@@ -78,7 +78,7 @@ void LayerBox::init(RS_LayerList & layerList, bool showByBlock, bool showUnchang
 /**
  * Sets the layer shown in the combobox to the given layer.
  */
-void LayerBox::setLayer(RS_Layer & layer)
+void LayerBox::setLayer(Layer & layer)
 {
        currentLayer = &layer;
 
index 678e142bbe65a699298b55993065374720c9ac7d..2728c4124ba8448e456532ca0036d8e7b2fe3ec7 100644 (file)
@@ -3,8 +3,8 @@
 
 #include <QtGui>
 
-class RS_Layer;
-class RS_LayerList;
+class Layer;
+class LayerList;
 
 /**
  * A combobox for choosing a layer.
@@ -17,21 +17,21 @@ class LayerBox: public QComboBox
                LayerBox(QWidget * parent = 0, const char * name = 0);
                virtual ~LayerBox();
 
-               RS_Layer * getLayer();
-               void setLayer(RS_Layer & layer);
+               Layer * getLayer();
+               void setLayer(Layer & layer);
                void setLayer(QString & layer);
-               void init(RS_LayerList & layerList, bool showByBlock, bool showUnchanged);
+               void init(LayerList & layerList, bool showByBlock, bool showUnchanged);
                bool isUnchanged();
 
        private slots:
                void slotLayerChanged(int index);
 
        signals:
-               void layerChanged(RS_Layer * layer);
+               void layerChanged(Layer * layer);
 
        private:
-               RS_LayerList * layerList;
-               RS_Layer * currentLayer;
+               LayerList * layerList;
+               Layer * currentLayer;
                bool showByBlock;
                bool showUnchanged;
                bool unchanged;
index 0a5c4d55691ccbc07d73182b0e094e0bd2d83835..5dfe475591f5a6eb00e03e803144fb58b334bd77 100644 (file)
@@ -137,7 +137,7 @@ LayerWidget::~LayerWidget()
  *                    it exists.
  *                    false: don't show special layer "ByBlock"
  */
-void LayerWidget::setLayerList(RS_LayerList * layerList, bool showByBlock)
+void LayerWidget::setLayerList(LayerList * layerList, bool showByBlock)
 {
        this->layerList = layerList;
        this->showByBlock = showByBlock;
@@ -149,30 +149,30 @@ void LayerWidget::setLayerList(RS_LayerList * layerList, bool showByBlock)
  */
 void LayerWidget::update()
 {
-       RS_DEBUG->print("LayerWidget::update() begin");
+       DEBUG->print("LayerWidget::update() begin");
 
 #warning "!!!"
 //     int yPos = listBox->contentsY();
 
-       RS_Layer * activeLayer = NULL;
+       Layer * activeLayer = NULL;
 
        if (layerList)
                activeLayer = layerList->getActive();
 
-       RS_DEBUG->print("LayerWidget::update() clearing listBox");
+       DEBUG->print("LayerWidget::update() clearing listBox");
        listBox->clear();
 
        if (!layerList)
        {
-               RS_DEBUG->print("LayerWidget::update() abort");
+               DEBUG->print("LayerWidget::update() abort");
                return;
        }
 
-       RS_DEBUG->print("LayerWidget::update() filling in layers");
+       DEBUG->print("LayerWidget::update() filling in layers");
 
        for(uint i=0; i<layerList->count(); ++i)
        {
-               RS_Layer * layer = layerList->at(i);
+               Layer * layer = layerList->at(i);
 
                // hide layer "ByBlock"?
                if (showByBlock || layer->getName() != "ByBlock")
@@ -189,36 +189,36 @@ void LayerWidget::update()
                }
        }
 
-       RS_DEBUG->print("LayerWidget::update() sorting");
+       DEBUG->print("LayerWidget::update() sorting");
 //     listBox->sort();
        listBox->sortItems(Qt::AscendingOrder);
-       RS_DEBUG->print("LayerWidget::update() reactivating current layer");
+       DEBUG->print("LayerWidget::update() reactivating current layer");
 
-       RS_Layer * l = lastLayer;
+       Layer * l = lastLayer;
        highlightLayer(activeLayer);
        lastLayer = l;
 #warning "!!!"
 //     listBox->setContentsPos(0, yPos);
-       RS_DEBUG->print("LayerWidget::update() end");
+       DEBUG->print("LayerWidget::update() end");
 }
 
 /**
  * Highlights (activates) the given layer and makes it
  * the active layer in the layerlist.
  */
-void LayerWidget::highlightLayer(RS_Layer * layer)
+void LayerWidget::highlightLayer(Layer * layer)
 {
-       RS_DEBUG->print("LayerWidget::highlightLayer() begin");
+       DEBUG->print("LayerWidget::highlightLayer() begin");
 
        if (!layer || !layerList)
        {
-               RS_DEBUG->print("LayerWidget::highlightLayer() abort");
+               DEBUG->print("LayerWidget::highlightLayer() abort");
                return;
        }
 
        QString name = layer->getName();
        highlightLayer(name);
-       RS_DEBUG->print("LayerWidget::highlightLayer() end");
+       DEBUG->print("LayerWidget::highlightLayer() end");
 }
 
 /**
@@ -227,11 +227,11 @@ void LayerWidget::highlightLayer(RS_Layer * layer)
  */
 void LayerWidget::highlightLayer(const QString & name)
 {
-       RS_DEBUG->print("LayerWidget::highlightLayer(name) begin");
+       DEBUG->print("LayerWidget::highlightLayer(name) begin");
 
        if (!layerList)
        {
-               RS_DEBUG->print("LayerWidget::highlightLayer(name) abort");
+               DEBUG->print("LayerWidget::highlightLayer(name) abort");
                return;
        }
 
@@ -249,32 +249,32 @@ void LayerWidget::highlightLayer(const QString & name)
                }
        }
 
-       RS_DEBUG->print("LayerWidget::highlightLayer(name) end");
+       DEBUG->print("LayerWidget::highlightLayer(name) end");
 }
 
-void LayerWidget::layerActivated(RS_Layer * layer)
+void LayerWidget::layerActivated(Layer * layer)
 {
        highlightLayer(layer);
 }
 
-void LayerWidget::layerAdded(RS_Layer * layer)
+void LayerWidget::layerAdded(Layer * layer)
 {
        update();
        highlightLayer(layer);
 }
 
-void LayerWidget::layerEdited(RS_Layer *)
+void LayerWidget::layerEdited(Layer *)
 {
        update();
 }
 
-void LayerWidget::layerRemoved(RS_Layer *)
+void LayerWidget::layerRemoved(Layer *)
 {
        update();
        highlightLayer(layerList->at(0));
 }
 
-void LayerWidget::layerToggled(RS_Layer *)
+void LayerWidget::layerToggled(Layer *)
 {
        update();
 }
@@ -286,7 +286,7 @@ void LayerWidget::layerToggled(RS_Layer *)
 void LayerWidget::slotActivated(void)
 {
        QString layerName = listBox->currentItem()->text();
-       RS_DEBUG->print("LayerWidget::slotActivated(): %s", layerName.toLatin1().data());
+       DEBUG->print("LayerWidget::slotActivated(): %s", layerName.toLatin1().data());
 
        if (!layerList)
                return;
@@ -301,10 +301,10 @@ void LayerWidget::slotActivated(void)
 //void LayerWidget::slotMouseButtonClicked(int /*button*/, Q3ListBoxItem * item, const QPoint & pos)
 void LayerWidget::slotMouseButtonClicked(QListWidgetItem * item)
 {
-       RS_DEBUG->print("LayerWidget::slotMouseButtonClicked()");
+       DEBUG->print("LayerWidget::slotMouseButtonClicked()");
        QPoint p = mapFromGlobal(QCursor::pos());
        // only change state / no activation
-       RS_Layer * l = lastLayer;
+       Layer * l = lastLayer;
 
 #warning "!!! Bad implementation of lock/freeze functionality !!!"
 //This is crap.
index c9b595d1102fe75e52784d3fda9f59378b8cda80..d5e77c72a48b368d53af3f6c922d21238e83edee 100644 (file)
@@ -4,8 +4,8 @@
 #include <QtGui>
 
 class ActionHandler;
-class RS_Layer;
-class RS_LayerList;
+class Layer;
+class LayerList;
 
 /**
  * This is the Qt implementation of a widget which can view a
@@ -20,16 +20,16 @@ class LayerWidget: public QWidget
                        const char * name = 0, Qt::WindowFlags f = 0);
                ~LayerWidget();
 
-               void setLayerList(RS_LayerList *, bool showByBlock);
+               void setLayerList(LayerList *, bool showByBlock);
                void update();
-               void highlightLayer(RS_Layer *);
+               void highlightLayer(Layer *);
                void highlightLayer(const QString &);
 
-               void layerActivated(RS_Layer *);
-               void layerAdded(RS_Layer *);
-               void layerEdited(RS_Layer *);
-               void layerRemoved(RS_Layer *);
-               void layerToggled(RS_Layer *);
+               void layerActivated(Layer *);
+               void layerAdded(Layer *);
+               void layerEdited(Layer *);
+               void layerRemoved(Layer *);
+               void layerToggled(Layer *);
 
        signals:
                void escape();
@@ -44,11 +44,11 @@ class LayerWidget: public QWidget
                virtual void keyPressEvent(QKeyEvent *);
 
        private:
-               RS_LayerList * layerList;
+               LayerList * layerList;
                bool showByBlock;
 //             Q3ListBox * listBox;
                QListWidget * listBox;
-               RS_Layer * lastLayer;
+               Layer * lastLayer;
                QPixmap pxmLayerStatus00;
                QPixmap pxmLayerStatus01;
                QPixmap pxmLayerStatus10;
index 52a92b65d0f06065cfcfa565f63fda68d407395a..4b0075c005863a5415d7bb041733a33c79ec483a 100644 (file)
@@ -129,7 +129,7 @@ RS2::LineType LineTypeBox::getLineType()
  */
 void LineTypeBox::setLineType(RS2::LineType t)
 {
-       RS_DEBUG->print("LineTypeBox::setLineType %d\n", (int)t);
+       DEBUG->print("LineTypeBox::setLineType %d\n", (int)t);
 
        int offset = (int)showByLayer * 2 + (int)showUnchanged;
 
@@ -139,14 +139,14 @@ void LineTypeBox::setLineType(RS2::LineType t)
                if (showByLayer)
                        setCurrentIndex(0 + (int)showUnchanged);
                else
-                       RS_DEBUG->print(RS_Debug::D_WARNING, "LineTypeBox::setLineType: "
+                       DEBUG->print(Debug::D_WARNING, "LineTypeBox::setLineType: "
                                "Combobox doesn't support linetype BYLAYER");
                break;
        case RS2::LineByBlock:
                if (showByLayer)
                        setCurrentIndex(1 + (int)showUnchanged);
                else
-                       RS_DEBUG->print(RS_Debug::D_WARNING, "LineTypeBox::setLineType: "
+                       DEBUG->print(Debug::D_WARNING, "LineTypeBox::setLineType: "
                                "Combobox doesn't support linetype BYBLOCK");
                break;
 
@@ -282,7 +282,7 @@ bool LineTypeBox::isUnchanged()
  */
 void LineTypeBox::slotLineTypeChanged(int index)
 {
-       RS_DEBUG->print("LineTypeBox::slotLineTypeChanged %d\n", index);
+       DEBUG->print("LineTypeBox::slotLineTypeChanged %d\n", index);
 
        unchanged = false;
 
@@ -312,7 +312,7 @@ void LineTypeBox::slotLineTypeChanged(int index)
        else
                currentLineType = (RS2::LineType)(index - (int)showByLayer * 2 - (int)showUnchanged);
 
-       RS_DEBUG->print("Current linetype is (%d): %d\n", index, currentLineType);
+       DEBUG->print("Current linetype is (%d): %d\n", index, currentLineType);
 
        emit lineTypeChanged(currentLineType);
 }
index a56910bf2ae4ff0722c91ca98c1f83c5db4d4ca2..ffc2c4d7f540c7007ed8880ad078da268564074f 100644 (file)
@@ -2,7 +2,7 @@
 #define __LINETYPEBOX_H__
 
 #include <QtGui>
-#include "rs.h"
+#include "enums.h"
 
 /**
  * A combobox for choosing a line type.
index fb92c4c4923360d04816f22e8ea52f1c05e534b1..a66fd169d3b222e56b4ab50803c6ed1978f7f878 100644 (file)
@@ -42,7 +42,7 @@ void PatternBox::init()
 {
        QStringList patterns;
 
-       for(RS_Pattern * f=RS_PATTERNLIST->firstPattern(); f!=NULL; f=RS_PATTERNLIST->nextPattern())
+       for(Pattern * f=PATTERNLIST->firstPattern(); f!=NULL; f=PATTERNLIST->nextPattern())
                patterns.append(f->getFileName());
 
        patterns.sort();
@@ -55,7 +55,7 @@ void PatternBox::init()
        slotPatternChanged(currentIndex());
 }
 
-RS_Pattern * PatternBox::getPattern()
+Pattern * PatternBox::getPattern()
 {
        return currentPattern;
 }
@@ -65,7 +65,7 @@ RS_Pattern * PatternBox::getPattern()
  */
 void PatternBox::setPattern(const QString & pName)
 {
-       RS_DEBUG->print("PatternBox::setPattern %s\n", pName.toLatin1().data());
+       DEBUG->print("PatternBox::setPattern %s\n", pName.toLatin1().data());
 //     setCurrentText(pName);
        setItemText(currentIndex(), pName);
        slotPatternChanged(currentIndex());
@@ -77,11 +77,11 @@ void PatternBox::setPattern(const QString & pName)
  */
 void PatternBox::slotPatternChanged(int index)
 {
-       RS_DEBUG->print("PatternBox::slotPatternChanged %d\n", index);
-       currentPattern = RS_PATTERNLIST->requestPattern(currentText());
+       DEBUG->print("PatternBox::slotPatternChanged %d\n", index);
+       currentPattern = PATTERNLIST->requestPattern(currentText());
 
        if (currentPattern!=NULL)
-               RS_DEBUG->print("Current pattern is (%d): %s\n", index, currentPattern->getFileName().toLatin1().data());
+               DEBUG->print("Current pattern is (%d): %s\n", index, currentPattern->getFileName().toLatin1().data());
 
        emit patternChanged(currentPattern);
 }
index dcc9b770966af0cc5a7c2f0e886531c74f21e762..6464906f1d576d646160031e63c932e34256833c 100644 (file)
@@ -3,7 +3,7 @@
 
 #include <QtGui>
 
-class RS_Pattern;
+class Pattern;
 
 /**
  * A combobox for choosing a pattern name.
@@ -17,17 +17,17 @@ class PatternBox: public QComboBox
                virtual ~PatternBox();
 
                void init();
-               RS_Pattern * getPattern();
+               Pattern * getPattern();
                void setPattern(const QString & pName);
 
        private slots:
                void slotPatternChanged(int index);
 
        signals:
-               void patternChanged(RS_Pattern * pattern);
+               void patternChanged(Pattern * pattern);
 
        private:
-               RS_Pattern * currentPattern;
+               Pattern * currentPattern;
 };
 
 #endif // __PATTERNBOX_H__
index 8897167cb2cdfa09c27c982fac63d2ce45e22300..fa6caee8142d6f98dac6f17e20630f052d94a4e0 100644 (file)
@@ -38,8 +38,8 @@ PenToolBar::PenToolBar(QMainWindow * parent/*= NULL*/, const char * name/*= NULL
        widthBox->setMinimumWidth(80);
        lineTypeBox->setMinimumWidth(80);
 
-       connect(colorBox, SIGNAL(colorChanged(const RS_Color &)), this,
-               SLOT(slotColorChanged(const RS_Color &)));
+       connect(colorBox, SIGNAL(colorChanged(const Color &)), this,
+               SLOT(slotColorChanged(const Color &)));
        connect(widthBox, SIGNAL(widthChanged(RS2::LineWidth)), this,
                SLOT(slotWidthChanged(RS2::LineWidth)));
        connect(lineTypeBox, SIGNAL(lineTypeChanged(RS2::LineType)), this,
@@ -64,7 +64,7 @@ PenToolBar::~PenToolBar()
        delete lineTypeBox;
 }
 
-RS_Pen PenToolBar::getPen()
+Pen PenToolBar::getPen()
 {
        return currentPen;
 }
@@ -73,7 +73,7 @@ RS_Pen PenToolBar::getPen()
  * Called by the layer list if this object was added as a listener
  * to a layer list.
  */
-void PenToolBar::layerActivated(RS_Layer * l)
+void PenToolBar::layerActivated(Layer * l)
 {
        //printf("PenToolBar::layerActivated\n");
 
@@ -97,14 +97,14 @@ void PenToolBar::layerActivated(RS_Layer * l)
  * Called by the layer list (if this object was previously
  * added as a listener to a layer list).
  */
-void PenToolBar::layerEdited(RS_Layer *)
+void PenToolBar::layerEdited(Layer *)
 {
 }
 
 /**
  * Called when the color was changed by the user.
  */
-void PenToolBar::slotColorChanged(const RS_Color & color)
+void PenToolBar::slotColorChanged(const Color & color)
 {
        currentPen.setColor(color);
        //printf("  color changed\n");
index 1a3b5fb68388269a8f13d804fcda9d4a767fad56..9922bd3ef2b756e1eb4fe423fa7ba2c3c7cc9c0c 100644 (file)
@@ -8,12 +8,12 @@
 class ColorBox;
 class WidthBox;
 class LineTypeBox;
-class RS_Layer;
+class Layer;
 
 /**
  * A toolbar that offers all widgets for choosing a pen.
  */
-class PenToolBar: public QToolBar//, public RS_LayerListListener
+class PenToolBar: public QToolBar//, public LayerListListener
 {
        Q_OBJECT
 
@@ -21,22 +21,22 @@ class PenToolBar: public QToolBar//, public RS_LayerListListener
                PenToolBar(QMainWindow * parent = NULL, const char * name = NULL);
                virtual ~PenToolBar();
 
-               RS_Pen getPen();
+               Pen getPen();
 
-               // Methods from RS_LayerListListener Interface:
-               virtual void layerActivated(RS_Layer *);
-               virtual void layerEdited(RS_Layer *);
+               // Methods from LayerListListener Interface:
+               virtual void layerActivated(Layer *);
+               virtual void layerEdited(Layer *);
 
        public slots:
-               void slotColorChanged(const RS_Color & color);
+               void slotColorChanged(const Color & color);
                void slotWidthChanged(RS2::LineWidth w);
                void slotLineTypeChanged(RS2::LineType w);
 
        signals:
-               void penChanged(RS_Pen);
+               void penChanged(Pen);
 
        private:
-               RS_Pen currentPen;
+               Pen currentPen;
                ColorBox * colorBox;
                WidthBox * widthBox;
                LineTypeBox * lineTypeBox;
index 7a4f7b44f093af30b15a6f495a72e1e19efadf9b..d0944b0e1875c2680df759129daa898bb77bde35 100644 (file)
  */
 //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 +113,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 +121,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 +131,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 +212,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 +241,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 +254,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 +278,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 +292,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,14 +335,14 @@ 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;
+       DEBUG->print("QG_DialogFactory::requestEditLayerDialog");
+       Layer * layer = 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;
        }
@@ -350,7 +350,7 @@ RS_Layer * QG_DialogFactory::requestEditLayerDialog(RS_LayerList * layerList)
        // Layer for parameter livery
        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);
@@ -377,21 +377,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);
@@ -407,22 +407,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;
                        }
@@ -443,17 +443,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*/)
 {
 }
 
@@ -463,13 +463,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;
        }
@@ -507,7 +507,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();
@@ -599,7 +599,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();
 
@@ -703,11 +703,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;
     }
 
@@ -718,9 +718,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:
@@ -831,7 +831,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");
 }
 
 /**
@@ -887,7 +887,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");
 }
 
 /**
@@ -1417,7 +1417,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;
     }
@@ -1436,7 +1436,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);
@@ -1453,7 +1453,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);
@@ -1470,7 +1470,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);
@@ -1487,7 +1487,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);
@@ -1504,7 +1504,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);
@@ -1521,7 +1521,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);
@@ -1538,7 +1538,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);
@@ -1555,7 +1555,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;
@@ -1567,7 +1567,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())
                {
@@ -1580,7 +1580,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())
                {
@@ -1593,7 +1593,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())
                {
@@ -1606,7 +1606,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())
                {
@@ -1619,7 +1619,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())
                {
@@ -1632,7 +1632,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())
                {
@@ -1645,7 +1645,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())
                {
@@ -1662,13 +1662,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;
@@ -1676,13 +1676,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;
@@ -1690,13 +1690,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;
@@ -1704,13 +1704,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;
@@ -1723,7 +1723,7 @@ bool QG_DialogFactory::requestModifyEntityDialog(RS_Entity * entity)
 }
 
  /*
-bool QG_DialogFactory::requestDimAlignedDialog(RS_DimAligned* dim) {
+bool QG_DialogFactory::requestDimAlignedDialog(DimAligned* dim) {
     return false;
 }
 */
@@ -1731,7 +1731,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;
@@ -1751,12 +1751,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);
@@ -1776,17 +1776,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
@@ -1855,12 +1855,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()
index 79f72314891e8e24f64f02bcad18dbf4c84a39f9..4203216f31ee4200c9a0fd5c03e3f9fdc82f3c55 100644 (file)
@@ -10,20 +10,20 @@ class ActionInterface;
 class CadToolBar;
 class CommandWidget;
 class CoordinateWidget;
-class RS_Document;
+class Document;
 class GraphicView;
 class QG_MainWindowInterface;
 class MouseWidget;
 class SelectionWidget;
 
-#define QG_DIALOGFACTORY (RS_DialogFactory::instance()->getFactoryObject()->isAdapter() == false ? ((QG_DialogFactory *)RS_DialogFactory::instance()->getFactoryObject()) : NULL)
+#define QG_DIALOGFACTORY (DialogFactory::instance()->getFactoryObject()->isAdapter() == false ? ((QG_DialogFactory *)DialogFactory::instance()->getFactoryObject()) : NULL)
 
 // !A_WIDGET
 /**
  * This is the Qt implementation of a widget which can create and
  * show dialogs.
  */
-class QG_DialogFactory: public RS_DialogFactoryInterface
+class QG_DialogFactory: public DialogFactoryInterface
 {
        public:
                QG_DialogFactory(QWidget * parent, QToolBar * ow);
@@ -44,18 +44,18 @@ class QG_DialogFactory: public RS_DialogFactoryInterface
                virtual void requestWarningDialog(const QString& warning);
 
                virtual GraphicView * requestNewDocument(const QString & fileName = QString::null,
-                       RS_Document * doc = NULL);
+                       Document * doc = NULL);
                virtual void requestSimulationControls();
 
-               virtual RS_Layer * requestNewLayerDialog(RS_LayerList * layerList = NULL);
-               virtual RS_Layer * requestLayerRemovalDialog(RS_LayerList * layerList = NULL);
-               virtual RS_Layer * requestEditLayerDialog(RS_LayerList * layerList = NULL);
+               virtual Layer * requestNewLayerDialog(LayerList * layerList = NULL);
+               virtual Layer * requestLayerRemovalDialog(LayerList * layerList = NULL);
+               virtual Layer * requestEditLayerDialog(LayerList * layerList = NULL);
 
-               virtual RS_BlockData requestNewBlockDialog(RS_BlockList * blockList);
-               virtual RS_Block * requestBlockRemovalDialog(RS_BlockList * blockList);
-               virtual RS_BlockData requestBlockAttributesDialog(RS_BlockList * blockList);
-               virtual void requestEditBlockWindow(RS_BlockList * /*blockList*/);
-               virtual void closeEditBlockWindow(RS_Block * /*blockList*/);
+               virtual BlockData requestNewBlockDialog(BlockList * blockList);
+               virtual Block * requestBlockRemovalDialog(BlockList * blockList);
+               virtual BlockData requestBlockAttributesDialog(BlockList * blockList);
+               virtual void requestEditBlockWindow(BlockList * /*blockList*/);
+               virtual void closeEditBlockWindow(Block * /*blockList*/);
                //virtual QString requestFileSaveAsDialog();
                //virtual QString requestFileOpenDialog();
 
@@ -95,17 +95,17 @@ class QG_DialogFactory: public RS_DialogFactoryInterface
                virtual void requestToolBar(RS2::ToolBarId id);
                virtual void requestToolBarSelect(ActionInterface * selectAction, RS2::ActionType nextAction);
 
-               virtual bool requestAttributesDialog(RS_AttributesData & data, RS_LayerList & layerList);
-               virtual bool requestMoveDialog(RS_MoveData & data);
-               virtual bool requestRotateDialog(RS_RotateData & data);
-               virtual bool requestScaleDialog(RS_ScaleData & data);
-               virtual bool requestMirrorDialog(RS_MirrorData & data);
-               virtual bool requestMoveRotateDialog(RS_MoveRotateData & data);
-               virtual bool requestRotate2Dialog(RS_Rotate2Data & data);
-
-               virtual bool requestModifyEntityDialog(RS_Entity * entity);
-               virtual bool requestTextDialog(RS_Text * text);
-               virtual bool requestHatchDialog(RS_Hatch * hatch);
+               virtual bool requestAttributesDialog(AttributesData & data, LayerList & layerList);
+               virtual bool requestMoveDialog(MoveData & data);
+               virtual bool requestRotateDialog(RotateData & data);
+               virtual bool requestScaleDialog(ScaleData & data);
+               virtual bool requestMirrorDialog(MirrorData & data);
+               virtual bool requestMoveRotateDialog(MoveRotateData & data);
+               virtual bool requestRotate2Dialog(Rotate2Data & data);
+
+               virtual bool requestModifyEntityDialog(Entity * entity);
+               virtual bool requestTextDialog(Text * text);
+               virtual bool requestHatchDialog(Hatch * hatch);
 
 #ifdef RS_CAM
                virtual bool requestCamOptionsDialog(Drawing & graphic);
index a12e67cdd9ed4173bb0a7f8bb1472eee96b38fb0..9ddec0fe96d280c2b0475a0930f7d641072de334 100644 (file)
 QG_GraphicView::QG_GraphicView(QWidget * parent, const char */*name*/, Qt::WindowFlags f):
        QWidget(parent, f), GraphicView()//, refCount(0)
 {
-       RS_DEBUG->print("QG_GraphicView::QG_GraphicView(parent, name, flags)...");
+       DEBUG->print("QG_GraphicView::QG_GraphicView(parent, name, flags)...");
        CommonInitialization();
 }
 
 /**
  * Constructor II.
  */
-QG_GraphicView::QG_GraphicView(RS_Document * doc, QWidget * parent)
+QG_GraphicView::QG_GraphicView(Document * doc, QWidget * parent)
 {
 //     QG_GraphicView(parent, "graphicview");
        CommonInitialization();
 
-       RS_DEBUG->print("QG_GraphicView::QG_GraphicView(doc, parent)...");
+       DEBUG->print("QG_GraphicView::QG_GraphicView(doc, parent)...");
        //document = doc;
-       RS_DEBUG->print("  Setting Container...");
+       DEBUG->print("  Setting Container...");
 
        if (doc)
                setContainer(doc);
 
-       RS_DEBUG->print("  container set.");
+       DEBUG->print("  container set.");
        setFactorX(4.0);
        setFactorY(4.0);
        setOffset(50, 50);
@@ -79,7 +79,7 @@ void QG_GraphicView::CommonInitialization(void)
 //hrm.
 painter = NULL;
 
-       RS_DEBUG->print("--> Setting up layout...");
+       DEBUG->print("--> Setting up layout...");
        QGridLayout * layout = new QGridLayout(this);
        layout->setColumnStretch(0, 1);
        layout->setColumnStretch(1, 0);
@@ -95,7 +95,7 @@ Alignment is specified by alignment, which is a bitwise OR of Qt::AlignmentFlags
 
 A non-zero alignment indicates that the widget should not grow to fill the available space but should be sized according to sizeHint().
 */
-       RS_DEBUG->print("--> Creating hScrollBar...");
+       DEBUG->print("--> Creating hScrollBar...");
 //     hScrollBar = new QG_ScrollBar(Qt::Horizontal, this);
        hScrollBar = new QScrollBar(Qt::Horizontal, this);
 //    hScrollBar->setLineStep(50);
@@ -105,7 +105,7 @@ A non-zero alignment indicates that the widget should not grow to fill the avail
 //    layout->addRowSpacing(1, hScrollBar->sizeHint().height());
        layout->addItem(new QSpacerItem(0, hScrollBar->sizeHint().height()), 1, 0);
 
-       RS_DEBUG->print("--> Creating vScrollBar...");
+       DEBUG->print("--> Creating vScrollBar...");
 //     vScrollBar = new QG_ScrollBar(Qt::Vertical, this);
        vScrollBar = new QScrollBar(Qt::Vertical, this);
 //    vScrollBar->setLineStep(50);
@@ -213,7 +213,7 @@ int QG_GraphicView::getHeight()
 /**
  * Changes the current background color of this view.
  */
-void QG_GraphicView::setBackground(const RS_Color & bg)
+void QG_GraphicView::setBackground(const Color & bg)
 {
        GraphicView::setBackground(bg);
 
@@ -330,7 +330,7 @@ void QG_GraphicView::updateGridStatusWidget(const QString & text)
  */
 void QG_GraphicView::redraw()
 {
-       RS_DEBUG->print("QG_GraphicView::redraw begin 1");
+       DEBUG->print("QG_GraphicView::redraw begin 1");
 
        if (simulationRunning)
                return;
@@ -344,7 +344,7 @@ void QG_GraphicView::redraw()
        if (!running)
        {
                running = true;
-               RS_DEBUG->print("QG_GraphicView::redraw begin 2");
+               DEBUG->print("QG_GraphicView::redraw begin 2");
 
 /*
 This is the only place in the entire codebase that a proper update is
@@ -354,20 +354,20 @@ triggered.
 //                     repaint(false);
                        update();
 
-               RS_DEBUG->print("QG_GraphicView::redraw end 2");
+               DEBUG->print("QG_GraphicView::redraw end 2");
                running = false;
        }
 
-       RS_DEBUG->print("QG_GraphicView::redraw end 1");
+       DEBUG->print("QG_GraphicView::redraw end 1");
 }
 
 void QG_GraphicView::resizeEvent(QResizeEvent * /*e*/)
 {
-       RS_DEBUG->print("QG_GraphicView::resizeEvent begin");
+       DEBUG->print("QG_GraphicView::resizeEvent begin");
        adjustOffsetControls();
        adjustZoomControls();
        updateGrid();
-       RS_DEBUG->print("QG_GraphicView::resizeEvent end");
+       DEBUG->print("QG_GraphicView::resizeEvent end");
 }
 
 /*
@@ -377,18 +377,18 @@ This could be easily called from whoever calls this crap.
 And so... We remove it.
 */
 #if 0
-// Next three methods from RS_LayerListListener Interface:
-void QG_GraphicView::layerEdited(RS_Layer *)
+// Next three methods from LayerListListener Interface:
+void QG_GraphicView::layerEdited(Layer *)
 {
        redraw();
 }
 
-void QG_GraphicView::layerRemoved(RS_Layer *)
+void QG_GraphicView::layerRemoved(Layer *)
 {
        redraw();
 }
 
-void QG_GraphicView::layerToggled(RS_Layer *)
+void QG_GraphicView::layerToggled(Layer *)
 {
        redraw();
 }
@@ -412,7 +412,7 @@ void QG_GraphicView::mousePressEvent(QMouseEvent * e)
 
 void QG_GraphicView::mouseReleaseEvent(QMouseEvent * e)
 {
-       RS_DEBUG->print("QG_GraphicView::mouseReleaseEvent");
+       DEBUG->print("QG_GraphicView::mouseReleaseEvent");
        GraphicView::mouseReleaseEvent(e);
        //QWidget::mouseReleaseEvent(e);
 
@@ -420,12 +420,12 @@ void QG_GraphicView::mouseReleaseEvent(QMouseEvent * e)
        {
                if (QG_DIALOGFACTORY && QG_DIALOGFACTORY->getCadToolBar())
                {
-                       RS_DEBUG->print("QG_GraphicView::mouseReleaseEvent: fwd to cadtoolbar");
+                       DEBUG->print("QG_GraphicView::mouseReleaseEvent: fwd to cadtoolbar");
                        QG_DIALOGFACTORY->getCadToolBar()->mouseReleaseEvent(e);
                }
        }
 
-       RS_DEBUG->print("QG_GraphicView::mouseReleaseEvent: OK");
+       DEBUG->print("QG_GraphicView::mouseReleaseEvent: OK");
 }
 
 void QG_GraphicView::mouseMoveEvent(QMouseEvent * e)
@@ -541,7 +541,7 @@ void QG_GraphicView::focusInEvent(QFocusEvent * e)
  */
 void QG_GraphicView::wheelEvent(QWheelEvent * e)
 {
-       //RS_DEBUG->print("wheel: %d", e->delta());
+       //DEBUG->print("wheel: %d", e->delta());
 
        //printf("state: %d\n", e->state());
        //printf("ctrl: %d\n", Qt::ControlButton);
@@ -647,7 +647,7 @@ void QG_GraphicView::adjustOffsetControls()
 
        running = true;
 
-       RS_DEBUG->print("QG_GraphicView::adjustOffsetControls() begin");
+       DEBUG->print("QG_GraphicView::adjustOffsetControls() begin");
 
        if (!container || !hScrollBar || !vScrollBar)
                return;
@@ -695,14 +695,14 @@ void QG_GraphicView::adjustOffsetControls()
        slotHScrolled(-ox);
        slotVScrolled(oy);
 
-       RS_DEBUG->print("H min: %d / max: %d / step: %d / value: %d\n",
+       DEBUG->print("H min: %d / max: %d / step: %d / value: %d\n",
                hScrollBar->minimum(), hScrollBar->maximum(), hScrollBar->pageStep(), ox);
-       RS_DEBUG->print("V min: %d / max: %d / step: %d / value: %d\n",
+       DEBUG->print("V min: %d / max: %d / step: %d / value: %d\n",
                vScrollBar->minimum(), vScrollBar->maximum(), vScrollBar->pageStep(), oy);
 
        enableUpdate();
 
-       RS_DEBUG->print("QG_GraphicView::adjustOffsetControls() end");
+       DEBUG->print("QG_GraphicView::adjustOffsetControls() end");
 
        running = false;
 }
@@ -726,7 +726,7 @@ void QG_GraphicView::slotHScrolled(int value)
        //static int running = false;
        //if (!running) {
        //running = true;
-       ////RS_DEBUG->print("value x: %d\n", value);
+       ////DEBUG->print("value x: %d\n", value);
        if (hScrollBar->maximum() == hScrollBar->minimum())
                centerOffsetX();
        else
@@ -752,7 +752,7 @@ void QG_GraphicView::slotVScrolled(int value)
        //static int running = false;
        //if (!running) {
        //running = true;
-       ////RS_DEBUG->print("value y: %d\n", value);
+       ////DEBUG->print("value y: %d\n", value);
        if (vScrollBar->maximum() == vScrollBar->minimum())
                centerOffsetY();
        else
@@ -779,7 +779,7 @@ void QG_GraphicView::slotVScrolled(int value)
  */
 void QG_GraphicView::paintEvent(QPaintEvent *)
 {
-       RS_DEBUG->print("QG_GraphicView::paintEvent begin");
+       DEBUG->print("QG_GraphicView::paintEvent begin");
 
        if (simulationRunning)
                return;
@@ -834,5 +834,5 @@ of VectorWorks & etc. as well...
        delete painter;
        painter = NULL;
 
-       RS_DEBUG->print("QG_GraphicView::paintEvent end");
+       DEBUG->print("QG_GraphicView::paintEvent end");
 }
index 6990d926a363aba2e8b1ec97cdba8ec35a30ec27..7784ea977acfcd0289a60a4be526ef88bdd67f26 100644 (file)
@@ -4,9 +4,9 @@
 #include <QtGui>
 #include "graphicview.h"
 
-class RS_Document;
+class Document;
 class PaintInterface;
-class RS_Preview;
+class Preview;
 
 /**
  * This is the Qt implementation of a widget which can view a
@@ -21,7 +21,7 @@ class QG_GraphicView: public QWidget, public GraphicView//, public Q3FilePreview
 
        public:
                QG_GraphicView(QWidget * parent = 0, const char * name = 0, Qt::WindowFlags f = 0);
-               QG_GraphicView(RS_Document * doc, QWidget * parent = 0);
+               QG_GraphicView(Document * doc, QWidget * parent = 0);
                virtual ~QG_GraphicView();
 
                virtual int getWidth();
@@ -29,16 +29,16 @@ class QG_GraphicView: public QWidget, public GraphicView//, public Q3FilePreview
                virtual void redraw();
                virtual void adjustOffsetControls();
                virtual void adjustZoomControls();
-               virtual void setBackground(const RS_Color & bg);
+               virtual void setBackground(const Color & bg);
                virtual void setMouseCursor(RS2::CursorType c);
                virtual void updateGridStatusWidget(const QString & text);
 
 // This is just crap. Why have a klunky listener interface when we have slots/signals???
 // That's what I thought!!!
-               // Methods from RS_LayerListListener Interface:
-//             virtual void layerEdited(RS_Layer *);
-//             virtual void layerRemoved(RS_Layer *);
-//             virtual void layerToggled(RS_Layer *);
+               // Methods from LayerListListener Interface:
+//             virtual void layerEdited(Layer *);
+//             virtual void layerRemoved(Layer *);
+//             virtual void layerToggled(Layer *);
 
        protected:
                virtual void emulateMouseMoveEvent();
index 1fba382e64718c28963e80a6348a0f2fb0d19032..953392320edea44a965a2b4d178010f6108d39e3 100644 (file)
@@ -9,7 +9,7 @@ class ActionHandler;
 /**
  * Interface for main application windows.
  */
-class QG_MainWindowInterface: public RS_MainWindowInterface
+class QG_MainWindowInterface: public MainWindowInterface
 {
        public:
                QG_MainWindowInterface() {}
index 4e445a215a8858f83f538e2ea721714b2decab6b..45229fd907c4f4e8376297bc13048ce28586b8c2 100644 (file)
@@ -57,7 +57,7 @@ RecentFiles::~RecentFiles()
  */
 void RecentFiles::add(const QString & filename)
 {
-       RS_DEBUG->print("RecentFiles::add");
+       DEBUG->print("RecentFiles::add");
 
        // Is the file already in the list? Bail out if so...
        if (files.indexOf(filename) != -1)
@@ -69,7 +69,7 @@ void RecentFiles::add(const QString & filename)
        if ((int)files.count() > number)
                files.pop_front();
 
-       RS_DEBUG->print("RecentFiles::add: OK");
+       DEBUG->print("RecentFiles::add: OK");
 }
 
 /**
index f175aabaa8c22278243d768fdd0003ca08e62381..e18461a2d27d895cef8a4e1c2956a862755db210 100644 (file)
@@ -107,7 +107,7 @@ RS2::LineWidth WidthBox::getWidth()
  */
 void WidthBox::setWidth(RS2::LineWidth w)
 {
-       RS_DEBUG->print("WidthBox::setWidth %d\n", (int)w);
+       DEBUG->print("WidthBox::setWidth %d\n", (int)w);
        int offset = (int)showByLayer * 2 + (int)showUnchanged;
 
        switch (w)
@@ -116,13 +116,13 @@ void WidthBox::setWidth(RS2::LineWidth w)
                if (showByLayer)
                        setCurrentIndex(0 + (int)showUnchanged);
                else
-                       RS_DEBUG->print(RS_Debug::D_WARNING, "WidthBox::setWidth: Unsupported width.");
+                       DEBUG->print(Debug::D_WARNING, "WidthBox::setWidth: Unsupported width.");
                break;
        case RS2::WidthByBlock:
                if (showByLayer)
                        setCurrentIndex(1 + (int)showUnchanged);
                else
-                       RS_DEBUG->print(RS_Debug::D_WARNING, "WidthBox::setWidth: Unsupported width.");
+                       DEBUG->print(Debug::D_WARNING, "WidthBox::setWidth: Unsupported width.");
                break;
        case RS2::WidthDefault:
                setCurrentIndex(0 + offset);
@@ -292,7 +292,7 @@ bool WidthBox::isUnchanged()
  */
 void WidthBox::slotWidthChanged(int index)
 {
-       RS_DEBUG->print("WidthBox::slotWidthChanged %d\n", index);
+       DEBUG->print("WidthBox::slotWidthChanged %d\n", index);
 
        bool done = false;
 
@@ -407,7 +407,7 @@ void WidthBox::slotWidthChanged(int index)
        //currentWidth = (RS2::LineWidth)(currentText().left(4).toDouble()*100);
        //}
 
-       RS_DEBUG->print("Current width is (%d): %d\n", index, ((int)currentWidth));
+       DEBUG->print("Current width is (%d): %d\n", index, ((int)currentWidth));
 
        emit widthChanged(currentWidth);
 }
index 34fc7ad1bc27100b6497212956d41f8f4c64bcf0..a08bb13a99c70ca9100c517864a4b93446306fc2 100644 (file)
@@ -2,7 +2,7 @@
 #define __WIDTHBOX_H__
 
 #include <QtGui>
-#include "rs.h"
+#include "enums.h"
 
 /**
  * A combobox for choosing a line width.