1 /****************************************************************************
2 **
3  * Toggle whether a layer is a construction layer
4  * Construction layer doesn't appear on printout
5  * and have straight lines of infinite length
6 
7 Copyright (C) 2015 A. Stebich (librecad@mail.lordofbikes.de)
8 Copyright (C) 2011 Dongxu Li (dongxuli2011@gmail.com)
9 Copyright (C) 2011 R. van Twisk (librecad@rvt.dds.nl)
10 
11 This program is free software; you can redistribute it and/or
12 modify it under the terms of the GNU General Public License
13 as published by the Free Software Foundation; either version 2
14 of the License, or (at your option) any later version.
15 
16 This program is distributed in the hope that it will be useful,
17 but WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19 GNU General Public License for more details.
20 
21 You should have received a copy of the GNU General Public License
22 along with this program; if not, write to the Free Software
23 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
24 **********************************************************************/
25 
26 
27 #ifndef LC_ACTIONLAYERSTOGGLECONSTRUCTION_H
28 #define LC_ACTIONLAYERSTOGGLECONSTRUCTION_H
29 
30 #include "rs_actioninterface.h"
31 
32 class RS_Layer;
33 
34 /**
35  * whether a layer is a construction layer or not
36  * construction layers doesn't appear on printout,
37  * and have straight lines of infinite length
38  *
39  * @author Armin Stebich
40  */
41 class LC_ActionLayersToggleConstruction : public RS_ActionInterface {
42     Q_OBJECT
43 public:
44     LC_ActionLayersToggleConstruction(RS_EntityContainer& container,
45                                       RS_GraphicView& graphicView,
46                                       RS_Layer* layer);
47 
48 	void init(int status=0) override;
49 	void trigger() override;
50 
51 protected:
52     RS_Layer* a_layer;
53 
54 private:
55     void deselectEntities(RS_Layer* layer);
56 };
57 
58 #endif
59