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