]> Shamusworld >> Repos - architektonas/blobdiff - src/actions/rs_actionfileopen.cpp
Major refactoring of actions: Moved implementation from header files
[architektonas] / src / actions / rs_actionfileopen.cpp
index 7093bbcbd235e842448511b75e0af063b353cbe4..517670f17b5492fc5e12c43ed7b6b140b8b687ca 100644 (file)
@@ -1,10 +1,22 @@
+// rs_actionfileopen.cpp
+//
+// Part of the Architektonas Project
+// Originally part of QCad Community Edition by Andrew Mustun
+// Extensively rewritten and refactored by James L. Hammons
+// (C) 2010 Underground Software
+//
+// JLH = James L. Hammons <jlhamm@acm.org>
+//
+// Who  When        What
+// ---  ----------  -----------------------------------------------------------
+// JLH  06/04/2010  Added this text. :-)
+//
 
 #include "rs_actionfileopen.h"
 
-#include "drawing.h"
+//#include "drawing.h"
 
-RS_ActionFileOpen::RS_ActionFileOpen(RS_EntityContainer & container,
-       RS_GraphicView & graphicView):
+RS_ActionFileOpen::RS_ActionFileOpen(RS_EntityContainer & container, RS_GraphicView & graphicView):
        RS_ActionInterface("File Open", container, graphicView)
 {
 }
@@ -13,34 +25,23 @@ RS_ActionFileOpen::~RS_ActionFileOpen()
 {
 }
 
-QAction * RS_ActionFileOpen::createGUIAction(RS2::ActionType /*type*/, QObject * parent)
-{
-       //icon = QPixmap(fileopen_xpm);
-       QAction * action = new QAction(QIcon(":/res/fileopen2.png"), tr("&Open..."), parent);
-       action->setShortcut(Qt::CTRL + Qt::Key_O);
-//     QAction* action = new QAction(tr("Open Drawing"),
-//                                                                     QPixmap::fromMimeSource("fileopen2.png"),
-//                                                                     tr("&Open..."), CTRL+Key_O, parent);
-       action->setStatusTip(tr("Opens an existing drawing"));
-       return action;
-}
-
 void RS_ActionFileOpen::trigger()
 {
-    /*
-    // Not supported currently
-    RS_DEBUG->print("RS_ActionFileOpen::trigger");
-
-    QString fileName; //= RS_DIALOGFACTORY->requestFileOpenDialog();
-    if (graphic!=NULL && !fileName.isEmpty()) {
-        graphic->open(fileName, );
-}
-    */
-    finish();
+       /*
+          // Not supported currently
+          RS_DEBUG->print("RS_ActionFileOpen::trigger");
+
+          QString fileName; //= RS_DIALOGFACTORY->requestFileOpenDialog();
+          if (graphic!=NULL && !fileName.isEmpty()) {
+               graphic->open(fileName, );
+          }
+        */
+       finish();
 }
 
 void RS_ActionFileOpen::init(int status)
 {
-    RS_ActionInterface::init(status);
-    trigger();
+       RS_ActionInterface::init(status);
+       trigger();
 }
+