//
#include "rs_actioneditundo.h"
-#include "rs_snapper.h"
-//Added by qt3to4:
-//#include <QIcon>//needed???
+
+#include "rs_dialogfactory.h"
+#include "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, GraphicView & graphicView): RS_ActionInterface("Edit Undo", container, graphicView)
{
this->undo = undo;
}
{
}
-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<QKeySequence> 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<QKeySequence> 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);
finish();
RS_DIALOGFACTORY->updateSelectionWidget(container->countSelected());
}
+