Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #ifndef QWT_PLOT_OPENGL_CANVAS_H
00011 #define QWT_PLOT_OPENGL_CANVAS_H
00012
00013 #include "qwt_global.h"
00014 #include "qwt_plot_abstract_canvas.h"
00015 #include <qopenglwidget.h>
00016
00017 class QwtPlot;
00018
00019 class QWT_EXPORT QwtPlotOpenGLCanvas: public QOpenGLWidget, public QwtPlotAbstractGLCanvas
00020 {
00021 Q_OBJECT
00022
00023 Q_PROPERTY( QFrame::Shadow frameShadow READ frameShadow WRITE setFrameShadow )
00024 Q_PROPERTY( QFrame::Shape frameShape READ frameShape WRITE setFrameShape )
00025 Q_PROPERTY( int lineWidth READ lineWidth WRITE setLineWidth )
00026 Q_PROPERTY( int midLineWidth READ midLineWidth WRITE setMidLineWidth )
00027 Q_PROPERTY( int frameWidth READ frameWidth )
00028 Q_PROPERTY( QRect frameRect READ frameRect DESIGNABLE false )
00029
00030 Q_PROPERTY( double borderRadius READ borderRadius WRITE setBorderRadius )
00031
00032 public:
00033 explicit QwtPlotOpenGLCanvas( QwtPlot * = NULL );
00034 explicit QwtPlotOpenGLCanvas( const QSurfaceFormat &, QwtPlot * = NULL);
00035 virtual ~QwtPlotOpenGLCanvas();
00036
00037 Q_INVOKABLE virtual void invalidateBackingStore();
00038 Q_INVOKABLE QPainterPath borderPath( const QRect & ) const;
00039
00040 virtual bool event( QEvent * );
00041
00042 public Q_SLOTS:
00043 void replot();
00044
00045 protected:
00046 virtual void paintEvent( QPaintEvent * );
00047
00048 virtual void initializeGL();
00049 virtual void paintGL();
00050 virtual void resizeGL( int width, int height );
00051
00052 private:
00053 void init( const QSurfaceFormat & );
00054 virtual void clearBackingStore();
00055
00056 class PrivateData;
00057 PrivateData *d_data;
00058 };
00059
00060 #endif