|
QWT API (中文) 7.0.1
Qt绘图库 - 中文API文档
|
用于在绘图上绘制箭头标记的类 更多...
#include <qwt_plot_arrowmarker.h>
类 | |
| class | PrivateData |
Public 类型 | |
| enum | EndpointStyle { NoEndpoint = 0 , ArrowHead , Circle , Square , Diamond , Triangle , CustomPath } |
| 箭头端点样式类型 更多... | |
| enum | PositionMode { ExplicitPoints , StartLengthAngle } |
| 箭头定位模式 更多... | |
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 成员函数 | |
| QwtPlotArrowMarker () | |
| 默认构造函数 | |
| QwtPlotArrowMarker (const QString &title) | |
| 构造函数(带标题) | |
| QwtPlotArrowMarker (const QwtText &title) | |
| 构造函数(带 QwtText 标题) | |
| virtual | ~QwtPlotArrowMarker () |
| 析构函数 | |
| virtual int | rtti () const override |
| 获取运行时类型信息 | |
| QPointF | startPoint () const |
| 获取箭头的起点 | |
| QPointF | endPoint () const |
| 获取箭头的终点 | |
| void | setStartPoint (const QPointF &point) |
| 设置起点(绘图坐标) | |
| void | setEndPoint (const QPointF &point) |
| 设置终点(绘图坐标) | |
| void | setPoints (const QPointF &start, const QPointF &end) |
| 设置起点和终点(绘图坐标) | |
| double | length () const |
| 获取箭头长度(像素) | |
| void | setLength (double length) |
| 设置箭头长度(像素) | |
| double | angle () const |
| 获取旋转角度(度) | |
| void | setAngle (double angle) |
| 设置旋转角度(度) | |
| PositionMode | positionMode () const |
| 获取定位模式 | |
| void | setPositionMode (PositionMode mode) |
| 设置定位模式 | |
| const QPen & | linePen () const |
| 获取箭头线条画笔 | |
| void | setLinePen (const QPen &pen) |
| 设置箭头线条画笔 | |
| void | setLinePen (const QColor &color, qreal width=1.0, Qt::PenStyle style=Qt::SolidLine) |
| 设置线条颜色和宽度的便捷方法 | |
| EndpointStyle | headStyle () const |
| 获取头部样式 | |
| void | setHeadStyle (EndpointStyle style) |
| 设置头部样式 | |
| EndpointStyle | tailStyle () const |
| 获取尾部样式 | |
| void | setTailStyle (EndpointStyle style) |
| 设置尾部样式 | |
| QSizeF | headSize () const |
| 获取头部大小(像素) | |
| void | setHeadSize (const QSizeF &size) |
| 设置头部大小(像素) | |
| void | setHeadSize (qreal size) |
| 设置头部大小的便捷方法(宽度和高度相等) | |
| QSizeF | tailSize () const |
| 获取尾部大小(像素) | |
| void | setTailSize (const QSizeF &size) |
| 设置尾部大小(像素) | |
| void | setTailSize (qreal size) |
| 设置尾部大小的便捷方法(宽度和高度相等) | |
| const QBrush & | headBrush () const |
| 获取头部画刷 | |
| void | setHeadBrush (const QBrush &brush) |
| 设置头部画刷 | |
| const QBrush & | tailBrush () const |
| 获取尾部画刷 | |
| void | setTailBrush (const QBrush &brush) |
| 设置尾部画刷 | |
| const QPen & | headPen () const |
| 获取头部画笔 | |
| void | setHeadPen (const QPen &pen) |
| 设置头部画笔 | |
| const QPen & | tailPen () const |
| 获取尾部画笔 | |
| void | setTailPen (const QPen &pen) |
| 设置尾部画笔 | |
| void | setHeadCustomPath (const QPainterPath &path) |
| 设置头部端点的自定义路径 | |
| QPainterPath | headCustomPath () const |
| 获取自定义头部路径 | |
| void | setTailCustomPath (const QPainterPath &path) |
| 设置尾部端点的自定义路径 | |
| QPainterPath | tailCustomPath () const |
| 获取自定义尾部路径 | |
| virtual void | draw (QPainter *painter, const QwtScaleMap &xMap, const QwtScaleMap &yMap, const QRectF &canvasRect) const override |
| 在绘图上绘制箭头标记 | |
| virtual QRectF | boundingRect () const override |
| 获取边界矩形 | |
| virtual QwtGraphic | legendIcon (int index, const QSizeF &size) const override |
| 获取图例图标 | |
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 | drawArrowLine (QPainter *painter, const QPointF &canvasStart, const QPointF &canvasEnd) const |
| Draw the arrow line | |
| virtual void | drawCachedEndpoint (QPainter *painter, const QPointF &position, const QPainterPath &cachedPath, const QSizeF &size, const QPen &pen, const QBrush &brush, double rotation=0.0) const |
| Draw a cached endpoint path | |
| virtual QPointF | toCanvasPoint (const QPointF &plotPoint, const QwtScaleMap &xMap, const QwtScaleMap &yMap) const |
| Convert plot coordinates to canvas coordinates | |
| virtual QPointF | calculateEndPoint () const |
| Calculate end point based on start point, length, and angle | |
Protected 成员函数 继承自 QwtPlotItem | |
| QwtGraphic | defaultIcon (const QBrush &, const QSizeF &) const |
| Create a default icon | |
用于在绘图上绘制箭头标记的类
|
explicit |
默认构造函数
|
explicit |
构造函数(带标题)
|
virtual |
析构函数
| double QwtPlotArrowMarker::angle | ( | ) | const |
获取旋转角度(度)
|
overridevirtual |
获取边界矩形
重载 QwtPlotItem .
|
overridevirtual |
在绘图上绘制箭头标记
实现了 QwtPlotItem.
|
protectedvirtual |
Draw a cached endpoint path
绘制缓存的端点路径
| QPointF QwtPlotArrowMarker::endPoint | ( | ) | const |
获取箭头的终点
| const QBrush & QwtPlotArrowMarker::headBrush | ( | ) | const |
获取头部画刷
| QPainterPath QwtPlotArrowMarker::headCustomPath | ( | ) | const |
获取自定义头部路径
| const QPen & QwtPlotArrowMarker::headPen | ( | ) | const |
获取头部画笔
| QSizeF QwtPlotArrowMarker::headSize | ( | ) | const |
获取头部大小(像素)
| QwtPlotArrowMarker::EndpointStyle QwtPlotArrowMarker::headStyle | ( | ) | const |
获取头部样式
|
overridevirtual |
获取图例图标
重载 QwtPlotItem .
| double QwtPlotArrowMarker::length | ( | ) | const |
获取箭头长度(像素)
| const QPen & QwtPlotArrowMarker::linePen | ( | ) | const |
获取箭头线条画笔
| QwtPlotArrowMarker::PositionMode QwtPlotArrowMarker::positionMode | ( | ) | const |
获取定位模式
|
overridevirtual |
获取运行时类型信息
重载 QwtPlotItem .
| void QwtPlotArrowMarker::setAngle | ( | double | angle | ) |
设置旋转角度(度)
| void QwtPlotArrowMarker::setEndPoint | ( | const QPointF & | point | ) |
设置终点(绘图坐标)
| void QwtPlotArrowMarker::setHeadBrush | ( | const QBrush & | brush | ) |
设置头部画刷
| void QwtPlotArrowMarker::setHeadCustomPath | ( | const QPainterPath & | path | ) |
设置头部端点的自定义路径
| void QwtPlotArrowMarker::setHeadPen | ( | const QPen & | pen | ) |
设置头部画笔
| void QwtPlotArrowMarker::setHeadSize | ( | const QSizeF & | size | ) |
设置头部大小(像素)
| void QwtPlotArrowMarker::setHeadSize | ( | qreal | size | ) |
设置头部大小的便捷方法(宽度和高度相等)
| void QwtPlotArrowMarker::setHeadStyle | ( | EndpointStyle | style | ) |
设置头部样式
| void QwtPlotArrowMarker::setLength | ( | double | length | ) |
设置箭头长度(像素)
| void QwtPlotArrowMarker::setLinePen | ( | const QColor & | color, |
| qreal | width = 1.0, |
||
| Qt::PenStyle | style = Qt::SolidLine |
||
| ) |
设置线条颜色和宽度的便捷方法
| void QwtPlotArrowMarker::setLinePen | ( | const QPen & | pen | ) |
设置箭头线条画笔
| void QwtPlotArrowMarker::setPoints | ( | const QPointF & | start, |
| const QPointF & | end | ||
| ) |
设置起点和终点(绘图坐标)
| void QwtPlotArrowMarker::setPositionMode | ( | PositionMode | mode | ) |
设置定位模式
| void QwtPlotArrowMarker::setStartPoint | ( | const QPointF & | point | ) |
设置起点(绘图坐标)
| void QwtPlotArrowMarker::setTailBrush | ( | const QBrush & | brush | ) |
设置尾部画刷
| void QwtPlotArrowMarker::setTailCustomPath | ( | const QPainterPath & | path | ) |
设置尾部端点的自定义路径
| void QwtPlotArrowMarker::setTailPen | ( | const QPen & | pen | ) |
设置尾部画笔
| void QwtPlotArrowMarker::setTailSize | ( | const QSizeF & | size | ) |
设置尾部大小(像素)
| void QwtPlotArrowMarker::setTailSize | ( | qreal | size | ) |
设置尾部大小的便捷方法(宽度和高度相等)
| void QwtPlotArrowMarker::setTailStyle | ( | EndpointStyle | style | ) |
设置尾部样式
| QPointF QwtPlotArrowMarker::startPoint | ( | ) | const |
获取箭头的起点
| const QBrush & QwtPlotArrowMarker::tailBrush | ( | ) | const |
获取尾部画刷
| QPainterPath QwtPlotArrowMarker::tailCustomPath | ( | ) | const |
获取自定义尾部路径
| const QPen & QwtPlotArrowMarker::tailPen | ( | ) | const |
获取尾部画笔
| QSizeF QwtPlotArrowMarker::tailSize | ( | ) | const |
获取尾部大小(像素)
| QwtPlotArrowMarker::EndpointStyle QwtPlotArrowMarker::tailStyle | ( | ) | const |
获取尾部样式