X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Factions%2Factioninfodist2.cpp;fp=src%2Factions%2Frs_actioninfodist2.cpp;h=2bf002886ed0331c491d8bf7764b7c8871d65ebd;hb=d774c2655ba2c3657a565f325411144452392277;hp=c8cea153c7e6ae599a98c9dd81d0260c749cb6f6;hpb=468780dd17f8b0ebb35427a9fc43491721d44d69;p=architektonas diff --git a/src/actions/rs_actioninfodist2.cpp b/src/actions/actioninfodist2.cpp similarity index 63% rename from src/actions/rs_actioninfodist2.cpp rename to src/actions/actioninfodist2.cpp index c8cea15..2bf0028 100644 --- a/src/actions/rs_actioninfodist2.cpp +++ b/src/actions/actioninfodist2.cpp @@ -1,4 +1,4 @@ -// rs_actioninfodist2.cpp +// actioninfodist2.cpp // // Part of the Architektonas Project // Originally part of QCad Community Edition by Andrew Mustun @@ -12,29 +12,29 @@ // JLH 06/04/2010 Added this text. :-) // -#include "rs_actioninfodist2.h" +#include "actioninfodist2.h" #include "rs_dialogfactory.h" #include "graphicview.h" #include "rs_preview.h" -RS_ActionInfoDist2::RS_ActionInfoDist2(RS_EntityContainer & container, GraphicView & graphicView): - RS_PreviewActionInterface("Info Dist2", container, graphicView) +ActionInfoDist2::ActionInfoDist2(RS_EntityContainer & container, GraphicView & graphicView): + ActionInterface("Info Dist2", container, graphicView) { } -RS_ActionInfoDist2::~RS_ActionInfoDist2() +ActionInfoDist2::~ActionInfoDist2() { } -void RS_ActionInfoDist2::init(int status) +void ActionInfoDist2::init(int status) { - RS_ActionInterface::init(status); + ActionInterface::init(status); } -void RS_ActionInfoDist2::trigger() +void ActionInfoDist2::trigger() { - RS_DEBUG->print("RS_ActionInfoDist2::trigger()"); + RS_DEBUG->print("ActionInfoDist2::trigger()"); deleteSnapper(); if (point.valid && entity != NULL) @@ -46,9 +46,9 @@ void RS_ActionInfoDist2::trigger() } } -void RS_ActionInfoDist2::mouseMoveEvent(QMouseEvent * e) +void ActionInfoDist2::mouseMoveEvent(QMouseEvent * e) { - RS_DEBUG->print("RS_ActionInfoDist2::mouseMoveEvent begin"); + RS_DEBUG->print("ActionInfoDist2::mouseMoveEvent begin"); switch (getStatus()) { @@ -57,19 +57,19 @@ void RS_ActionInfoDist2::mouseMoveEvent(QMouseEvent * e) break; case SetPoint: - if (entity != NULL) point = snapPoint(e); + break; default: break; } - RS_DEBUG->print("RS_ActionInfoDist2::mouseMoveEvent end"); + RS_DEBUG->print("ActionInfoDist2::mouseMoveEvent end"); } -void RS_ActionInfoDist2::mouseReleaseEvent(QMouseEvent * e) +void ActionInfoDist2::mouseReleaseEvent(QMouseEvent * e) { if (e->button() == Qt::LeftButton) { @@ -82,11 +82,12 @@ void RS_ActionInfoDist2::mouseReleaseEvent(QMouseEvent * e) setStatus(SetPoint); break; - case SetPoint: { + case SetPoint: + { Vector ce(snapPoint(e)); coordinateEvent(&ce); } - break; + break; default: break; @@ -100,7 +101,7 @@ void RS_ActionInfoDist2::mouseReleaseEvent(QMouseEvent * e) } } -void RS_ActionInfoDist2::coordinateEvent(Vector * e) +void ActionInfoDist2::coordinateEvent(Vector * e) { if (e == NULL) return; @@ -114,20 +115,16 @@ void RS_ActionInfoDist2::coordinateEvent(Vector * e) } } -void RS_ActionInfoDist2::updateMouseButtonHints() +void ActionInfoDist2::updateMouseButtonHints() { switch (getStatus()) { case SetEntity: - RS_DIALOGFACTORY->updateMouseWidget( - tr("Specify entity"), - tr("Cancel")); + RS_DIALOGFACTORY->updateMouseWidget(tr("Specify entity"), tr("Cancel")); break; case SetPoint: - RS_DIALOGFACTORY->updateMouseWidget( - tr("Specify point"), - tr("Back")); + RS_DIALOGFACTORY->updateMouseWidget(tr("Specify point"), tr("Back")); break; default: @@ -136,12 +133,12 @@ void RS_ActionInfoDist2::updateMouseButtonHints() } } -void RS_ActionInfoDist2::updateMouseCursor() +void ActionInfoDist2::updateMouseCursor() { graphicView->setMouseCursor(RS2::CadCursor); } -void RS_ActionInfoDist2::updateToolBar() +void ActionInfoDist2::updateToolBar() { switch (getStatus()) { @@ -155,5 +152,3 @@ void RS_ActionInfoDist2::updateToolBar() break; } } - -// EOF