X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Factions%2Factiondrawlinetangent2.cpp;h=4397560b1ac441e08ed17cacb897adad792573c7;hb=f62cebc26c7c3af447f0e4e4c43331f8589dce22;hp=82d36a3c944955bd743708da050a208ecbb43831;hpb=865303923fcb231a171992b75a73364ff469ff8c;p=architektonas diff --git a/src/actions/actiondrawlinetangent2.cpp b/src/actions/actiondrawlinetangent2.cpp index 82d36a3..4397560 100644 --- a/src/actions/actiondrawlinetangent2.cpp +++ b/src/actions/actiondrawlinetangent2.cpp @@ -16,13 +16,14 @@ #include "actiondrawlinetangent2.h" -#include "rs_creation.h" -#include "rs_dialogfactory.h" +#include "creation.h" +#include "debug.h" +#include "dialogfactory.h" #include "graphicview.h" -#include "rs_preview.h" +#include "preview.h" ActionDrawLineTangent2::ActionDrawLineTangent2( - RS_EntityContainer & container, GraphicView & graphicView): + EntityContainer & container, GraphicView & graphicView): ActionInterface("Draw Tangents 2", container, graphicView) { tangent = NULL; @@ -40,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) { @@ -64,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)) @@ -87,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(); @@ -116,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) @@ -144,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; } } @@ -172,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); }