]> Shamusworld >> Repos - architektonas/blob - src/actions/rs_actionlockrelativezero.cpp
Refactoring: Moved RS_GraphicView to GraphicView.
[architektonas] / src / actions / rs_actionlockrelativezero.cpp
1 // rs_actionlockrelativezero.cpp
2 //
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
7 //
8 // JLH = James L. Hammons <jlhamm@acm.org>
9 //
10 // Who  When        What
11 // ---  ----------  -----------------------------------------------------------
12 // JLH  06/04/2010  Added this text. :-)
13 //
14
15 #include "rs_actionlockrelativezero.h"
16
17 #include "graphicview.h"
18
19 RS_ActionLockRelativeZero::RS_ActionLockRelativeZero(
20         RS_EntityContainer & container, GraphicView & graphicView, bool on):
21         RS_ActionInterface("(Un-)lock the relative Zero", container, graphicView)
22 {
23         this->on = on;
24 }
25
26 RS_ActionLockRelativeZero::~RS_ActionLockRelativeZero()
27 {
28 }
29
30 void RS_ActionLockRelativeZero::init(int status)
31 {
32         RS_ActionInterface::init(status);
33         trigger();
34         finish();
35 }
36
37 void RS_ActionLockRelativeZero::trigger()
38 {
39         graphicView->lockRelativeZero(on);
40 }
41