X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Factions%2Factioninfodist.cpp;h=02067915bf54ae09dc17c3174cf91aedbeae761b;hb=e1d1cacbb43055988d0d9db632fdf05c0bea9543;hp=57c744b2c9a1c973c9a8eff7cf1df0b7928796b2;hpb=d774c2655ba2c3657a565f325411144452392277;p=architektonas diff --git a/src/actions/actioninfodist.cpp b/src/actions/actioninfodist.cpp index 57c744b..0206791 100644 --- a/src/actions/actioninfodist.cpp +++ b/src/actions/actioninfodist.cpp @@ -3,7 +3,9 @@ // Part of the Architektonas Project // Originally part of QCad Community Edition by Andrew Mustun // Extensively rewritten and refactored by James L. Hammons -// (C) 2010 Underground Software +// Portions copyright (C) 2001-2003 RibbonSoft +// Copyright (C) 2010 Underground Software +// See the README and GPLv2 files for licensing and warranty information // // JLH = James L. Hammons // @@ -14,11 +16,12 @@ #include "actioninfodist.h" -#include "rs_dialogfactory.h" +#include "debug.h" +#include "dialogfactory.h" #include "graphicview.h" -#include "rs_preview.h" +#include "preview.h" -ActionInfoDist::ActionInfoDist(RS_EntityContainer & container, GraphicView & graphicView): ActionInterface("Info Dist", +ActionInfoDist::ActionInfoDist(EntityContainer & container, GraphicView & graphicView): ActionInterface("Info Dist", container, graphicView) { } @@ -34,20 +37,20 @@ void ActionInfoDist::init(int status) void ActionInfoDist::trigger() { - RS_DEBUG->print("ActionInfoDist::trigger()"); + DEBUG->print("ActionInfoDist::trigger()"); if (point1.valid && point2.valid) { double dist = point1.distanceTo(point2); QString str; str.sprintf("%.6f", dist); - RS_DIALOGFACTORY->commandMessage(tr("Distance: %1").arg(str)); + DIALOGFACTORY->commandMessage(tr("Distance: %1").arg(str)); } } void ActionInfoDist::mouseMoveEvent(QMouseEvent * e) { - RS_DEBUG->print("ActionInfoDist::mouseMoveEvent begin"); + DEBUG->print("ActionInfoDist::mouseMoveEvent begin"); if (getStatus() == SetPoint1 || getStatus() == SetPoint2) @@ -67,7 +70,7 @@ void ActionInfoDist::mouseMoveEvent(QMouseEvent * e) deletePreview(); clearPreview(); -// preview->addEntity(new RS_Line(preview, RS_LineData(point1, point2))); +// preview->addEntity(new Line(preview, LineData(point1, point2))); drawPreview(); } break; @@ -77,7 +80,7 @@ void ActionInfoDist::mouseMoveEvent(QMouseEvent * e) } } - RS_DEBUG->print("ActionInfoDist::mouseMoveEvent end"); + DEBUG->print("ActionInfoDist::mouseMoveEvent end"); } void ActionInfoDist::mouseReleaseEvent(QMouseEvent * e) @@ -133,19 +136,19 @@ void ActionInfoDist::updateMouseButtonHints() switch (getStatus()) { case SetPoint1: - RS_DIALOGFACTORY->updateMouseWidget( + DIALOGFACTORY->updateMouseWidget( tr("Specify first point of distance"), tr("Cancel")); break; case SetPoint2: - RS_DIALOGFACTORY->updateMouseWidget( + DIALOGFACTORY->updateMouseWidget( tr("Specify second point of distance"), tr("Back")); break; default: - RS_DIALOGFACTORY->updateMouseWidget("", ""); + DIALOGFACTORY->updateMouseWidget("", ""); break; } } @@ -161,11 +164,11 @@ void ActionInfoDist::updateToolBar() { case SetPoint1: case SetPoint2: - RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap); + DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap); break; default: - RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarInfo); + DIALOGFACTORY->requestToolBar(RS2::ToolBarInfo); break; } }