1 /*****************************************************************************
2 ** $Id: rs_staticgraphicview.cpp 1686 2003-08-25 22:50:31Z andrew $
4 ** This is part of the QCad Qt GUI
5 ** Copyright (C) 2001 Andrew Mustun
7 ** This program is free software; you can redistribute it and/or modify
8 ** it under the terms of the GNU General Public License (version 2) as
9 ** published by the Free Software Foundation.
11 ** This program is distributed in the hope that it will be useful,
12 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
13 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 ** GNU General Public License for more details.
16 ** You should have received a copy of the GNU General Public License
17 ** along with this program; if not, write to the Free Software
18 ** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 ******************************************************************************/
21 #include "rs_staticgraphicview.h"
23 #include "rs_graphic.h"
31 //RS_StaticGraphicView::RS_StaticGraphicView(int w, int h, RS_Painter * p): /*painter(p),*/ width(w),
32 RS_StaticGraphicView::RS_StaticGraphicView(int w, int h, PaintInterface * p): /*painter(p),*/ width(w), height(h)
34 setBackground(RS_Color(255, 255, 255));
36 setBorders(5, 5, 5, 5);
42 RS_StaticGraphicView::~RS_StaticGraphicView()
47 * @return width of widget.
49 int RS_StaticGraphicView::getWidth()
55 * @return height of widget.
57 int RS_StaticGraphicView::getHeight()
63 * Creates a new painter for the buffer of this widget and returns a
64 * pointer to it. The class variable 'painter' also
65 * points to that object.
67 //RS_Painter * RS_StaticGraphicView::createPainter()
68 PaintInterface * RS_StaticGraphicView::createPainter()
74 * Creates a new painter for this widget and returns a
75 * pointer to it. The class variable 'painter' also
76 * points to that object.
78 //RS_Painter * RS_StaticGraphicView::createDirectPainter()
79 PaintInterface * RS_StaticGraphicView::createDirectPainter()
81 return createPainter();
85 * Deletes the painter.
87 void RS_StaticGraphicView::destroyPainter()
92 * Handles paint events by redrawing the graphic in this view.
94 void RS_StaticGraphicView::paint()
96 RS_DEBUG->print("RS_StaticGraphicView::paint begin");
98 RS_DEBUG->print("RS_StaticGraphicView::paint end");