X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Factions%2Frs_actionblocksfreezeall.cpp;h=ef5f7793e2693e8a97b2914dfdcc042da1ee5489;hb=be33e866f2121c48db93e06d743c5ae3826c1948;hp=13305d3bcbadedbb9cbb69b79d2fb8698028b4f4;hpb=89e127aa3dbd74d3158e6dbe0ca1703420c04395;p=architektonas diff --git a/src/actions/rs_actionblocksfreezeall.cpp b/src/actions/rs_actionblocksfreezeall.cpp index 13305d3..ef5f779 100644 --- a/src/actions/rs_actionblocksfreezeall.cpp +++ b/src/actions/rs_actionblocksfreezeall.cpp @@ -15,41 +15,23 @@ #include "rs_actionblocksfreezeall.h" #include "drawing.h" +#include "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, 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(); } +