]> Shamusworld >> Repos - architektonas/blobdiff - src/actions/rs_actionlayersfreezeall.cpp
Major refactoring of actions: Moved implementation from header files
[architektonas] / src / actions / rs_actionlayersfreezeall.cpp
index 7e7dc9088dcea233fd62ea6340bd851c753a4480..d94ffc89f8c022510a4912b9d04527caccea0ff5 100644 (file)
 
 #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