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

A class for drawing markers 更多...

#include <qwt_polar_marker.h>

类 QwtPolarMarker 继承关系图:
QwtPolarItem

class  PrivateData
 

Public 成员函数

 QwtPolarMarker ()
 Constructor
 
 ~QwtPolarMarker () override
 Destructor
 
virtual int rtti () const override
 Get the runtime type information
 
void setPosition (const QwtPointPolar &)
 Set the position
 
QwtPointPolar position () const
 Get the position
 
void setSymbol (const QwtSymbol *s)
 Set the symbol
 
const QwtSymbolsymbol () 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
 
virtual void draw (QPainter *painter, const QwtScaleMap &azimuthMap, const QwtScaleMap &radialMap, const QPointF &pole, double radius, const QRectF &canvasRect) const override
 Draw the marker
 
virtual QwtInterval boundingInterval (int scaleId) const override
 Get the bounding interval for a scale
 
- Public 成员函数 继承自 QwtPolarItem
 QwtPolarItem (const QwtText &title=QwtText())
 Constructor
 
virtual ~QwtPolarItem ()
 Destructor
 
void attach (QwtPolarPlot *plot)
 Attach the item to a plot
 
void detach ()
 Detach the item from its plot
 
QwtPolarPlotplot () const
 Get the attached plot
 
void setTitle (const QString &title)
 Set the title from a QString
 
void setTitle (const QwtText &title)
 Set the title from 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 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
 
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
 Get the visibility
 
virtual void itemChanged ()
 Update the item and trigger autoRefresh
 
virtual void legendChanged ()
 Update the legend
 
virtual void updateScaleDiv (const QwtScaleDiv &, const QwtScaleDiv &, const QwtInterval &)
 Update the scale division
 
virtual int marginHint () const
 Get the margin hint
 
void setLegendIconSize (const QSize &)
 Set the legend icon size
 
QSize legendIconSize () const
 Get the legend icon size
 
virtual QList< QwtLegendDatalegendData () const
 Get the legend data
 
virtual QwtGraphic legendIcon (int index, const QSizeF &) const
 Get the legend icon
 

额外继承的成员函数

- Public 类型 继承自 QwtPolarItem
enum  RttiValues {
  Rtti_PolarItem = 0 , Rtti_PolarGrid , Rtti_PolarMarker , Rtti_PolarCurve ,
  Rtti_PolarSpectrogram , Rtti_PolarUserItem = 1000
}
 Runtime type information 更多...
 
enum  ItemAttribute { Legend = 0x01 , AutoScale = 0x02 }
 Plot Item Attributes 更多...
 
enum  RenderHint { RenderAntialiased = 0x01 }
 Render hints 更多...
 

详细描述

A class for drawing markers

A marker can be a a symbol, a label or a combination of them, which can be drawn around a center point inside a bounding rectangle.

The setSymbol() member assigns a symbol to the marker. The symbol is drawn at the specified point.

With setLabel(), a label can be assigned to the marker. The setLabelAlignment() member specifies where the label is drawn. All the Align*-constants in Qt::AlignmentFlags (see Qt documentation) are valid. The alignment refers to the center point of the marker, which means, for example, that the label would be painted left above the center point if the alignment was set to AlignLeft|AlignTop.

构造及析构函数说明

◆ QwtPolarMarker()

QwtPolarMarker::QwtPolarMarker ( )
explicit

Constructor

Sets alignment to Qt::AlignCenter, and style to NoLine.

Destructor

成员函数说明

◆ boundingInterval()

QwtInterval QwtPolarMarker::boundingInterval ( int  scaleId) const
overridevirtual

Get the bounding interval for a scale

Get the bounding interval necessary to display the item

参数
scaleIdScale index
返回
Bounding interval (equals position)

This interval can be useful for operations like clipping or autoscaling.

参见
position()

重载 QwtPolarItem .

◆ draw()

void QwtPolarMarker::draw ( QPainter *  painter,
const QwtScaleMap azimuthMap,
const QwtScaleMap radialMap,
const QPointF &  pole,
double  radius,
const QRectF &  canvasRect 
) const
overridevirtual

Draw the marker

参数
painterPainter
azimuthMapMaps azimuth values to values related to 0.0, M_2PI
radialMapMaps radius values into painter coordinates
polePosition of the pole in painter coordinates
radiusRadius of the complete plot area in painter coordinates
canvasRectContents rect of the canvas in painter coordinates

实现了 QwtPolarItem.

◆ label()

QwtText QwtPolarMarker::label ( ) const

Get the label

Get the label text

返回
The label text
参见
setLabel()

◆ labelAlignment()

Qt::Alignment QwtPolarMarker::labelAlignment ( ) const

Get the label alignment

返回
The label alignment
参见
setLabelAlignment()

◆ position()

QwtPointPolar QwtPolarMarker::position ( ) const

Get the position

Get the position of the marker

返回
Position of the marker
参见
setPosition()

◆ rtti()

int QwtPolarMarker::rtti ( ) const
overridevirtual

Get the runtime type information

返回
QwtPolarItem::Rtti_PolarMarker

重载 QwtPolarItem .

◆ setLabel()

void QwtPolarMarker::setLabel ( const QwtText label)

Set the label

Set the label text

参数
labelLabel text
参见
label()

◆ setLabelAlignment()

void QwtPolarMarker::setLabelAlignment ( Qt::Alignment  align)

Set the label alignment

Set the alignment of the label

参数
alignAlignment. A combination of AlignTop, AlignBottom, AlignLeft, AlignRight, AlignCenter, AlignHCenter, AlignVCenter.

The alignment determines where the label is drawn relative to the marker's position.

参见
labelAlignment()

◆ setPosition()

void QwtPolarMarker::setPosition ( const QwtPointPolar pos)

Set the position

Set the position of the marker

参数
posNew position of the marker
参见
position()

◆ setSymbol()

void QwtPolarMarker::setSymbol ( const QwtSymbol symbol)

Set the symbol

Assign a symbol

参数
symbolNew symbol (ownership is transferred)
参见
symbol(), QwtSymbol

◆ symbol()

const QwtSymbol * QwtPolarMarker::symbol ( ) const

Get the symbol

Get the current symbol

返回
The current symbol
参见
setSymbol(), QwtSymbol

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