X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Factions%2Factionmodifystretch.cpp;h=e1465a7404317efe4eb895ba3d07c595cb9d6001;hb=e1d1cacbb43055988d0d9db632fdf05c0bea9543;hp=3dff16aa85a8f7b397e6d9fb017433e1efede87d;hpb=3239ef39dcee08fa6e8cd68cdf2727fc68cc7a8c;p=architektonas diff --git a/src/actions/actionmodifystretch.cpp b/src/actions/actionmodifystretch.cpp index 3dff16a..e1465a7 100644 --- a/src/actions/actionmodifystretch.cpp +++ b/src/actions/actionmodifystretch.cpp @@ -21,7 +21,7 @@ #include "modification.h" #include "preview.h" -ActionModifyStretch::ActionModifyStretch(RS_EntityContainer & container, +ActionModifyStretch::ActionModifyStretch(EntityContainer & container, GraphicView & graphicView): ActionInterface("Stretch Entities", container, graphicView) { @@ -42,26 +42,26 @@ void ActionModifyStretch::init(int status) void ActionModifyStretch::trigger() { - RS_DEBUG->print("ActionModifyStretch::trigger()"); + DEBUG->print("ActionModifyStretch::trigger()"); deletePreview(); clearPreview(); deleteSnapper(); - RS_Modification m(*container, graphicView); + Modification m(*container, graphicView); m.stretch(firstCorner, secondCorner, targetPoint - referencePoint); drawSnapper(); setStatus(SetFirstCorner); - RS_DIALOGFACTORY->updateSelectionWidget(container->countSelected()); + DIALOGFACTORY->updateSelectionWidget(container->countSelected()); } void ActionModifyStretch::mouseMoveEvent(QMouseEvent * e) { - RS_DEBUG->print("ActionModifyStretch::mouseMoveEvent begin"); + DEBUG->print("ActionModifyStretch::mouseMoveEvent begin"); Vector mouse = snapPoint(e); @@ -77,16 +77,16 @@ void ActionModifyStretch::mouseMoveEvent(QMouseEvent * e) deletePreview(); clearPreview(); /* preview->addEntity( - new RS_Line(preview, RS_LineData(Vector(firstCorner.x, firstCorner.y), + new Line(preview, LineData(Vector(firstCorner.x, firstCorner.y), Vector(secondCorner.x, firstCorner.y)))); preview->addEntity( - new RS_Line(preview, RS_LineData(Vector(secondCorner.x, firstCorner.y), + new Line(preview, LineData(Vector(secondCorner.x, firstCorner.y), Vector(secondCorner.x, secondCorner.y)))); preview->addEntity( - new RS_Line(preview, RS_LineData(Vector(secondCorner.x, secondCorner.y), + new Line(preview, LineData(Vector(secondCorner.x, secondCorner.y), Vector(firstCorner.x, secondCorner.y)))); preview->addEntity( - new RS_Line(preview, RS_LineData(Vector(firstCorner.x, secondCorner.y), + new Line(preview, LineData(Vector(firstCorner.x, secondCorner.y), Vector(firstCorner.x, firstCorner.y))));*/ drawPreview(); } @@ -114,7 +114,7 @@ void ActionModifyStretch::mouseMoveEvent(QMouseEvent * e) break; } - RS_DEBUG->print("ActionModifyStretch::mouseMoveEvent end"); + DEBUG->print("ActionModifyStretch::mouseMoveEvent end"); } void ActionModifyStretch::mouseReleaseEvent(QMouseEvent * e) @@ -176,27 +176,27 @@ void ActionModifyStretch::updateMouseButtonHints() switch (getStatus()) { case SetFirstCorner: - RS_DIALOGFACTORY->updateMouseWidget(tr("Specify first corner"), + DIALOGFACTORY->updateMouseWidget(tr("Specify first corner"), tr("Cancel")); break; case SetSecondCorner: - RS_DIALOGFACTORY->updateMouseWidget(tr("Specify second corner"), + DIALOGFACTORY->updateMouseWidget(tr("Specify second corner"), tr("Back")); break; case SetReferencePoint: - RS_DIALOGFACTORY->updateMouseWidget(tr("Specify reference point"), + DIALOGFACTORY->updateMouseWidget(tr("Specify reference point"), tr("Back")); break; case SetTargetPoint: - RS_DIALOGFACTORY->updateMouseWidget(tr("Specify target point"), + DIALOGFACTORY->updateMouseWidget(tr("Specify target point"), tr("Back")); break; default: - RS_DIALOGFACTORY->updateMouseWidget("", ""); + DIALOGFACTORY->updateMouseWidget("", ""); break; } } @@ -209,9 +209,9 @@ void ActionModifyStretch::updateMouseCursor() void ActionModifyStretch::updateToolBar() { if (!isFinished()) - RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap); + DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap); else - RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarModify); + DIALOGFACTORY->requestToolBar(RS2::ToolBarModify); }