QwtPlotGLCanvas(3) Qwt User's Guide QwtPlotGLCanvas(3)

QwtPlotGLCanvas - An alternative canvas for a QwtPlot derived from QGLWidget.

#include <qwt_plot_glcanvas.h>

Inherits QGLWidget.


enum Shadow { Plain = QFrame::Plain, Raised = QFrame::Raised, Sunken = QFrame::Sunken }
Frame shadow. enum Shape { NoFrame = QFrame::NoFrame, Box = QFrame::Box, Panel = QFrame::Panel }
Frame shape.


void replot ()
Calls repaint()


QwtPlotGLCanvas (QwtPlot *=NULL)
Constructor. virtual ~QwtPlotGLCanvas ()
Destructor. void setFrameStyle (int style)
int frameStyle () const
void setFrameShadow (Shadow)
Shadow frameShadow () const
void setFrameShape (Shape)
Shape frameShape () const
void setLineWidth (int)
int lineWidth () const
void setMidLineWidth (int)
int midLineWidth () const
int frameWidth () const
QRect frameRect () const
Q_INVOKABLE QPainterPath borderPath (const QRect &) const
virtual bool event (QEvent *)


virtual void paintEvent (QPaintEvent *)
virtual void drawBackground (QPainter *)
virtual void drawBorder (QPainter *)
virtual void drawItems (QPainter *)

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.

See also:

QwtPlot::setCanvas(), QwtPlotCanvas

Note:

With Qt4 you might want to use the QPaintEngine::OpenGL paint engine ( see QGL::setPreferredPaintEngine() ). On a Linux test system QPaintEngine::OpenGL2 shows very basic problems like translated geometries.

enum QwtPlotGLCanvas::Shadow

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.

Enumerator

QFrame::Plain.
QFrame::Raised.
QFrame::Sunken.

enum QwtPlotGLCanvas::Shape

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.

Note:

QFrame::StyledPanel and QFrame::WinPanel are unsupported and will be displayed as QFrame::Panel.

Constructor.

Parameters:

plot Parent plot widget

See also:

QwtPlot::setCanvas()

Returns:

Empty path

Draw the background of the canvas

Parameters:

painter Painter

Draw the border of the canvas

Parameters:

painter Painter

Draw the plot items

Parameters:

painter Painter

See also:

QwtPlot::drawCanvas()

Qt event handler for QEvent::PolishRequest and QEvent::StyleChange

Parameters:

event Qt Event

Returns:

See QGLWidget::event()

Returns:

The rectangle where the frame is drawn in.

QwtPlotGLCanvas::Shadow QwtPlotGLCanvas::frameShadow () const

Returns:

Frame shadow

See also:

setFrameShadow(), QFrame::setFrameShadow()

QwtPlotGLCanvas::Shape QwtPlotGLCanvas::frameShape () const

Returns:

Frame shape

See also:

setFrameShape(), QFrame::frameShape()

Returns:

The bitwise OR between a frameShape() and a frameShadow()

See also:

setFrameStyle(), QFrame::frameStyle()

Returns:

Frame width depending on the style, line width and midline width.

Returns:

Line width of the frame

See also:

setLineWidth(), midLineWidth()

Returns:

Midline width of the frame

See also:

setMidLineWidth(), lineWidth()

Paint event

Parameters:

event Paint event

See also:

QwtPlot::drawCanvas()

Set the frame shadow

Parameters:

shadow Frame shadow

See also:

frameShadow(), setFrameShape(), QFrame::setFrameShadow()

Set the frame shape

Parameters:

shape Frame shape

See also:

frameShape(), setFrameShadow(), QFrame::frameShape()

Set the frame style

Parameters:

style The bitwise OR between a shape and a shadow.

See also:

frameStyle(), QFrame::setFrameStyle(), setFrameShadow(), setFrameShape()

Set the frame line width

The default line width is 2 pixels.

Parameters:

width Line width of the frame

See also:

lineWidth(), setMidLineWidth()

Set the frame mid line width

The default midline width is 0 pixels.

Parameters:

width Midline width of the frame

See also:

midLineWidth(), setLineWidth()

Generated automatically by Doxygen for Qwt User's Guide from the source code.

Wed Jan 2 2019 Version 6.1.4