#include "graphicview.h"
#include "preview.h"
-ActionInfoDist2::ActionInfoDist2(RS_EntityContainer & container, GraphicView & graphicView):
+ActionInfoDist2::ActionInfoDist2(EntityContainer & container, GraphicView & graphicView):
ActionInterface("Info Dist2", container, graphicView)
{
}
void ActionInfoDist2::trigger()
{
- RS_DEBUG->print("ActionInfoDist2::trigger()");
+ DEBUG->print("ActionInfoDist2::trigger()");
deleteSnapper();
if (point.valid && entity != NULL)
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())
{
break;
}
- RS_DEBUG->print("ActionInfoDist2::mouseMoveEvent end");
+ DEBUG->print("ActionInfoDist2::mouseMoveEvent end");
}
void ActionInfoDist2::mouseReleaseEvent(QMouseEvent * e)
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;
}
}
{
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;
}
}