X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Factions%2Factioninfoarea.cpp;h=7c9ca32cb8ea180cafc718c8dab5f9fc2ae08fce;hb=e1d1cacbb43055988d0d9db632fdf05c0bea9543;hp=ba3b6f355bebaeeba00e0424fbdaac5d368f704d;hpb=3239ef39dcee08fa6e8cd68cdf2727fc68cc7a8c;p=architektonas diff --git a/src/actions/actioninfoarea.cpp b/src/actions/actioninfoarea.cpp index ba3b6f3..7c9ca32 100644 --- a/src/actions/actioninfoarea.cpp +++ b/src/actions/actioninfoarea.cpp @@ -21,7 +21,7 @@ #include "graphicview.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) { } @@ -42,7 +42,7 @@ void ActionInfoArea::init(int status) void ActionInfoArea::trigger() { - RS_DEBUG->print("ActionInfoArea::trigger()"); + DEBUG->print("ActionInfoArea::trigger()"); if (ia.isValid()) { @@ -51,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(); @@ -63,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) @@ -100,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); // } @@ -145,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(); } @@ -172,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; @@ -185,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; @@ -211,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; } } @@ -239,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; } }