Qwt User's Guide: qwt_plot_glcanvas.h Source File

Qwt User's Guide 6.1.3

- Main Page
- Classes

qwt_plot_glcanvas.h
1 /* -*- mode: C++ ; c-file-style: "stroustrup" -*- *****************************
2 * Qwt Widget Library
3 * Copyright (C) 1997 Josef Wilgen
4 * Copyright (C) 2002 Uwe Rathmann
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the Qwt License, Version 1.0
8 *****************************************************************************/
9
10 #ifndef QWT_PLOT_GLCANVAS_H
11 #define QWT_PLOT_GLCANVAS_H
12
13 #include "qwt_global.h"
14 #include <qframe.h>
15 #include <qgl.h>
16
17 class QwtPlot;
18
37 class QWT_EXPORT QwtPlotGLCanvas: public QGLWidget
38 {
39 Q_OBJECT
40
41 Q_ENUMS( Shape Shadow )
42
43 Q_PROPERTY( Shadow frameShadow READ frameShadow WRITE setFrameShadow )
44 Q_PROPERTY( Shape frameShape READ frameShape WRITE setFrameShape )
45 Q_PROPERTY( int lineWidth READ lineWidth WRITE setLineWidth )
46 Q_PROPERTY( int midLineWidth READ midLineWidth WRITE setMidLineWidth )
47 Q_PROPERTY( int frameWidth READ frameWidth )
48 Q_PROPERTY( QRect frameRect READ frameRect DESIGNABLE false )
49
50 public:
59 enum Shadow
60 {
62 Plain = QFrame::Plain,
63
65 Raised = QFrame::Raised,
66
68 Sunken = QFrame::Sunken
69 };
70
82 enum Shape
83 {
84 NoFrame = QFrame::NoFrame,
85
86 Box = QFrame::Box,
87 Panel = QFrame::Panel
88 };
89
90 explicit QwtPlotGLCanvas( QwtPlot * = NULL );
91 virtual ~QwtPlotGLCanvas();
92
93 void setFrameStyle( int style );
94 int frameStyle() const;
95
96 void setFrameShadow( Shadow );
97 Shadow frameShadow() const;
98
99 void setFrameShape( Shape );
100 Shape frameShape() const;
101
102 void setLineWidth( int );
103 int lineWidth() const;
104
105 void setMidLineWidth( int );
106 int midLineWidth() const;
107
108 int frameWidth() const;
109 QRect frameRect() const;
110
111 Q_INVOKABLE QPainterPath borderPath( const QRect & ) const;
112
113 virtual bool event( QEvent * );
114
115 public Q_SLOTS:
116 void replot();
117
118 protected:
119 virtual void paintEvent( QPaintEvent * );
120
121 virtual void drawBackground( QPainter * );
122 virtual void drawBorder( QPainter * );
123 virtual void drawItems( QPainter * );
124
125 private:
126 class PrivateData;
127 PrivateData *d_data;
128 };
129
130 #endif
QwtPlotGLCanvas::Shadow
Shadow
Frame shadow.
Definition: qwt_plot_glcanvas.h:59
QwtPlotGLCanvas
An alternative canvas for a QwtPlot derived from QGLWidget.
Definition: qwt_plot_glcanvas.h:37
QwtPlotGLCanvas::Shape
Shape
Frame shape.
Definition: qwt_plot_glcanvas.h:82
QwtPlot
A 2-D plotting widget.
Definition: qwt_plot.h:74