]> Shamusworld >> Repos - architektonas/blobdiff - src/actions/actiondrawhatch.cpp
Removed unnecessary RS_ prefix from classes and whatnot.
[architektonas] / src / actions / actiondrawhatch.cpp
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);
 }