X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Factions%2Factiondrawlinepolygon.cpp;h=a260e441ece99ae8f4c8bca2b426cda93b3818bb;hb=2ee84c5948ede7fc2f7b4435c5edef42a030ac05;hp=ea57975f2539553fab891a053cfb065194734198;hpb=3239ef39dcee08fa6e8cd68cdf2727fc68cc7a8c;p=architektonas diff --git a/src/actions/actiondrawlinepolygon.cpp b/src/actions/actiondrawlinepolygon.cpp index ea57975..a260e44 100644 --- a/src/actions/actiondrawlinepolygon.cpp +++ b/src/actions/actiondrawlinepolygon.cpp @@ -23,7 +23,7 @@ #include "graphicview.h" #include "preview.h" -ActionDrawLinePolygon::ActionDrawLinePolygon(RS_EntityContainer & container, +ActionDrawLinePolygon::ActionDrawLinePolygon(EntityContainer & container, GraphicView & graphicView): ActionInterface("Draw Polygons", container, graphicView) { @@ -50,16 +50,16 @@ void ActionDrawLinePolygon::trigger() // deletePreview(); // clearPreview(); - RS_Creation creation(container, graphicView); + Creation creation(container, graphicView); bool ok = creation.createPolygon(center, corner, number); if (!ok) - RS_DEBUG->print("ActionDrawLinePolygon::trigger: No polygon added\n"); + DEBUG->print("ActionDrawLinePolygon::trigger: No polygon added\n"); } void ActionDrawLinePolygon::mouseMoveEvent(QMouseEvent * e) { - RS_DEBUG->print("ActionDrawLinePolygon::mouseMoveEvent begin"); + DEBUG->print("ActionDrawLinePolygon::mouseMoveEvent begin"); Vector mouse = snapPoint(e); @@ -76,7 +76,7 @@ void ActionDrawLinePolygon::mouseMoveEvent(QMouseEvent * e) deletePreview(); clearPreview(); -// RS_Creation creation(preview, NULL, false); +// Creation creation(preview, NULL, false); // creation.createPolygon(center, corner, number); drawPreview(); @@ -131,25 +131,25 @@ void ActionDrawLinePolygon::coordinateEvent(Vector * e) void ActionDrawLinePolygon::updateMouseButtonHints() { - if (RS_DIALOGFACTORY != NULL) + if (DIALOGFACTORY != NULL) { switch (getStatus()) { case SetCenter: - RS_DIALOGFACTORY->updateMouseWidget(tr("Specify center"), + DIALOGFACTORY->updateMouseWidget(tr("Specify center"), ""); break; case SetCorner: - RS_DIALOGFACTORY->updateMouseWidget(tr("Specify a corner"), ""); + DIALOGFACTORY->updateMouseWidget(tr("Specify a corner"), ""); break; case SetNumber: - RS_DIALOGFACTORY->updateMouseWidget(tr("Enter number:"), ""); + DIALOGFACTORY->updateMouseWidget(tr("Enter number:"), ""); break; default: - RS_DIALOGFACTORY->updateMouseWidget("", ""); + DIALOGFACTORY->updateMouseWidget("", ""); break; } } @@ -159,26 +159,26 @@ void ActionDrawLinePolygon::showOptions() { ActionInterface::showOptions(); - if (RS_DIALOGFACTORY != NULL) - RS_DIALOGFACTORY->requestOptions(this, true); + if (DIALOGFACTORY != NULL) + DIALOGFACTORY->requestOptions(this, true); } void ActionDrawLinePolygon::hideOptions() { ActionInterface::hideOptions(); - if (RS_DIALOGFACTORY != NULL) - RS_DIALOGFACTORY->requestOptions(this, false); + if (DIALOGFACTORY != NULL) + DIALOGFACTORY->requestOptions(this, false); } -void ActionDrawLinePolygon::commandEvent(RS_CommandEvent * e) +void ActionDrawLinePolygon::commandEvent(CommandEvent * e) { QString c = e->getCommand().toLower(); if (checkCommand("help", c)) { - if (RS_DIALOGFACTORY != NULL) - RS_DIALOGFACTORY->commandMessage(msgAvailableCommands() + if (DIALOGFACTORY != NULL) + DIALOGFACTORY->commandMessage(msgAvailableCommands() + getAvailableCommands().join(", ")); return; } @@ -206,16 +206,16 @@ void ActionDrawLinePolygon::commandEvent(RS_CommandEvent * e) { if (n > 0 && n < 10000) number = n; - else if (RS_DIALOGFACTORY != NULL) - RS_DIALOGFACTORY->commandMessage(tr("Not a valid number. " + else if (DIALOGFACTORY != NULL) + DIALOGFACTORY->commandMessage(tr("Not a valid number. " "Try 1..9999")); } - else if (RS_DIALOGFACTORY != NULL) - RS_DIALOGFACTORY->commandMessage(tr("Not a valid expression")); + else if (DIALOGFACTORY != NULL) + DIALOGFACTORY->commandMessage(tr("Not a valid expression")); - if (RS_DIALOGFACTORY != NULL) - RS_DIALOGFACTORY->requestOptions(this, true, true); + if (DIALOGFACTORY != NULL) + DIALOGFACTORY->requestOptions(this, true, true); setStatus(lastStatus); } break; @@ -250,12 +250,12 @@ void ActionDrawLinePolygon::updateMouseCursor() void ActionDrawLinePolygon::updateToolBar() { - if (RS_DIALOGFACTORY != NULL) + if (DIALOGFACTORY != NULL) { if (!isFinished()) - RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap); + DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap); else - RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarLines); + DIALOGFACTORY->requestToolBar(RS2::ToolBarLines); } }