// Part of the Architektonas Project
// Originally part of QCad Community Edition by Andrew Mustun
// Extensively rewritten and refactored by James L. Hammons
-// (C) 2010 Underground Software
+// Portions copyright (C) 2001-2003 RibbonSoft
+// Copyright (C) 2010 Underground Software
+// See the README and GPLv2 files for licensing and warranty information
//
// JLH = James L. Hammons <jlhamm@acm.org>
//
// Who When What
// --- ---------- -----------------------------------------------------------
// JLH 06/02/2010 Added this text. :-)
+// JLH 06/15/2010 Moved implementation (however trivial) from header to here.
//
+/*
+To me, this is yet another useless class. It seems to me that this could be
+easily replaced by putting a bitmap creation method in GraphicView. But that's
+just me. >:-)
+*/
+
#include "rs_staticgraphicview.h"
-#include "drawing.h"
+#include "rs_debug.h"
/**
* Constructor.
* @param w Width
* @param h Height
*/
-//RS_StaticGraphicView::RS_StaticGraphicView(int w, int h, RS_Painter * p): /*painter(p),*/ width(w),
RS_StaticGraphicView::RS_StaticGraphicView(int w, int h, PaintInterface * p): /*painter(p),*/ width(w), height(h)
{
+//#warning "!!! PaintInterface * p passed in constructor is IGNORED !!!"
+//Not strictly true: it sets painter down below there...
setBackground(RS_Color(255, 255, 255));
painter = p;
setBorders(5, 5, 5, 5);
}
/**
- * Creates a new painter for the buffer of this widget and returns a
- * pointer to it. The class variable 'painter' also
- * points to that object.
+ * Handles paint events by redrawing the graphic in this view.
*/
-//RS_Painter * RS_StaticGraphicView::createPainter()
-PaintInterface * RS_StaticGraphicView::createPainter()
+void RS_StaticGraphicView::paint()
{
- return painter;
+ RS_DEBUG->print("RS_StaticGraphicView::paint begin");
+ drawIt();
+ RS_DEBUG->print("RS_StaticGraphicView::paint end");
}
-/**
- * Creates a new painter for this widget and returns a
- * pointer to it. The class variable 'painter' also
- * points to that object.
- */
-//RS_Painter * RS_StaticGraphicView::createDirectPainter()
-PaintInterface * RS_StaticGraphicView::createDirectPainter()
+/*virtual*/ void RS_StaticGraphicView::redraw()
{
- return createPainter();
}
-/**
- * Deletes the painter.
- */
-void RS_StaticGraphicView::destroyPainter()
+/*virtual*/ void RS_StaticGraphicView::adjustOffsetControls()
{
}
-/**
- * Handles paint events by redrawing the graphic in this view.
- */
-void RS_StaticGraphicView::paint()
+/*virtual*/ void RS_StaticGraphicView::adjustZoomControls()
+{
+}
+
+/*virtual*/ void RS_StaticGraphicView::setMouseCursor(RS2::CursorType)
+{
+}
+
+/*virtual*/ void RS_StaticGraphicView::emulateMouseMoveEvent()
+{
+}
+
+/*virtual*/ void RS_StaticGraphicView::updateGridStatusWidget(const QString &)
{
- RS_DEBUG->print("RS_StaticGraphicView::paint begin");
- drawIt();
- RS_DEBUG->print("RS_StaticGraphicView::paint end");
}