X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Factions%2Factiondrawlinepolygon.cpp;fp=src%2Factions%2Frs_actiondrawlinepolygon.cpp;h=dc0a2e0d48bf4a8ae933ee14b055ff982dd805a9;hb=d774c2655ba2c3657a565f325411144452392277;hp=7bfe2bc810885467f64107630bd796a7866172e3;hpb=468780dd17f8b0ebb35427a9fc43491721d44d69;p=architektonas diff --git a/src/actions/rs_actiondrawlinepolygon.cpp b/src/actions/actiondrawlinepolygon.cpp similarity index 70% rename from src/actions/rs_actiondrawlinepolygon.cpp rename to src/actions/actiondrawlinepolygon.cpp index 7bfe2bc..dc0a2e0 100644 --- a/src/actions/rs_actiondrawlinepolygon.cpp +++ b/src/actions/actiondrawlinepolygon.cpp @@ -1,4 +1,4 @@ -// rs_actiondrawlinepolygon.cpp +// actiondrawlinepolygon.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_actiondrawlinepolygon.h" +#include "actiondrawlinepolygon.h" #include "rs_commandevent.h" #include "rs_creation.h" @@ -20,8 +20,9 @@ #include "graphicview.h" #include "rs_preview.h" -RS_ActionDrawLinePolygon::RS_ActionDrawLinePolygon(RS_EntityContainer & container, GraphicView & graphicView): RS_PreviewActionInterface("Draw Polygons", - container, graphicView) +ActionDrawLinePolygon::ActionDrawLinePolygon(RS_EntityContainer & container, + GraphicView & graphicView): ActionInterface("Draw Polygons", + container, graphicView) { center = Vector(false); corner = Vector(false); @@ -29,33 +30,33 @@ RS_ActionDrawLinePolygon::RS_ActionDrawLinePolygon(RS_EntityContainer & containe number = 3; } -RS_ActionDrawLinePolygon::~RS_ActionDrawLinePolygon() +ActionDrawLinePolygon::~ActionDrawLinePolygon() { } -/*virtual*/ RS2::ActionType RS_ActionDrawLinePolygon::rtti() +/*virtual*/ RS2::ActionType ActionDrawLinePolygon::rtti() { return RS2::ActionDrawLinePolygon; } -void RS_ActionDrawLinePolygon::trigger() +void ActionDrawLinePolygon::trigger() { - RS_PreviewActionInterface::trigger(); + ActionInterface::trigger(); - deleteSnapper(); - deletePreview(); - clearPreview(); +// deleteSnapper(); +// deletePreview(); +// clearPreview(); RS_Creation creation(container, graphicView); bool ok = creation.createPolygon(center, corner, number); if (!ok) - RS_DEBUG->print("RS_ActionDrawLinePolygon::trigger: No polygon added\n"); + RS_DEBUG->print("ActionDrawLinePolygon::trigger: No polygon added\n"); } -void RS_ActionDrawLinePolygon::mouseMoveEvent(QMouseEvent * e) +void ActionDrawLinePolygon::mouseMoveEvent(QMouseEvent * e) { - RS_DEBUG->print("RS_ActionDrawLinePolygon::mouseMoveEvent begin"); + RS_DEBUG->print("ActionDrawLinePolygon::mouseMoveEvent begin"); Vector mouse = snapPoint(e); @@ -72,8 +73,8 @@ void RS_ActionDrawLinePolygon::mouseMoveEvent(QMouseEvent * e) deletePreview(); clearPreview(); - RS_Creation creation(preview, NULL, false); - creation.createPolygon(center, corner, number); +// RS_Creation creation(preview, NULL, false); +// creation.createPolygon(center, corner, number); drawPreview(); } @@ -84,7 +85,7 @@ void RS_ActionDrawLinePolygon::mouseMoveEvent(QMouseEvent * e) } } -void RS_ActionDrawLinePolygon::mouseReleaseEvent(QMouseEvent * e) +void ActionDrawLinePolygon::mouseReleaseEvent(QMouseEvent * e) { if (e->button() == Qt::LeftButton) { @@ -100,7 +101,7 @@ void RS_ActionDrawLinePolygon::mouseReleaseEvent(QMouseEvent * e) } } -void RS_ActionDrawLinePolygon::coordinateEvent(Vector * e) +void ActionDrawLinePolygon::coordinateEvent(Vector * e) { if (e == NULL) return; @@ -125,7 +126,7 @@ void RS_ActionDrawLinePolygon::coordinateEvent(Vector * e) } } -void RS_ActionDrawLinePolygon::updateMouseButtonHints() +void ActionDrawLinePolygon::updateMouseButtonHints() { if (RS_DIALOGFACTORY != NULL) { @@ -151,23 +152,23 @@ void RS_ActionDrawLinePolygon::updateMouseButtonHints() } } -void RS_ActionDrawLinePolygon::showOptions() +void ActionDrawLinePolygon::showOptions() { - RS_ActionInterface::showOptions(); + ActionInterface::showOptions(); if (RS_DIALOGFACTORY != NULL) RS_DIALOGFACTORY->requestOptions(this, true); } -void RS_ActionDrawLinePolygon::hideOptions() +void ActionDrawLinePolygon::hideOptions() { - RS_ActionInterface::hideOptions(); + ActionInterface::hideOptions(); if (RS_DIALOGFACTORY != NULL) RS_DIALOGFACTORY->requestOptions(this, false); } -void RS_ActionDrawLinePolygon::commandEvent(RS_CommandEvent * e) +void ActionDrawLinePolygon::commandEvent(RS_CommandEvent * e) { QString c = e->getCommand().toLower(); @@ -221,7 +222,7 @@ void RS_ActionDrawLinePolygon::commandEvent(RS_CommandEvent * e) } } -QStringList RS_ActionDrawLinePolygon::getAvailableCommands() +QStringList ActionDrawLinePolygon::getAvailableCommands() { QStringList cmd; @@ -239,12 +240,12 @@ QStringList RS_ActionDrawLinePolygon::getAvailableCommands() return cmd; } -void RS_ActionDrawLinePolygon::updateMouseCursor() +void ActionDrawLinePolygon::updateMouseCursor() { graphicView->setMouseCursor(RS2::CadCursor); } -void RS_ActionDrawLinePolygon::updateToolBar() +void ActionDrawLinePolygon::updateToolBar() { if (RS_DIALOGFACTORY != NULL) { @@ -255,13 +256,12 @@ void RS_ActionDrawLinePolygon::updateToolBar() } } -int RS_ActionDrawLinePolygon::getNumber() +int ActionDrawLinePolygon::getNumber() { return number; } -void RS_ActionDrawLinePolygon::setNumber(int n) +void ActionDrawLinePolygon::setNumber(int n) { number = n; } -