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

An item, which displays a spectrogram 更多...

#include <qwt_polar_spectrogram.h>

类 QwtPolarSpectrogram 继承关系图:
QwtPolarItem

class  PrivateData
 
class  TileInfo
 

Public 类型

enum  PaintAttribute { ApproximatedAtan = 0x01 }
 Attributes to modify the drawing algorithm 更多...
 
- 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 更多...
 

Public 成员函数

 QwtPolarSpectrogram ()
 Constructor
 
 ~QwtPolarSpectrogram () override
 Destructor
 
void setData (QwtRasterData *data)
 Set the data
 
const QwtRasterDatadata () const
 Get the data
 
void setColorMap (QwtColorMap *)
 Set the color map
 
const QwtColorMapcolorMap () const
 Get the color map
 
void setPaintAttribute (PaintAttribute, bool on=true)
 Set a paint attribute
 
bool testPaintAttribute (PaintAttribute) const
 Test a paint attribute
 
virtual int rtti () const override
 Get the runtime type information
 
virtual void draw (QPainter *painter, const QwtScaleMap &azimuthMap, const QwtScaleMap &radialMap, const QPointF &pole, double radius, const QRectF &canvasRect) const override
 Draw the spectrogram
 
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
 

Protected 成员函数

virtual QImage renderImage (const QwtScaleMap &azimuthMap, const QwtScaleMap &radialMap, const QPointF &pole, const QRect &rect) const
 Render an image
 
virtual void renderTile (const QwtScaleMap &azimuthMap, const QwtScaleMap &radialMap, const QPointF &pole, const QPoint &imagePos, const QRect &tile, QImage *image) const
 Render a tile
 

详细描述

An item, which displays a spectrogram

A spectrogram displays 3-dimensional data, where the 3rd dimension ( the intensity ) is displayed using colors. The colors are calculated from the values using a color map.

参见
QwtRasterData, QwtColorMap

成员枚举类型说明

◆ PaintAttribute

Attributes to modify the drawing algorithm

The default setting disables ApproximatedAtan

参见
setPaintAttribute(), testPaintAttribute()
枚举值
ApproximatedAtan 

Use qwtFastAtan2 instead of atan2 for translating widget into polar coordinates.

构造及析构函数说明

◆ QwtPolarSpectrogram()

QwtPolarSpectrogram::QwtPolarSpectrogram ( )
explicit

Constructor

Creates a spectrogram item with default settings.

Destructor

成员函数说明

◆ boundingInterval()

QwtInterval QwtPolarSpectrogram::boundingInterval ( int  scaleId) const
overridevirtual

Get the bounding interval for a scale

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

参数
scaleIdScale index
返回
Bounding interval ( == position )
参见
position()

重载 QwtPolarItem .

◆ colorMap()

const QwtColorMap * QwtPolarSpectrogram::colorMap ( ) const

Get the color map

Get the color map used for mapping intensity values to colors

返回
Color Map
参见
setColorMap()

◆ data()

const QwtRasterData * QwtPolarSpectrogram::data ( ) const

Get the data

Get the spectrogram data

返回
Spectrogram data
参见
setData()

◆ draw()

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

Draw the spectrogram

参数
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.

◆ renderImage()

QImage QwtPolarSpectrogram::renderImage ( const QwtScaleMap azimuthMap,
const QwtScaleMap radialMap,
const QPointF &  pole,
const QRect &  rect 
) const
protectedvirtual

Render an image

Render an image from the data and color map.

The area is translated into a rect of the paint device. For each pixel of this rect the intensity is mapped into a color.

参数
azimuthMapMaps azimuth values to values related to 0.0, M_2PI
radialMapMaps radius values into painter coordinates.
polePosition of the pole in painter coordinates
rectTarget rectangle of the image in painter coordinates
返回
A QImage::Format_Indexed8 or QImage::Format_ARGB32 depending on the color map.
参见
QwtRasterData::intensity(), QwtColorMap::rgb(), QwtColorMap::colorIndex()

◆ renderTile()

void QwtPolarSpectrogram::renderTile ( const QwtScaleMap azimuthMap,
const QwtScaleMap radialMap,
const QPointF &  pole,
const QPoint &  imagePos,
const QRect &  tile,
QImage *  image 
) const
protectedvirtual

Render a tile

Render a sub-rectangle of an image

renderTile() is called by renderImage() to render different parts of the image by concurrent threads.

参数
azimuthMapMaps azimuth values to values related to 0.0, M_2PI
radialMapMaps radius values into painter coordinates.
polePosition of the pole in painter coordinates
imagePosTop/left position of the image in painter coordinates
tileSub-rectangle of the tile in painter coordinates
imageImage to be rendered
参见
setRenderThreadCount()
注解
renderTile needs to be reentrant

◆ rtti()

int QwtPolarSpectrogram::rtti ( ) const
overridevirtual

Get the runtime type information

Get runtime type information

返回
QwtPolarItem::Rtti_PolarSpectrogram

重载 QwtPolarItem .

◆ setColorMap()

void QwtPolarSpectrogram::setColorMap ( QwtColorMap colorMap)

Set the color map

Change the color map

Often it is useful to display the mapping between intensities and colors as an additional plot axis, showing a color bar.

参数
colorMapColor Map
参见
colorMap(), QwtScaleWidget::setColorBarEnabled(), QwtScaleWidget::setColorMap()

◆ setData()

void QwtPolarSpectrogram::setData ( QwtRasterData data)

Set the data

Set the data to be displayed

参数
dataSpectrogram Data
参见
data()
警告
QwtRasterData::initRaster() is called each time before the image is rendered, but without any useful parameters. Also QwtRasterData::rasterHint() is not used.

◆ setPaintAttribute()

void QwtPolarSpectrogram::setPaintAttribute ( PaintAttribute  attribute,
bool  on = true 
)

Set a paint attribute

Specify an attribute how to draw the curve

参数
attributePaint attribute
onOn/Off
参见
testPaintAttribute()

◆ testPaintAttribute()

bool QwtPolarSpectrogram::testPaintAttribute ( PaintAttribute  attribute) const

Test a paint attribute

参数
attributePaint attribute
返回
True when attribute has been set
参见
setPaintAttribute()

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