X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Factions%2Frs_actionlayersfreezeall.cpp;h=d94ffc89f8c022510a4912b9d04527caccea0ff5;hb=3f46c180da0806c9c263e6d87d0f1404632402da;hp=6e79f83d8052eaf14af412d247e4ab48ef6dbfe7;hpb=16ce54abf01ca3032e42a5bb11a4afcf9014dcca;p=architektonas diff --git a/src/actions/rs_actionlayersfreezeall.cpp b/src/actions/rs_actionlayersfreezeall.cpp index 6e79f83..d94ffc8 100644 --- a/src/actions/rs_actionlayersfreezeall.cpp +++ b/src/actions/rs_actionlayersfreezeall.cpp @@ -14,56 +14,32 @@ #include "rs_actionlayersfreezeall.h" -#include "rs_graphic.h" +#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, RS_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