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 // Portions copyright (C) 2001-2003 RibbonSoft
7 // Copyright (C) 2010 Underground Software
8 // See the README and GPLv2 files for licensing and warranty information
10 // JLH = James L. Hammons <jlhamm@acm.org>
13 // --- ---------- -----------------------------------------------------------
14 // JLH 05/28/2010 Added this text. :-)
17 #include "actionzoomin.h"
19 #include "graphicview.h"
22 * Default constructor.
24 * @param direction In for zooming in, Out for zooming out.
25 * @param axis Axis that are affected by the zoom (OnlyX, OnlyY or Both)
27 ActionZoomIn::ActionZoomIn(EntityContainer & container, GraphicView & graphicView, RS2::ZoomDirection direction, RS2::Axis axis, const Vector & center):
28 ActionInterface("Zoom in", container, graphicView)
30 this->direction = direction;
32 this->center = center;
35 ActionZoomIn::~ActionZoomIn()
39 void ActionZoomIn::init(int status)
41 ActionInterface::init(status);
45 void ActionZoomIn::trigger()
51 if (direction == RS2::In)
52 graphicView->zoomInX();
54 graphicView->zoomOutX();
59 if (direction == RS2::In)
60 graphicView->zoomInY();
62 graphicView->zoomOutY();
67 if (direction == RS2::In)
68 graphicView->zoomIn(1.25, center);
70 graphicView->zoomOut(1.25, center);