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