X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Factions%2Frs_actioneditundo.cpp;h=3a9cfeac6578dfa63705b14eae8653315d2b4caf;hb=3f46c180da0806c9c263e6d87d0f1404632402da;hp=939fe95e470a277eefab89b45802b772b14e88aa;hpb=16ce54abf01ca3032e42a5bb11a4afcf9014dcca;p=architektonas diff --git a/src/actions/rs_actioneditundo.cpp b/src/actions/rs_actioneditundo.cpp index 939fe95..3a9cfea 100644 --- a/src/actions/rs_actioneditundo.cpp +++ b/src/actions/rs_actioneditundo.cpp @@ -13,17 +13,16 @@ // #include "rs_actioneditundo.h" -#include "rs_snapper.h" -//Added by qt3to4: -//#include //needed??? + +#include "rs_dialogfactory.h" +#include "rs_graphicview.h" /** * Constructor. * * @param undo true for undo and false for redo. */ -RS_ActionEditUndo::RS_ActionEditUndo(bool undo, RS_EntityContainer & container, - RS_GraphicView & graphicView): RS_ActionInterface("Edit Undo", container, graphicView) +RS_ActionEditUndo::RS_ActionEditUndo(bool undo, RS_EntityContainer & container, RS_GraphicView & graphicView): RS_ActionInterface("Edit Undo", container, graphicView) { this->undo = undo; } @@ -32,34 +31,6 @@ RS_ActionEditUndo::~RS_ActionEditUndo() { } -QAction * RS_ActionEditUndo::createGUIAction(RS2::ActionType type, QObject * parent) -{ - QAction * action; - - if (type == RS2::ActionEditUndo) - { - action = new QAction(QIcon(":/res/undo2.png"), tr("&Undo")/*+ QString("\too")*/, parent); - QList ks; - ks.append(QKeySequence(tr("o, o", "Edit|Undo"))); - ks.append(Qt::CTRL + Qt::Key_Z); -// action->setShortcut(Qt::CTRL + Qt::Key_Z); - action->setShortcuts(ks); - action->setStatusTip(tr("Undoes last action")); - } - else - { - action = new QAction(QIcon(":/res/redo2.png"), tr("&Redo")/* + QString("\tuu")*/, parent); - QList ks; - ks.append(QKeySequence(tr("u, u", "Edit|Redo"))); - ks.append(Qt::CTRL + Qt::SHIFT + Qt::Key_Z); -// action->setShortcut(Qt::CTRL + Qt::SHIFT + Qt::Key_Z); - action->setShortcuts(ks); - action->setStatusTip(tr("Redoes last action")); - } - - return action; -} - void RS_ActionEditUndo::init(int status) { RS_ActionInterface::init(status); @@ -80,3 +51,4 @@ void RS_ActionEditUndo::trigger() finish(); RS_DIALOGFACTORY->updateSelectionWidget(container->countSelected()); } +