1 // rs_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 "rs_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 RS_ActionSetSnapRestriction::RS_ActionSetSnapRestriction(
26 RS_EntityContainer & container, GraphicView & graphicView, RS2::SnapRestriction snapRes):
27 RS_ActionInterface("Set Additional Snap Mode", container, graphicView)
29 this->snapRes = snapRes;
32 RS_ActionSetSnapRestriction::~RS_ActionSetSnapRestriction()
36 void RS_ActionSetSnapRestriction::trigger()
38 graphicView->setSnapRestriction(snapRes);
42 void RS_ActionSetSnapRestriction::init(int status)
44 RS_ActionInterface::init(status);