Qwt User's Guide 6.3.0

Loading...
Searching...
No Matches
Public Types | Public Member Functions | Protected Member Functions | List of all members
QwtPlotAbstractCanvas Class Reference

Base class for all type of plot canvases. More...

`#include <qwt_plot_abstract_canvas.h>`

Inheritance diagram for QwtPlotAbstractCanvas:

## Public Types
enum | FocusIndicator { NoFocusIndicator , CanvasFocusIndicator , ItemFocusIndicator }
| Focus indicator The default setting is NoFocusIndicator. More...

## Public Member Functions
| QwtPlotAbstractCanvas (QWidget *canvasWidget)
| Constructor.
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
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 for all type of plot canvases.

Definition at line 21 of file qwt_plot_abstract_canvas.h.

## Member Enumeration Documentation

## ◆ FocusIndicator

enum QwtPlotAbstractCanvas::FocusIndicator

Focus indicator The default setting is NoFocusIndicator.

See also
  setFocusIndicator(), focusIndicator(), drawFocusIndicator()

Enumerator
NoFocusIndicator | Don't paint a focus indicator.
CanvasFocusIndicator | The focus is related to the complete canvas. Paint the focus indicator using drawFocusIndicator()
ItemFocusIndicator | The focus is related to an item (curve, point, ...) on the canvas. It is up to the application to display a focus indication using f.e. highlighting.

Definition at line 30 of file qwt_plot_abstract_canvas.h.

## Constructor & Destructor Documentation

## ◆ QwtPlotAbstractCanvas()

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

Constructor.

Parameters

  canvasWidget | plot canvas widget

Definition at line 534 of file qwt_plot_abstract_canvas.cpp.

## ◆ ~QwtPlotAbstractCanvas()

QwtPlotAbstractCanvas::~QwtPlotAbstractCanvas | ( |  | ) |
| virtual

Destructor.

Definition at line 546 of file qwt_plot_abstract_canvas.cpp.

## Member Function Documentation

## ◆ borderRadius()

double QwtPlotAbstractCanvas::borderRadius | ( |  | ) | const

Returns
  Radius for the corners of the border frame

See also
  setBorderRadius()

Definition at line 613 of file qwt_plot_abstract_canvas.cpp.

## ◆ canvasBorderPath()

QPainterPath QwtPlotAbstractCanvas::canvasBorderPath | ( | const QRect & | rect | ) | const
| protected

Returns
  Path for the canvas border

Definition at line 619 of file qwt_plot_abstract_canvas.cpp.

## ◆ canvasWidget() [1/2]

QWidget * QwtPlotAbstractCanvas::canvasWidget | ( |  | ) |
| protected

Returns
  canvas widget

Definition at line 872 of file qwt_plot_abstract_canvas.cpp.

## ◆ canvasWidget() [2/2]

const QWidget * QwtPlotAbstractCanvas::canvasWidget | ( |  | ) | const
| protected

Returns
  canvas widget

Definition at line 878 of file qwt_plot_abstract_canvas.cpp.

## ◆ drawBackground()

void QwtPlotAbstractCanvas::drawBackground | ( | QPainter * | painter | ) |
| protected virtual

Helper function for the derived plot canvas.

Definition at line 690 of file qwt_plot_abstract_canvas.cpp.

## ◆ drawBorder()

void QwtPlotAbstractCanvas::drawBorder | ( | QPainter * | painter | ) |
| protected virtual

Draw the border of the canvas

Parameters

  painter | Painter

Reimplemented in QwtPlotCanvas.

Definition at line 628 of file qwt_plot_abstract_canvas.cpp.

## ◆ drawCanvas()

void QwtPlotAbstractCanvas::drawCanvas | ( | QPainter * | painter | ) |
| protected

Draw the plot to the canvas.

Definition at line 803 of file qwt_plot_abstract_canvas.cpp.

## ◆ drawFocusIndicator()

void QwtPlotAbstractCanvas::drawFocusIndicator | ( | QPainter * | painter | ) |
| protected virtual

Draw the focus indication

Parameters

  painter | Painter

Definition at line 587 of file qwt_plot_abstract_canvas.cpp.

## ◆ drawStyled()

void QwtPlotAbstractCanvas::drawStyled | ( | QPainter * | painter,
|  | bool | hackStyledBackground )
| protected

Helper function for the derived plot canvas.

Definition at line 744 of file qwt_plot_abstract_canvas.cpp.

## ◆ drawUnstyled()

void QwtPlotAbstractCanvas::drawUnstyled | ( | QPainter * | painter | ) |
| protected

Helper function for the derived plot canvas.

Definition at line 702 of file qwt_plot_abstract_canvas.cpp.

## ◆ fillBackground()

void QwtPlotAbstractCanvas::fillBackground | ( | QPainter * | painter | ) |
| protected

Helper function for the derived plot canvas.

Definition at line 696 of file qwt_plot_abstract_canvas.cpp.

## ◆ focusIndicator()

QwtPlotAbstractCanvas::FocusIndicator QwtPlotAbstractCanvas::focusIndicator | ( |  | ) | const

Returns
  Focus indicator

See also
  FocusIndicator, setFocusIndicator()

Definition at line 578 of file qwt_plot_abstract_canvas.cpp.

## ◆ plot() [1/2]

QwtPlot * QwtPlotAbstractCanvas::plot | ( |  | ) |

Return parent plot widget.

Definition at line 552 of file qwt_plot_abstract_canvas.cpp.

## ◆ plot() [2/2]

const QwtPlot * QwtPlotAbstractCanvas::plot | ( |  | ) | const

Return parent plot widget.

Definition at line 558 of file qwt_plot_abstract_canvas.cpp.

## ◆ setBorderRadius()

void QwtPlotAbstractCanvas::setBorderRadius | ( | double | radius | ) |

Set the radius for the corners of the border frame

Parameters

  radius | Radius of a rounded corner

See also
  borderRadius()

Definition at line 604 of file qwt_plot_abstract_canvas.cpp.

## ◆ setFocusIndicator()

void QwtPlotAbstractCanvas::setFocusIndicator | ( | FocusIndicator | focusIndicator | ) |

Set the focus indicator

See also
  FocusIndicator, focusIndicator()

Definition at line 568 of file qwt_plot_abstract_canvas.cpp.

## ◆ updateStyleSheetInfo()

void QwtPlotAbstractCanvas::updateStyleSheetInfo | ( |  | ) |
| protected

Update the cached information about the current style sheet.

Definition at line 835 of file qwt_plot_abstract_canvas.cpp.