|
QWT API (中文) 7.3.0
Qt绘图库 - 中文API文档
|
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.
Frame Style used in Box style()
| 枚举值 | |
|---|---|
| NoFrame | No frame |
| Plain | A plain frame style |
| Raised | A raised frame style |
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. |
Constructor with style parameter
Constructor
| [in] | style | Style of the symbol |
Destructor
| QBrush QwtColumnSymbol::brush | ( | ) | const |
Return the fill brush
|
virtual |
Draw the column symbol
Draw the symbol depending on its style
| [in] | painter | Painter to use for drawing |
| [in] | rect | Directed rectangle defining the column bounds |
| QwtColumnSymbol::FrameStyle QwtColumnSymbol::frameStyle | ( | ) | const |
Return the frame style
Return current frame style that is used for the Box style
| int QwtColumnSymbol::lineWidth | ( | ) | const |
Return the line width
Return line width of the frame that is used for the Box style
| QPen QwtColumnSymbol::pen | ( | ) | const |
Return the outline pen
| void QwtColumnSymbol::setBrush | ( | const QBrush & | b | ) |
Set the fill brush
Specify the fill brush
| [in] | b | Brush to use for filling the column |
| void QwtColumnSymbol::setFrameStyle | ( | FrameStyle | frameStyle | ) |
Set the frame style
Set the frame style that is used for the Box style
| [in] | frameStyle | Frame style to set |
| 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] | width | Width of the frame line |
| void QwtColumnSymbol::setPen | ( | const QPen & | pen | ) |
Set the outline pen
Specify the outline pen
| [in] | pen | Pen to use for drawing the outline |
| void QwtColumnSymbol::setStyle | ( | Style | style | ) |
| QwtColumnSymbol::Style QwtColumnSymbol::style | ( | ) | const |