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

Canvas of a QwtPolarPlot. More...

#include <qwt_polar_canvas.h>

Inheritance diagram for QwtPolarCanvas:

Classes

class  PrivateData
 

Public Types

enum  PaintAttribute { BackingStore = 0x01 }
 Paint attributes. More...
 

Public Member Functions

 QwtPolarCanvas (QwtPolarPlot *)
 Constructor.
 
 ~QwtPolarCanvas () override
 Destructor.
 
QwtPolarPlotplot ()
 Get the plot.
 
const QwtPolarPlotplot () const
 Get the plot (const version)
 
void setPaintAttribute (PaintAttribute, bool on=true)
 Set a paint attribute.
 
bool testPaintAttribute (PaintAttribute) const
 Test a paint attribute.
 
const QPixmap * backingStore () const
 Get the backing store.
 
void invalidateBackingStore ()
 Invalidate the backing store.
 
QwtPointPolar invTransform (const QPoint &) const
 Inverse transform from widget coordinates to polar coordinates.
 
QPoint transform (const QwtPointPolar &) const
 Transform from polar coordinates to widget coordinates.
 

Protected Member Functions

virtual void paintEvent (QPaintEvent *) override
 Handle paint events.
 
virtual void resizeEvent (QResizeEvent *) override
 Handle resize events.
 

Detailed Description

Canvas of a QwtPolarPlot.

The canvas is the widget, where all polar items are painted to.

Note
In opposite to QwtPlot all axes are painted on the canvas.
See also
QwtPolarPlot

Member Enumeration Documentation

◆ PaintAttribute

Paint attributes.

The default setting enables BackingStore

See also
setPaintAttribute(), testPaintAttribute(), backingStore()
Enumerator
BackingStore 

Paint double buffered and reuse the content of the pixmap buffer for some spontaneous repaints that happen when a plot gets unhidden, deiconified or changes the focus.

Constructor & Destructor Documentation

◆ QwtPolarCanvas()

QwtPolarCanvas::QwtPolarCanvas ( QwtPolarPlot plot)
explicit

Constructor.

Parameters
plotParent polar plot widget

Destructor

Member Function Documentation

◆ backingStore()

const QPixmap * QwtPolarCanvas::backingStore ( ) const

Get the backing store.

Get the backing store pixmap.

Returns
Backing store pixmap, might be null if not enabled
See also
setPaintAttribute(), invalidateBackingStore()

◆ invalidateBackingStore()

void QwtPolarCanvas::invalidateBackingStore ( )

Invalidate the backing store.

Invalidate the internal backing store.

Clears the backing store pixmap, forcing a full repaint on the next paint event.

See also
backingStore()

◆ invTransform()

QwtPointPolar QwtPolarCanvas::invTransform ( const QPoint &  pos) const

Inverse transform from widget coordinates to polar coordinates.

Translate a point from widget coordinates to polar coordinates.

Parameters
posPoint in widget coordinates of the plot canvas
Returns
Point in polar coordinates
See also
transform()

◆ paintEvent()

void QwtPolarCanvas::paintEvent ( QPaintEvent *  event)
overrideprotectedvirtual

Handle paint events.

Paint event.

Parameters
eventPaint event

◆ plot() [1/2]

QwtPolarPlot * QwtPolarCanvas::plot ( )

Get the plot.

Get the parent plot widget.

Returns
Parent polar plot widget

◆ plot() [2/2]

const QwtPolarPlot * QwtPolarCanvas::plot ( ) const

Get the plot (const version)

Get the parent plot widget (const version)

Returns
Parent polar plot widget

◆ resizeEvent()

void QwtPolarCanvas::resizeEvent ( QResizeEvent *  event)
overrideprotectedvirtual

Handle resize events.

Resize event.

Parameters
eventResize event

◆ setPaintAttribute()

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

Set a paint attribute.

Change the paint attributes.

Parameters
attributePaint attribute to modify
onTrue to enable, false to disable

The default setting enables BackingStore.

See also
testPaintAttribute(), backingStore()

◆ testPaintAttribute()

bool QwtPolarCanvas::testPaintAttribute ( PaintAttribute  attribute) const

Test a paint attribute.

Test whether a paint attribute is enabled.

Parameters
attributePaint attribute to test
Returns
True if the attribute is enabled
See also
setPaintAttribute()

◆ transform()

QPoint QwtPolarCanvas::transform ( const QwtPointPolar polarPos) const

Transform from polar coordinates to widget coordinates.

Translate a point from polar coordinates to widget coordinates.

Parameters
polarPosPoint in polar coordinates
Returns
Point in widget coordinates
See also
invTransform()

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