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=6e79f83d8052eaf14af412d247e4ab48ef6dbfe7;hpb=16ce54abf01ca3032e42a5bb11a4afcf9014dcca;p=architektonas diff --git a/src/actions/rs_actionlayersfreezeall.cpp b/src/actions/rs_actionlayersfreezeall.cpp index 6e79f83..62308d0 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, 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