]> Shamusworld >> Repos - architektonas/blob - src/actions/actionoptionsdrawing.cpp
Last checkin before major refactor...
[architektonas] / src / actions / actionoptionsdrawing.cpp
1 // 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 "actionoptionsdrawing.h"
16
17 #include "rs_dialogfactory.h"
18 #include "graphicview.h"
19
20 ActionOptionsDrawing::ActionOptionsDrawing(RS_EntityContainer & container, GraphicView & graphicView):
21         ActionInterface("Drawing Options", container, graphicView)
22 {
23 }
24
25 ActionOptionsDrawing::~ActionOptionsDrawing()
26 {
27 }
28
29 /*virtual*/ RS2::ActionType ActionOptionsDrawing::rtti()
30 {
31         return RS2::ActionOptionsDrawing;
32 }
33
34 void ActionOptionsDrawing::init(int status)
35 {
36         ActionInterface::init(status);
37         trigger();
38 }
39
40 void ActionOptionsDrawing::trigger()
41 {
42         if (graphic)
43         {
44                 RS_DIALOGFACTORY->requestOptionsDrawingDialog(*graphic);
45                 RS_DIALOGFACTORY->updateCoordinateWidget(Vector(0.0, 0.0), Vector(0.0, 0.0), true);
46                 graphicView->updateGrid();
47                 graphicView->redraw();
48         }
49         finish();
50 }