#include "actionmodifyrotate2.h"
-#include "rs_dialogfactory.h"
+#include "debug.h"
+#include "dialogfactory.h"
ActionModifyRotate2::ActionModifyRotate2(
- RS_EntityContainer & container, GraphicView & graphicView):
+ EntityContainer & container, GraphicView & graphicView):
ActionInterface("Rotate Entities around two centers", container, graphicView)
{
}
void ActionModifyRotate2::trigger()
{
- RS_DEBUG->print("ActionModifyRotate2::trigger()");
+ DEBUG->print("ActionModifyRotate2::trigger()");
- RS_Modification m(*container, graphicView);
+ Modification m(*container, graphicView);
m.rotate2(data);
finish();
- RS_DIALOGFACTORY->updateSelectionWidget(container->countSelected());
+ DIALOGFACTORY->updateSelectionWidget(container->countSelected());
}
void ActionModifyRotate2::mouseMoveEvent(QMouseEvent * e)
{
- RS_DEBUG->print("ActionModifyRotate2::mouseMoveEvent begin");
+ DEBUG->print("ActionModifyRotate2::mouseMoveEvent begin");
if (getStatus() == SetReferencePoint1 || getStatus() == SetReferencePoint2)
{
}
}
- RS_DEBUG->print("ActionModifyRotate2::mouseMoveEvent end");
+ DEBUG->print("ActionModifyRotate2::mouseMoveEvent end");
}
void ActionModifyRotate2::mouseReleaseEvent(QMouseEvent * e)
data.center2 = pos;
setStatus(ShowDialog);
- if (RS_DIALOGFACTORY->requestRotate2Dialog(data))
+ if (DIALOGFACTORY->requestRotate2Dialog(data))
trigger();
//finish();
break;
}
}
-void ActionModifyRotate2::commandEvent(RS_CommandEvent * /*e*/)
+void ActionModifyRotate2::commandEvent(CommandEvent * /*e*/)
{
}
switch (getStatus())
{
case SetReferencePoint1:
- RS_DIALOGFACTORY->updateMouseWidget(tr("Specify absolute reference point"),
+ DIALOGFACTORY->updateMouseWidget(tr("Specify absolute reference point"),
tr("Cancel"));
break;
case SetReferencePoint2:
- RS_DIALOGFACTORY->updateMouseWidget(tr("Specify relative reference point"),
+ DIALOGFACTORY->updateMouseWidget(tr("Specify relative reference point"),
tr("Back"));
break;
default:
- RS_DIALOGFACTORY->updateMouseWidget("", "");
+ DIALOGFACTORY->updateMouseWidget("", "");
break;
}
}
{
case SetReferencePoint1:
case SetReferencePoint2:
- RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
+ DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
break;
default:
- RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarModify);
+ DIALOGFACTORY->requestToolBar(RS2::ToolBarModify);
break;
}
}