X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Factions%2Factiondrawlinetangent1.cpp;h=045ae6de44c081794612a71a7af7c9938ba03ef9;hb=e1d1cacbb43055988d0d9db632fdf05c0bea9543;hp=fbb128ae117b2723a7aadfcc86cf2603270913c9;hpb=d774c2655ba2c3657a565f325411144452392277;p=architektonas diff --git a/src/actions/actiondrawlinetangent1.cpp b/src/actions/actiondrawlinetangent1.cpp index fbb128a..045ae6d 100644 --- a/src/actions/actiondrawlinetangent1.cpp +++ b/src/actions/actiondrawlinetangent1.cpp @@ -3,7 +3,9 @@ // Part of the Architektonas Project // Originally part of QCad Community Edition by Andrew Mustun // Extensively rewritten and refactored by James L. Hammons -// (C) 2010 Underground Software +// 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 // @@ -14,12 +16,13 @@ #include "actiondrawlinetangent1.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" -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; @@ -37,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) { @@ -64,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()) @@ -81,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(); @@ -111,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) @@ -162,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; } } @@ -189,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); } }