-// rs_actiondimleader.cpp
+// actiondimleader.cpp
//
// Part of the Architektonas Project
// Originally part of QCad Community Edition by Andrew Mustun
// JLH 06/03/2010 Added this text. :-)
//
-#include "rs_actiondimleader.h"
+#include "actiondimleader.h"
#include "rs_commandevent.h"
#include "rs_dialogfactory.h"
#include "graphicview.h"
#include "rs_preview.h"
-RS_ActionDimLeader::RS_ActionDimLeader(RS_EntityContainer & container, GraphicView & graphicView):
- RS_PreviewActionInterface("Draw leaders", container, graphicView)
+ActionDimLeader::ActionDimLeader(RS_EntityContainer & container, GraphicView & graphicView):
+ ActionInterface("Draw leaders", container, graphicView)
{
reset();
}
-RS_ActionDimLeader::~RS_ActionDimLeader()
+ActionDimLeader::~ActionDimLeader()
{
}
-/*virtual*/ RS2::ActionType RS_ActionDimLeader::rtti()
+/*virtual*/ RS2::ActionType ActionDimLeader::rtti()
{
return RS2::ActionDimLeader;
}
-void RS_ActionDimLeader::reset()
+void ActionDimLeader::reset()
{
//data = RS_LineData(Vector(false), Vector(false));
//start = Vector(false);
points.clear();
}
-void RS_ActionDimLeader::init(int status)
+void ActionDimLeader::init(int status)
{
- RS_PreviewActionInterface::init(status);
+ ActionInterface::init(status);
reset();
}
-void RS_ActionDimLeader::trigger()
+void ActionDimLeader::trigger()
{
- RS_PreviewActionInterface::trigger();
+ ActionInterface::trigger();
if (points.count() > 0)
{
graphicView->moveRelativeZero(rz);
//drawSnapper();
- RS_DEBUG->print("RS_ActionDimLeader::trigger(): leader added: %d", leader->getId());
+ RS_DEBUG->print("ActionDimLeader::trigger(): leader added: %d", leader->getId());
}
}
-void RS_ActionDimLeader::mouseMoveEvent(QMouseEvent * e)
+void ActionDimLeader::mouseMoveEvent(QMouseEvent * e)
{
- RS_DEBUG->print("RS_ActionDimLeader::mouseMoveEvent begin");
+ RS_DEBUG->print("ActionDimLeader::mouseMoveEvent begin");
Vector mouse = snapPoint(e);
// fill in lines that were already set:
Vector last(false);
-// for(Vector * v=points.first(); v!=NULL; v=points.next())
- for (int i = 0; i < points.size(); i++)
+ for(int i=0; i<points.size(); i++)
{
Vector * v = points[i];
- if (last.valid)
- preview->addEntity(new RS_Line(preview, RS_LineData(last, *v)));
+// if (last.valid)
+// preview->addEntity(new RS_Line(preview, RS_LineData(last, *v)));
last = *v;
}
Vector p = *points.last();
- preview->addEntity(new RS_Line(preview, RS_LineData(p, mouse)));
+// preview->addEntity(new RS_Line(preview, RS_LineData(p, mouse)));
drawPreview();
}
- RS_DEBUG->print("RS_ActionDimLeader::mouseMoveEvent end");
+ RS_DEBUG->print("ActionDimLeader::mouseMoveEvent end");
}
-void RS_ActionDimLeader::mouseReleaseEvent(QMouseEvent * e)
+void ActionDimLeader::mouseReleaseEvent(QMouseEvent * e)
{
if (e->button() == Qt::LeftButton)
{
}
}
-void RS_ActionDimLeader::keyPressEvent(QKeyEvent * e)
+void ActionDimLeader::keyPressEvent(QKeyEvent * e)
{
if (getStatus() == SetEndpoint && e->key() == Qt::Key_Enter)
{
}
}
-void RS_ActionDimLeader::coordinateEvent(Vector * e)
+void ActionDimLeader::coordinateEvent(Vector * e)
{
if (e == NULL)
return;
}
}
-void RS_ActionDimLeader::commandEvent(RS_CommandEvent * e)
+void ActionDimLeader::commandEvent(RS_CommandEvent * e)
{
QString c = e->getCommand().toLower();
}
}
-QStringList RS_ActionDimLeader::getAvailableCommands()
+QStringList ActionDimLeader::getAvailableCommands()
{
QStringList cmd;
return cmd;
}
-void RS_ActionDimLeader::updateMouseButtonHints()
+void ActionDimLeader::updateMouseButtonHints()
{
if (RS_DIALOGFACTORY != NULL)
{
}
}
-void RS_ActionDimLeader::showOptions()
+void ActionDimLeader::showOptions()
{
- RS_ActionInterface::showOptions();
-
- //RS_DIALOGFACTORY->requestOptions(this, true);
+ ActionInterface::showOptions();
}
-void RS_ActionDimLeader::hideOptions()
+void ActionDimLeader::hideOptions()
{
- RS_ActionInterface::hideOptions();
-
- //RS_DIALOGFACTORY->requestOptions(this, false);
+ ActionInterface::hideOptions();
}
-void RS_ActionDimLeader::updateMouseCursor()
+void ActionDimLeader::updateMouseCursor()
{
graphicView->setMouseCursor(RS2::CadCursor);
}
-void RS_ActionDimLeader::updateToolBar()
+void ActionDimLeader::updateToolBar()
{
- if (RS_DIALOGFACTORY != NULL)
+ if (RS_DIALOGFACTORY)
{
if (!isFinished())
RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarSnap);
RS_DIALOGFACTORY->requestToolBar(RS2::ToolBarDim);
}
}
-