X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Factions%2Factionsnapintersectionmanual.cpp;h=fca53c468769bd8e819b5fe025f7f08c844ff94b;hb=e1d1cacbb43055988d0d9db632fdf05c0bea9543;hp=dc692df90a7902522509f8343b861cb77562789e;hpb=865303923fcb231a171992b75a73364ff469ff8c;p=architektonas diff --git a/src/actions/actionsnapintersectionmanual.cpp b/src/actions/actionsnapintersectionmanual.cpp index dc692df..fca53c4 100644 --- a/src/actions/actionsnapintersectionmanual.cpp +++ b/src/actions/actionsnapintersectionmanual.cpp @@ -16,16 +16,17 @@ #include "actionsnapintersectionmanual.h" -#include "rs_dialogfactory.h" +#include "debug.h" +#include "dialogfactory.h" #include "graphicview.h" -#include "rs_information.h" -#include "rs_preview.h" +#include "information.h" +#include "preview.h" /** * @param both Trim both entities. */ ActionSnapIntersectionManual::ActionSnapIntersectionManual( - RS_EntityContainer & container, GraphicView & graphicView): + EntityContainer & container, GraphicView & graphicView): ActionInterface("Trim Entity", container, graphicView) { entity2 = NULL; @@ -47,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; @@ -73,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()) @@ -89,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; @@ -108,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) @@ -116,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()) { @@ -153,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; } } @@ -175,7 +176,7 @@ void ActionSnapIntersectionManual::updateMouseCursor() void ActionSnapIntersectionManual::updateToolBar() { - RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap); + DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap); }