X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Factions%2Factionmodifytrimamount.cpp;h=83fbbe0da6747bd9e2b46bfa3f25ce92c0095aab;hb=2ee84c5948ede7fc2f7b4435c5edef42a030ac05;hp=7d2e4613c4ad812168d5250a4fcc66fb76e5958f;hpb=865303923fcb231a171992b75a73364ff469ff8c;p=architektonas diff --git a/src/actions/actionmodifytrimamount.cpp b/src/actions/actionmodifytrimamount.cpp index 7d2e461..83fbbe0 100644 --- a/src/actions/actionmodifytrimamount.cpp +++ b/src/actions/actionmodifytrimamount.cpp @@ -16,12 +16,13 @@ #include "actionmodifytrimamount.h" -#include "rs_commandevent.h" -#include "rs_dialogfactory.h" -#include "rs_modification.h" +#include "commandevent.h" +#include "debug.h" +#include "dialogfactory.h" +#include "modification.h" ActionModifyTrimAmount::ActionModifyTrimAmount( - RS_EntityContainer & container, GraphicView & graphicView): + EntityContainer & container, GraphicView & graphicView): ActionInterface("Trim Entity by a given amount", container, graphicView) { @@ -49,17 +50,17 @@ void ActionModifyTrimAmount::init(int status) void ActionModifyTrimAmount::trigger() { - RS_DEBUG->print("ActionModifyTrimAmount::trigger()"); + DEBUG->print("ActionModifyTrimAmount::trigger()"); if (trimEntity != NULL && trimEntity->isAtomic()) { - RS_Modification m(*container, graphicView); - m.trimAmount(trimCoord, (RS_AtomicEntity *)trimEntity, distance); + Modification m(*container, graphicView); + m.trimAmount(trimCoord, (AtomicEntity *)trimEntity, distance); trimEntity = NULL; setStatus(ChooseTrimEntity); - RS_DIALOGFACTORY->updateSelectionWidget(container->countSelected()); + DIALOGFACTORY->updateSelectionWidget(container->countSelected()); } } @@ -79,14 +80,14 @@ void ActionModifyTrimAmount::mouseReleaseEvent(QMouseEvent * e) else { if (trimEntity == NULL) - RS_DIALOGFACTORY->commandMessage( + DIALOGFACTORY->commandMessage( tr("No entity found. ")); else if (trimEntity->rtti() == RS2::EntityInsert) - RS_DIALOGFACTORY->commandMessage( + DIALOGFACTORY->commandMessage( tr("The chosen Entity is in a block. " "Please edit the block.")); else - RS_DIALOGFACTORY->commandMessage( + DIALOGFACTORY->commandMessage( tr("The chosen Entity is not an atomic entity " "or cannot be trimmed.")); } @@ -103,13 +104,13 @@ void ActionModifyTrimAmount::mouseReleaseEvent(QMouseEvent * e) } } -void ActionModifyTrimAmount::commandEvent(RS_CommandEvent * e) +void ActionModifyTrimAmount::commandEvent(CommandEvent * e) { QString c = e->getCommand().toLower(); if (checkCommand("help", c)) { - RS_DIALOGFACTORY->commandMessage(msgAvailableCommands() + DIALOGFACTORY->commandMessage(msgAvailableCommands() + getAvailableCommands().join(", ")); return; } @@ -118,13 +119,13 @@ void ActionModifyTrimAmount::commandEvent(RS_CommandEvent * e) { case ChooseTrimEntity: { bool ok; - double d = RS_Math::eval(c, &ok); + double d = Math::eval(c, &ok); if (ok == true) distance = d; 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(ChooseTrimEntity); } break; @@ -154,14 +155,14 @@ void ActionModifyTrimAmount::showOptions() { ActionInterface::showOptions(); - RS_DIALOGFACTORY->requestOptions(this, true); + DIALOGFACTORY->requestOptions(this, true); } void ActionModifyTrimAmount::hideOptions() { ActionInterface::hideOptions(); - RS_DIALOGFACTORY->requestOptions(this, false); + DIALOGFACTORY->requestOptions(this, false); } void ActionModifyTrimAmount::updateMouseButtonHints() @@ -169,12 +170,12 @@ void ActionModifyTrimAmount::updateMouseButtonHints() switch (getStatus()) { case ChooseTrimEntity: - RS_DIALOGFACTORY->updateMouseWidget( + DIALOGFACTORY->updateMouseWidget( tr("Select entity to trim or enter distance:"), tr("Back")); break; default: - RS_DIALOGFACTORY->updateMouseWidget("", ""); + DIALOGFACTORY->updateMouseWidget("", ""); break; } } @@ -186,7 +187,7 @@ void ActionModifyTrimAmount::updateMouseCursor() void ActionModifyTrimAmount::updateToolBar() { - RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarModify); + DIALOGFACTORY->requestToolBar(RS2::ToolBarModify); } double ActionModifyTrimAmount::getDistance()