]> Shamusworld >> Repos - architektonas/blob - src/actions/rs_actionblocksfreezeall.cpp
90313f75046b1fe6cf4d3c6c98a1238a38df3d0e
[architektonas] / src / actions / rs_actionblocksfreezeall.cpp
1 // rs_actionblocksfreezeall.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_actionblocksfreezeall.h"
16
17 #include "drawing.h"
18 #include "rs_graphicview.h"
19
20 RS_ActionBlocksFreezeAll::RS_ActionBlocksFreezeAll(bool freeze, RS_EntityContainer & container, RS_GraphicView & graphicView): RS_ActionInterface("Freeze all Blocks",
21                 container, graphicView)
22 {
23         this->freeze = freeze;
24 }
25
26 RS_ActionBlocksFreezeAll::~RS_ActionBlocksFreezeAll()
27 {
28 }
29
30 void RS_ActionBlocksFreezeAll::trigger()
31 {
32         RS_DEBUG->print("RS_ActionBlocksFreezeAll::trigger");
33
34         if (graphic != NULL)
35                 graphic->freezeAllBlocks(freeze);
36
37         graphicView->redraw();
38         finish();
39 }
40
41 void RS_ActionBlocksFreezeAll::init(int status)
42 {
43         RS_ActionInterface::init(status);
44         trigger();
45 }
46