Qwt Polar User's Guide
0.1.0
|
00001 /* -*- mode: C++ ; c-file-style: "stroustrup" -*- ***************************** 00002 * QwtPolar Widget Library 00003 * Copyright (C) 2008 Uwe Rathmann 00004 * 00005 * This library is free software; you can redistribute it and/or 00006 * modify it under the terms of the Qwt License, Version 1.0 00007 *****************************************************************************/ 00008 00009 #ifndef QWT_POLAR_CANVAS_H 00010 #define QWT_POLAR_CANVAS_H 1 00011 00012 #include <qframe.h> 00013 #include "qwt_polar_global.h" 00014 #include "qwt_double_rect.h" 00015 00016 class QPainter; 00017 class QwtPolarPlot; 00018 00027 class QWT_POLAR_EXPORT QwtPolarCanvas: public QFrame 00028 { 00029 Q_OBJECT 00030 00031 public: 00044 enum PaintAttribute 00045 { 00046 PaintCached = 1 00047 }; 00048 00049 explicit QwtPolarCanvas(QwtPolarPlot *); 00050 virtual ~QwtPolarCanvas(); 00051 00052 QwtPolarPlot *plot(); 00053 const QwtPolarPlot *plot() const; 00054 00055 void setPaintAttribute(PaintAttribute, bool on = true); 00056 bool testPaintAttribute(PaintAttribute) const; 00057 00058 QPixmap *paintCache(); 00059 const QPixmap *paintCache() const; 00060 void invalidatePaintCache(); 00061 00062 protected: 00063 virtual void paintEvent(QPaintEvent *); 00064 virtual void resizeEvent(QResizeEvent *); 00065 00066 virtual void drawContents(QPainter *); 00067 00068 void drawCanvas(QPainter *, const QwtDoubleRect &); 00069 00070 class PrivateData; 00071 PrivateData *d_data; 00072 }; 00073 00074 #endif