X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Factions%2Factiondrawlineparallelthrough.cpp;h=f34f376186b1a7963ffefef78d07ff87b2da804a;hb=e1d1cacbb43055988d0d9db632fdf05c0bea9543;hp=612677d9748655147e82c7ecee39d121a7a0ab26;hpb=865303923fcb231a171992b75a73364ff469ff8c;p=architektonas diff --git a/src/actions/actiondrawlineparallelthrough.cpp b/src/actions/actiondrawlineparallelthrough.cpp index 612677d..f34f376 100644 --- a/src/actions/actiondrawlineparallelthrough.cpp +++ b/src/actions/actiondrawlineparallelthrough.cpp @@ -16,14 +16,15 @@ #include "actiondrawlineparallelthrough.h" -#include "rs_commandevent.h" -#include "rs_creation.h" -#include "rs_dialogfactory.h" +#include "commandevent.h" +#include "creation.h" +#include "debug.h" +#include "dialogfactory.h" #include "graphicview.h" -#include "rs_preview.h" +#include "preview.h" ActionDrawLineParallelThrough::ActionDrawLineParallelThrough( - RS_EntityContainer & container, GraphicView & graphicView): + EntityContainer & container, GraphicView & graphicView): ActionInterface("Draw Parallels", container, graphicView) { parallel = NULL; @@ -49,18 +50,18 @@ void ActionDrawLineParallelThrough::trigger() if (entity) { - RS_Creation creation(container, graphicView); - RS_Entity * e = creation.createParallelThrough(coord, number, entity); + Creation creation(container, graphicView); + Entity * e = creation.createParallelThrough(coord, number, entity); if (!e) - RS_DEBUG->print("ActionDrawLineParallelThrough::trigger:" + DEBUG->print("ActionDrawLineParallelThrough::trigger:" " No parallels added\n"); } } void ActionDrawLineParallelThrough::mouseMoveEvent(QMouseEvent * e) { - RS_DEBUG->print("ActionDrawLineParallelThrough::mouseMoveEvent begin"); + DEBUG->print("ActionDrawLineParallelThrough::mouseMoveEvent begin"); switch (getStatus()) { @@ -74,7 +75,7 @@ void ActionDrawLineParallelThrough::mouseMoveEvent(QMouseEvent * e) deletePreview(); clearPreview(); -// RS_Creation creation(preview, NULL, false); +// Creation creation(preview, NULL, false); // creation.createParallelThrough(coord, number, entity); drawPreview(); @@ -85,7 +86,7 @@ void ActionDrawLineParallelThrough::mouseMoveEvent(QMouseEvent * e) break; } - RS_DEBUG->print("ActionDrawLineParallelThrough::mouseMoveEvent end"); + DEBUG->print("ActionDrawLineParallelThrough::mouseMoveEvent end"); } void ActionDrawLineParallelThrough::mouseReleaseEvent(QMouseEvent * e) @@ -157,19 +158,19 @@ void ActionDrawLineParallelThrough::updateMouseButtonHints() switch (getStatus()) { case SetEntity: - RS_DIALOGFACTORY->updateMouseWidget(tr("Select entity"), tr("Cancel")); + DIALOGFACTORY->updateMouseWidget(tr("Select entity"), tr("Cancel")); break; case SetPos: - RS_DIALOGFACTORY->updateMouseWidget(tr("Specify through point"), tr("Back")); + DIALOGFACTORY->updateMouseWidget(tr("Specify through point"), tr("Back")); break; case SetNumber: - RS_DIALOGFACTORY->updateMouseWidget(tr("Number:"), tr("Back")); + DIALOGFACTORY->updateMouseWidget(tr("Number:"), tr("Back")); break; default: - RS_DIALOGFACTORY->updateMouseWidget("", ""); + DIALOGFACTORY->updateMouseWidget("", ""); break; } } @@ -177,23 +178,23 @@ void ActionDrawLineParallelThrough::updateMouseButtonHints() void ActionDrawLineParallelThrough::showOptions() { ActionInterface::showOptions(); - RS_DIALOGFACTORY->requestOptions(this, true); + DIALOGFACTORY->requestOptions(this, true); updateMouseButtonHints(); } void ActionDrawLineParallelThrough::hideOptions() { ActionInterface::hideOptions(); - RS_DIALOGFACTORY->requestOptions(this, false); + DIALOGFACTORY->requestOptions(this, false); } -void ActionDrawLineParallelThrough::commandEvent(RS_CommandEvent * e) +void ActionDrawLineParallelThrough::commandEvent(CommandEvent * e) { QString c = e->getCommand().toLower(); if (checkCommand("help", c)) { - RS_DIALOGFACTORY->commandMessage(msgAvailableCommands() + DIALOGFACTORY->commandMessage(msgAvailableCommands() + getAvailableCommands().join(", ")); return; } @@ -223,12 +224,12 @@ void ActionDrawLineParallelThrough::commandEvent(RS_CommandEvent * e) if (n > 0 && n < 100) number = n; else - RS_DIALOGFACTORY->commandMessage(tr("Not a valid number. " + DIALOGFACTORY->commandMessage(tr("Not a valid number. " "Try 1..99")); } else - RS_DIALOGFACTORY->commandMessage(tr("Not a valid expression")); - RS_DIALOGFACTORY->requestOptions(this, true, true); + DIALOGFACTORY->commandMessage(tr("Not a valid expression")); + DIALOGFACTORY->requestOptions(this, true, true); setStatus(lastStatus); } break; @@ -263,9 +264,9 @@ void ActionDrawLineParallelThrough::updateMouseCursor() void ActionDrawLineParallelThrough::updateToolBar() { if (getStatus() == SetPos && !isFinished()) - RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap); + DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap); else - RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarLines); + DIALOGFACTORY->requestToolBar(RS2::ToolBarLines); } int ActionDrawLineParallelThrough::getNumber()