]> Shamusworld >> Repos - architektonas/blob - src/actions/rs_actionoptionsdrawing.cpp
Major refactoring of actions: Moved implementation from header files
[architektonas] / src / actions / rs_actionoptionsdrawing.cpp
1 // rs_actionoptionsdrawing.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 "rs_actionoptionsdrawing.h"
16
17 #include "rs_dialogfactory.h"
18 #include "rs_graphicview.h"
19
20 RS_ActionOptionsDrawing::RS_ActionOptionsDrawing(RS_EntityContainer & container, RS_GraphicView & graphicView):
21         RS_ActionInterface("Drawing Options", container, graphicView)
22 {
23 }
24
25 RS_ActionOptionsDrawing::~RS_ActionOptionsDrawing()
26 {
27 }
28
29 /*virtual*/ RS2::ActionType RS_ActionOptionsDrawing::rtti()
30 {
31         return RS2::ActionOptionsDrawing;
32 }
33
34 void RS_ActionOptionsDrawing::init(int status)
35 {
36         RS_ActionInterface::init(status);
37
38         trigger();
39 }
40
41 void RS_ActionOptionsDrawing::trigger()
42 {
43         if (graphic != NULL)
44         {
45                 RS_DIALOGFACTORY->requestOptionsDrawingDialog(*graphic);
46                 RS_DIALOGFACTORY->updateCoordinateWidget(Vector(0.0, 0.0),
47                         Vector(0.0, 0.0),
48                         true);
49                 graphicView->updateGrid();
50                 graphicView->redraw();
51         }
52         finish();
53 }
54
55 // EOF