Qwt User's Guide 6.1.0

- Main Page
- Related Pages
- Classes

All Classes Functions Variables Typedefs Enumerations Enumerator Pages
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
43 class QWT_EXPORT QwtPlotGLCanvas: public QGLWidget
44 {
45 Q_OBJECT
46
47 Q_ENUMS( Shape Shadow )
48
49 Q_PROPERTY( Shadow frameShadow READ frameShadow WRITE setFrameShadow )
50 Q_PROPERTY( Shape frameShape READ frameShape WRITE setFrameShape )
51 Q_PROPERTY( int lineWidth READ lineWidth WRITE setLineWidth )
52 Q_PROPERTY( int midLineWidth READ midLineWidth WRITE setMidLineWidth )
53 Q_PROPERTY( int frameWidth READ frameWidth )
54 Q_PROPERTY( QRect frameRect READ frameRect DESIGNABLE false )
55
56 public:
65 enum Shadow
66 {
68 Plain = QFrame::Plain,
69
71 Raised = QFrame::Raised,
72
74 Sunken = QFrame::Sunken
75 };
76
88 enum Shape
89 {
90 NoFrame = QFrame::NoFrame,
91
92 Box = QFrame::Box,
93 Panel = QFrame::Panel
94 };
95
96 explicit QwtPlotGLCanvas( QwtPlot * = NULL );
97 virtual ~QwtPlotGLCanvas();
98
99 void setFrameStyle( int style );
100 int frameStyle() const;
101
102 void setFrameShadow( Shadow );
103 Shadow frameShadow() const;
104
105 void setFrameShape( Shape );
106 Shape frameShape() const;
107
108 void setLineWidth( int );
109 int lineWidth() const;
110
111 void setMidLineWidth( int );
112 int midLineWidth() const;
113
114 int frameWidth() const;
115 QRect frameRect() const;
116
117 Q_INVOKABLE QPainterPath borderPath( const QRect & ) const;
118
119 virtual bool event( QEvent * );
120
121 public Q_SLOTS:
122 void replot();
123
124 protected:
125 virtual void paintEvent( QPaintEvent * );
126
127 virtual void drawBackground( QPainter * );
128 virtual void drawBorder( QPainter * );
129 virtual void drawItems( QPainter * );
130
131 private:
132 class PrivateData;
133 PrivateData *d_data;
134 };
135
136 #endif