#include "actioninfoarea.h"
-#include "rs_debug.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)
{
}
void ActionInfoArea::trigger()
{
- RS_DEBUG->print("ActionInfoArea::trigger()");
+ DEBUG->print("ActionInfoArea::trigger()");
if (ia.isValid())
{
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();
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)
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);
// }
closingLine = NULL;
}
-// currentLine = new RS_Line(preview, RS_LineData(prev, point1));
+// currentLine = new Line(preview, LineData(prev, point1));
// preview->addEntity(currentLine);
drawPreview();
}
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;
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;
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;
}
}
{
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;
}
}