]> Shamusworld >> Repos - architektonas/blob - src/actions/rs_actionlayersfreezeall.cpp
62308d0c9554171a77d4d84653841fb5e08aeb41
[architektonas] / src / actions / rs_actionlayersfreezeall.cpp
1 // rs_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 "rs_actionlayersfreezeall.h"
16
17 #include "drawing.h"
18
19 RS_ActionLayersFreezeAll::RS_ActionLayersFreezeAll(bool freeze, RS_EntityContainer & container, GraphicView & graphicView):
20         RS_ActionInterface("Freeze all Layers", container, graphicView)
21 {
22         this->freeze = freeze;
23 }
24
25 RS_ActionLayersFreezeAll::~RS_ActionLayersFreezeAll()
26 {
27 }
28
29 void RS_ActionLayersFreezeAll::trigger()
30 {
31         RS_DEBUG->print("RS_ActionLayersFreezeAll::trigger");
32
33         if (graphic != NULL)
34                 //RS_Layer* layer = graphic->getActiveLayer();
35                 graphic->freezeAllLayers(freeze);
36
37         finish();
38 }
39
40 void RS_ActionLayersFreezeAll::init(int status)
41 {
42         RS_ActionInterface::init(status);
43         trigger();
44 }
45