]> Shamusworld >> Repos - architektonas/blob - src/base/staticgraphicview.cpp
Fixed problem with MDI activation.
[architektonas] / src / base / staticgraphicview.cpp
1 // 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 "staticgraphicview.h"
25
26 #include "debug.h"
27
28 /**
29  * Constructor.
30  *
31  * @param w Width
32  * @param h Height
33  */
34 StaticGraphicView::StaticGraphicView(int w, int h, PaintInterface * p): /*painter(p),*/ width(w), height(h)
35 {
36 //#warning "!!! PaintInterface * p passed in constructor is IGNORED !!!"
37 //Not strictly true: it sets painter down below there...
38         setBackground(Color(255, 255, 255));
39         painter = p;
40         setBorders(5, 5, 5, 5);
41 }
42
43 /**
44  * Destructor
45  */
46 StaticGraphicView::~StaticGraphicView()
47 {
48 }
49
50 /**
51  * @return width of widget.
52  */
53 int StaticGraphicView::getWidth()
54 {
55         return width;
56 }
57
58 /**
59  * @return height of widget.
60  */
61 int StaticGraphicView::getHeight()
62 {
63         return height;
64 }
65
66 /**
67  * Handles paint events by redrawing the graphic in this view.
68  */
69 void StaticGraphicView::paint()
70 {
71         DEBUG->print("StaticGraphicView::paint begin");
72         drawIt();
73         DEBUG->print("StaticGraphicView::paint end");
74 }
75
76 /*virtual*/ void StaticGraphicView::redraw()
77 {
78 }
79
80 /*virtual*/ void StaticGraphicView::adjustOffsetControls()
81 {
82 }
83
84 /*virtual*/ void StaticGraphicView::adjustZoomControls()
85 {
86 }
87
88 /*virtual*/ void StaticGraphicView::setMouseCursor(RS2::CursorType)
89 {
90 }
91
92 /*virtual*/ void StaticGraphicView::emulateMouseMoveEvent()
93 {
94 }
95
96 /*virtual*/ void StaticGraphicView::updateGridStatusWidget(const QString &)
97 {
98 }