]> Shamusworld >> Repos - architektonas/blobdiff - src/actions/actioninfodist2.cpp
Phase two of adding polyline functionality...
[architektonas] / src / actions / actioninfodist2.cpp
index 2bf002886ed0331c491d8bf7764b7c8871d65ebd..a3402f25a5997361ef4e25c7835b09279bd09943 100644 (file)
@@ -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 <jlhamm@acm.org>
 //
 
 #include "actioninfodist2.h"
 
-#include "rs_dialogfactory.h"
+#include "debug.h"
+#include "dialogfactory.h"
 #include "graphicview.h"
-#include "rs_preview.h"
+#include "preview.h"
 
-ActionInfoDist2::ActionInfoDist2(RS_EntityContainer & container, GraphicView & graphicView):
+ActionInfoDist2::ActionInfoDist2(EntityContainer & container, GraphicView & graphicView):
        ActionInterface("Info Dist2", container, graphicView)
 {
 }
@@ -34,7 +37,7 @@ void ActionInfoDist2::init(int status)
 
 void ActionInfoDist2::trigger()
 {
-       RS_DEBUG->print("ActionInfoDist2::trigger()");
+       DEBUG->print("ActionInfoDist2::trigger()");
        deleteSnapper();
 
        if (point.valid && entity != NULL)
@@ -42,13 +45,13 @@ void ActionInfoDist2::trigger()
                double dist = entity->getDistanceToPoint(point);
                QString str;
                str.sprintf("%.6f", dist);
-               RS_DIALOGFACTORY->commandMessage(tr("Distance: %1").arg(str));
+               DIALOGFACTORY->commandMessage(tr("Distance: %1").arg(str));
        }
 }
 
 void ActionInfoDist2::mouseMoveEvent(QMouseEvent * e)
 {
-       RS_DEBUG->print("ActionInfoDist2::mouseMoveEvent begin");
+       DEBUG->print("ActionInfoDist2::mouseMoveEvent begin");
 
        switch (getStatus())
        {
@@ -66,7 +69,7 @@ void ActionInfoDist2::mouseMoveEvent(QMouseEvent * e)
                break;
        }
 
-       RS_DEBUG->print("ActionInfoDist2::mouseMoveEvent end");
+       DEBUG->print("ActionInfoDist2::mouseMoveEvent end");
 }
 
 void ActionInfoDist2::mouseReleaseEvent(QMouseEvent * e)
@@ -120,15 +123,15 @@ void ActionInfoDist2::updateMouseButtonHints()
        switch (getStatus())
        {
        case SetEntity:
-               RS_DIALOGFACTORY->updateMouseWidget(tr("Specify entity"), tr("Cancel"));
+               DIALOGFACTORY->updateMouseWidget(tr("Specify entity"), tr("Cancel"));
                break;
 
        case SetPoint:
-               RS_DIALOGFACTORY->updateMouseWidget(tr("Specify point"), tr("Back"));
+               DIALOGFACTORY->updateMouseWidget(tr("Specify point"), tr("Back"));
                break;
 
        default:
-               RS_DIALOGFACTORY->updateMouseWidget("", "");
+               DIALOGFACTORY->updateMouseWidget("", "");
                break;
        }
 }
@@ -144,11 +147,11 @@ void ActionInfoDist2::updateToolBar()
        {
        case SetPoint:
        case SetEntity:
-               RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
+               DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
                break;
 
        default:
-               RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarInfo);
+               DIALOGFACTORY->requestToolBar(RS2::ToolBarInfo);
                break;
        }
 }