* in x and y will stay the same. false Exactly the chosen
* area will be fit to the viewport.
*/
-ActionZoomWindow::ActionZoomWindow(RS_EntityContainer & container,
+ActionZoomWindow::ActionZoomWindow(EntityContainer & container,
GraphicView & graphicView, bool keepAspectRatio):
ActionInterface("Zoom Window", container, graphicView)
{
void ActionZoomWindow::init(int status)
{
- RS_DEBUG->print("ActionZoomWindow::init()");
+ DEBUG->print("ActionZoomWindow::init()");
ActionInterface::init(status);
v1 = v2 = Vector(false);
/* snapMode = RS2::SnapFree;
void ActionZoomWindow::trigger()
{
- RS_DEBUG->print("ActionZoomWindow::trigger()");
+ DEBUG->print("ActionZoomWindow::trigger()");
ActionInterface::trigger();
v2 = snapPoint(e);
deletePreview();
clearPreview();
-/* preview->addEntity(new RS_Line(preview,
- RS_LineData(Vector(v1.x, v1.y), Vector(v2.x, v1.y))));
- preview->addEntity(new RS_Line(preview,
- RS_LineData(Vector(v2.x, v1.y), Vector(v2.x, v2.y))));
- preview->addEntity(new RS_Line(preview,
- RS_LineData(Vector(v2.x, v2.y), Vector(v1.x, v2.y))));
- preview->addEntity(new RS_Line(preview,
- RS_LineData(Vector(v1.x, v2.y), Vector(v1.x, v1.y))));*/
+/* preview->addEntity(new Line(preview,
+ LineData(Vector(v1.x, v1.y), Vector(v2.x, v1.y))));
+ preview->addEntity(new Line(preview,
+ LineData(Vector(v2.x, v1.y), Vector(v2.x, v2.y))));
+ preview->addEntity(new Line(preview,
+ LineData(Vector(v2.x, v2.y), Vector(v1.x, v2.y))));
+ preview->addEntity(new Line(preview,
+ LineData(Vector(v1.x, v2.y), Vector(v1.x, v1.y))));*/
drawPreview();
}
}
}
}
- RS_DEBUG->print("ActionZoomWindow::mousePressEvent(): %f %f", v1.x, v1.y);
+ DEBUG->print("ActionZoomWindow::mousePressEvent(): %f %f", v1.x, v1.y);
}
void ActionZoomWindow::mouseReleaseEvent(QMouseEvent * e)
{
- RS_DEBUG->print("ActionZoomWindow::mouseReleaseEvent()");
+ DEBUG->print("ActionZoomWindow::mouseReleaseEvent()");
if (e->button() == Qt::RightButton)
{
void ActionZoomWindow::updateMouseButtonHints()
{
- RS_DEBUG->print("ActionZoomWindow::updateMouseButtonHints()");
+ DEBUG->print("ActionZoomWindow::updateMouseButtonHints()");
switch (getStatus())
{
case 0:
- RS_DIALOGFACTORY->updateMouseWidget(tr("Specify first edge"), tr("Cancel"));
+ DIALOGFACTORY->updateMouseWidget(tr("Specify first edge"), tr("Cancel"));
break;
case 1:
- RS_DIALOGFACTORY->updateMouseWidget(tr("Specify second edge"), tr("Back"));
+ DIALOGFACTORY->updateMouseWidget(tr("Specify second edge"), tr("Back"));
break;
default:
- RS_DIALOGFACTORY->updateMouseWidget("", "");
+ DIALOGFACTORY->updateMouseWidget("", "");
break;
}
}