]> Shamusworld >> Repos - architektonas/blob - src/base/rs_staticgraphicview.cpp
ca6d1252bb5ebcc208fe0e7560a80df58de153ac
[architektonas] / src / base / rs_staticgraphicview.cpp
1 // rs_staticgraphicview.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/02/2010  Added this text. :-)
13 // JLH  06/15/2010  Moved implementation (however trivial) from header to here.
14 //
15
16 /*
17 To me, this is yet another useless class. It seems to me that this could be
18 easily replaced by putting a bitmap creation method in GraphicView. But that's
19 just me. >:-)
20 */
21
22 #include "rs_staticgraphicview.h"
23
24 /**
25  * Constructor.
26  *
27  * @param w Width
28  * @param h Height
29  */
30 RS_StaticGraphicView::RS_StaticGraphicView(int w, int h, PaintInterface * p): /*painter(p),*/ width(w), height(h)
31 {
32         setBackground(RS_Color(255, 255, 255));
33         painter = p;
34         setBorders(5, 5, 5, 5);
35 }
36
37 /**
38  * Destructor
39  */
40 RS_StaticGraphicView::~RS_StaticGraphicView()
41 {
42 }
43
44 /**
45  * @return width of widget.
46  */
47 int RS_StaticGraphicView::getWidth()
48 {
49         return width;
50 }
51
52 /**
53  * @return height of widget.
54  */
55 int RS_StaticGraphicView::getHeight()
56 {
57         return height;
58 }
59
60 /**
61  * Handles paint events by redrawing the graphic in this view.
62  */
63 void RS_StaticGraphicView::paint()
64 {
65         RS_DEBUG->print("RS_StaticGraphicView::paint begin");
66         drawIt();
67         RS_DEBUG->print("RS_StaticGraphicView::paint end");
68 }
69
70 /*virtual*/ void RS_StaticGraphicView::redraw()
71 {
72 }
73
74 /*virtual*/ void RS_StaticGraphicView::adjustOffsetControls()
75 {
76 }
77
78 /*virtual*/ void RS_StaticGraphicView::adjustZoomControls()
79 {
80 }
81
82 /*virtual*/ void RS_StaticGraphicView::setMouseCursor(RS2::CursorType)
83 {
84 }
85
86 /*virtual*/ void RS_StaticGraphicView::emulateMouseMoveEvent()
87 {
88 }
89
90 /*virtual*/ void RS_StaticGraphicView::updateGridStatusWidget(const QString &)
91 {
92 }