]> Shamusworld >> Repos - architektonas/blob - src/actions/actionlayersfreezeall.cpp
13ebe1cc38c7585073b3e8a1e432735c0f851e7d
[architektonas] / src / actions / actionlayersfreezeall.cpp
1 // actionlayersfreezeall.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  05/22/2010  Added this text. :-)
13 //
14
15 #include "actionlayersfreezeall.h"
16
17 #include "drawing.h"
18
19 ActionLayersFreezeAll::ActionLayersFreezeAll(bool freeze,
20         RS_EntityContainer & container, GraphicView & graphicView):
21         ActionInterface("Freeze all Layers", container, graphicView)
22 {
23         this->freeze = freeze;
24 }
25
26 ActionLayersFreezeAll::~ActionLayersFreezeAll()
27 {
28 }
29
30 void ActionLayersFreezeAll::trigger()
31 {
32         RS_DEBUG->print("ActionLayersFreezeAll::trigger");
33
34         if (graphic)
35                 graphic->freezeAllLayers(freeze);
36
37         finish();
38 }
39
40 void ActionLayersFreezeAll::init(int status)
41 {
42         ActionInterface::init(status);
43         trigger();
44 }