|
QWT API (English) 7.3.0
Qt Widget Library for Technical Applications - English API Documentation
|
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 |
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()
| Enumerator | |
|---|---|
| NoFrame | No frame. |
| Plain | A plain frame style. |
| Raised | A raised frame style. |
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 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 | ) |
Set the column style.
Specify the symbol style.
| [in] | style | Style to set |
| QwtColumnSymbol::Style QwtColumnSymbol::style | ( | ) | const |