-// rs_actionzoompan.cpp
+// actionzoompan.cpp
//
// Part of the Architektonas Project
// Originally part of QCad Community Edition by Andrew Mustun
// JLH 06/05/2010 Added this text. :-)
//
-#include "rs_actionzoompan.h"
+#include "actionzoompan.h"
#include "graphicview.h"
-RS_ActionZoomPan::RS_ActionZoomPan(RS_EntityContainer & container, GraphicView & graphicView):
- RS_ActionInterface("Zoom Pan", container, graphicView)
+ActionZoomPan::ActionZoomPan(RS_EntityContainer & container, GraphicView & graphicView):
+ ActionInterface("Zoom Pan", container, graphicView)
{
}
-RS_ActionZoomPan::~RS_ActionZoomPan()
+ActionZoomPan::~ActionZoomPan()
{
}
-void RS_ActionZoomPan::init(int status)
+void ActionZoomPan::init(int status)
{
- RS_ActionInterface::init(status);
- snapMode = RS2::SnapFree;
- snapRes = RS2::RestrictNothing;
+ ActionInterface::init(status);
+/* snapMode = RS2::SnapFree;
+ snapRes = RS2::RestrictNothing;*/
x1 = y1 = x2 = y2 = -1;
}
-void RS_ActionZoomPan::trigger()
+void ActionZoomPan::trigger()
{
if (x1 >= 0)
{
}
#define SCROLL_DELTA 4
-void RS_ActionZoomPan::mouseMoveEvent(QMouseEvent * e)
+void ActionZoomPan::mouseMoveEvent(QMouseEvent * e)
{
x2 = e->x();
y2 = e->y();
trigger();
}
-void RS_ActionZoomPan::mousePressEvent(QMouseEvent * e)
+void ActionZoomPan::mousePressEvent(QMouseEvent * e)
{
if (e->button() == Qt::MidButton || e->button() == Qt::LeftButton)
{
}
}
-void RS_ActionZoomPan::mouseReleaseEvent(QMouseEvent * e)
+void ActionZoomPan::mouseReleaseEvent(QMouseEvent * e)
{
if (e->button() == Qt::RightButton)
init(getStatus() - 1);
init(-1);
else
setStatus(0);
-
- //RS_DEBUG->print("RS_ActionZoomPan::mousePressEvent(): %f %f", v1.x, v1.y);
}
-void RS_ActionZoomPan::updateMouseCursor()
+void ActionZoomPan::updateMouseCursor()
{
#ifndef __APPLE__
graphicView->setMouseCursor(RS2::SizeAllCursor);