X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Factions%2Factionmodifytrim.cpp;h=efbc6a06289c850c69f0ece612983ac57040672b;hb=e1d1cacbb43055988d0d9db632fdf05c0bea9543;hp=45601066a49f107919c8a6ec59d39c4dfd71e29b;hpb=865303923fcb231a171992b75a73364ff469ff8c;p=architektonas diff --git a/src/actions/actionmodifytrim.cpp b/src/actions/actionmodifytrim.cpp index 4560106..efbc6a0 100644 --- a/src/actions/actionmodifytrim.cpp +++ b/src/actions/actionmodifytrim.cpp @@ -16,13 +16,14 @@ #include "actionmodifytrim.h" -#include "rs_dialogfactory.h" -#include "rs_modification.h" +#include "debug.h" +#include "dialogfactory.h" +#include "modification.h" /** * @param both Trim both entities. */ -ActionModifyTrim::ActionModifyTrim(RS_EntityContainer & container, +ActionModifyTrim::ActionModifyTrim(EntityContainer & container, GraphicView & graphicView, bool both): ActionInterface("Trim Entity", container, graphicView) { @@ -47,12 +48,12 @@ void ActionModifyTrim::init(int status) void ActionModifyTrim::trigger() { - RS_DEBUG->print("ActionModifyTrim::trigger()"); + DEBUG->print("ActionModifyTrim::trigger()"); if (trimEntity && trimEntity->isAtomic() && limitEntity) { - RS_Modification m(*container, graphicView); - m.trim(trimCoord, (RS_AtomicEntity *)trimEntity, + Modification m(*container, graphicView); + m.trim(trimCoord, (AtomicEntity *)trimEntity, limitCoord, limitEntity, both); trimEntity = NULL; @@ -66,16 +67,16 @@ void ActionModifyTrim::trigger() else setStatus(ChooseTrimEntity); - RS_DIALOGFACTORY->updateSelectionWidget(container->countSelected()); + DIALOGFACTORY->updateSelectionWidget(container->countSelected()); } } void ActionModifyTrim::mouseMoveEvent(QMouseEvent * e) { - RS_DEBUG->print("ActionModifyTrim::mouseMoveEvent begin"); + DEBUG->print("ActionModifyTrim::mouseMoveEvent begin"); Vector mouse = graphicView->toGraph(e->x(), e->y()); - RS_Entity * se = catchEntity(e); + Entity * se = catchEntity(e); switch (getStatus()) { @@ -93,7 +94,7 @@ void ActionModifyTrim::mouseMoveEvent(QMouseEvent * e) break; } - RS_DEBUG->print("ActionModifyTrim::mouseMoveEvent end"); + DEBUG->print("ActionModifyTrim::mouseMoveEvent end"); } void ActionModifyTrim::mouseReleaseEvent(QMouseEvent * e) @@ -101,7 +102,7 @@ void ActionModifyTrim::mouseReleaseEvent(QMouseEvent * e) if (e->button() == Qt::LeftButton) { Vector mouse = graphicView->toGraph(e->x(), e->y()); - RS_Entity * se = catchEntity(e); + Entity * se = catchEntity(e); switch (getStatus()) { @@ -150,25 +151,25 @@ void ActionModifyTrim::updateMouseButtonHints() case ChooseLimitEntity: if (both) - RS_DIALOGFACTORY->updateMouseWidget(tr("Select first trim entity"), + DIALOGFACTORY->updateMouseWidget(tr("Select first trim entity"), tr("Cancel")); else - RS_DIALOGFACTORY->updateMouseWidget(tr("Select limiting entity"), + DIALOGFACTORY->updateMouseWidget(tr("Select limiting entity"), tr("Back")); break; case ChooseTrimEntity: if (both) - RS_DIALOGFACTORY->updateMouseWidget(tr("Select second trim entity"), + DIALOGFACTORY->updateMouseWidget(tr("Select second trim entity"), tr("Cancel")); else - RS_DIALOGFACTORY->updateMouseWidget(tr("Select entity to trim"), + DIALOGFACTORY->updateMouseWidget(tr("Select entity to trim"), tr("Back")); break; default: - RS_DIALOGFACTORY->updateMouseWidget("", ""); + DIALOGFACTORY->updateMouseWidget("", ""); break; } } @@ -180,6 +181,6 @@ void ActionModifyTrim::updateMouseCursor() void ActionModifyTrim::updateToolBar() { - RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarModify); + DIALOGFACTORY->requestToolBar(RS2::ToolBarModify); }