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

A drawing primitive for columns. More...

#include <qwt_column_symbol.h>

Classes

class  PrivateData
 

Public Types

enum  Style { NoStyle = -1 , Box , UserStyle = 1000 }
 Style. More...
 
enum  FrameStyle { NoFrame , Plain , Raised }
 Frame Style used in Box style() More...
 

Public Member Functions

 QwtColumnSymbol (Style=NoStyle)
 Constructor with style parameter.
 
virtual ~QwtColumnSymbol ()
 Destructor.
 
void setFrameStyle (FrameStyle)
 Set the frame style.
 
FrameStyle frameStyle () const
 Return the frame style.
 
void setLineWidth (int width)
 Set the line width for the frame.
 
int lineWidth () const
 Return the line width.
 
void setStyle (Style)
 Set the column style.
 
Style style () const
 Return the column style.
 
void setPen (const QPen &pen)
 Set the outline pen.
 
QPen pen () const
 Return the outline pen.
 
void setBrush (const QBrush &b)
 Set the fill brush.
 
QBrush brush () const
 Return the fill brush.
 
virtual void draw (QPainter *, const QwtColumnRect &) const
 Draw the column symbol.
 

Protected Member Functions

void drawBox (QPainter *, const QwtColumnRect &) const
 

Detailed Description

A drawing primitive for columns.

QwtColumnSymbol defines how columns are rendered in column-based charts like bar charts. It provides different styles (Box, etc.) and frame styles (Plain, Raised, NoFrame) to customize the appearance of column graphics. The symbol can be extended by deriving new types with UserStyle.

Member Enumeration Documentation

◆ FrameStyle

Frame Style used in Box style()

See also
Style, setFrameStyle(), frameStyle(), setStyle(), setPalette()
Enumerator
NoFrame 

No frame.

Plain 

A plain frame style.

Raised 

A raised frame style.

◆ Style

Style.

See also
setStyle(), style()
Enumerator
NoStyle 

No Style, the symbol draws nothing.

Box 

The column is painted with a frame depending on the frameStyle() and lineWidth() using the palette().

UserStyle 

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

Constructor & Destructor Documentation

◆ QwtColumnSymbol()

QwtColumnSymbol::QwtColumnSymbol ( Style  style = NoStyle)
explicit

Constructor with style parameter.

Constructor.

Parameters
[in]styleStyle of the symbol
See also
setStyle(), style(), Style

Destructor

Member Function Documentation

◆ brush()

QBrush QwtColumnSymbol::brush ( ) const

Return the fill brush.

Returns
Current brush used for filling the column

◆ draw()

void QwtColumnSymbol::draw ( QPainter *  painter,
const QwtColumnRect rect 
) const
virtual

Draw the column symbol.

Draw the symbol depending on its style.

Parameters
[in]painterPainter to use for drawing
[in]rectDirected rectangle defining the column bounds
See also
drawBox()

◆ frameStyle()

QwtColumnSymbol::FrameStyle QwtColumnSymbol::frameStyle ( ) const

Return the frame style.

Return current frame style that is used for the Box style.

Returns
Current frame style
See also
setFrameStyle(), lineWidth(), setStyle()

◆ lineWidth()

int QwtColumnSymbol::lineWidth ( ) const

Return the line width.

Return line width of the frame that is used for the Box style.

Returns
Current line width
See also
setLineWidth(), frameStyle(), setStyle()

◆ pen()

QPen QwtColumnSymbol::pen ( ) const

Return the outline pen.

Returns
Current pen used for drawing the outline

◆ setBrush()

void QwtColumnSymbol::setBrush ( const QBrush &  b)

Set the fill brush.

Specify the fill brush.

Parameters
[in]bBrush to use for filling the column

◆ setFrameStyle()

void QwtColumnSymbol::setFrameStyle ( FrameStyle  frameStyle)

Set the frame style.

Set the frame style that is used for the Box style.

Parameters
[in]frameStyleFrame style to set
See also
frameStyle(), setLineWidth(), setStyle()

◆ setLineWidth()

void QwtColumnSymbol::setLineWidth ( int  width)

Set the line width for the frame.

Set the line width of the frame that is used for the Box style.

Parameters
[in]widthWidth of the frame line
See also
lineWidth(), setFrameStyle()

◆ setPen()

void QwtColumnSymbol::setPen ( const QPen &  pen)

Set the outline pen.

Specify the outline pen.

Parameters
[in]penPen to use for drawing the outline

◆ setStyle()

void QwtColumnSymbol::setStyle ( Style  style)

Set the column style.

Specify the symbol style.

Parameters
[in]styleStyle to set
See also
style(), setPalette()

◆ style()

QwtColumnSymbol::Style QwtColumnSymbol::style ( ) const

Return the column style.

Return current symbol style.

Returns
Current style
See also
setStyle()

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