QWT 7.0.1
Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | Protected Member Functions | List of all members
QwtPlotAbstractGLCanvas Class Referenceabstract

Base class of QwtPlotOpenGLCanvas and QwtPlotGLCanvas. More...

#include <qwt_plot_abstract_canvas.h>

Inheritance diagram for QwtPlotAbstractGLCanvas:
QwtPlotAbstractCanvas QwtPlotGLCanvas QwtPlotOpenGLCanvas

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

 QwtPlotAbstractGLCanvas (QWidget *canvasWidget)
 Paint attributes.
 
virtual ~QwtPlotAbstractGLCanvas ()
 Destructor.
 
void setPaintAttribute (PaintAttribute, bool on=true)
 Changing the paint attributes.
 
bool testPaintAttribute (PaintAttribute) const
 Test whether a paint attribute is enabled.
 
void setFrameStyle (int style)
 Set the frame style.
 
int frameStyle () const
 
void setFrameShadow (QFrame::Shadow)
 Set the frame shadow.
 
QFrame::Shadow frameShadow () const
 
void setFrameShape (QFrame::Shape)
 Set the frame shape.
 
QFrame::Shape frameShape () const
 
void setLineWidth (int)
 Set the frame line width.
 
int lineWidth () const
 
void setMidLineWidth (int)
 Set the frame mid line width.
 
int midLineWidth () const
 
int frameWidth () const
 
QRect frameRect () const
 
virtual void invalidateBackingStore ()=0
 Invalidate the internal backing store.
 
- Public Member Functions inherited from QwtPlotAbstractCanvas
 QwtPlotAbstractCanvas (QWidget *canvasWidget)
 Constructor.
 
virtual ~QwtPlotAbstractCanvas ()
 Destructor.
 
QwtPlotplot ()
 Return parent plot widget.
 
const QwtPlotplot () const
 Return parent plot widget.
 
void setFocusIndicator (FocusIndicator)
 Set the focus indicator.
 
FocusIndicator focusIndicator () const
 
void setBorderRadius (double)
 Set the radius for the corners of the border frame.
 
double borderRadius () const
 

Protected Member Functions

void replot ()
 Invalidate the paint cache and repaint the canvas.
 
void draw (QPainter *)
 Helper function for the derived plot canvas.
 
- Protected Member Functions inherited from QwtPlotAbstractCanvas
QWidget * canvasWidget ()
 
const QWidget * canvasWidget () const
 
virtual void drawFocusIndicator (QPainter *)
 Draw the focus indication.
 
virtual void drawBorder (QPainter *)
 Draw the border of the canvas.
 
virtual void drawBackground (QPainter *)
 Helper function for the derived plot canvas.
 
void fillBackground (QPainter *)
 Helper function for the derived plot canvas.
 
void drawCanvas (QPainter *)
 Draw the plot to the canvas.
 
void drawStyled (QPainter *, bool)
 Helper function for the derived plot canvas.
 
void drawUnstyled (QPainter *)
 Helper function for the derived plot canvas.
 
QPainterPath canvasBorderPath (const QRect &rect) const
 
void updateStyleSheetInfo ()
 Update the cached information about the current style sheet.
 

Detailed Description

Base class of QwtPlotOpenGLCanvas and QwtPlotGLCanvas.

Member Enumeration Documentation

◆ PaintAttribute

Paint attributes.

The default setting enables BackingStore and Opaque.

See also
setPaintAttribute(), testPaintAttribute()
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 ).

See also
backingStore(), invalidateBackingStore()
ImmediatePaint 

When ImmediatePaint is set replot() calls repaint() instead of update().

See also
replot(), QWidget::repaint(), QWidget::update()

Constructor & Destructor Documentation

◆ QwtPlotAbstractGLCanvas()

QwtPlotAbstractGLCanvas::QwtPlotAbstractGLCanvas ( QWidget *  canvasWidget)
explicit

Paint attributes.

Constructor.

Parameters
canvasWidgetplot canvas widget

Member Function Documentation

◆ frameRect()

QRect QwtPlotAbstractGLCanvas::frameRect ( ) const
Returns
The rectangle where the frame is drawn in.

◆ frameShadow()

QFrame::Shadow QwtPlotAbstractGLCanvas::frameShadow ( ) const
Returns
Frame shadow
See also
setFrameShadow(), QFrame::setFrameShadow()

◆ frameShape()

QFrame::Shape QwtPlotAbstractGLCanvas::frameShape ( ) const
Returns
Frame shape
See also
setFrameShape(), QFrame::frameShape()

◆ frameStyle()

int QwtPlotAbstractGLCanvas::frameStyle ( ) const
Returns
The bitwise OR between a frameShape() and a frameShadow()
See also
setFrameStyle(), QFrame::frameStyle()

◆ frameWidth()

int QwtPlotAbstractGLCanvas::frameWidth ( ) const
Returns
Frame width depending on the style, line width and midline width.

◆ invalidateBackingStore()

virtual void QwtPlotAbstractGLCanvas::invalidateBackingStore ( )
pure virtual

Invalidate the internal backing store.

Implemented in QwtPlotGLCanvas, and QwtPlotOpenGLCanvas.

◆ lineWidth()

int QwtPlotAbstractGLCanvas::lineWidth ( ) const
Returns
Line width of the frame
See also
setLineWidth(), midLineWidth()

◆ midLineWidth()

int QwtPlotAbstractGLCanvas::midLineWidth ( ) const
Returns
Midline width of the frame
See also
setMidLineWidth(), lineWidth()

◆ replot()

void QwtPlotAbstractGLCanvas::replot ( )
protected

Invalidate the paint cache and repaint the canvas.

See also
invalidatePaintCache()

◆ setFrameShadow()

void QwtPlotAbstractGLCanvas::setFrameShadow ( QFrame::Shadow  shadow)

Set the frame shadow.

Parameters
shadowFrame shadow
See also
frameShadow(), setFrameShape(), QFrame::setFrameShadow()

◆ setFrameShape()

void QwtPlotAbstractGLCanvas::setFrameShape ( QFrame::Shape  shape)

Set the frame shape.

Parameters
shapeFrame shape
See also
frameShape(), setFrameShadow(), QFrame::frameShape()

◆ setFrameStyle()

void QwtPlotAbstractGLCanvas::setFrameStyle ( int  style)

Set the frame style.

Parameters
styleThe bitwise OR between a shape and a shadow.
See also
frameStyle(), QFrame::setFrameStyle(), setFrameShadow(), setFrameShape()

◆ setLineWidth()

void QwtPlotAbstractGLCanvas::setLineWidth ( int  width)

Set the frame line width.

The default line width is 2 pixels.

Parameters
widthLine width of the frame
See also
lineWidth(), setMidLineWidth()

◆ setMidLineWidth()

void QwtPlotAbstractGLCanvas::setMidLineWidth ( int  width)

Set the frame mid line width.

The default midline width is 0 pixels.

Parameters
widthMidline width of the frame
See also
midLineWidth(), setLineWidth()

◆ setPaintAttribute()

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

Changing the paint attributes.

Parameters
attributePaint attribute
onOn/Off
See also
testPaintAttribute()

◆ testPaintAttribute()

bool QwtPlotAbstractGLCanvas::testPaintAttribute ( PaintAttribute  attribute) const

Test whether a paint attribute is enabled.

Parameters
attributePaint attribute
Returns
true, when attribute is enabled
See also
setPaintAttribute()

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