X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Factions%2Frs_actionlayersfreezeall.cpp;h=62308d0c9554171a77d4d84653841fb5e08aeb41;hb=f7188d32d0beaef31fc3475be05daea2f018ebec;hp=7e7dc9088dcea233fd62ea6340bd851c753a4480;hpb=89e127aa3dbd74d3158e6dbe0ca1703420c04395;p=architektonas diff --git a/src/actions/rs_actionlayersfreezeall.cpp b/src/actions/rs_actionlayersfreezeall.cpp index 7e7dc90..62308d0 100644 --- a/src/actions/rs_actionlayersfreezeall.cpp +++ b/src/actions/rs_actionlayersfreezeall.cpp @@ -16,54 +16,30 @@ #include "drawing.h" -RS_ActionLayersFreezeAll::RS_ActionLayersFreezeAll(bool freeze, - RS_EntityContainer& container, - RS_GraphicView& graphicView) - :RS_ActionInterface("Freeze all Layers", - container, graphicView) { - - this->freeze = freeze; +RS_ActionLayersFreezeAll::RS_ActionLayersFreezeAll(bool freeze, RS_EntityContainer & container, GraphicView & graphicView): + RS_ActionInterface("Freeze all Layers", container, graphicView) +{ + this->freeze = freeze; } -QAction * RS_ActionLayersFreezeAll::createGUIAction(RS2::ActionType type, QObject * /*parent*/) +RS_ActionLayersFreezeAll::~RS_ActionLayersFreezeAll() { - QAction * action = NULL; - - if (type == RS2::ActionLayersFreezeAll) - { - action = new QAction(tr("&Freeze all"), 0); -// action = new QAction(tr("Freeze all"), tr("&Freeze all"), -// QKeySequence(), NULL); - action->setStatusTip(tr("Freeze all layers")); - } - else if (type == RS2::ActionLayersDefreezeAll) - { - action = new QAction(tr("&Defreeze all"), 0); -// action = new QAction(tr("Defreeze all"), tr("&Defreeze all"), -// QKeySequence(), NULL); - action->setStatusTip(tr("Defreeze all layers")); - } - - return action; } - void RS_ActionLayersFreezeAll::trigger() { - RS_DEBUG->print("RS_ActionLayersFreezeAll::trigger"); - if (graphic!=NULL) - { - //RS_Layer* layer = graphic->getActiveLayer(); - graphic->freezeAllLayers(freeze); - } - finish(); -} + RS_DEBUG->print("RS_ActionLayersFreezeAll::trigger"); + if (graphic != NULL) + //RS_Layer* layer = graphic->getActiveLayer(); + graphic->freezeAllLayers(freeze); + finish(); +} -void RS_ActionLayersFreezeAll::init(int status) { - RS_ActionInterface::init(status); - trigger(); +void RS_ActionLayersFreezeAll::init(int status) +{ + RS_ActionInterface::init(status); + trigger(); } -// EOF