-// rs_actioninfodist2.cpp
+// actioninfodist2.cpp
//
// Part of the Architektonas Project
// Originally part of QCad Community Edition by Andrew Mustun
// JLH 06/04/2010 Added this text. :-)
//
-#include "rs_actioninfodist2.h"
+#include "actioninfodist2.h"
#include "rs_dialogfactory.h"
#include "graphicview.h"
#include "rs_preview.h"
-RS_ActionInfoDist2::RS_ActionInfoDist2(RS_EntityContainer & container, GraphicView & graphicView):
- RS_PreviewActionInterface("Info Dist2", container, graphicView)
+ActionInfoDist2::ActionInfoDist2(RS_EntityContainer & container, GraphicView & graphicView):
+ ActionInterface("Info Dist2", container, graphicView)
{
}
-RS_ActionInfoDist2::~RS_ActionInfoDist2()
+ActionInfoDist2::~ActionInfoDist2()
{
}
-void RS_ActionInfoDist2::init(int status)
+void ActionInfoDist2::init(int status)
{
- RS_ActionInterface::init(status);
+ ActionInterface::init(status);
}
-void RS_ActionInfoDist2::trigger()
+void ActionInfoDist2::trigger()
{
- RS_DEBUG->print("RS_ActionInfoDist2::trigger()");
+ RS_DEBUG->print("ActionInfoDist2::trigger()");
deleteSnapper();
if (point.valid && entity != NULL)
}
}
-void RS_ActionInfoDist2::mouseMoveEvent(QMouseEvent * e)
+void ActionInfoDist2::mouseMoveEvent(QMouseEvent * e)
{
- RS_DEBUG->print("RS_ActionInfoDist2::mouseMoveEvent begin");
+ RS_DEBUG->print("ActionInfoDist2::mouseMoveEvent begin");
switch (getStatus())
{
break;
case SetPoint:
-
if (entity != NULL)
point = snapPoint(e);
+
break;
default:
break;
}
- RS_DEBUG->print("RS_ActionInfoDist2::mouseMoveEvent end");
+ RS_DEBUG->print("ActionInfoDist2::mouseMoveEvent end");
}
-void RS_ActionInfoDist2::mouseReleaseEvent(QMouseEvent * e)
+void ActionInfoDist2::mouseReleaseEvent(QMouseEvent * e)
{
if (e->button() == Qt::LeftButton)
{
setStatus(SetPoint);
break;
- case SetPoint: {
+ case SetPoint:
+ {
Vector ce(snapPoint(e));
coordinateEvent(&ce);
}
- break;
+ break;
default:
break;
}
}
-void RS_ActionInfoDist2::coordinateEvent(Vector * e)
+void ActionInfoDist2::coordinateEvent(Vector * e)
{
if (e == NULL)
return;
}
}
-void RS_ActionInfoDist2::updateMouseButtonHints()
+void ActionInfoDist2::updateMouseButtonHints()
{
switch (getStatus())
{
case SetEntity:
- RS_DIALOGFACTORY->updateMouseWidget(
- tr("Specify entity"),
- tr("Cancel"));
+ RS_DIALOGFACTORY->updateMouseWidget(tr("Specify entity"), tr("Cancel"));
break;
case SetPoint:
- RS_DIALOGFACTORY->updateMouseWidget(
- tr("Specify point"),
- tr("Back"));
+ RS_DIALOGFACTORY->updateMouseWidget(tr("Specify point"), tr("Back"));
break;
default:
}
}
-void RS_ActionInfoDist2::updateMouseCursor()
+void ActionInfoDist2::updateMouseCursor()
{
graphicView->setMouseCursor(RS2::CadCursor);
}
-void RS_ActionInfoDist2::updateToolBar()
+void ActionInfoDist2::updateToolBar()
{
switch (getStatus())
{
break;
}
}
-
-// EOF