X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Factions%2Factiondrawlinepolygon2.cpp;fp=src%2Factions%2Frs_actiondrawlinepolygon2.cpp;h=d1d1f8fb466e6de06942323b9d59210039d984c8;hb=d774c2655ba2c3657a565f325411144452392277;hp=fb783d61f98746b37c4151a6708c295a6e8372dd;hpb=468780dd17f8b0ebb35427a9fc43491721d44d69;p=architektonas diff --git a/src/actions/rs_actiondrawlinepolygon2.cpp b/src/actions/actiondrawlinepolygon2.cpp similarity index 71% rename from src/actions/rs_actiondrawlinepolygon2.cpp rename to src/actions/actiondrawlinepolygon2.cpp index fb783d6..d1d1f8f 100644 --- a/src/actions/rs_actiondrawlinepolygon2.cpp +++ b/src/actions/actiondrawlinepolygon2.cpp @@ -1,4 +1,4 @@ -// rs_actiondrawlinepolygon2.cpp +// actiondrawlinepolygon2.cpp // // Part of the Architektonas Project // Originally part of QCad Community Edition by Andrew Mustun @@ -12,7 +12,7 @@ // JLH 06/04/2010 Added this text. :-) // -#include "rs_actiondrawlinepolygon2.h" +#include "actiondrawlinepolygon2.h" #include "rs_commandevent.h" #include "rs_creation.h" @@ -20,7 +20,7 @@ #include "graphicview.h" #include "rs_preview.h" -RS_ActionDrawLinePolygon2::RS_ActionDrawLinePolygon2(RS_EntityContainer & container, GraphicView & graphicView): RS_PreviewActionInterface("Draw Polygons", +ActionDrawLinePolygon2::ActionDrawLinePolygon2(RS_EntityContainer & container, GraphicView & graphicView): ActionInterface("Draw Polygons", container, graphicView) { corner1 = Vector(false); @@ -29,18 +29,18 @@ RS_ActionDrawLinePolygon2::RS_ActionDrawLinePolygon2(RS_EntityContainer & contai number = 3; } -RS_ActionDrawLinePolygon2::~RS_ActionDrawLinePolygon2() +ActionDrawLinePolygon2::~ActionDrawLinePolygon2() { } -/*virtual*/ RS2::ActionType RS_ActionDrawLinePolygon2::rtti() +/*virtual*/ RS2::ActionType ActionDrawLinePolygon2::rtti() { return RS2::ActionDrawLinePolygon2; } -void RS_ActionDrawLinePolygon2::trigger() +void ActionDrawLinePolygon2::trigger() { - RS_PreviewActionInterface::trigger(); + ActionInterface::trigger(); deleteSnapper(); deletePreview(); @@ -50,12 +50,12 @@ void RS_ActionDrawLinePolygon2::trigger() bool ok = creation.createPolygon2(corner1, corner2, number); if (!ok) - RS_DEBUG->print("RS_ActionDrawLinePolygon2::trigger: No polygon added\n"); + RS_DEBUG->print("ActionDrawLinePolygon2::trigger: No polygon added\n"); } -void RS_ActionDrawLinePolygon2::mouseMoveEvent(QMouseEvent * e) +void ActionDrawLinePolygon2::mouseMoveEvent(QMouseEvent * e) { - RS_DEBUG->print("RS_ActionDrawLinePolygon2::mouseMoveEvent begin"); + RS_DEBUG->print("ActionDrawLinePolygon2::mouseMoveEvent begin"); Vector mouse = snapPoint(e); @@ -72,8 +72,8 @@ void RS_ActionDrawLinePolygon2::mouseMoveEvent(QMouseEvent * e) deletePreview(); clearPreview(); - RS_Creation creation(preview, NULL, false); - creation.createPolygon2(corner1, corner2, number); +// RS_Creation creation(preview, NULL, false); +// creation.createPolygon2(corner1, corner2, number); drawPreview(); } @@ -84,7 +84,7 @@ void RS_ActionDrawLinePolygon2::mouseMoveEvent(QMouseEvent * e) } } -void RS_ActionDrawLinePolygon2::mouseReleaseEvent(QMouseEvent * e) +void ActionDrawLinePolygon2::mouseReleaseEvent(QMouseEvent * e) { if (e->button() == Qt::LeftButton) { @@ -100,9 +100,9 @@ void RS_ActionDrawLinePolygon2::mouseReleaseEvent(QMouseEvent * e) } } -void RS_ActionDrawLinePolygon2::coordinateEvent(Vector * e) +void ActionDrawLinePolygon2::coordinateEvent(Vector * e) { - if (e == NULL) + if (!e) return; Vector mouse = *e; @@ -125,7 +125,7 @@ void RS_ActionDrawLinePolygon2::coordinateEvent(Vector * e) } } -void RS_ActionDrawLinePolygon2::updateMouseButtonHints() +void ActionDrawLinePolygon2::updateMouseButtonHints() { if (RS_DIALOGFACTORY != NULL) { @@ -152,23 +152,23 @@ void RS_ActionDrawLinePolygon2::updateMouseButtonHints() } } -void RS_ActionDrawLinePolygon2::showOptions() +void ActionDrawLinePolygon2::showOptions() { - RS_ActionInterface::showOptions(); + ActionInterface::showOptions(); if (RS_DIALOGFACTORY != NULL) RS_DIALOGFACTORY->requestOptions(this, true); } -void RS_ActionDrawLinePolygon2::hideOptions() +void ActionDrawLinePolygon2::hideOptions() { - RS_ActionInterface::hideOptions(); + ActionInterface::hideOptions(); if (RS_DIALOGFACTORY != NULL) RS_DIALOGFACTORY->requestOptions(this, false); } -void RS_ActionDrawLinePolygon2::commandEvent(RS_CommandEvent * e) +void ActionDrawLinePolygon2::commandEvent(RS_CommandEvent * e) { QString c = e->getCommand().toLower(); @@ -222,7 +222,7 @@ void RS_ActionDrawLinePolygon2::commandEvent(RS_CommandEvent * e) } } -QStringList RS_ActionDrawLinePolygon2::getAvailableCommands() +QStringList ActionDrawLinePolygon2::getAvailableCommands() { QStringList cmd; @@ -240,12 +240,12 @@ QStringList RS_ActionDrawLinePolygon2::getAvailableCommands() return cmd; } -void RS_ActionDrawLinePolygon2::updateMouseCursor() +void ActionDrawLinePolygon2::updateMouseCursor() { graphicView->setMouseCursor(RS2::CadCursor); } -void RS_ActionDrawLinePolygon2::updateToolBar() +void ActionDrawLinePolygon2::updateToolBar() { if (RS_DIALOGFACTORY != NULL) { @@ -256,13 +256,12 @@ void RS_ActionDrawLinePolygon2::updateToolBar() } } -int RS_ActionDrawLinePolygon2::getNumber() +int ActionDrawLinePolygon2::getNumber() { return number; } -void RS_ActionDrawLinePolygon2::setNumber(int n) +void ActionDrawLinePolygon2::setNumber(int n) { number = n; } -