-// rs_actionmodifystretch.cpp
+// actionmodifystretch.cpp
//
// Part of the Architektonas Project
// Originally part of QCad Community Edition by Andrew Mustun
// JLH 06/04/2010 Added this text. :-)
//
-#include "rs_actionmodifystretch.h"
+#include "actionmodifystretch.h"
#include "rs_dialogfactory.h"
#include "rs_modification.h"
#include "rs_preview.h"
-RS_ActionModifyStretch::RS_ActionModifyStretch(RS_EntityContainer & container,
- GraphicView & graphicView): RS_PreviewActionInterface("Stretch Entities",
+ActionModifyStretch::ActionModifyStretch(RS_EntityContainer & container,
+ GraphicView & graphicView): ActionInterface("Stretch Entities",
container, graphicView)
{
firstCorner = Vector(false);
targetPoint = Vector(false);
}
-RS_ActionModifyStretch::~RS_ActionModifyStretch()
+ActionModifyStretch::~ActionModifyStretch()
{
}
-void RS_ActionModifyStretch::init(int status)
+void ActionModifyStretch::init(int status)
{
- RS_ActionInterface::init(status);
+ ActionInterface::init(status);
}
-void RS_ActionModifyStretch::trigger()
+void ActionModifyStretch::trigger()
{
- RS_DEBUG->print("RS_ActionModifyStretch::trigger()");
+ RS_DEBUG->print("ActionModifyStretch::trigger()");
deletePreview();
clearPreview();
RS_DIALOGFACTORY->updateSelectionWidget(container->countSelected());
}
-void RS_ActionModifyStretch::mouseMoveEvent(QMouseEvent * e)
+void ActionModifyStretch::mouseMoveEvent(QMouseEvent * e)
{
- RS_DEBUG->print("RS_ActionModifyStretch::mouseMoveEvent begin");
+ RS_DEBUG->print("ActionModifyStretch::mouseMoveEvent begin");
Vector mouse = snapPoint(e);
break;
case SetSecondCorner:
-
if (firstCorner.valid)
{
secondCorner = snapPoint(e);
deletePreview();
clearPreview();
+/* preview->addEntity(
+ new RS_Line(preview, RS_LineData(Vector(firstCorner.x, firstCorner.y),
+ Vector(secondCorner.x, firstCorner.y))));
preview->addEntity(
- new RS_Line(preview,
- RS_LineData(Vector(firstCorner.x,
- firstCorner.y),
- Vector(secondCorner.x,
- firstCorner.y))));
- preview->addEntity(
- new RS_Line(preview,
- RS_LineData(Vector(secondCorner.x,
- firstCorner.y),
- Vector(secondCorner.x,
- secondCorner.y))));
+ new RS_Line(preview, RS_LineData(Vector(secondCorner.x, firstCorner.y),
+ Vector(secondCorner.x, secondCorner.y))));
preview->addEntity(
- new RS_Line(preview,
- RS_LineData(Vector(secondCorner.x,
- secondCorner.y),
- Vector(firstCorner.x,
- secondCorner.y))));
+ new RS_Line(preview, RS_LineData(Vector(secondCorner.x, secondCorner.y),
+ Vector(firstCorner.x, secondCorner.y))));
preview->addEntity(
- new RS_Line(preview,
- RS_LineData(Vector(firstCorner.x,
- secondCorner.y),
- Vector(firstCorner.x,
- firstCorner.y))));
+ new RS_Line(preview, RS_LineData(Vector(firstCorner.x, secondCorner.y),
+ Vector(firstCorner.x, firstCorner.y))));*/
drawPreview();
}
+
break;
case SetReferencePoint:
break;
case SetTargetPoint:
-
if (referencePoint.valid)
{
targetPoint = mouse;
deletePreview();
clearPreview();
- preview->addStretchablesFrom(*container, firstCorner, secondCorner);
- //preview->move(targetPoint-referencePoint);
- preview->stretch(firstCorner, secondCorner,
- targetPoint - referencePoint);
+/* preview->addStretchablesFrom(*container, firstCorner, secondCorner);
+ preview->stretch(firstCorner, secondCorner, targetPoint - referencePoint);*/
drawPreview();
}
+
break;
default:
break;
}
- RS_DEBUG->print("RS_ActionModifyStretch::mouseMoveEvent end");
+ RS_DEBUG->print("ActionModifyStretch::mouseMoveEvent end");
}
-void RS_ActionModifyStretch::mouseReleaseEvent(QMouseEvent * e)
+void ActionModifyStretch::mouseReleaseEvent(QMouseEvent * e)
{
if (e->button() == Qt::LeftButton)
{
}
}
-void RS_ActionModifyStretch::coordinateEvent(Vector * e)
+void ActionModifyStretch::coordinateEvent(Vector * e)
{
if (e == NULL)
return;
}
}
-void RS_ActionModifyStretch::updateMouseButtonHints()
+void ActionModifyStretch::updateMouseButtonHints()
{
switch (getStatus())
{
}
}
-void RS_ActionModifyStretch::updateMouseCursor()
+void ActionModifyStretch::updateMouseCursor()
{
graphicView->setMouseCursor(RS2::CadCursor);
}
-void RS_ActionModifyStretch::updateToolBar()
+void ActionModifyStretch::updateToolBar()
{
if (!isFinished())
RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarModify);
}
-// EOF
+