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 05/28/2010 Added this text. :-)
15 #include "actionzoomin.h"
17 #include "graphicview.h"
20 * Default constructor.
22 * @param direction In for zooming in, Out for zooming out.
23 * @param axis Axis that are affected by the zoom (OnlyX, OnlyY or Both)
25 ActionZoomIn::ActionZoomIn(RS_EntityContainer & container, GraphicView & graphicView, RS2::ZoomDirection direction, RS2::Axis axis, const Vector & center):
26 ActionInterface("Zoom in", container, graphicView)
28 this->direction = direction;
30 this->center = center;
33 ActionZoomIn::~ActionZoomIn()
37 void ActionZoomIn::init(int status)
39 ActionInterface::init(status);
43 void ActionZoomIn::trigger()
49 if (direction == RS2::In)
50 graphicView->zoomInX();
52 graphicView->zoomOutX();
57 if (direction == RS2::In)
58 graphicView->zoomInY();
60 graphicView->zoomOutY();
65 if (direction == RS2::In)
66 graphicView->zoomIn(1.25, center);
68 graphicView->zoomOut(1.25, center);