Base class of QwtPlotOpenGLCanvas and QwtPlotGLCanvas. More...
#include <qwt_plot_abstract_canvas.h>
Classes | |
class | PrivateData |
Public Types | |
enum | PaintAttribute { BackingStore = 1, ImmediatePaint = 8 } |
Paint attributes. More... | |
Public Types inherited from QwtPlotAbstractCanvas | |
enum | FocusIndicator { NoFocusIndicator, CanvasFocusIndicator, ItemFocusIndicator } |
Focus indicator The default setting is NoFocusIndicator. More... | |
Public Member Functions | |
QRect | frameRect () const |
QFrame::Shadow | frameShadow () const |
QFrame::Shape | frameShape () const |
int | frameStyle () const |
int | frameWidth () const |
virtual void | invalidateBackingStore ()=0 |
Invalidate the internal backing store. More... | |
int | lineWidth () const |
int | midLineWidth () const |
QwtPlotAbstractGLCanvas (QWidget *canvasWidget) | |
Paint attributes. More... | |
void | setFrameShadow (QFrame::Shadow) |
void | setFrameShape (QFrame::Shape) |
void | setFrameStyle (int style) |
void | setLineWidth (int) |
void | setMidLineWidth (int) |
void | setPaintAttribute (PaintAttribute, bool on=true) |
Changing the paint attributes. More... | |
bool | testPaintAttribute (PaintAttribute) const |
virtual | ~QwtPlotAbstractGLCanvas () |
Destructor. More... | |
Public Member Functions inherited from QwtPlotAbstractCanvas | |
double | borderRadius () const |
FocusIndicator | focusIndicator () const |
QwtPlot * | plot () |
Return parent plot widget. More... | |
const QwtPlot * | plot () const |
QwtPlotAbstractCanvas (QWidget *canvasWidget) | |
Constructor. More... | |
void | setBorderRadius (double) |
void | setFocusIndicator (FocusIndicator) |
virtual | ~QwtPlotAbstractCanvas () |
Destructor. More... | |
Protected Member Functions | |
void | draw (QPainter *) |
Helper function for the derived plot canvas. More... | |
void | replot () |
Protected Member Functions inherited from QwtPlotAbstractCanvas | |
QPainterPath | canvasBorderPath (const QRect &rect) const |
QWidget * | canvasWidget () |
const QWidget * | canvasWidget () const |
virtual void | drawBackground (QPainter *) |
Helper function for the derived plot canvas. More... | |
virtual void | drawBorder (QPainter *) |
void | drawCanvas (QPainter *) |
Draw the plot to the canvas. More... | |
virtual void | drawFocusIndicator (QPainter *) |
void | drawStyled (QPainter *, bool) |
Helper function for the derived plot canvas. More... | |
void | drawUnstyled (QPainter *) |
Helper function for the derived plot canvas. More... | |
void | fillBackground (QPainter *) |
Helper function for the derived plot canvas. More... | |
void | updateStyleSheetInfo () |
Update the cached information about the current style sheet. More... | |
Private Member Functions | |
virtual void | clearBackingStore ()=0 |
Private Attributes | |
PrivateData * | m_data |
Base class of QwtPlotOpenGLCanvas and QwtPlotGLCanvas.
Definition at line 87 of file qwt_plot_abstract_canvas.h.
Paint attributes.
The default setting enables BackingStore and Opaque.
Enumerator | |
---|---|
BackingStore | Paint double buffered reusing the content of the pixmap buffer when possible. Using a backing store might improve the performance significantly, when working with widget overlays ( like rubber bands ). Disabling the cache might improve the performance for incremental paints (using QwtPlotDirectPainter ).
|
ImmediatePaint | When ImmediatePaint is set replot() calls repaint() instead of update().
|
Definition at line 97 of file qwt_plot_abstract_canvas.h.
|
explicit |
Paint attributes.
Constructor.
canvasWidget | plot canvas widget |
Definition at line 904 of file qwt_plot_abstract_canvas.cpp.
|
virtual |
Destructor.
Definition at line 914 of file qwt_plot_abstract_canvas.cpp.
|
privatepure virtual |
Implemented in QwtPlotGLCanvas, and QwtPlotOpenGLCanvas.
|
protected |
Helper function for the derived plot canvas.
Definition at line 1112 of file qwt_plot_abstract_canvas.cpp.
QRect QwtPlotAbstractGLCanvas::frameRect | ( | ) | const |
Definition at line 1105 of file qwt_plot_abstract_canvas.cpp.
QFrame::Shadow QwtPlotAbstractGLCanvas::frameShadow | ( | ) | const |
Definition at line 1000 of file qwt_plot_abstract_canvas.cpp.
QFrame::Shape QwtPlotAbstractGLCanvas::frameShape | ( | ) | const |
Definition at line 1020 of file qwt_plot_abstract_canvas.cpp.
int QwtPlotAbstractGLCanvas::frameStyle | ( | ) | const |
Definition at line 980 of file qwt_plot_abstract_canvas.cpp.
int QwtPlotAbstractGLCanvas::frameWidth | ( | ) | const |
Definition at line 1084 of file qwt_plot_abstract_canvas.cpp.
|
pure virtual |
Invalidate the internal backing store.
Implemented in QwtPlotGLCanvas, and QwtPlotOpenGLCanvas.
int QwtPlotAbstractGLCanvas::lineWidth | ( | ) | const |
Definition at line 1048 of file qwt_plot_abstract_canvas.cpp.
int QwtPlotAbstractGLCanvas::midLineWidth | ( | ) | const |
Definition at line 1076 of file qwt_plot_abstract_canvas.cpp.
|
protected |
Invalidate the paint cache and repaint the canvas
Definition at line 1093 of file qwt_plot_abstract_canvas.cpp.
void QwtPlotAbstractGLCanvas::setFrameShadow | ( | QFrame::Shadow | shadow | ) |
Set the frame shadow
shadow | Frame shadow |
Definition at line 991 of file qwt_plot_abstract_canvas.cpp.
void QwtPlotAbstractGLCanvas::setFrameShape | ( | QFrame::Shape | shape | ) |
Set the frame shape
shape | Frame shape |
Definition at line 1011 of file qwt_plot_abstract_canvas.cpp.
void QwtPlotAbstractGLCanvas::setFrameStyle | ( | int | style | ) |
Set the frame style
style | The bitwise OR between a shape and a shadow. |
Definition at line 965 of file qwt_plot_abstract_canvas.cpp.
void QwtPlotAbstractGLCanvas::setLineWidth | ( | int | width | ) |
Set the frame line width
The default line width is 2 pixels.
width | Line width of the frame |
Definition at line 1033 of file qwt_plot_abstract_canvas.cpp.
void QwtPlotAbstractGLCanvas::setMidLineWidth | ( | int | width | ) |
Set the frame mid line width
The default midline width is 0 pixels.
width | Midline width of the frame |
Definition at line 1061 of file qwt_plot_abstract_canvas.cpp.
void QwtPlotAbstractGLCanvas::setPaintAttribute | ( | PaintAttribute | attribute, |
bool | on = true |
||
) |
Changing the paint attributes.
attribute | Paint attribute |
on | On/Off |
Definition at line 927 of file qwt_plot_abstract_canvas.cpp.
bool QwtPlotAbstractGLCanvas::testPaintAttribute | ( | PaintAttribute | attribute | ) | const |
Test whether a paint attribute is enabled
attribute | Paint attribute |
Definition at line 952 of file qwt_plot_abstract_canvas.cpp.
|
private |
Definition at line 158 of file qwt_plot_abstract_canvas.h.