An alternative canvas for a QwtPlot derived from QGLWidget. More...
#include <qwt_plot_glcanvas.h>
Classes | |
class | PrivateData |
Public Types | |
enum | Shadow { Plain = QFrame::Plain, Raised = QFrame::Raised, Sunken = QFrame::Sunken } |
Frame shadow. More... | |
enum | Shape { NoFrame = QFrame::NoFrame, Box = QFrame::Box, Panel = QFrame::Panel } |
Frame shape. More... | |
Public Slots | |
void | replot () |
Calls repaint() | |
Public Member Functions | |
Q_INVOKABLE QPainterPath | borderPath (const QRect &) const |
virtual bool | event (QEvent *) |
QRect | frameRect () const |
Shadow | frameShadow () const |
Shape | frameShape () const |
int | frameStyle () const |
int | frameWidth () const |
int | lineWidth () const |
int | midLineWidth () const |
QwtPlotGLCanvas (QwtPlot *=NULL) | |
Constructor. | |
void | setFrameShadow (Shadow) |
void | setFrameShape (Shape) |
void | setFrameStyle (int style) |
void | setLineWidth (int) |
void | setMidLineWidth (int) |
virtual | ~QwtPlotGLCanvas () |
Destructor. | |
Protected Member Functions | |
virtual void | drawBackground (QPainter *) |
virtual void | drawBorder (QPainter *) |
virtual void | drawItems (QPainter *) |
virtual void | paintEvent (QPaintEvent *) |
Properties | |
QRect | frameRect |
Shadow | frameShadow |
Shape | frameShape |
int | frameWidth |
int | lineWidth |
int | midLineWidth |
Private Attributes | |
PrivateData * | d_data |
An alternative canvas for a QwtPlot derived from QGLWidget.
QwtPlotGLCanvas implements the very basics to act as canvas inside of a QwtPlot widget. It might be extended to a full featured alternative to QwtPlotCanvas in a future version of Qwt.
Even if QwtPlotGLCanvas is not derived from QFrame it imitates its API. When using style sheets it supports the box model - beside backgrounds with rounded borders.
Definition at line 37 of file qwt_plot_glcanvas.h.
Frame shadow.
Unfortunately it is not possible to use QFrame::Shadow as a property of a widget that is not derived from QFrame. The following enum is made for the designer only. It is safe to use QFrame::Shadow instead.
Definition at line 59 of file qwt_plot_glcanvas.h.
Frame shape.
Unfortunately it is not possible to use QFrame::Shape as a property of a widget that is not derived from QFrame. The following enum is made for the designer only. It is safe to use QFrame::Shadow instead.
Definition at line 82 of file qwt_plot_glcanvas.h.
QwtPlotGLCanvas::QwtPlotGLCanvas | ( | QwtPlot * | plot = NULL | ) | [explicit] |
Constructor.
plot | Parent plot widget |
Definition at line 74 of file qwt_plot_glcanvas.cpp.
QwtPlotGLCanvas::~QwtPlotGLCanvas | ( | ) | [virtual] |
Destructor.
Definition at line 88 of file qwt_plot_glcanvas.cpp.
QPainterPath QwtPlotGLCanvas::borderPath | ( | const QRect & | rect | ) | const |
Definition at line 366 of file qwt_plot_glcanvas.cpp.
void QwtPlotGLCanvas::drawBackground | ( | QPainter * | painter | ) | [protected, virtual] |
Draw the background of the canvas
painter | Painter |
Definition at line 299 of file qwt_plot_glcanvas.cpp.
void QwtPlotGLCanvas::drawBorder | ( | QPainter * | painter | ) | [protected, virtual] |
Draw the border of the canvas
painter | Painter |
Definition at line 331 of file qwt_plot_glcanvas.cpp.
void QwtPlotGLCanvas::drawItems | ( | QPainter * | painter | ) | [protected, virtual] |
Draw the plot items
painter | Painter |
Definition at line 282 of file qwt_plot_glcanvas.cpp.
bool QwtPlotGLCanvas::event | ( | QEvent * | event | ) | [virtual] |
Qt event handler for QEvent::PolishRequest and QEvent::StyleChange
event | Qt Event |
Definition at line 259 of file qwt_plot_glcanvas.cpp.
QRect QwtPlotGLCanvas::frameRect | ( | ) | const |
Shadow QwtPlotGLCanvas::frameShadow | ( | ) | const |
Shape QwtPlotGLCanvas::frameShape | ( | ) | const |
int QwtPlotGLCanvas::frameStyle | ( | ) | const |
Definition at line 116 of file qwt_plot_glcanvas.cpp.
int QwtPlotGLCanvas::frameWidth | ( | ) | const |
int QwtPlotGLCanvas::lineWidth | ( | ) | const |
int QwtPlotGLCanvas::midLineWidth | ( | ) | const |
void QwtPlotGLCanvas::paintEvent | ( | QPaintEvent * | event | ) | [protected, virtual] |
Paint event
event | Paint event |
Definition at line 231 of file qwt_plot_glcanvas.cpp.
void QwtPlotGLCanvas::replot | ( | ) | [slot] |
Calls repaint()
Definition at line 358 of file qwt_plot_glcanvas.cpp.
void QwtPlotGLCanvas::setFrameShadow | ( | Shadow | shadow | ) |
Set the frame shadow
shadow | Frame shadow |
Definition at line 127 of file qwt_plot_glcanvas.cpp.
void QwtPlotGLCanvas::setFrameShape | ( | Shape | shape | ) |
Set the frame shape
shape | Frame shape |
Definition at line 147 of file qwt_plot_glcanvas.cpp.
void QwtPlotGLCanvas::setFrameStyle | ( | int | style | ) |
Set the frame style
style | The bitwise OR between a shape and a shadow. |
Definition at line 101 of file qwt_plot_glcanvas.cpp.
void QwtPlotGLCanvas::setLineWidth | ( | int | width | ) |
Set the frame line width
The default line width is 2 pixels.
width | Line width of the frame |
Definition at line 169 of file qwt_plot_glcanvas.cpp.
void QwtPlotGLCanvas::setMidLineWidth | ( | int | width | ) |
Set the frame mid line width
The default midline width is 0 pixels.
width | Midline width of the frame |
Definition at line 197 of file qwt_plot_glcanvas.cpp.
PrivateData* QwtPlotGLCanvas::d_data [private] |
Definition at line 126 of file qwt_plot_glcanvas.h.
QRect QwtPlotGLCanvas::frameRect [read] |
Definition at line 48 of file qwt_plot_glcanvas.h.
QwtPlotGLCanvas::Shadow QwtPlotGLCanvas::frameShadow [read, write] |
Definition at line 43 of file qwt_plot_glcanvas.h.
QwtPlotGLCanvas::Shape QwtPlotGLCanvas::frameShape [read, write] |
Definition at line 44 of file qwt_plot_glcanvas.h.
int QwtPlotGLCanvas::frameWidth [read] |
Definition at line 47 of file qwt_plot_glcanvas.h.
int QwtPlotGLCanvas::lineWidth [read, write] |
Definition at line 45 of file qwt_plot_glcanvas.h.
int QwtPlotGLCanvas::midLineWidth [read, write] |
Definition at line 46 of file qwt_plot_glcanvas.h.