|
QWT API (中文) 7.0.1
Qt绘图库 - 中文API文档
|
用于绘制标记的类 更多...
#include <qwt_plot_marker.h>
类 | |
| class | PrivateData |
Public 类型 | |
| enum | LineStyle { NoLine , HLine , VLine , Cross } |
| 线条样式 更多... | |
Public 类型 继承自 QwtPlotItem | |
| enum | RttiValues { Rtti_PlotItem = 0 , Rtti_PlotGrid , Rtti_PlotScale , Rtti_PlotLegend , Rtti_PlotMarker , Rtti_PlotCurve , Rtti_PlotSpectroCurve , Rtti_PlotIntervalCurve , Rtti_PlotHistogram , Rtti_PlotSpectrogram , Rtti_PlotGraphic , Rtti_PlotTradingCurve , Rtti_PlotBarChart , Rtti_PlotMultiBarChart , Rtti_PlotShape , Rtti_PlotTextLabel , Rtti_PlotZone , Rtti_PlotVectorField , Rtti_PlotArrowMarker , Rtti_PlotBoxChart , Rtti_PlotUserItem = 1000 } |
| 运行时类型信息 更多... | |
| enum | ItemAttribute { Legend = 0x01 , AutoScale = 0x02 , Margins = 0x04 } |
| 绘图项属性 更多... | |
| enum | ItemInterest { ScaleInterest = 0x01 , LegendInterest = 0x02 } |
| 绘图项关注的事件类型 更多... | |
| enum | RenderHint { RenderAntialiased = 0x1 } |
| 渲染提示 更多... | |
Public 成员函数 | |
| QwtPlotMarker () | |
| Constructor | |
| QwtPlotMarker (const QString &title) | |
| Constructor with title | |
| QwtPlotMarker (const QwtText &title) | |
| Constructor with QwtText title | |
| virtual | ~QwtPlotMarker () |
| Destructor | |
| virtual int | rtti () const override |
| Get the runtime type information | |
| double | xValue () const |
| Get the x-value | |
| double | yValue () const |
| Get the y-value | |
| QPointF | value () const |
| Get the value as a point | |
| void | setXValue (double) |
| Set the x-value | |
| void | setYValue (double) |
| Set the y-value | |
| void | setValue (double, double) |
| Set the value | |
| void | setValue (const QPointF &) |
| Set the value from a point | |
| void | setLineStyle (LineStyle) |
| Set the line style | |
| LineStyle | lineStyle () const |
| Get the line style | |
| void | setLinePen (const QColor &, qreal width=0.0, Qt::PenStyle=Qt::SolidLine) |
| Set the line pen | |
| void | setLinePen (const QPen &) |
| Set the line pen | |
| const QPen & | linePen () const |
| Get the line pen | |
| void | setSymbol (const QwtSymbol *) |
| Set the symbol | |
| const QwtSymbol * | symbol () const |
| Get the symbol | |
| void | setLabel (const QwtText &) |
| Set the label | |
| QwtText | label () const |
| Get the label | |
| void | setLabelAlignment (Qt::Alignment) |
| Set the label alignment | |
| Qt::Alignment | labelAlignment () const |
| Get the label alignment | |
| void | setLabelOrientation (Qt::Orientation) |
| Set the label orientation | |
| Qt::Orientation | labelOrientation () const |
| Get the label orientation | |
| void | setSpacing (int) |
| Set the spacing | |
| int | spacing () const |
| Get the spacing | |
| virtual void | draw (QPainter *, const QwtScaleMap &xMap, const QwtScaleMap &yMap, const QRectF &) const override |
| Draw the marker | |
| virtual QRectF | boundingRect () const override |
| Get the bounding rectangle | |
| virtual QwtGraphic | legendIcon (int index, const QSizeF &) const override |
| Get the legend icon | |
Public 成员函数 继承自 QwtPlotItem | |
| QwtPlotItem () | |
| Default constructor | |
| QwtPlotItem (const QString &title) | |
| Constructor with title as QString | |
| QwtPlotItem (const QwtText &title) | |
| Constructor with title as QwtText | |
| virtual | ~QwtPlotItem () |
| Destructor | |
| void | attach (QwtPlot *plot) |
| Attach the item to a plot | |
| void | detach () |
| Detach the item from the plot | |
| QwtPlot * | plot () const |
| Get the plot the item is attached to | |
| void | setTitle (const QString &title) |
| Set the title using a QString | |
| void | setTitle (const QwtText &title) |
| Set the title using a QwtText | |
| const QwtText & | title () const |
| Get the title | |
| void | setItemAttribute (ItemAttribute, bool on=true) |
| Set an item attribute | |
| bool | testItemAttribute (ItemAttribute) const |
| Test an item attribute | |
| void | setItemInterest (ItemInterest, bool on=true) |
| Set an item interest | |
| bool | testItemInterest (ItemInterest) const |
| Test an item interest | |
| void | setRenderHint (RenderHint, bool on=true) |
| Set a render hint | |
| bool | testRenderHint (RenderHint) const |
| Test a render hint | |
| void | setRenderThreadCount (uint numThreads) |
| Set the number of render threads | |
| uint | renderThreadCount () const |
| Get the number of render threads | |
| void | setLegendIconSize (const QSize &) |
| Set the legend icon size | |
| QSize | legendIconSize () const |
| Get the legend icon size | |
| double | z () const |
| Get the z-value | |
| void | setZ (double z) |
| Set the z-value | |
| void | show () |
| Show the item | |
| void | hide () |
| Hide the item | |
| virtual void | setVisible (bool) |
| Set the visibility | |
| bool | isVisible () const |
| Check if the item is visible | |
| void | setAxes (QwtAxisId xAxis, QwtAxisId yAxis) |
| Set both axes | |
| void | setXAxis (QwtAxisId) |
| Set the x-axis | |
| QwtAxisId | xAxis () const |
| Get the x-axis | |
| void | setYAxis (QwtAxisId) |
| Set the y-axis | |
| QwtAxisId | yAxis () const |
| Get the y-axis | |
| virtual void | itemChanged () |
| Notify the plot that the item has changed | |
| virtual void | legendChanged () |
| Notify the item that the legend has changed | |
| virtual void | getCanvasMarginHint (const QwtScaleMap &xMap, const QwtScaleMap &yMap, const QRectF &canvasRect, double &left, double &top, double &right, double &bottom) const |
| Get margin hints for the canvas | |
| virtual void | updateScaleDiv (const QwtScaleDiv &, const QwtScaleDiv &) |
| Update the item with new scale divisions | |
| virtual void | updateLegend (const QwtPlotItem *, const QList< QwtLegendData > &) |
| Update the item with changes of the legend | |
| QRectF | scaleRect (const QwtScaleMap &, const QwtScaleMap &) const |
| Calculate the scale rectangle | |
| QRectF | paintRect (const QwtScaleMap &, const QwtScaleMap &) const |
| Calculate the paint rectangle | |
| virtual QList< QwtLegendData > | legendData () const |
| Return legend data | |
Protected 成员函数 | |
| virtual void | drawLines (QPainter *, const QRectF &, const QPointF &) const |
| Draw the lines | |
| virtual void | drawSymbol (QPainter *, const QRectF &, const QPointF &) const |
| Draw the symbol | |
| virtual void | drawLabel (QPainter *, const QRectF &, const QPointF &) const |
| Draw the label | |
Protected 成员函数 继承自 QwtPlotItem | |
| QwtGraphic | defaultIcon (const QBrush &, const QSizeF &) const |
| Create a default icon | |
用于绘制标记的类
|
explicit |
Constructor
构造函数
|
explicit |
Constructor with title
QString标题的构造函数
|
explicit |
Constructor with QwtText title
QwtText标题的构造函数
|
virtual |
Destructor
析构函数
|
overridevirtual |
|
overridevirtual |
|
protectedvirtual |
Draw the label
Align and draw the text label of the marker
| painter | Painter |
| canvasRect | Contents rectangle of the canvas in painter coordinates |
| pos | Position of the marker, translated into widget coordinates |
|
protectedvirtual |
Draw the lines
Draw the lines marker
| painter | Painter |
| canvasRect | Contents rectangle of the canvas in painter coordinates |
| pos | Position of the marker, translated into widget coordinates |
|
protectedvirtual |
Draw the symbol
Draw the symbol of the marker
| painter | Painter |
| canvasRect | Contents rectangle of the canvas in painter coordinates |
| pos | Position of the marker, translated into widget coordinates |
| QwtText QwtPlotMarker::label | ( | ) | const |
Get the label
获取标签
| Qt::Alignment QwtPlotMarker::labelAlignment | ( | ) | const |
Get the label alignment
获取标签对齐方式
| Qt::Orientation QwtPlotMarker::labelOrientation | ( | ) | const |
Get the label orientation
获取标签方向
|
overridevirtual |
| const QPen & QwtPlotMarker::linePen | ( | ) | const |
Get the line pen
获取线条画笔
| QwtPlotMarker::LineStyle QwtPlotMarker::lineStyle | ( | ) | const |
Get the line style
获取线条样式
|
overridevirtual |
| void QwtPlotMarker::setLabel | ( | const QwtText & | label | ) |
Set the label
设置标签
| void QwtPlotMarker::setLabelAlignment | ( | Qt::Alignment | align | ) |
Set the label alignment
设置标签的对齐方式
| void QwtPlotMarker::setLabelOrientation | ( | Qt::Orientation | orientation | ) |
Set the label orientation
设置标签的方向
| void QwtPlotMarker::setLinePen | ( | const QColor & | color, |
| qreal | width = 0.0, |
||
| Qt::PenStyle | style = Qt::SolidLine |
||
| ) |
Set the line pen
构建并分配线条画笔
| void QwtPlotMarker::setLinePen | ( | const QPen & | pen | ) |
Set the line pen
指定线条的画笔
| void QwtPlotMarker::setLineStyle | ( | LineStyle | style | ) |
Set the line style
设置线条样式
| void QwtPlotMarker::setSpacing | ( | int | spacing | ) |
Set the spacing
设置间距
| void QwtPlotMarker::setSymbol | ( | const QwtSymbol * | symbol | ) |
Set the symbol
分配符号
| void QwtPlotMarker::setValue | ( | const QPointF & | pos | ) |
Set the value from a point
从点设置值
| void QwtPlotMarker::setValue | ( | double | x, |
| double | y | ||
| ) |
Set the value
设置值
| void QwtPlotMarker::setXValue | ( | double | x | ) |
Set the x-value
设置x值
| void QwtPlotMarker::setYValue | ( | double | y | ) |
Set the y-value
设置y值
| int QwtPlotMarker::spacing | ( | ) | const |
Get the spacing
获取间距
| const QwtSymbol * QwtPlotMarker::symbol | ( | ) | const |
Get the symbol
获取符号
| QPointF QwtPlotMarker::value | ( | ) | const |
Get the value as a point
获取作为点的值
| double QwtPlotMarker::xValue | ( | ) | const |
Get the x-value
获取x值
| double QwtPlotMarker::yValue | ( | ) | const |
Get the y-value
获取y值