qwt_paint_buffer.h
Go to the documentation of this file.
1 /*-*- c++ -*-******************************************************************
2  * Qwt Widget Library
3  * Copyright (C) 1997 Josef Wilgen
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the Free Software
17  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18  *****************************************************************************/
19 
20 #ifndef QWT_PAINT_BUFFER_H
21 #define QWT_PAINT_BUFFER_H 1
22 
23 #include <qpixmap.h>
24 //#include "qwt_global.h"
25 
26 class QPainter;
27 
28 namespace hippodraw {
29 
39 {
40 public:
42  QwtPaintBuffer(QPaintDevice *, const QRect &, QPainter *painter = NULL);
43 
44  virtual ~QwtPaintBuffer();
45 
46  void open(QPaintDevice *, const QRect &, QPainter *painter = NULL);
47  void close();
48 
49  QPainter *painter();
50  const QPaintDevice *device();
51 
52  static void setEnabled(bool enable);
53  static bool isEnabled();
54 
55 protected:
56  void flush();
57 
58 private:
61 
62  QPaintDevice *d_device; // use QGuardedPtr
63  QPainter *d_painter; // use QGuardedPtr
64  QPainter *d_devicePainter; // use QGuardedPtr
65 
66  static bool d_enabled;
67 };
68 
69 } // namespace hippodraw
70 
71 #endif

Generated for HippoDraw Class Library by doxygen