]> Shamusworld >> Repos - architektonas/blobdiff - src/actions/rs_actionselectall.cpp
Major refactoring of actions: Moved implementation from header files
[architektonas] / src / actions / rs_actionselectall.cpp
index b3a0e220b6462a4b9436af1a62a285e3469aa614..9a58bfe2571f406e4c4f02cd9a584ce9c54cf8aa 100644 (file)
@@ -9,43 +9,29 @@
 //
 // Who  When        What
 // ---  ----------  -----------------------------------------------------------
-// JLH  05/22/2010  Added this text. :-)
+// JLH  06/22/2010  Added this text. :-)
 //
 
 #include "rs_actionselectall.h"
+
+#include "rs_dialogfactory.h"
 #include "rs_selection.h"
 
-RS_ActionSelectAll::RS_ActionSelectAll(RS_EntityContainer& container,
-       RS_GraphicView& graphicView, bool select):
+RS_ActionSelectAll::RS_ActionSelectAll(RS_EntityContainer & container,
+       RS_GraphicView & graphicView, bool select):
        RS_ActionInterface("Select All Entities", container, graphicView)
 {
-    this->select = select;
+       this->select = select;
 }
 
-QAction * RS_ActionSelectAll::createGUIAction(RS2::ActionType type, QObject * parent)
+RS_ActionSelectAll::~RS_ActionSelectAll()
 {
-       QAction * action;
-
-       if (type == RS2::ActionSelectAll)
-       {
-               action = new QAction(tr("Select &All"), parent);
-               action->setShortcut(Qt::CTRL + Qt::Key_A);
-//             action = new QAction(tr("Select All"), tr("Select &All"),
-//                                                             CTRL+Key_A, parent);
-               action->setStatusTip(tr("Selects all Entities"));
-       }
-       else
-       {
-               action = new QAction(tr("Deselect &all"), parent);
-               action->setShortcut(Qt::CTRL + Qt::Key_K);
-//             action = new QAction(tr("Deselect all"), tr("Deselect &all"),
-//                                                             CTRL+Key_K, parent);
-               action->setStatusTip(tr("Deselects all Entities"));
-       }
-
-       return action;
 }
 
+/*virtual*/ RS2::ActionType RS_ActionSelectAll::rtti()
+{
+       return RS2::ActionSelectAll;
+}
 
 void RS_ActionSelectAll::init(int status)
 {
@@ -61,5 +47,3 @@ void RS_ActionSelectAll::trigger()
 
        RS_DIALOGFACTORY->updateSelectionWidget(container->countSelected());
 }
-
-// EOF