#include "information.h"
#include "preview.h"
-ActionDimAngular::ActionDimAngular(RS_EntityContainer & container, GraphicView & graphicView): ActionDimension("Draw Angular Dimensions",
+ActionDimAngular::ActionDimAngular(EntityContainer & container, GraphicView & graphicView): ActionDimension("Draw Angular Dimensions",
container, graphicView)
{
reset();
void ActionDimAngular::reset()
{
ActionDimension::reset();
- edata = RS_DimAngularData(Vector(false), Vector(false), Vector(false), Vector(false));
+ edata = DimAngularData(Vector(false), Vector(false), Vector(false), Vector(false));
line1 = NULL;
line2 = NULL;
center = Vector(false);
- RS_DIALOGFACTORY->requestOptions(this, true, true);
+ DIALOGFACTORY->requestOptions(this, true, true);
}
void ActionDimAngular::trigger()
if (line1 != NULL && line2 != NULL)
{
- RS_DimAngular * newEntity = NULL;
+ DimAngular * newEntity = NULL;
- newEntity = new RS_DimAngular(container,
+ newEntity = new DimAngular(container,
data,
edata);
graphicView->moveRelativeZero(rz);
}
else
- RS_DEBUG->print("ActionDimAngular::trigger:"
+ DEBUG->print("ActionDimAngular::trigger:"
" Entity is NULL\n");
}
void ActionDimAngular::mouseMoveEvent(QMouseEvent * e)
{
- RS_DEBUG->print("ActionDimAngular::mouseMoveEvent begin");
+ DEBUG->print("ActionDimAngular::mouseMoveEvent begin");
Vector mouse(graphicView->toGraphX(e->x()), graphicView->toGraphY(e->y()));
Vector mouse = snapPoint(e);
edata.definitionPoint4 = mouse;
-// RS_DimAngular * d = new RS_DimAngular(preview, data, edata);
+// DimAngular * d = new DimAngular(preview, data, edata);
// d->update();
//
// deletePreview();
break;
}
- RS_DEBUG->print("ActionDimAngular::mouseMoveEvent end");
+ DEBUG->print("ActionDimAngular::mouseMoveEvent end");
}
void ActionDimAngular::mouseReleaseEvent(QMouseEvent * e)
{
case SetLine1:
{
- RS_Entity * en = catchEntity(e, RS2::ResolveAll);
+ Entity * en = catchEntity(e, RS2::ResolveAll);
if (en != NULL
&& en->rtti() == RS2::EntityLine)
{
- line1 = (RS_Line *)en;
+ line1 = (Line *)en;
setStatus(SetLine2);
}
}
case SetLine2:
{
- RS_Entity * en = catchEntity(e, RS2::ResolveAll);
+ Entity * en = catchEntity(e, RS2::ResolveAll);
if (en != NULL
&& en->rtti() == RS2::EntityLine)
{
- line2 = (RS_Line *)en;
+ line2 = (Line *)en;
VectorSolutions sol =
- RS_Information::getIntersectionLineLine(line1, line2);
+ Information::getIntersectionLineLine(line1, line2);
if (sol.get(0).valid)
{
}
}
-void ActionDimAngular::commandEvent(RS_CommandEvent * e)
+void ActionDimAngular::commandEvent(CommandEvent * e)
{
QString c = e->getCommand().toLower();
if (checkCommand("help", c))
{
- RS_DIALOGFACTORY->commandMessage(msgAvailableCommands()
+ DIALOGFACTORY->commandMessage(msgAvailableCommands()
+ getAvailableCommands().join(", "));
return;
}
if (getStatus() == SetText)
{
setText(c);
- RS_DIALOGFACTORY->requestOptions(this, true, true);
+ DIALOGFACTORY->requestOptions(this, true, true);
graphicView->enableCoordinateInput();
setStatus(lastStatus);
return;
{
ActionInterface::showOptions();
- RS_DIALOGFACTORY->requestOptions(this, true);
+ DIALOGFACTORY->requestOptions(this, true);
}
void ActionDimAngular::hideOptions()
{
ActionInterface::hideOptions();
- RS_DIALOGFACTORY->requestOptions(this, false);
+ DIALOGFACTORY->requestOptions(this, false);
}
void ActionDimAngular::updateMouseButtonHints()
switch (getStatus())
{
case SetLine1:
- RS_DIALOGFACTORY->updateMouseWidget(tr("Select first line"),
+ DIALOGFACTORY->updateMouseWidget(tr("Select first line"),
tr("Cancel"));
break;
case SetLine2:
- RS_DIALOGFACTORY->updateMouseWidget(tr("Select second line"),
+ DIALOGFACTORY->updateMouseWidget(tr("Select second line"),
tr("Cancel"));
break;
case SetPos:
- RS_DIALOGFACTORY->updateMouseWidget(
+ DIALOGFACTORY->updateMouseWidget(
tr("Specify dimension arc line location"), tr("Cancel"));
break;
case SetText:
- RS_DIALOGFACTORY->updateMouseWidget(tr("Enter dimension text:"), "");
+ DIALOGFACTORY->updateMouseWidget(tr("Enter dimension text:"), "");
break;
default:
- RS_DIALOGFACTORY->updateMouseWidget("", "");
+ DIALOGFACTORY->updateMouseWidget("", "");
break;
}
}