X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Factions%2Factiondrawlinetangent2.cpp;h=4397560b1ac441e08ed17cacb897adad792573c7;hb=2ee84c5948ede7fc2f7b4435c5edef42a030ac05;hp=55802863268b306ad03f03ebc532d24a3747134b;hpb=d774c2655ba2c3657a565f325411144452392277;p=architektonas diff --git a/src/actions/actiondrawlinetangent2.cpp b/src/actions/actiondrawlinetangent2.cpp index 5580286..4397560 100644 --- a/src/actions/actiondrawlinetangent2.cpp +++ b/src/actions/actiondrawlinetangent2.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,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; @@ -38,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) { @@ -62,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)) @@ -85,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(); @@ -114,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) @@ -142,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; } } @@ -170,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); }