#include "actionselectintersected.h"
-#include "rs_debug.h"
-#include "rs_dialogfactory.h"
+#include "debug.h"
+#include "dialogfactory.h"
#include "graphicview.h"
-#include "rs_selection.h"
-#include "rs_preview.h"
+#include "selection.h"
+#include "preview.h"
/**
* Constructor.
* @param select true: select window. false: deselect window
*/
ActionSelectIntersected::ActionSelectIntersected(
- RS_EntityContainer & container, GraphicView & graphicView, bool select):
+ EntityContainer & container, GraphicView & graphicView, bool select):
ActionInterface("Select Intersected", container, graphicView)
{
this->select = select;
if (graphicView->toGuiDX(v1.distanceTo(v2)) > 10)
{
deleteSnapper();
- RS_Selection s(*container, graphicView);
+ Selection s(*container, graphicView);
s.selectIntersected(v1, v2, select);
- if (RS_DIALOGFACTORY)
- RS_DIALOGFACTORY->updateSelectionWidget(container->countSelected());
+ if (DIALOGFACTORY)
+ DIALOGFACTORY->updateSelectionWidget(container->countSelected());
init();
}
v2 = snapPoint(e);
deletePreview();
clearPreview();
-// preview->addEntity(new RS_Line(preview, RS_LineData(Vector(v1.x, v1.y), Vector(v2.x, v2.y))));
+// preview->addEntity(new Line(preview, LineData(Vector(v1.x, v1.y), Vector(v2.x, v2.y))));
drawPreview();
}
}
}
}
- RS_DEBUG->print("ActionSelectIntersected::mousePressEvent(): %f %f",
+ DEBUG->print("ActionSelectIntersected::mousePressEvent(): %f %f",
v1.x, v1.y);
}
void ActionSelectIntersected::mouseReleaseEvent(QMouseEvent * e)
{
- RS_DEBUG->print("ActionSelectIntersected::mouseReleaseEvent()");
+ DEBUG->print("ActionSelectIntersected::mouseReleaseEvent()");
if (e->button() == Qt::RightButton)
{
void ActionSelectIntersected::updateMouseButtonHints()
{
- if (RS_DIALOGFACTORY != NULL)
+ if (DIALOGFACTORY != NULL)
{
switch (getStatus())
{
case SetPoint1:
- RS_DIALOGFACTORY->updateMouseWidget(tr("Choose first point of intersection line"), tr("Cancel"));
+ DIALOGFACTORY->updateMouseWidget(tr("Choose first point of intersection line"), tr("Cancel"));
break;
case SetPoint2:
- RS_DIALOGFACTORY->updateMouseWidget(tr("Choose second point of intersection line"), tr("Back"));
+ DIALOGFACTORY->updateMouseWidget(tr("Choose second point of intersection line"), tr("Back"));
break;
default:
- RS_DIALOGFACTORY->updateMouseWidget("", "");
+ DIALOGFACTORY->updateMouseWidget("", "");
break;
}
}
void ActionSelectIntersected::updateToolBar()
{
- if (RS_DIALOGFACTORY != NULL)
+ if (DIALOGFACTORY != NULL)
{
if (!isFinished())
- RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarSelect);
+ DIALOGFACTORY->requestToolBar(RS2::ToolBarSelect);
else
- RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarSelect);
+ DIALOGFACTORY->requestToolBar(RS2::ToolBarSelect);
}
}