Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

qwt_plot_canvas.h

00001 /* -*- mode: C++ ; c-file-style: "stroustrup" -*- *****************************
00002  * Qwt Widget Library
00003  * Copyright (C) 1997   Josef Wilgen
00004  * Copyright (C) 2002   Uwe Rathmann
00005  * 
00006  * This library is free software; you can redistribute it and/or
00007  * modify it under the terms of the Qwt License, Version 1.0
00008  *****************************************************************************/
00009 
00010 // vim: expandtab
00011 
00012 #ifndef QWT_PLOT_CANVAS_H
00013 #define QWT_PLOT_CANVAS_H
00014 
00015 #include <qframe.h>
00016 #include <qpen.h>
00017 #include "qwt_global.h"
00018 
00019 class QwtPlot;
00020 class QPixmap;
00021 
00028 class QWT_EXPORT QwtPlotCanvas : public QFrame
00029 {
00030     Q_OBJECT
00031     friend class QwtPlot;
00032 
00033 public:
00034 
00052     enum PaintAttribute
00053     {
00054         PaintCached = 1,
00055         PaintPacked = 2
00056     };
00057 
00076     enum FocusIndicator
00077     {
00078         NoFocusIndicator,
00079         CanvasFocusIndicator,
00080         ItemFocusIndicator
00081     };
00082 
00083     void setFocusIndicator(FocusIndicator);
00084     FocusIndicator focusIndicator() const;
00085 
00086     void setPaintAttribute(PaintAttribute, bool on = true);
00087     bool testPaintAttribute(PaintAttribute) const;
00088 
00089     QPixmap *cache();
00090     const QPixmap *cache() const;
00091     void invalidateCache();
00092 
00093 protected:
00094     explicit QwtPlotCanvas(QwtPlot *);
00095     virtual ~QwtPlotCanvas();
00096 
00097     virtual void hideEvent(QHideEvent *);
00098 
00099     virtual void paintEvent(QPaintEvent *);
00100 
00101     virtual void drawContents(QPainter *);
00102     virtual void drawFocusIndicator(QPainter *);
00103 
00104     void drawCanvas(QPainter *painter = NULL);
00105 
00106 private:    
00107     void setSystemBackground(bool);
00108 
00109     class PrivateData;
00110     PrivateData *d_data;
00111 };
00112 
00113 #endif

Generated on Wed Aug 31 23:02:29 2005 for Qwt User's Guide by  doxygen 1.4.1