-// rs_actiondrawlinepolygon.cpp
+// actiondrawlinepolygon.cpp
//
// Part of the Architektonas Project
// Originally part of QCad Community Edition by Andrew Mustun
// JLH 06/04/2010 Added this text. :-)
//
-#include "rs_actiondrawlinepolygon.h"
+#include "actiondrawlinepolygon.h"
#include "rs_commandevent.h"
#include "rs_creation.h"
#include "graphicview.h"
#include "rs_preview.h"
-RS_ActionDrawLinePolygon::RS_ActionDrawLinePolygon(RS_EntityContainer & container, GraphicView & graphicView): RS_PreviewActionInterface("Draw Polygons",
- container, graphicView)
+ActionDrawLinePolygon::ActionDrawLinePolygon(RS_EntityContainer & container,
+ GraphicView & graphicView): ActionInterface("Draw Polygons",
+ container, graphicView)
{
center = Vector(false);
corner = Vector(false);
number = 3;
}
-RS_ActionDrawLinePolygon::~RS_ActionDrawLinePolygon()
+ActionDrawLinePolygon::~ActionDrawLinePolygon()
{
}
-/*virtual*/ RS2::ActionType RS_ActionDrawLinePolygon::rtti()
+/*virtual*/ RS2::ActionType ActionDrawLinePolygon::rtti()
{
return RS2::ActionDrawLinePolygon;
}
-void RS_ActionDrawLinePolygon::trigger()
+void ActionDrawLinePolygon::trigger()
{
- RS_PreviewActionInterface::trigger();
+ ActionInterface::trigger();
- deleteSnapper();
- deletePreview();
- clearPreview();
+// deleteSnapper();
+// deletePreview();
+// clearPreview();
RS_Creation creation(container, graphicView);
bool ok = creation.createPolygon(center, corner, number);
if (!ok)
- RS_DEBUG->print("RS_ActionDrawLinePolygon::trigger: No polygon added\n");
+ RS_DEBUG->print("ActionDrawLinePolygon::trigger: No polygon added\n");
}
-void RS_ActionDrawLinePolygon::mouseMoveEvent(QMouseEvent * e)
+void ActionDrawLinePolygon::mouseMoveEvent(QMouseEvent * e)
{
- RS_DEBUG->print("RS_ActionDrawLinePolygon::mouseMoveEvent begin");
+ RS_DEBUG->print("ActionDrawLinePolygon::mouseMoveEvent begin");
Vector mouse = snapPoint(e);
deletePreview();
clearPreview();
- RS_Creation creation(preview, NULL, false);
- creation.createPolygon(center, corner, number);
+// RS_Creation creation(preview, NULL, false);
+// creation.createPolygon(center, corner, number);
drawPreview();
}
}
}
-void RS_ActionDrawLinePolygon::mouseReleaseEvent(QMouseEvent * e)
+void ActionDrawLinePolygon::mouseReleaseEvent(QMouseEvent * e)
{
if (e->button() == Qt::LeftButton)
{
}
}
-void RS_ActionDrawLinePolygon::coordinateEvent(Vector * e)
+void ActionDrawLinePolygon::coordinateEvent(Vector * e)
{
if (e == NULL)
return;
}
}
-void RS_ActionDrawLinePolygon::updateMouseButtonHints()
+void ActionDrawLinePolygon::updateMouseButtonHints()
{
if (RS_DIALOGFACTORY != NULL)
{
}
}
-void RS_ActionDrawLinePolygon::showOptions()
+void ActionDrawLinePolygon::showOptions()
{
- RS_ActionInterface::showOptions();
+ ActionInterface::showOptions();
if (RS_DIALOGFACTORY != NULL)
RS_DIALOGFACTORY->requestOptions(this, true);
}
-void RS_ActionDrawLinePolygon::hideOptions()
+void ActionDrawLinePolygon::hideOptions()
{
- RS_ActionInterface::hideOptions();
+ ActionInterface::hideOptions();
if (RS_DIALOGFACTORY != NULL)
RS_DIALOGFACTORY->requestOptions(this, false);
}
-void RS_ActionDrawLinePolygon::commandEvent(RS_CommandEvent * e)
+void ActionDrawLinePolygon::commandEvent(RS_CommandEvent * e)
{
QString c = e->getCommand().toLower();
}
}
-QStringList RS_ActionDrawLinePolygon::getAvailableCommands()
+QStringList ActionDrawLinePolygon::getAvailableCommands()
{
QStringList cmd;
return cmd;
}
-void RS_ActionDrawLinePolygon::updateMouseCursor()
+void ActionDrawLinePolygon::updateMouseCursor()
{
graphicView->setMouseCursor(RS2::CadCursor);
}
-void RS_ActionDrawLinePolygon::updateToolBar()
+void ActionDrawLinePolygon::updateToolBar()
{
if (RS_DIALOGFACTORY != NULL)
{
}
}
-int RS_ActionDrawLinePolygon::getNumber()
+int ActionDrawLinePolygon::getNumber()
{
return number;
}
-void RS_ActionDrawLinePolygon::setNumber(int n)
+void ActionDrawLinePolygon::setNumber(int n)
{
number = n;
}
-