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

用于在绘图上绘制箭头标记的类 更多...

#include <qwt_plot_arrowmarker.h>

类 QwtPlotArrowMarker 继承关系图:
QwtPlotItem

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
 
QwtPlotplot () 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 QwtTexttitle () 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< QwtLegendDatalegendData () 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
 

详细描述

用于在绘图上绘制箭头标记的类

成员枚举类型说明

◆ EndpointStyle

箭头端点样式类型

枚举值
NoEndpoint 

无端点(不可见)

ArrowHead 

箭头头部样式

Circle 

圆形端点

Square 

方形端点

Diamond 

菱形端点

Triangle 

三角形端点

CustomPath 

自定义 QPainterPath 端点

◆ PositionMode

箭头定位模式

枚举值
ExplicitPoints 

使用显式起点和终点

StartLengthAngle 

使用起点、长度和角度

构造及析构函数说明

◆ QwtPlotArrowMarker() [1/3]

QwtPlotArrowMarker::QwtPlotArrowMarker ( )
explicit

默认构造函数

◆ QwtPlotArrowMarker() [2/3]

QwtPlotArrowMarker::QwtPlotArrowMarker ( const QString &  title)
explicit

构造函数(带标题)

◆ QwtPlotArrowMarker() [3/3]

QwtPlotArrowMarker::QwtPlotArrowMarker ( const QwtText title)
explicit

构造函数(带 QwtText 标题)

◆ ~QwtPlotArrowMarker()

QwtPlotArrowMarker::~QwtPlotArrowMarker ( )
virtual

析构函数

成员函数说明

◆ angle()

double QwtPlotArrowMarker::angle ( ) const

获取旋转角度(度)

◆ boundingRect()

QRectF QwtPlotArrowMarker::boundingRect ( ) const
overridevirtual

获取边界矩形

重载 QwtPlotItem .

◆ draw()

void QwtPlotArrowMarker::draw ( QPainter *  painter,
const QwtScaleMap xMap,
const QwtScaleMap yMap,
const QRectF &  canvasRect 
) const
overridevirtual

在绘图上绘制箭头标记

实现了 QwtPlotItem.

◆ drawCachedEndpoint()

void QwtPlotArrowMarker::drawCachedEndpoint ( QPainter *  painter,
const QPointF &  position,
const QPainterPath &  cachedPath,
const QSizeF &  size,
const QPen &  pen,
const QBrush &  brush,
double  rotation = 0.0 
) const
protectedvirtual

Draw a cached endpoint path

绘制缓存的端点路径

◆ endPoint()

QPointF QwtPlotArrowMarker::endPoint ( ) const

获取箭头的终点

◆ headBrush()

const QBrush & QwtPlotArrowMarker::headBrush ( ) const

获取头部画刷

◆ headCustomPath()

QPainterPath QwtPlotArrowMarker::headCustomPath ( ) const

获取自定义头部路径

◆ headPen()

const QPen & QwtPlotArrowMarker::headPen ( ) const

获取头部画笔

◆ headSize()

QSizeF QwtPlotArrowMarker::headSize ( ) const

获取头部大小(像素)

◆ headStyle()

QwtPlotArrowMarker::EndpointStyle QwtPlotArrowMarker::headStyle ( ) const

获取头部样式

◆ legendIcon()

QwtGraphic QwtPlotArrowMarker::legendIcon ( int  index,
const QSizeF &  size 
) const
overridevirtual

获取图例图标

重载 QwtPlotItem .

◆ length()

double QwtPlotArrowMarker::length ( ) const

获取箭头长度(像素)

◆ linePen()

const QPen & QwtPlotArrowMarker::linePen ( ) const

获取箭头线条画笔

◆ positionMode()

QwtPlotArrowMarker::PositionMode QwtPlotArrowMarker::positionMode ( ) const

获取定位模式

◆ rtti()

int QwtPlotArrowMarker::rtti ( ) const
overridevirtual

获取运行时类型信息

重载 QwtPlotItem .

◆ setAngle()

void QwtPlotArrowMarker::setAngle ( double  angle)

设置旋转角度(度)

◆ setEndPoint()

void QwtPlotArrowMarker::setEndPoint ( const QPointF &  point)

设置终点(绘图坐标)

◆ setHeadBrush()

void QwtPlotArrowMarker::setHeadBrush ( const QBrush &  brush)

设置头部画刷

◆ setHeadCustomPath()

void QwtPlotArrowMarker::setHeadCustomPath ( const QPainterPath &  path)

设置头部端点的自定义路径

◆ setHeadPen()

void QwtPlotArrowMarker::setHeadPen ( const QPen &  pen)

设置头部画笔

◆ setHeadSize() [1/2]

void QwtPlotArrowMarker::setHeadSize ( const QSizeF &  size)

设置头部大小(像素)

◆ setHeadSize() [2/2]

void QwtPlotArrowMarker::setHeadSize ( qreal  size)

设置头部大小的便捷方法(宽度和高度相等)

◆ setHeadStyle()

void QwtPlotArrowMarker::setHeadStyle ( EndpointStyle  style)

设置头部样式

◆ setLength()

void QwtPlotArrowMarker::setLength ( double  length)

设置箭头长度(像素)

◆ setLinePen() [1/2]

void QwtPlotArrowMarker::setLinePen ( const QColor &  color,
qreal  width = 1.0,
Qt::PenStyle  style = Qt::SolidLine 
)

设置线条颜色和宽度的便捷方法

◆ setLinePen() [2/2]

void QwtPlotArrowMarker::setLinePen ( const QPen &  pen)

设置箭头线条画笔

◆ setPoints()

void QwtPlotArrowMarker::setPoints ( const QPointF &  start,
const QPointF &  end 
)

设置起点和终点(绘图坐标)

◆ setPositionMode()

void QwtPlotArrowMarker::setPositionMode ( PositionMode  mode)

设置定位模式

◆ setStartPoint()

void QwtPlotArrowMarker::setStartPoint ( const QPointF &  point)

设置起点(绘图坐标)

◆ setTailBrush()

void QwtPlotArrowMarker::setTailBrush ( const QBrush &  brush)

设置尾部画刷

◆ setTailCustomPath()

void QwtPlotArrowMarker::setTailCustomPath ( const QPainterPath &  path)

设置尾部端点的自定义路径

◆ setTailPen()

void QwtPlotArrowMarker::setTailPen ( const QPen &  pen)

设置尾部画笔

◆ setTailSize() [1/2]

void QwtPlotArrowMarker::setTailSize ( const QSizeF &  size)

设置尾部大小(像素)

◆ setTailSize() [2/2]

void QwtPlotArrowMarker::setTailSize ( qreal  size)

设置尾部大小的便捷方法(宽度和高度相等)

◆ setTailStyle()

void QwtPlotArrowMarker::setTailStyle ( EndpointStyle  style)

设置尾部样式

◆ startPoint()

QPointF QwtPlotArrowMarker::startPoint ( ) const

获取箭头的起点

◆ tailBrush()

const QBrush & QwtPlotArrowMarker::tailBrush ( ) const

获取尾部画刷

◆ tailCustomPath()

QPainterPath QwtPlotArrowMarker::tailCustomPath ( ) const

获取自定义尾部路径

◆ tailPen()

const QPen & QwtPlotArrowMarker::tailPen ( ) const

获取尾部画笔

◆ tailSize()

QSizeF QwtPlotArrowMarker::tailSize ( ) const

获取尾部大小(像素)

◆ tailStyle()

QwtPlotArrowMarker::EndpointStyle QwtPlotArrowMarker::tailStyle ( ) const

获取尾部样式


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