#include "graphicview.h"
#include "preview.h"
-ActionDrawLineTangent1::ActionDrawLineTangent1(RS_EntityContainer & container, GraphicView & graphicView): ActionInterface("Draw Tangents 1",
+ActionDrawLineTangent1::ActionDrawLineTangent1(EntityContainer & container, GraphicView & graphicView): ActionInterface("Draw Tangents 1",
container, graphicView)
{
tangent = NULL;
if (tangent)
{
- RS_Entity * newEntity = NULL;
- newEntity = new RS_Line(container, tangent->getData());
+ Entity * newEntity = NULL;
+ newEntity = new Line(container, tangent->getData());
if (newEntity)
{
tangent = NULL;
}
else
- RS_DEBUG->print("ActionDrawLineTangent1::trigger:"
+ DEBUG->print("ActionDrawLineTangent1::trigger:"
" Entity is NULL\n");
}
void ActionDrawLineTangent1::mouseMoveEvent(QMouseEvent * e)
{
- RS_DEBUG->print("ActionDrawLineTangent1::mouseMoveEvent begin");
+ DEBUG->print("ActionDrawLineTangent1::mouseMoveEvent begin");
Vector mouse(graphicView->toGraphX(e->x()), graphicView->toGraphY(e->y()));
switch (getStatus())
case SetCircle:
{
- RS_Entity * en = catchEntity(e, RS2::ResolveAll);
+ Entity * en = catchEntity(e, RS2::ResolveAll);
if (en && (en->rtti() == RS2::EntityCircle
|| en->rtti() == RS2::EntityArc
|| en->rtti() == RS2::EntityEllipse))
{
circle = en;
- RS_Creation creation(NULL, NULL);
- RS_Line * t = creation.createTangent1(mouse, point, circle);
+ Creation creation(NULL, NULL);
+ Line * t = creation.createTangent1(mouse, point, circle);
if (t)
{
if (tangent)
delete tangent;
- tangent = (RS_Line *)t->clone();
+ tangent = (Line *)t->clone();
deletePreview();
clearPreview();
break;
}
- RS_DEBUG->print("ActionDrawLineTangent1::mouseMoveEvent end");
+ DEBUG->print("ActionDrawLineTangent1::mouseMoveEvent end");
}
void ActionDrawLineTangent1::mouseReleaseEvent(QMouseEvent * e)
void ActionDrawLineTangent1::updateMouseButtonHints()
{
- if (RS_DIALOGFACTORY != NULL)
+ if (DIALOGFACTORY != NULL)
{
switch (getStatus())
{
case SetPoint:
- RS_DIALOGFACTORY->updateMouseWidget(tr("Specify point"), tr("Cancel"));
+ DIALOGFACTORY->updateMouseWidget(tr("Specify point"), tr("Cancel"));
break;
case SetCircle:
- RS_DIALOGFACTORY->updateMouseWidget(tr("Select circle, arc or ellipse"),
+ DIALOGFACTORY->updateMouseWidget(tr("Select circle, arc or ellipse"),
tr("Back"));
break;
default:
- RS_DIALOGFACTORY->updateMouseWidget("", "");
+ DIALOGFACTORY->updateMouseWidget("", "");
break;
}
}
void ActionDrawLineTangent1::updateToolBar()
{
- if (RS_DIALOGFACTORY)
+ if (DIALOGFACTORY)
{
if (!isFinished())
- RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
+ DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
else
- RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarLines);
+ DIALOGFACTORY->requestToolBar(RS2::ToolBarLines);
}
}