-// rs_actiondimaligned.cpp
+// actiondimaligned.cpp
//
// Part of the Architektonas Project
// Originally part of QCad Community Edition by Andrew Mustun
// JLH 06/03/2010 Added this text. :-)
//
-#include "rs_actiondimaligned.h"
+#include "actiondimaligned.h"
#include "rs_commandevent.h"
#include "rs_constructionline.h"
#include "rs_preview.h"
#include "rs_snapper.h"
-RS_ActionDimAligned::RS_ActionDimAligned(RS_EntityContainer & container, GraphicView & graphicView): RS_ActionDimension("Draw aligned dimensions",
+ActionDimAligned::ActionDimAligned(RS_EntityContainer & container, GraphicView & graphicView): ActionDimension("Draw aligned dimensions",
container, graphicView)
{
reset();
}
-RS_ActionDimAligned::~RS_ActionDimAligned()
+ActionDimAligned::~ActionDimAligned()
{
}
-/*virtual*/ RS2::ActionType RS_ActionDimAligned::rtti()
+/*virtual*/ RS2::ActionType ActionDimAligned::rtti()
{
return RS2::ActionDimAligned;
}
-void RS_ActionDimAligned::reset()
+void ActionDimAligned::reset()
{
- RS_ActionDimension::reset();
+ ActionDimension::reset();
edata = RS_DimAlignedData(Vector(false), Vector(false));
lastStatus = SetExtPoint1;
RS_DIALOGFACTORY->requestOptions(this, true, true);
}
-void RS_ActionDimAligned::trigger()
+void ActionDimAligned::trigger()
{
- RS_ActionDimension::trigger();
+ ActionDimension::trigger();
preparePreview();
graphicView->moveRelativeZero(data.definitionPoint);
graphicView->moveRelativeZero(rz);
drawSnapper();
- RS_DEBUG->print("RS_ActionDimAligned::trigger(): dim added: %d", dim->getId());
+ RS_DEBUG->print("ActionDimAligned::trigger(): dim added: %d", dim->getId());
}
-void RS_ActionDimAligned::preparePreview()
+void ActionDimAligned::preparePreview()
{
Vector dirV;
dirV.setPolar(100.0, edata.extensionPoint1.angleTo(edata.extensionPoint2) + M_PI / 2.0);
RS_ConstructionLine cl(NULL, RS_ConstructionLineData(edata.extensionPoint2,
- edata.extensionPoint2 + dirV));
+ edata.extensionPoint2 + dirV));
data.definitionPoint = cl.getNearestPointOnEntity(data.definitionPoint);
}
-void RS_ActionDimAligned::mouseMoveEvent(QMouseEvent * e)
+void ActionDimAligned::mouseMoveEvent(QMouseEvent * e)
{
- RS_DEBUG->print("RS_ActionDimAligned::mouseMoveEvent begin");
+ RS_DEBUG->print("ActionDimAligned::mouseMoveEvent begin");
Vector mouse = snapPoint(e);
switch (getStatus())
{
deletePreview();
clearPreview();
- preview->addEntity(new RS_Line(preview,
- RS_LineData(edata.extensionPoint1, mouse)));
+// preview->addEntity(new RS_Line(preview, RS_LineData(edata.extensionPoint1, mouse)));
drawPreview();
}
break;
preparePreview();
//data.text = getText();
- RS_DimAligned * dim = new RS_DimAligned(preview, data, edata);
- dim->update();
- preview->addEntity(dim);
+// RS_DimAligned * dim = new RS_DimAligned(preview, data, edata);
+// dim->update();
+// preview->addEntity(dim);
drawPreview();
}
break;
break;
}
- RS_DEBUG->print("RS_ActionDimAligned::mouseMoveEvent end");
+ RS_DEBUG->print("ActionDimAligned::mouseMoveEvent end");
}
-void RS_ActionDimAligned::mouseReleaseEvent(QMouseEvent * e)
+void ActionDimAligned::mouseReleaseEvent(QMouseEvent * e)
{
// if (RS2::qtToRsButtonState(e->button())==RS2::LeftButton)
if (e->button() == Qt::LeftButton)
}
}
-void RS_ActionDimAligned::coordinateEvent(Vector * e)
+void ActionDimAligned::coordinateEvent(Vector * e)
{
if (e == NULL)
return;
}
}
-void RS_ActionDimAligned::commandEvent(RS_CommandEvent * e)
+void ActionDimAligned::commandEvent(RS_CommandEvent * e)
{
QString c = e->getCommand().toLower();
}
}
-QStringList RS_ActionDimAligned::getAvailableCommands()
+QStringList ActionDimAligned::getAvailableCommands()
{
QStringList cmd;
return cmd;
}
-void RS_ActionDimAligned::updateMouseButtonHints()
+void ActionDimAligned::updateMouseButtonHints()
{
if (RS_DIALOGFACTORY != NULL)
{
}
}
-void RS_ActionDimAligned::hideOptions()
+void ActionDimAligned::hideOptions()
{
if (RS_DIALOGFACTORY != NULL)
RS_DIALOGFACTORY->requestOptions(this, false);
- RS_ActionDimension::hideOptions();
+ ActionDimension::hideOptions();
}
-void RS_ActionDimAligned::showOptions()
+void ActionDimAligned::showOptions()
{
- RS_ActionDimension::showOptions();
+ ActionDimension::showOptions();
if (RS_DIALOGFACTORY != NULL)
RS_DIALOGFACTORY->requestOptions(this, true);