Qwt User's Guide 6.2.0

Public Types | Public Member Functions | Protected Member Functions | List of all members
QwtPlotAbstractGLCanvas Class Referenceabstract

Base class of QwtPlotOpenGLCanvas and QwtPlotGLCanvas. More...

`#include <qwt_plot_abstract_canvas.h>`

Inheritance diagram for QwtPlotAbstractGLCanvas:

## Public Types
enum | PaintAttribute { BackingStore = 1 , ImmediatePaint = 8 }
| Paint attributes. More...
typedef QFlags< PaintAttribute > | PaintAttributes
| Paint attributes. More...
Public Types inherited from QwtPlotAbstractCanvas
enum | FocusIndicator { NoFocusIndicator , CanvasFocusIndicator , ItemFocusIndicator }
| Focus indicator The default setting is NoFocusIndicator. More...

## Public Member Functions
| QwtPlotAbstractGLCanvas (QWidget *canvasWidget)
| Constructor. More...
virtual | ~QwtPlotAbstractGLCanvas ()
| Destructor.
void | setPaintAttribute (PaintAttribute, bool on=true)
| Changing the paint attributes. More...
bool | testPaintAttribute (PaintAttribute) const
void | setFrameStyle (int style)
int | frameStyle () const
void | setFrameShadow (QFrame::Shadow)
QFrame::Shadow | frameShadow () const
void | setFrameShape (QFrame::Shape)
QFrame::Shape | frameShape () const
void | setLineWidth (int)
int | lineWidth () const
void | setMidLineWidth (int)
int | midLineWidth () const
int | frameWidth () const
QRect | frameRect () const
virtual void | invalidateBackingStore ()=0
| Invalidate the internal backing store.
Public Member Functions inherited from QwtPlotAbstractCanvas
| QwtPlotAbstractCanvas (QWidget *canvasWidget)
| Constructor. More...
virtual | ~QwtPlotAbstractCanvas ()
| Destructor.
QwtPlot * | plot ()
| Return parent plot widget.
const QwtPlot * | plot () const
| Return parent plot widget.
void | setFocusIndicator (FocusIndicator)
FocusIndicator | focusIndicator () const
void | setBorderRadius (double)
double | borderRadius () const

## Protected Member Functions
void | replot ()
void | draw (QPainter *)
| Helper function for the derived plot canvas.
Protected Member Functions inherited from QwtPlotAbstractCanvas
QWidget * | canvasWidget ()
const QWidget * | canvasWidget () const
virtual void | drawFocusIndicator (QPainter *)
virtual void | drawBorder (QPainter *)
virtual void | drawBackground (QPainter *)
| Helper function for the derived plot canvas.
void | fillBackground (QPainter *)
| Helper function for the derived plot canvas.
void | drawCanvas (QPainter *)
| Draw the plot to the canvas.
void | drawStyled (QPainter *, bool)
| Helper function for the derived plot canvas.
void | drawUnstyled (QPainter *)
| Helper function for the derived plot canvas.
QPainterPath | canvasBorderPath (const QRect &rect) const
void | updateStyleSheetInfo ()
| Update the cached information about the current style sheet.

## Detailed Description

Base class of QwtPlotOpenGLCanvas and QwtPlotGLCanvas.

Definition at line 87 of file qwt_plot_abstract_canvas.h.

## Member Typedef Documentation

## ◆ PaintAttributes

typedef QFlags<PaintAttribute > QwtPlotAbstractGLCanvas::PaintAttributes

Paint attributes.

An ORed combination of PaintAttribute values.

Definition at line 122 of file qwt_plot_abstract_canvas.h.

## Member Enumeration Documentation

## ◆ PaintAttribute

enum QwtPlotAbstractGLCanvas::PaintAttribute

Paint attributes.

The default setting enables BackingStore and Opaque.

See also
  setPaintAttribute(), testPaintAttribute()

Enumerator
BackingStore | Paint double buffered reusing the content of the pixmap buffer when possible. Using a backing store might improve the performance significantly, when working with widget overlays ( like rubber bands ). Disabling the cache might improve the performance for incremental paints (using QwtPlotDirectPainter ). See also backingStore(), invalidateBackingStore()
ImmediatePaint | When ImmediatePaint is set replot() calls repaint() instead of update(). See also replot(), QWidget::repaint(), QWidget::update()

Definition at line 97 of file qwt_plot_abstract_canvas.h.

## Constructor & Destructor Documentation

## ◆ QwtPlotAbstractGLCanvas()

QwtPlotAbstractGLCanvas::QwtPlotAbstractGLCanvas | ( | QWidget * | canvasWidget | ) |
| explicit

Constructor.

Parameters

  canvasWidget | plot canvas widget

Definition at line 904 of file qwt_plot_abstract_canvas.cpp.

## Member Function Documentation

## ◆ frameRect()

QRect QwtPlotAbstractGLCanvas::frameRect | ( |  | ) | const

Returns
  The rectangle where the frame is drawn in.

Definition at line 1105 of file qwt_plot_abstract_canvas.cpp.

## ◆ frameShadow()

QFrame::Shadow QwtPlotAbstractGLCanvas::frameShadow | ( |  | ) | const

Returns
  Frame shadow

See also
  setFrameShadow(), QFrame::setFrameShadow()

Definition at line 1000 of file qwt_plot_abstract_canvas.cpp.

## ◆ frameShape()

QFrame::Shape QwtPlotAbstractGLCanvas::frameShape | ( |  | ) | const

Returns
  Frame shape

See also
  setFrameShape(), QFrame::frameShape()

Definition at line 1020 of file qwt_plot_abstract_canvas.cpp.

## ◆ frameStyle()

int QwtPlotAbstractGLCanvas::frameStyle | ( |  | ) | const

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

See also
  setFrameStyle(), QFrame::frameStyle()

Definition at line 980 of file qwt_plot_abstract_canvas.cpp.

## ◆ frameWidth()

int QwtPlotAbstractGLCanvas::frameWidth | ( |  | ) | const

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

Definition at line 1084 of file qwt_plot_abstract_canvas.cpp.

## ◆ lineWidth()

int QwtPlotAbstractGLCanvas::lineWidth | ( |  | ) | const

Returns
  Line width of the frame

See also
  setLineWidth(), midLineWidth()

Definition at line 1048 of file qwt_plot_abstract_canvas.cpp.

## ◆ midLineWidth()

int QwtPlotAbstractGLCanvas::midLineWidth | ( |  | ) | const

Returns
  Midline width of the frame

See also
  setMidLineWidth(), lineWidth()

Definition at line 1076 of file qwt_plot_abstract_canvas.cpp.

## ◆ replot()

void QwtPlotAbstractGLCanvas::replot | ( |  | ) |
| protected

Invalidate the paint cache and repaint the canvas

See also
  invalidatePaintCache()

Definition at line 1093 of file qwt_plot_abstract_canvas.cpp.

## ◆ setFrameShadow()

void QwtPlotAbstractGLCanvas::setFrameShadow | ( | QFrame::Shadow | shadow | ) |

Set the frame shadow

Parameters

  shadow | Frame shadow

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

Definition at line 991 of file qwt_plot_abstract_canvas.cpp.

## ◆ setFrameShape()

void QwtPlotAbstractGLCanvas::setFrameShape | ( | QFrame::Shape | shape | ) |

Set the frame shape

Parameters

  shape | Frame shape

See also
  frameShape(), setFrameShadow(), QFrame::frameShape()

Definition at line 1011 of file qwt_plot_abstract_canvas.cpp.

## ◆ setFrameStyle()

void QwtPlotAbstractGLCanvas::setFrameStyle | ( | int | style | ) |

Set the frame style

Parameters

  style | The bitwise OR between a shape and a shadow.

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

Definition at line 965 of file qwt_plot_abstract_canvas.cpp.

## ◆ setLineWidth()

void QwtPlotAbstractGLCanvas::setLineWidth | ( | int | width | ) |

Set the frame line width

The default line width is 2 pixels.

Parameters

  width | Line width of the frame

See also
  lineWidth(), setMidLineWidth()

Definition at line 1033 of file qwt_plot_abstract_canvas.cpp.

## ◆ setMidLineWidth()

void QwtPlotAbstractGLCanvas::setMidLineWidth | ( | int | width | ) |

Set the frame mid line width

The default midline width is 0 pixels.

Parameters

  width | Midline width of the frame

See also
  midLineWidth(), setLineWidth()

Definition at line 1061 of file qwt_plot_abstract_canvas.cpp.

## ◆ setPaintAttribute()

void QwtPlotAbstractGLCanvas::setPaintAttribute | ( | PaintAttribute | attribute,
|  | bool | on = `true`
| ) |  |

Changing the paint attributes.

Parameters

  attribute | Paint attribute
  on | On/Off

See also
  testPaintAttribute()

Definition at line 927 of file qwt_plot_abstract_canvas.cpp.

## ◆ testPaintAttribute()

bool QwtPlotAbstractGLCanvas::testPaintAttribute | ( | PaintAttribute | attribute | ) | const

Test whether a paint attribute is enabled

Parameters

  attribute | Paint attribute

Returns
  true, when attribute is enabled

See also
  setPaintAttribute()

Definition at line 952 of file qwt_plot_abstract_canvas.cpp.