X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Factions%2Factiondimangular.cpp;h=b672222b32eb83dc68c9bfcde92db8a981bee218;hb=2ee84c5948ede7fc2f7b4435c5edef42a030ac05;hp=63970a01b740effa3d558a04cbb4b91fc4cb60db;hpb=865303923fcb231a171992b75a73364ff469ff8c;p=architektonas diff --git a/src/actions/actiondimangular.cpp b/src/actions/actiondimangular.cpp index 63970a0..b672222 100644 --- a/src/actions/actiondimangular.cpp +++ b/src/actions/actiondimangular.cpp @@ -16,13 +16,14 @@ #include "actiondimangular.h" -#include "rs_commandevent.h" -#include "rs_dialogfactory.h" +#include "commandevent.h" +#include "debug.h" +#include "dialogfactory.h" #include "graphicview.h" -#include "rs_information.h" -#include "rs_preview.h" +#include "information.h" +#include "preview.h" -ActionDimAngular::ActionDimAngular(RS_EntityContainer & container, GraphicView & graphicView): ActionDimension("Draw Angular Dimensions", +ActionDimAngular::ActionDimAngular(EntityContainer & container, GraphicView & graphicView): ActionDimension("Draw Angular Dimensions", container, graphicView) { reset(); @@ -40,11 +41,11 @@ ActionDimAngular::~ActionDimAngular() void ActionDimAngular::reset() { ActionDimension::reset(); - edata = RS_DimAngularData(Vector(false), Vector(false), Vector(false), Vector(false)); + edata = DimAngularData(Vector(false), Vector(false), Vector(false), Vector(false)); line1 = NULL; line2 = NULL; center = Vector(false); - RS_DIALOGFACTORY->requestOptions(this, true, true); + DIALOGFACTORY->requestOptions(this, true, true); } void ActionDimAngular::trigger() @@ -53,9 +54,9 @@ void ActionDimAngular::trigger() if (line1 != NULL && line2 != NULL) { - RS_DimAngular * newEntity = NULL; + DimAngular * newEntity = NULL; - newEntity = new RS_DimAngular(container, + newEntity = new DimAngular(container, data, edata); @@ -78,13 +79,13 @@ void ActionDimAngular::trigger() graphicView->moveRelativeZero(rz); } else - RS_DEBUG->print("ActionDimAngular::trigger:" + DEBUG->print("ActionDimAngular::trigger:" " Entity is NULL\n"); } void ActionDimAngular::mouseMoveEvent(QMouseEvent * e) { - RS_DEBUG->print("ActionDimAngular::mouseMoveEvent begin"); + DEBUG->print("ActionDimAngular::mouseMoveEvent begin"); Vector mouse(graphicView->toGraphX(e->x()), graphicView->toGraphY(e->y())); @@ -103,7 +104,7 @@ void ActionDimAngular::mouseMoveEvent(QMouseEvent * e) Vector mouse = snapPoint(e); edata.definitionPoint4 = mouse; -// RS_DimAngular * d = new RS_DimAngular(preview, data, edata); +// DimAngular * d = new DimAngular(preview, data, edata); // d->update(); // // deletePreview(); @@ -117,7 +118,7 @@ void ActionDimAngular::mouseMoveEvent(QMouseEvent * e) break; } - RS_DEBUG->print("ActionDimAngular::mouseMoveEvent end"); + DEBUG->print("ActionDimAngular::mouseMoveEvent end"); } void ActionDimAngular::mouseReleaseEvent(QMouseEvent * e) @@ -128,12 +129,12 @@ void ActionDimAngular::mouseReleaseEvent(QMouseEvent * e) { case SetLine1: { - RS_Entity * en = catchEntity(e, RS2::ResolveAll); + Entity * en = catchEntity(e, RS2::ResolveAll); if (en != NULL && en->rtti() == RS2::EntityLine) { - line1 = (RS_Line *)en; + line1 = (Line *)en; setStatus(SetLine2); } } @@ -141,15 +142,15 @@ void ActionDimAngular::mouseReleaseEvent(QMouseEvent * e) case SetLine2: { - RS_Entity * en = catchEntity(e, RS2::ResolveAll); + Entity * en = catchEntity(e, RS2::ResolveAll); if (en != NULL && en->rtti() == RS2::EntityLine) { - line2 = (RS_Line *)en; + line2 = (Line *)en; VectorSolutions sol = - RS_Information::getIntersectionLineLine(line1, line2); + Information::getIntersectionLineLine(line1, line2); if (sol.get(0).valid) { @@ -221,13 +222,13 @@ void ActionDimAngular::coordinateEvent(Vector * e) } } -void ActionDimAngular::commandEvent(RS_CommandEvent * e) +void ActionDimAngular::commandEvent(CommandEvent * e) { QString c = e->getCommand().toLower(); if (checkCommand("help", c)) { - RS_DIALOGFACTORY->commandMessage(msgAvailableCommands() + DIALOGFACTORY->commandMessage(msgAvailableCommands() + getAvailableCommands().join(", ")); return; } @@ -236,7 +237,7 @@ void ActionDimAngular::commandEvent(RS_CommandEvent * e) if (getStatus() == SetText) { setText(c); - RS_DIALOGFACTORY->requestOptions(this, true, true); + DIALOGFACTORY->requestOptions(this, true, true); graphicView->enableCoordinateInput(); setStatus(lastStatus); return; @@ -274,14 +275,14 @@ void ActionDimAngular::showOptions() { ActionInterface::showOptions(); - RS_DIALOGFACTORY->requestOptions(this, true); + DIALOGFACTORY->requestOptions(this, true); } void ActionDimAngular::hideOptions() { ActionInterface::hideOptions(); - RS_DIALOGFACTORY->requestOptions(this, false); + DIALOGFACTORY->requestOptions(this, false); } void ActionDimAngular::updateMouseButtonHints() @@ -289,26 +290,26 @@ void ActionDimAngular::updateMouseButtonHints() switch (getStatus()) { case SetLine1: - RS_DIALOGFACTORY->updateMouseWidget(tr("Select first line"), + DIALOGFACTORY->updateMouseWidget(tr("Select first line"), tr("Cancel")); break; case SetLine2: - RS_DIALOGFACTORY->updateMouseWidget(tr("Select second line"), + DIALOGFACTORY->updateMouseWidget(tr("Select second line"), tr("Cancel")); break; case SetPos: - RS_DIALOGFACTORY->updateMouseWidget( + DIALOGFACTORY->updateMouseWidget( tr("Specify dimension arc line location"), tr("Cancel")); break; case SetText: - RS_DIALOGFACTORY->updateMouseWidget(tr("Enter dimension text:"), ""); + DIALOGFACTORY->updateMouseWidget(tr("Enter dimension text:"), ""); break; default: - RS_DIALOGFACTORY->updateMouseWidget("", ""); + DIALOGFACTORY->updateMouseWidget("", ""); break; } }