]> Shamusworld >> Repos - architektonas/blob - src/mainapp/qc_graphicview.cpp
7d184ee039f5ad7728c3f2695cc6c78c27c78cfb
[architektonas] / src / mainapp / qc_graphicview.cpp
1 // qc_graphicview.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  05/17/2010  Added this text. :-)
13 //
14
15 #include "qc_graphicview.h"
16
17 #include "rs_actiondefault.h"
18 #include "settings.h"
19 #include "qc_applicationwindow.h"
20
21 QC_GraphicView::QC_GraphicView(RS_Document * doc, QWidget * parent):
22         QG_GraphicView(parent, "graphicview")
23 {
24         RS_DEBUG->print("QC_GraphicView::QC_GraphicView()...");
25         //document = doc;
26         RS_DEBUG->print("  Setting Container...");
27
28         if (doc != NULL)
29                 setContainer(doc);
30
31         RS_DEBUG->print("  container set.");
32         setFactorX(4.0);
33         setFactorY(4.0);
34         setOffset(50, 50);
35         setBorders(10, 10, 10, 10);
36
37         if (doc != NULL)
38                 setDefaultAction(new RS_ActionDefault(*doc, *this));
39 }
40
41 QC_GraphicView::~QC_GraphicView()
42 {
43 }
44
45 void QC_GraphicView::drawIt()
46 {
47         if (!isUpdateEnabled())
48                 return;
49
50         RS_GraphicView::drawIt();
51 }