#include <qwt_plot_canvas.h>
Public Types | |
| enum | PaintAttribute { PaintCached = 1, PaintPacked = 2 } |
| enum | FocusIndicator { NoFocusIndicator, CanvasFocusIndicator, ItemFocusIndicator } |
Public Member Functions | |
| QwtPlotCanvas (QwtPlot *) | |
| virtual | ~QwtPlotCanvas () |
| QwtPlot * | plot () |
| const QwtPlot * | plot () const |
| void | setFocusIndicator (FocusIndicator) |
| FocusIndicator | focusIndicator () const |
| void | setPaintAttribute (PaintAttribute, bool on=true) |
| bool | testPaintAttribute (PaintAttribute) const |
| QPixmap * | paintCache () |
| const QPixmap * | paintCache () const |
| void | invalidatePaintCache () |
| void | replot () |
Protected Member Functions | |
| virtual void | hideEvent (QHideEvent *) |
| virtual void | paintEvent (QPaintEvent *) |
| virtual void | drawContents (QPainter *) |
| virtual void | drawFocusIndicator (QPainter *) |
| void | drawCanvas (QPainter *painter=NULL) |
Focus indicator.
Paint attributes.
The default setting enables PaintCached and PaintPacked
| QwtPlotCanvas::QwtPlotCanvas | ( | QwtPlot * | plot | ) | [explicit] |
Sets a cross cursor, enables QwtPlotCanvas::PaintCached.
| QwtPlotCanvas::~QwtPlotCanvas | ( | ) | [virtual] |
Destructor.
| void QwtPlotCanvas::drawCanvas | ( | QPainter * | painter = NULL |
) | [protected] |
Draw the the canvas
Paints all plot items to the contentsRect(), using QwtPlot::drawCanvas and updates the paint cache.
| painter | Painter |
| void QwtPlotCanvas::drawContents | ( | QPainter * | painter | ) | [protected, virtual] |
Redraw the canvas, and focus rect
| painter | Painter |
| void QwtPlotCanvas::drawFocusIndicator | ( | QPainter * | painter | ) | [protected, virtual] |
Draw the focus indication
| painter | Painter |
| QwtPlotCanvas::FocusIndicator QwtPlotCanvas::focusIndicator | ( | ) | const |
| void QwtPlotCanvas::hideEvent | ( | QHideEvent * | event | ) | [protected, virtual] |
Hide event
| event | Hide event |
| void QwtPlotCanvas::invalidatePaintCache | ( | ) |
Invalidate the internal paint cache.
| const QPixmap * QwtPlotCanvas::paintCache | ( | ) | const |
Return the paint cache, might be null.
| QPixmap * QwtPlotCanvas::paintCache | ( | ) |
Return the paint cache, might be null.
| void QwtPlotCanvas::paintEvent | ( | QPaintEvent * | event | ) | [protected, virtual] |
Paint event
| event | Paint event |
| const QwtPlot * QwtPlotCanvas::plot | ( | ) | const |
Return parent plot widget.
| QwtPlot * QwtPlotCanvas::plot | ( | ) |
Return parent plot widget.
| void QwtPlotCanvas::replot | ( | ) |
Invalidate the paint cache and repaint the canvas
| void QwtPlotCanvas::setFocusIndicator | ( | FocusIndicator | focusIndicator | ) |
| void QwtPlotCanvas::setPaintAttribute | ( | PaintAttribute | attribute, | |
| bool | on = true | |||
| ) |
Changing the paint attributes.
| attribute | Paint attribute | |
| on | On/Off |
| bool QwtPlotCanvas::testPaintAttribute | ( | PaintAttribute | attribute | ) | const |
Test wether a paint attribute is enabled
| attribute | Paint attribute |
1.5.8