QWT API (English) 7.0.1
Qt Widget Library for Technical Applications - English API Documentation
Loading...
Searching...
No Matches
Classes | Public Types | Public Slots | Public Member Functions | Protected Member Functions | Properties | List of all members
QwtPlotCanvas Class Reference

Canvas of a QwtPlot. More...

#include <qwt_plot_canvas.h>

Inheritance diagram for QwtPlotCanvas:
QwtPlotAbstractCanvas

Classes

class  PrivateData
 

Public Types

enum  PaintAttribute { BackingStore = 1 , Opaque = 2 , HackStyledBackground = 4 , ImmediatePaint = 8 }
 Paint attributes. More...
 
- Public Types inherited from QwtPlotAbstractCanvas
enum  FocusIndicator { NoFocusIndicator , CanvasFocusIndicator , ItemFocusIndicator }
 Focus indicator. More...
 

Public Slots

void replot ()
 Invalidate the paint cache and repaint the canvas.
 

Public Member Functions

 QwtPlotCanvas (QwtPlot *=nullptr)
 Constructor.
 
virtual ~QwtPlotCanvas ()
 Destructor .
 
void setPaintAttribute (PaintAttribute, bool on=true)
 Change the paint attributes.
 
bool testPaintAttribute (PaintAttribute) const
 Test whether a paint attribute is enabled.
 
const QPixmap * backingStore () const
 Get the backing store.
 
Q_INVOKABLE void invalidateBackingStore ()
 Invalidate the internal backing store .
 
virtual bool event (QEvent *) override
 Qt event handler for QEvent::PolishRequest and QEvent::StyleChange.
 
Q_INVOKABLE QPainterPath borderPath (const QRect &) const
 Calculate the painter path for a styled or rounded border.
 
- Public Member Functions inherited from QwtPlotAbstractCanvas
 QwtPlotAbstractCanvas (QWidget *canvasWidget)
 Constructor.
 
virtual ~QwtPlotAbstractCanvas ()
 Destructor .
 
QwtPlotplot ()
 Return parent plot widget.
 
const QwtPlotplot () const
 Return parent plot widget.
 
void setFocusIndicator (FocusIndicator)
 Set the focus indicator.
 
FocusIndicator focusIndicator () const
 Get the focus indicator.
 
void setBorderRadius (double)
 Set the radius for the corners of the border frame.
 
double borderRadius () const
 Get the radius for the corners of the border frame.
 

Protected Member Functions

virtual void paintEvent (QPaintEvent *) override
 Paint event handler.
 
virtual void resizeEvent (QResizeEvent *) override
 Resize event handler.
 
virtual void drawBorder (QPainter *) override
 Draw border.
 
- Protected Member Functions inherited from QwtPlotAbstractCanvas
QWidget * canvasWidget ()
 
const QWidget * canvasWidget () const
 
virtual void drawFocusIndicator (QPainter *)
 Draw the focus indication.
 
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.
 

Properties

double borderRadius
 

Detailed Description

Canvas of a QwtPlot.

Member Enumeration Documentation

◆ PaintAttribute

Paint attributes.

Enumerator
BackingStore 

BackingStore.

Opaque 

Opaque.

HackStyledBackground 

HackStyledBackground.

ImmediatePaint 

ImmediatePaint.

Constructor & Destructor Documentation

◆ QwtPlotCanvas()

QwtPlotCanvas::QwtPlotCanvas ( QwtPlot plot = nullptr)
explicit

Constructor.

◆ ~QwtPlotCanvas()

QwtPlotCanvas::~QwtPlotCanvas ( )
virtual

Destructor .

Member Function Documentation

◆ backingStore()

const QPixmap * QwtPlotCanvas::backingStore ( ) const

Get the backing store.

◆ borderPath()

QPainterPath QwtPlotCanvas::borderPath ( const QRect &  rect) const

Calculate the painter path for a styled or rounded border.

◆ drawBorder()

void QwtPlotCanvas::drawBorder ( QPainter *  painter)
overrideprotectedvirtual

Draw border.

Draw the border of the plot canvas.

Parameters
painterPainter
See also
setBorderRadius()

Reimplemented from QwtPlotAbstractCanvas.

◆ event()

bool QwtPlotCanvas::event ( QEvent *  event)
overridevirtual

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

◆ invalidateBackingStore()

void QwtPlotCanvas::invalidateBackingStore ( )

Invalidate the internal backing store .

◆ paintEvent()

void QwtPlotCanvas::paintEvent ( QPaintEvent *  event)
overrideprotectedvirtual

Paint event handler.

Paint event.

Parameters
eventPaint event

◆ replot

void QwtPlotCanvas::replot ( )
slot

Invalidate the paint cache and repaint the canvas.

◆ resizeEvent()

void QwtPlotCanvas::resizeEvent ( QResizeEvent *  event)
overrideprotectedvirtual

Resize event handler.

Resize event.

Parameters
eventResize event

◆ setPaintAttribute()

void QwtPlotCanvas::setPaintAttribute ( PaintAttribute  attribute,
bool  on = true 
)

Change the paint attributes.

◆ testPaintAttribute()

bool QwtPlotCanvas::testPaintAttribute ( PaintAttribute  attribute) const

Test whether a paint attribute is enabled.


The documentation for this class was generated from the following files: