]> Shamusworld >> Repos - architektonas/blob - src/base/rs_staticgraphicview.h
Initial import
[architektonas] / src / base / rs_staticgraphicview.h
1 /*****************************************************************************
2 **  $Id: rs_staticgraphicview.h 1686 2003-08-25 22:50:31Z andrew $
3 **
4 **  This is part of the QCad Qt GUI
5 **  Copyright (C) 2001 Andrew Mustun
6 **
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.
10 **
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.
15 **
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 ******************************************************************************/
20
21 #ifndef RS_STATICGRAPHICVIEW_H
22 #define RS_STATICGRAPHICVIEW_H
23
24 #include "rs_graphicview.h"
25 #include "rs_layerlistlistener.h"
26
27 /**
28  * This is an implementation of a graphic viewer with a fixed size
29  * for drawing onto fixed devices (such as bitmaps).
30  */
31 class RS_StaticGraphicView: public RS_GraphicView
32 {
33         public:
34 //              RS_StaticGraphicView(int w, int h, RS_Painter * p);
35                 RS_StaticGraphicView(int w, int h, PaintInterface * p);
36                 virtual ~RS_StaticGraphicView();
37
38                 virtual int getWidth();
39                 virtual int getHeight();
40                 virtual void redraw() {}
41                 virtual void adjustOffsetControls() {}
42                 virtual void adjustZoomControls() {}
43 //              virtual RS_Painter * createPainter();
44 //              virtual RS_Painter * createDirectPainter();
45                 virtual PaintInterface * createPainter();
46                 virtual PaintInterface * createDirectPainter();
47                 virtual void destroyPainter();
48                 virtual void setMouseCursor(RS2::CursorType ) {}
49
50                 virtual void emulateMouseMoveEvent() {}
51                 virtual void updateGridStatusWidget(const QString &) {}
52
53                 void paint();
54
55                 //These pure virtual methods are placeholders for QG_GraphicView...
56                 //now here too...
57 //              virtual void SetPreviewMode(bool mode = true) {}
58 //              virtual void SetPreviewEntity(RS_Preview *) {}
59
60         private:
61                 //! Width
62                 int width;
63
64                 //! Height
65                 int height;
66 };
67
68 #endif