QWT API (中文) 7.3.0
Qt绘图库 - 中文API文档
载入中...
搜索中...
未找到
| Public 类型 | Public 成员函数 | Protected 成员函数 | 所有成员列表
QwtColumnSymbol类 参考

A drawing primitive for columns 更多...

#include <qwt_column_symbol.h>

class  PrivateData
 

Public 类型

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

Public 成员函数

 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 成员函数

void drawBox (QPainter *, const QwtColumnRect &) const
 

详细描述

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.

成员枚举类型说明

◆ FrameStyle

Frame Style used in Box style()

参见
Style, setFrameStyle(), frameStyle(), setStyle(), setPalette()
枚举值
NoFrame 

No frame

Plain 

A plain frame style

Raised 

A raised frame style

◆ Style

Style

参见
setStyle(), style()
枚举值
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.

构造及析构函数说明

◆ QwtColumnSymbol()

QwtColumnSymbol::QwtColumnSymbol ( Style  style = NoStyle)
explicit

Constructor with style parameter

Constructor

参数
[in]styleStyle of the symbol
参见
setStyle(), style(), Style

Destructor

成员函数说明

◆ brush()

QBrush QwtColumnSymbol::brush ( ) const

Return the fill brush

返回
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

参数
[in]painterPainter to use for drawing
[in]rectDirected rectangle defining the column bounds
参见
drawBox()

◆ frameStyle()

QwtColumnSymbol::FrameStyle QwtColumnSymbol::frameStyle ( ) const

Return the frame style

Return current frame style that is used for the Box style

返回
Current frame style
参见
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

返回
Current line width
参见
setLineWidth(), frameStyle(), setStyle()

◆ pen()

QPen QwtColumnSymbol::pen ( ) const

Return the outline pen

返回
Current pen used for drawing the outline

◆ setBrush()

void QwtColumnSymbol::setBrush ( const QBrush &  b)

Set the fill brush

Specify the fill brush

参数
[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

参数
[in]frameStyleFrame style to set
参见
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

参数
[in]widthWidth of the frame line
参见
lineWidth(), setFrameStyle()

◆ setPen()

void QwtColumnSymbol::setPen ( const QPen &  pen)

Set the outline pen

Specify the outline pen

参数
[in]penPen to use for drawing the outline

◆ setStyle()

void QwtColumnSymbol::setStyle ( Style  style)

Set the column style

Specify the symbol style

参数
[in]styleStyle to set
参见
style(), setPalette()

◆ style()

QwtColumnSymbol::Style QwtColumnSymbol::style ( ) const

Return the column style

Return current symbol style

返回
Current style
参见
setStyle()

该类的文档由以下文件生成: