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