1 // staticgraphicview.cpp
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
10 // JLH = James L. Hammons <jlhamm@acm.org>
13 // --- ---------- -----------------------------------------------------------
14 // JLH 06/02/2010 Added this text. :-)
15 // JLH 06/15/2010 Moved implementation (however trivial) from header to here.
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
24 #include "staticgraphicview.h"
34 StaticGraphicView::StaticGraphicView(int w, int h, PaintInterface * p): /*painter(p),*/ width(w), height(h)
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));
40 setBorders(5, 5, 5, 5);
46 StaticGraphicView::~StaticGraphicView()
51 * @return width of widget.
53 int StaticGraphicView::getWidth()
59 * @return height of widget.
61 int StaticGraphicView::getHeight()
67 * Handles paint events by redrawing the graphic in this view.
69 void StaticGraphicView::paint()
71 DEBUG->print("StaticGraphicView::paint begin");
73 DEBUG->print("StaticGraphicView::paint end");
76 /*virtual*/ void StaticGraphicView::redraw()
80 /*virtual*/ void StaticGraphicView::adjustOffsetControls()
84 /*virtual*/ void StaticGraphicView::adjustZoomControls()
88 /*virtual*/ void StaticGraphicView::setMouseCursor(RS2::CursorType)
92 /*virtual*/ void StaticGraphicView::emulateMouseMoveEvent()
96 /*virtual*/ void StaticGraphicView::updateGridStatusWidget(const QString &)