]> Shamusworld >> Repos - architektonas/blob - src/actions/actionfilesaveas.cpp
88a2a4dc39f2ae220d75a8bd6996d5c3c65f7471
[architektonas] / src / actions / actionfilesaveas.cpp
1 // actionfilesaveas.cpp
2 //
3 // Part of the Architektonas Project
4 // Originally part of QCad Community Edition by Andrew Mustun
5 // Extensively rewritten and refactored by James L. Hammons
6 // (C) 2010 Underground Software
7 //
8 // JLH = James L. Hammons <jlhamm@acm.org>
9 //
10 // Who  When        What
11 // ---  ----------  -----------------------------------------------------------
12 // JLH  06/04/2010  Added this text. :-)
13 //
14
15 #include "actionfilesaveas.h"
16
17 #include "drawing.h"
18
19 ActionFileSaveAs::ActionFileSaveAs(RS_EntityContainer & container, GraphicView & graphicView):
20         ActionInterface("Add Layer", container, graphicView)
21 {
22 }
23
24 ActionFileSaveAs::~ActionFileSaveAs()
25 {
26 }
27
28 void ActionFileSaveAs::trigger()
29 {
30         RS_DEBUG->print("ActionFileSaveAs::trigger");
31         QString fileName; // = RS_DIALOGFACTORY->requestFileSaveAsDialog();
32
33         if (graphic != NULL && !fileName.isEmpty())
34                 graphic->saveAs(fileName, RS2::FormatUnknown);
35
36         finish();
37 }
38
39 void ActionFileSaveAs::init(int status)
40 {
41         ActionInterface::init(status);
42         trigger();
43 }