#include "actioninfoangle.h"
-#include "rs_dialogfactory.h"
+#include "debug.h"
+#include "dialogfactory.h"
#include "graphicview.h"
-#include "rs_information.h"
+#include "information.h"
-ActionInfoAngle::ActionInfoAngle(RS_EntityContainer & container, GraphicView & graphicView): ActionInterface("Info Angle",
+ActionInfoAngle::ActionInfoAngle(EntityContainer & container, GraphicView & graphicView): ActionInterface("Info Angle",
container, graphicView)
{
}
void ActionInfoAngle::trigger()
{
- RS_DEBUG->print("ActionInfoAngle::trigger()");
+ DEBUG->print("ActionInfoAngle::trigger()");
deleteSnapper();
if (entity1 != NULL && entity2 != NULL)
{
- VectorSolutions sol = RS_Information::getIntersection(entity1, entity2, false);
+ VectorSolutions sol = Information::getIntersection(entity1, entity2, false);
if (sol.hasValid())
{
double angle = fabs(angle2 - angle1);
QString str;
- str.sprintf("%.6f", RS_Math::rad2deg(angle));
- RS_DIALOGFACTORY->commandMessage(tr("Angle: %1%2").arg(str).arg(QChar(0xB0)));
+ str.sprintf("%.6f", Math::rad2deg(angle));
+ DIALOGFACTORY->commandMessage(tr("Angle: %1%2").arg(str).arg(QChar(0xB0)));
}
}
else
- RS_DIALOGFACTORY->commandMessage(tr("Lines are parallel"));
+ DIALOGFACTORY->commandMessage(tr("Lines are parallel"));
}
}
void ActionInfoAngle::mouseMoveEvent(QMouseEvent * /*e*/)
{
- RS_DEBUG->print("ActionInfoAngle::mouseMoveEvent begin");
+ DEBUG->print("ActionInfoAngle::mouseMoveEvent begin");
switch (getStatus())
{
break;
}
- RS_DEBUG->print("ActionInfoAngle::mouseMoveEvent end");
+ DEBUG->print("ActionInfoAngle::mouseMoveEvent end");
}
void ActionInfoAngle::mouseReleaseEvent(QMouseEvent * e)
switch (getStatus())
{
case SetEntity1:
- RS_DIALOGFACTORY->updateMouseWidget(
+ DIALOGFACTORY->updateMouseWidget(
tr("Specify first line"), tr("Cancel"));
break;
case SetEntity2:
- RS_DIALOGFACTORY->updateMouseWidget(
+ DIALOGFACTORY->updateMouseWidget(
tr("Specify second line"), tr("Back"));
break;
default:
- RS_DIALOGFACTORY->updateMouseWidget("", "");
+ DIALOGFACTORY->updateMouseWidget("", "");
break;
}
}
{
case SetEntity1:
case SetEntity2:
- RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
+ DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
break;
default:
- RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarInfo);
+ DIALOGFACTORY->requestToolBar(RS2::ToolBarInfo);
break;
}
}