X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Factions%2Factioninfoarea.cpp;h=7c9ca32cb8ea180cafc718c8dab5f9fc2ae08fce;hb=e1d1cacbb43055988d0d9db632fdf05c0bea9543;hp=3b877408d2fef9d1ec192651f6732c43a4ea604a;hpb=d774c2655ba2c3657a565f325411144452392277;p=architektonas diff --git a/src/actions/actioninfoarea.cpp b/src/actions/actioninfoarea.cpp index 3b87740..7c9ca32 100644 --- a/src/actions/actioninfoarea.cpp +++ b/src/actions/actioninfoarea.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 "actioninfoarea.h" -#include "rs_dialogfactory.h" +#include "debug.h" +#include "dialogfactory.h" #include "graphicview.h" -#include "rs_preview.h" +#include "preview.h" -ActionInfoArea::ActionInfoArea(RS_EntityContainer & container, GraphicView & graphicView): ActionInterface("Info Area", +ActionInfoArea::ActionInfoArea(EntityContainer & container, GraphicView & graphicView): ActionInterface("Info Area", container, graphicView) { } @@ -39,7 +42,7 @@ void ActionInfoArea::init(int status) void ActionInfoArea::trigger() { - RS_DEBUG->print("ActionInfoArea::trigger()"); + DEBUG->print("ActionInfoArea::trigger()"); if (ia.isValid()) { @@ -48,9 +51,9 @@ void ActionInfoArea::trigger() double area = ia.getArea(); double circ = ia.getCircumference(); - RS_DEBUG->print("ActionInfoArea::trigger: area: %f", area); - RS_DIALOGFACTORY->commandMessage(tr("Area: %1").arg(area)); - RS_DIALOGFACTORY->commandMessage(tr("Circumference: %1").arg(circ)); + DEBUG->print("ActionInfoArea::trigger: area: %f", area); + DIALOGFACTORY->commandMessage(tr("Area: %1").arg(area)); + DIALOGFACTORY->commandMessage(tr("Circumference: %1").arg(circ)); } ia.reset(); @@ -60,14 +63,14 @@ void ActionInfoArea::trigger() 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 ActionInfoArea::mouseMoveEvent(QMouseEvent * e) { - //RS_DEBUG->print("ActionInfoArea::mouseMoveEvent begin"); + //DEBUG->print("ActionInfoArea::mouseMoveEvent begin"); if (getStatus() == SetFirstPoint || getStatus() == SetNextPoint) @@ -97,12 +100,12 @@ void ActionInfoArea::mouseMoveEvent(QMouseEvent * e) closingLine = NULL; } -// currentLine = new RS_Line(preview, RS_LineData(prev, mouse)); +// currentLine = new Line(preview, LineData(prev, mouse)); // preview->addEntity(currentLine); // if (preview->count() > 1) // { -// closingLine = new RS_Line(preview, RS_LineData(mouse, point1)); +// closingLine = new Line(preview, LineData(mouse, point1)); // preview->addEntity(closingLine); // } @@ -142,7 +145,7 @@ void ActionInfoArea::mouseReleaseEvent(QMouseEvent * e) closingLine = NULL; } -// currentLine = new RS_Line(preview, RS_LineData(prev, point1)); +// currentLine = new Line(preview, LineData(prev, point1)); // preview->addEntity(currentLine); drawPreview(); } @@ -169,7 +172,7 @@ void ActionInfoArea::coordinateEvent(Vector * e) clearPreview(); ia.addPoint(mouse); - RS_DIALOGFACTORY->commandMessage(tr("Point: %1/%2").arg(mouse.x).arg(mouse.y)); + DIALOGFACTORY->commandMessage(tr("Point: %1/%2").arg(mouse.x).arg(mouse.y)); graphicView->moveRelativeZero(point1); prev = mouse; @@ -182,7 +185,7 @@ void ActionInfoArea::coordinateEvent(Vector * e) if (point1.valid) { ia.addPoint(mouse); - RS_DIALOGFACTORY->commandMessage(tr("Point: %1/%2").arg(mouse.x).arg(mouse.y)); + DIALOGFACTORY->commandMessage(tr("Point: %1/%2").arg(mouse.x).arg(mouse.y)); currentLine = NULL; @@ -208,19 +211,19 @@ void ActionInfoArea::updateMouseButtonHints() switch (getStatus()) { case SetFirstPoint: - RS_DIALOGFACTORY->updateMouseWidget( + DIALOGFACTORY->updateMouseWidget( tr("Specify first point of polygon"), tr("Cancel")); break; case SetNextPoint: - RS_DIALOGFACTORY->updateMouseWidget( + DIALOGFACTORY->updateMouseWidget( tr("Specify next point of polygon"), tr("Terminate")); break; default: - RS_DIALOGFACTORY->updateMouseWidget("", ""); + DIALOGFACTORY->updateMouseWidget("", ""); break; } } @@ -236,11 +239,11 @@ void ActionInfoArea::updateToolBar() { case SetFirstPoint: case SetNextPoint: - RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap); + DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap); break; default: - RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarInfo); + DIALOGFACTORY->requestToolBar(RS2::ToolBarInfo); break; } }