1 // actionsetsnaprestriction.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 "actionsetsnaprestriction.h"
17 #include "graphicview.h"
22 * @param snapRes The new snap mode used from now on.
23 * @param set true: set additional snap mode / false: unset
25 ActionSetSnapRestriction::ActionSetSnapRestriction(
26 RS_EntityContainer & container, GraphicView & graphicView, RS2::SnapRestriction snapRes):
27 ActionInterface("Set Additional Snap Mode", container, graphicView)
29 this->snapRes = snapRes;
32 ActionSetSnapRestriction::~ActionSetSnapRestriction()
36 void ActionSetSnapRestriction::trigger()
38 graphicView->setSnapRestriction(snapRes);
42 void ActionSetSnapRestriction::init(int status)
44 ActionInterface::init(status);