Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #ifndef QWT_PLOT_GLCANVAS_H
00011 #define QWT_PLOT_GLCANVAS_H
00012
00013 #include "qwt_global.h"
00014 #include <qframe.h>
00015 #include <qgl.h>
00016
00017 class QwtPlot;
00018
00037 class QWT_EXPORT QwtPlotGLCanvas: public QGLWidget
00038 {
00039 Q_OBJECT
00040
00041 Q_ENUMS( Shape Shadow )
00042
00043 Q_PROPERTY( Shadow frameShadow READ frameShadow WRITE setFrameShadow )
00044 Q_PROPERTY( Shape frameShape READ frameShape WRITE setFrameShape )
00045 Q_PROPERTY( int lineWidth READ lineWidth WRITE setLineWidth )
00046 Q_PROPERTY( int midLineWidth READ midLineWidth WRITE setMidLineWidth )
00047 Q_PROPERTY( int frameWidth READ frameWidth )
00048 Q_PROPERTY( QRect frameRect READ frameRect DESIGNABLE false )
00049
00050 public:
00059 enum Shadow
00060 {
00062 Plain = QFrame::Plain,
00063
00065 Raised = QFrame::Raised,
00066
00068 Sunken = QFrame::Sunken
00069 };
00070
00082 enum Shape
00083 {
00084 NoFrame = QFrame::NoFrame,
00085
00086 Box = QFrame::Box,
00087 Panel = QFrame::Panel
00088 };
00089
00090 explicit QwtPlotGLCanvas( QwtPlot * = NULL );
00091 virtual ~QwtPlotGLCanvas();
00092
00093 void setFrameStyle( int style );
00094 int frameStyle() const;
00095
00096 void setFrameShadow( Shadow );
00097 Shadow frameShadow() const;
00098
00099 void setFrameShape( Shape );
00100 Shape frameShape() const;
00101
00102 void setLineWidth( int );
00103 int lineWidth() const;
00104
00105 void setMidLineWidth( int );
00106 int midLineWidth() const;
00107
00108 int frameWidth() const;
00109 QRect frameRect() const;
00110
00111 Q_INVOKABLE QPainterPath borderPath( const QRect & ) const;
00112
00113 virtual bool event( QEvent * );
00114
00115 public Q_SLOTS:
00116 void replot();
00117
00118 protected:
00119 virtual void paintEvent( QPaintEvent * );
00120
00121 virtual void drawBackground( QPainter * );
00122 virtual void drawBorder( QPainter * );
00123 virtual void drawItems( QPainter * );
00124
00125 private:
00126 class PrivateData;
00127 PrivateData *d_data;
00128 };
00129
00130 #endif