2 #include "rs_actionfileopen.h"
6 RS_ActionFileOpen::RS_ActionFileOpen(RS_EntityContainer & container,
7 RS_GraphicView & graphicView):
8 RS_ActionInterface("File Open", container, graphicView)
12 RS_ActionFileOpen::~RS_ActionFileOpen()
16 QAction * RS_ActionFileOpen::createGUIAction(RS2::ActionType /*type*/, QObject * parent)
18 //icon = QPixmap(fileopen_xpm);
19 QAction * action = new QAction(QIcon(":/res/fileopen2.png"), tr("&Open..."), parent);
20 action->setShortcut(Qt::CTRL + Qt::Key_O);
21 // QAction* action = new QAction(tr("Open Drawing"),
22 // QPixmap::fromMimeSource("fileopen2.png"),
23 // tr("&Open..."), CTRL+Key_O, parent);
24 action->setStatusTip(tr("Opens an existing drawing"));
28 void RS_ActionFileOpen::trigger()
31 // Not supported currently
32 RS_DEBUG->print("RS_ActionFileOpen::trigger");
34 QString fileName; //= RS_DIALOGFACTORY->requestFileOpenDialog();
35 if (graphic!=NULL && !fileName.isEmpty()) {
36 graphic->open(fileName, );
42 void RS_ActionFileOpen::init(int status)
44 RS_ActionInterface::init(status);