Qwt Polar User's Guide  0.1.0
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
QwtPolarCanvas Class Reference

#include <qwt_polar_canvas.h>

Public Types

enum  PaintAttribute { PaintCached = 1 }

Public Member Functions

 QwtPolarCanvas (QwtPolarPlot *)
virtual ~QwtPolarCanvas ()
QwtPolarPlotplot ()
const QwtPolarPlotplot () const
void setPaintAttribute (PaintAttribute, bool on=true)
bool testPaintAttribute (PaintAttribute) const
QPixmap * paintCache ()
const QPixmap * paintCache () const
void invalidatePaintCache ()

Protected Member Functions

virtual void paintEvent (QPaintEvent *)
virtual void resizeEvent (QResizeEvent *)
virtual void drawContents (QPainter *)
void drawCanvas (QPainter *, const QwtDoubleRect &)

Protected Attributes

PrivateData * d_data

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

Paint attributes.

  • PaintCached
    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.

The default setting enables PaintCached

See Also
setPaintAttribute(), testPaintAttribute(), paintCache()

Constructor & Destructor Documentation

QwtPolarCanvas::QwtPolarCanvas ( QwtPolarPlot plot)
explicit

Constructor.

QwtPolarCanvas::~QwtPolarCanvas ( )
virtual

Destructor.

Member Function Documentation

void QwtPolarCanvas::drawCanvas ( QPainter *  painter,
const QwtDoubleRect &  canvasRect 
)
protected

Draw the the canvas

Paints all plot items to the canvasRect, using QwtPolarPlot::drawCanvas and updates the paint cache.

See Also
QwtPolarPlot::drawCanvas, setPaintAttributes(), testPaintAttributes()
void QwtPolarCanvas::drawContents ( QPainter *  painter)
protectedvirtual

Redraw the canvas.

void QwtPolarCanvas::invalidatePaintCache ( )

Invalidate the internal paint cache.

QPixmap * QwtPolarCanvas::paintCache ( )

Return the paint cache, might be null.

const QPixmap * QwtPolarCanvas::paintCache ( ) const

Return the paint cache, might be null.

void QwtPolarCanvas::paintEvent ( QPaintEvent *  event)
protectedvirtual

Paint event.

QwtPolarPlot * QwtPolarCanvas::plot ( )

Return parent plot widget.

const QwtPolarPlot * QwtPolarCanvas::plot ( ) const

Return parent plot widget.

void QwtPolarCanvas::resizeEvent ( QResizeEvent *  event)
protectedvirtual

Resize event.

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

Changing the paint attributes.

Parameters
attributePaint attribute
onOn/Off

The default setting enables PaintCached

See Also
testPaintAttribute(), drawCanvas(), drawContents(), paintCache()
bool QwtPolarCanvas::testPaintAttribute ( PaintAttribute  attribute) const

Test wether a paint attribute is enabled

Parameters
attributePaint attribute
Returns
true if the attribute is enabled
See Also
setPaintAttribute()