1 // rs_actionlayersfreezeall.cpp
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
8 // JLH = James L. Hammons <jlhamm@acm.org>
11 // --- ---------- -----------------------------------------------------------
12 // JLH 05/22/2010 Added this text. :-)
15 #include "rs_actionlayersfreezeall.h"
19 RS_ActionLayersFreezeAll::RS_ActionLayersFreezeAll(bool freeze,
20 RS_EntityContainer& container,
21 RS_GraphicView& graphicView)
22 :RS_ActionInterface("Freeze all Layers",
23 container, graphicView) {
25 this->freeze = freeze;
28 QAction * RS_ActionLayersFreezeAll::createGUIAction(RS2::ActionType type, QObject * /*parent*/)
30 QAction * action = NULL;
32 if (type == RS2::ActionLayersFreezeAll)
34 action = new QAction(tr("&Freeze all"), 0);
35 // action = new QAction(tr("Freeze all"), tr("&Freeze all"),
36 // QKeySequence(), NULL);
37 action->setStatusTip(tr("Freeze all layers"));
39 else if (type == RS2::ActionLayersDefreezeAll)
41 action = new QAction(tr("&Defreeze all"), 0);
42 // action = new QAction(tr("Defreeze all"), tr("&Defreeze all"),
43 // QKeySequence(), NULL);
44 action->setStatusTip(tr("Defreeze all layers"));
51 void RS_ActionLayersFreezeAll::trigger()
53 RS_DEBUG->print("RS_ActionLayersFreezeAll::trigger");
56 //RS_Layer* layer = graphic->getActiveLayer();
57 graphic->freezeAllLayers(freeze);
64 void RS_ActionLayersFreezeAll::init(int status) {
65 RS_ActionInterface::init(status);