#include "actiondrawlinefree.h"
-#include "rs_dialogfactory.h"
+#include "debug.h"
+#include "dialogfactory.h"
#include "graphicview.h"
-#include "rs_polyline.h"
+#include "polyline.h"
-ActionDrawLineFree::ActionDrawLineFree(RS_EntityContainer & container,
+ActionDrawLineFree::ActionDrawLineFree(EntityContainer & container,
GraphicView & graphicView): ActionInterface("Draw freehand lines",
container, graphicView)
{
document->endUndoCycle();
}
- RS_DEBUG->print("ActionDrawLineFree::trigger():"
+ DEBUG->print("ActionDrawLineFree::trigger():"
" polyline added: %d", polyline->getId());
polyline = NULL;
}
if (vertex.valid && polyline)
{
Vector v = snapPoint(e);
- RS_Entity * ent = polyline->addVertex(v);
+ Entity * ent = polyline->addVertex(v);
ent->setLayerToActive();
ent->setPenToActive();
vertex = v;
- RS_DEBUG->print("ActionDrawLineFree::mouseMoveEvent():"
+ DEBUG->print("ActionDrawLineFree::mouseMoveEvent():"
" line added: %d", ent->getId());
}
}
if (e->button() == Qt::LeftButton)
{
vertex = snapPoint(e);
- polyline = new RS_Polyline(container, RS_PolylineData(vertex, vertex, 0));
+ polyline = new Polyline(container, PolylineData(vertex, vertex, 0));
polyline->setLayerToActive();
polyline->setPenToActive();
}
switch (getStatus())
{
case 0:
- RS_DIALOGFACTORY->updateMouseWidget(tr("Click and drag to draw a line"), tr("Cancel"));
+ DIALOGFACTORY->updateMouseWidget(tr("Click and drag to draw a line"), tr("Cancel"));
break;
default:
- RS_DIALOGFACTORY->updateMouseWidget("", "");
+ DIALOGFACTORY->updateMouseWidget("", "");
break;
}
}
void ActionDrawLineFree::updateToolBar()
{
if (!isFinished())
- RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
+ DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
else
- RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarLines);
+ DIALOGFACTORY->requestToolBar(RS2::ToolBarLines);
}