Qwt User's Guide 5.2.2
|
#include <qwt_plot_canvas.h>
Public Types | |
enum | FocusIndicator { NoFocusIndicator, CanvasFocusIndicator, ItemFocusIndicator } |
enum | PaintAttribute { PaintCached = 1, PaintPacked = 2 } |
Public Member Functions | |
FocusIndicator | focusIndicator () const |
void | invalidatePaintCache () |
QPixmap * | paintCache () |
const QPixmap * | paintCache () const |
const QwtPlot * | plot () const |
QwtPlot * | plot () |
QwtPlotCanvas (QwtPlot *) | |
void | replot () |
void | setFocusIndicator (FocusIndicator) |
void | setPaintAttribute (PaintAttribute, bool on=true) |
bool | testPaintAttribute (PaintAttribute) const |
virtual | ~QwtPlotCanvas () |
Protected Member Functions | |
void | drawCanvas (QPainter *painter=NULL) |
virtual void | drawContents (QPainter *) |
virtual void | drawFocusIndicator (QPainter *) |
virtual void | hideEvent (QHideEvent *) |
virtual void | paintEvent (QPaintEvent *) |
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 | ) |
Set the focus indicator
void QwtPlotCanvas::setPaintAttribute | ( | PaintAttribute | attribute, |
bool | on = true |
||
) |
Changing the paint attributes.
attribute | Paint attribute |
on | On/Off |
The default setting enables PaintCached and PaintPacked
bool QwtPlotCanvas::testPaintAttribute | ( | PaintAttribute | attribute | ) | const |
Test wether a paint attribute is enabled
attribute | Paint attribute |