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