QWT API (English) 7.0.1
Qt Widget Library for Technical Applications - English API Documentation
Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | List of all members
QwtIntervalSymbol Class Reference

A drawing primitive for displaying an interval like an error bar. More...

#include <qwt_interval_symbol.h>

Classes

class  PrivateData
 

Public Types

enum  Style { NoSymbol = -1 , Bar , Box , UserSymbol = 1000 }
 Symbol style More...
 

Public Member Functions

 QwtIntervalSymbol (Style=NoSymbol)
 Constructor.
 
 QwtIntervalSymbol (const QwtIntervalSymbol &)
 Copy constructor.
 
virtual ~QwtIntervalSymbol ()
 Destructor .
 
QwtIntervalSymboloperator= (const QwtIntervalSymbol &)
 Assignment operator.
 
bool operator== (const QwtIntervalSymbol &) const
 Compare two symbols.
 
bool operator!= (const QwtIntervalSymbol &) const
 Compare two symbols.
 
void setWidth (int)
 Specify the width of the symbol.
 
int width () const
 Get the width of the symbol.
 
void setBrush (const QBrush &)
 Assign a brush.
 
const QBrush & brush () const
 Get the brush.
 
void setPen (const QColor &, qreal width=0.0, Qt::PenStyle=Qt::SolidLine)
 Build and assign a pen.
 
void setPen (const QPen &)
 Assign a pen.
 
const QPen & pen () const
 Get the pen.
 
void setStyle (Style)
 Specify the symbol style.
 
Style style () const
 Get the current symbol style.
 
virtual void draw (QPainter *, Qt::Orientation, const QPointF &from, const QPointF &to) const
 Draw a symbol depending on its style.
 

Detailed Description

A drawing primitive for displaying an interval like an error bar.

Member Enumeration Documentation

◆ Style

Symbol style

Enumerator
NoSymbol 

No Style. The symbol cannot be drawn.

Bar 

The symbol displays a line with caps at the beginning/end.

The size of the caps depends on the symbol width().

Box 

The symbol displays a plain rectangle using pen() and brush().

The size of the rectangle depends on the translated interval and the width().

UserSymbol 

Styles >= UserSymbol are reserved for derived classes of QwtIntervalSymbol that overload draw() with additional application specific symbol types.

Constructor & Destructor Documentation

◆ QwtIntervalSymbol() [1/2]

QwtIntervalSymbol::QwtIntervalSymbol ( Style  style = NoSymbol)
explicit

Constructor.

◆ QwtIntervalSymbol() [2/2]

QwtIntervalSymbol::QwtIntervalSymbol ( const QwtIntervalSymbol other)

Copy constructor.

◆ ~QwtIntervalSymbol()

QwtIntervalSymbol::~QwtIntervalSymbol ( )
virtual

Destructor .

Member Function Documentation

◆ brush()

const QBrush & QwtIntervalSymbol::brush ( ) const

Get the brush.

◆ draw()

void QwtIntervalSymbol::draw ( QPainter *  painter,
Qt::Orientation  orientation,
const QPointF &  from,
const QPointF &  to 
) const
virtual

Draw a symbol depending on its style.

◆ operator!=()

bool QwtIntervalSymbol::operator!= ( const QwtIntervalSymbol other) const

Compare two symbols.

◆ operator=()

QwtIntervalSymbol & QwtIntervalSymbol::operator= ( const QwtIntervalSymbol other)

Assignment operator.

◆ operator==()

bool QwtIntervalSymbol::operator== ( const QwtIntervalSymbol other) const

Compare two symbols.

◆ pen()

const QPen & QwtIntervalSymbol::pen ( ) const

Get the pen.

◆ setBrush()

void QwtIntervalSymbol::setBrush ( const QBrush &  brush)

Assign a brush.

◆ setPen() [1/2]

void QwtIntervalSymbol::setPen ( const QColor &  color,
qreal  width = 0.0,
Qt::PenStyle  style = Qt::SolidLine 
)

Build and assign a pen.

◆ setPen() [2/2]

void QwtIntervalSymbol::setPen ( const QPen &  pen)

Assign a pen.

◆ setStyle()

void QwtIntervalSymbol::setStyle ( Style  style)

Specify the symbol style.

◆ setWidth()

void QwtIntervalSymbol::setWidth ( int  width)

Specify the width of the symbol.

◆ style()

QwtIntervalSymbol::Style QwtIntervalSymbol::style ( ) const

Get the current symbol style.

◆ width()

int QwtIntervalSymbol::width ( ) const

Get the width of the symbol.


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