1 // rs_actionzoomauto.cpp
3 // Part of the Architektonas Project
4 // Originally part of QCad Community Edition by Andrew Mustun
5 // Extensively rewritten and refactored by James L. Hammons
6 // (C) 2010 Underground Software
8 // JLH = James L. Hammons <jlhamm@acm.org>
11 // --- ---------- -----------------------------------------------------------
12 // JLH 06/05/2010 Added this text. :-)
15 #include "rs_actionzoomauto.h"
17 #include "graphicview.h"
22 * @param keepAspectRatio true: keep same zoom value for x/y.
23 * false: adjust both x and y individually
25 RS_ActionZoomAuto::RS_ActionZoomAuto(RS_EntityContainer & container,
26 GraphicView & graphicView, bool keepAspectRatio):
27 RS_ActionInterface("Auto zoom", container, graphicView)
29 this->keepAspectRatio = keepAspectRatio;
32 RS_ActionZoomAuto::~RS_ActionZoomAuto()
36 void RS_ActionZoomAuto::init(int status)
38 RS_ActionInterface::init(status);
42 void RS_ActionZoomAuto::trigger()
44 graphicView->zoomAuto(false, keepAspectRatio);