]> Shamusworld >> Repos - architektonas/blobdiff - src/actions/rs_actionblocksfreezeall.cpp
Major refactoring of actions: Moved implementation from header files
[architektonas] / src / actions / rs_actionblocksfreezeall.cpp
index 13305d3bcbadedbb9cbb69b79d2fb8698028b4f4..90313f75046b1fe6cf4d3c6c98a1238a38df3d0e 100644 (file)
 #include "rs_actionblocksfreezeall.h"
 
 #include "drawing.h"
+#include "rs_graphicview.h"
 
-RS_ActionBlocksFreezeAll::RS_ActionBlocksFreezeAll(bool freeze, RS_EntityContainer & container,
-       RS_GraphicView& graphicView): RS_ActionInterface("Freeze all Blocks",
-       container, graphicView)
+RS_ActionBlocksFreezeAll::RS_ActionBlocksFreezeAll(bool freeze, RS_EntityContainer & container, RS_GraphicView & graphicView): RS_ActionInterface("Freeze all Blocks",
+               container, graphicView)
 {
        this->freeze = freeze;
 }
 
-QAction * RS_ActionBlocksFreezeAll::createGUIAction(RS2::ActionType type, QObject* /*parent*/)
+RS_ActionBlocksFreezeAll::~RS_ActionBlocksFreezeAll()
 {
-    QAction * action = NULL;
-
-       if (type == RS2::ActionBlocksFreezeAll)
-       {
-               action = new QAction(tr("&Freeze all"), 0);
-//             action= new QAction(tr("Freeze all"), tr("&Freeze all"),
-//                                  QKeySequence(), NULL);
-       action->setStatusTip(tr("Freeze all blocks"));
-       }
-       else if (type == RS2::ActionBlocksDefreezeAll)
-       {
-        action = new QAction(tr("&Defreeze all"), 0);
-//        action = new QAction(tr("Defreeze all"), tr("&Defreeze all"),
-//                             QKeySequence(), NULL);
-        action->setStatusTip(tr("Defreeze all blocks"));
-       }
-
-    return action;
 }
 
 void RS_ActionBlocksFreezeAll::trigger()
 {
        RS_DEBUG->print("RS_ActionBlocksFreezeAll::trigger");
 
-       if (graphic!=NULL)
+       if (graphic != NULL)
                graphic->freezeAllBlocks(freeze);
 
        graphicView->redraw();
@@ -61,3 +43,4 @@ void RS_ActionBlocksFreezeAll::init(int status)
        RS_ActionInterface::init(status);
        trigger();
 }
+