]> Shamusworld >> Repos - architektonas/blob - src/base/rs_staticgraphicview.cpp
83d9deb145e588e7d967e232d8bdf2000a97f969
[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 /**
27  * Constructor.
28  *
29  * @param w Width
30  * @param h Height
31  */
32 RS_StaticGraphicView::RS_StaticGraphicView(int w, int h, PaintInterface * p): /*painter(p),*/ width(w), height(h)
33 {
34         setBackground(RS_Color(255, 255, 255));
35         painter = p;
36         setBorders(5, 5, 5, 5);
37 }
38
39 /**
40  * Destructor
41  */
42 RS_StaticGraphicView::~RS_StaticGraphicView()
43 {
44 }
45
46 /**
47  * @return width of widget.
48  */
49 int RS_StaticGraphicView::getWidth()
50 {
51         return width;
52 }
53
54 /**
55  * @return height of widget.
56  */
57 int RS_StaticGraphicView::getHeight()
58 {
59         return height;
60 }
61
62 /**
63  * Handles paint events by redrawing the graphic in this view.
64  */
65 void RS_StaticGraphicView::paint()
66 {
67         RS_DEBUG->print("RS_StaticGraphicView::paint begin");
68         drawIt();
69         RS_DEBUG->print("RS_StaticGraphicView::paint end");
70 }
71
72 /*virtual*/ void RS_StaticGraphicView::redraw()
73 {
74 }
75
76 /*virtual*/ void RS_StaticGraphicView::adjustOffsetControls()
77 {
78 }
79
80 /*virtual*/ void RS_StaticGraphicView::adjustZoomControls()
81 {
82 }
83
84 /*virtual*/ void RS_StaticGraphicView::setMouseCursor(RS2::CursorType)
85 {
86 }
87
88 /*virtual*/ void RS_StaticGraphicView::emulateMouseMoveEvent()
89 {
90 }
91
92 /*virtual*/ void RS_StaticGraphicView::updateGridStatusWidget(const QString &)
93 {
94 }