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

显示频谱图的绘图项 更多...

#include <qwt_plot_spectrogram.h>

类 QwtPlotSpectrogram 继承关系图:
QwtPlotRasterItem QwtPlotItem

class  PrivateData
 

Public 类型

enum  DisplayMode { ImageMode = 0x01 , ContourMode = 0x02 }
 显示模式 更多...
 
- Public 类型 继承自 QwtPlotRasterItem
enum  CachePolicy { NoCache , PaintCache }
 缓存策略 更多...
 
enum  PaintAttribute { PaintInDeviceResolution = 1 }
 绘制属性 更多...
 
- 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 成员函数

 QwtPlotSpectrogram (const QString &title=QString())
 构造函数
 
virtual ~QwtPlotSpectrogram ()
 析构函数
 
void setDisplayMode (DisplayMode, bool on=true)
 设置显示模式
 
bool testDisplayMode (DisplayMode) const
 测试显示模式
 
void setData (QwtRasterData *data)
 设置要显示的数据
 
const QwtRasterDatadata () const
 获取频谱图数据(常量版本)
 
QwtRasterDatadata ()
 获取频谱图数据
 
void setColorMap (QwtColorMap *)
 更改颜色映射
 
const QwtColorMapcolorMap () const
 获取用于将强度值映射到颜色的颜色映射
 
void setColorTableSize (int numColors)
 限制颜色映射使用的颜色数量
 
int colorTableSize () const
 获取颜色表大小
 
virtual QwtInterval interval (Qt::Axis) const override
 获取轴的边界区间
 
virtual QRectF pixelHint (const QRectF &) const override
 获取像素提示
 
void setDefaultContourPen (const QColor &, qreal width=0.0, Qt::PenStyle=Qt::SolidLine)
 构建并分配等高线的默认画笔
 
void setDefaultContourPen (const QPen &)
 设置等高线的默认画笔
 
QPen defaultContourPen () const
 获取默认等高线画笔
 
virtual QPen contourPen (double level) const
 计算等高线的画笔
 
void setConrecFlag (QwtRasterData::ConrecFlag, bool on)
 修改 CONREC 算法的属性
 
bool testConrecFlag (QwtRasterData::ConrecFlag) const
 测试 CONREC 算法的属性
 
void setContourLevels (const QList< double > &)
 设置等高线的级别
 
QList< double > contourLevels () const
 获取等高线的级别
 
virtual int rtti () const override
 获取运行时类型信息
 
virtual void draw (QPainter *, const QwtScaleMap &xMap, const QwtScaleMap &yMap, const QRectF &canvasRect) const override
 绘制频谱图
 
- Public 成员函数 继承自 QwtPlotRasterItem
 QwtPlotRasterItem (const QString &title=QString())
 构造函数
 
 QwtPlotRasterItem (const QwtText &title)
 构造函数(带标题)
 
virtual ~QwtPlotRasterItem ()
 析构函数
 
void setPaintAttribute (PaintAttribute, bool on=true)
 设置绘制属性
 
bool testPaintAttribute (PaintAttribute) const
 测试绘制属性
 
void setAlpha (int alpha)
 设置栅格数据的 alpha 值
 
int alpha () const
 获取栅格项的 alpha 值
 
void setCachePolicy (CachePolicy)
 更改缓存策略
 
CachePolicy cachePolicy () const
 获取缓存策略
 
void invalidateCache ()
 使绘制缓存失效
 
virtual QRectF boundingRect () 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
 
virtual QwtGraphic legendIcon (int index, const QSizeF &) const
 Return a legend icon
 

Protected 成员函数

virtual QImage renderImage (const QwtScaleMap &xMap, const QwtScaleMap &yMap, const QRectF &area, const QSize &imageSize) const override
 Render an image from data and color map.
 
virtual QSize contourRasterSize (const QRectF &, const QRect &) const
 Return the raster to be used by the CONREC contour algorithm.
 
virtual QwtRasterData::ContourLines renderContourLines (const QRectF &rect, const QSize &raster) const
 Calculate contour lines
 
virtual void drawContourLines (QPainter *, const QwtScaleMap &xMap, const QwtScaleMap &yMap, const QwtRasterData::ContourLines &) const
 Paint the contour lines
 
void renderTile (const QwtScaleMap &xMap, const QwtScaleMap &yMap, const QRect &tile, QImage *) const
 Render a tile of an image.
 
- Protected 成员函数 继承自 QwtPlotRasterItem
virtual QwtScaleMap imageMap (Qt::Orientation, const QwtScaleMap &map, const QRectF &area, const QSize &imageSize, double pixelSize) const
 Get the image map
 
- Protected 成员函数 继承自 QwtPlotItem
QwtGraphic defaultIcon (const QBrush &, const QSizeF &) const
 Create a default icon
 

详细描述

显示频谱图的绘图项

成员枚举类型说明

◆ DisplayMode

显示模式

枚举值
ImageMode 

The values are mapped to colors using a color map.

ContourMode 

The data is displayed using contour lines

构造及析构函数说明

◆ QwtPlotSpectrogram()

QwtPlotSpectrogram::QwtPlotSpectrogram ( const QString &  title = QString())
explicit

构造函数

◆ ~QwtPlotSpectrogram()

QwtPlotSpectrogram::~QwtPlotSpectrogram ( )
virtual

析构函数

成员函数说明

◆ colorMap()

const QwtColorMap * QwtPlotSpectrogram::colorMap ( ) const

获取用于将强度值映射到颜色的颜色映射

◆ colorTableSize()

int QwtPlotSpectrogram::colorTableSize ( ) const

获取颜色表大小

◆ contourLevels()

QList< double > QwtPlotSpectrogram::contourLevels ( ) const

获取等高线的级别

◆ contourPen()

QPen QwtPlotSpectrogram::contourPen ( double  level) const
virtual

计算等高线的画笔

◆ contourRasterSize()

QSize QwtPlotSpectrogram::contourRasterSize ( const QRectF &  area,
const QRect &  rect 
) const
protectedvirtual

Return the raster to be used by the CONREC contour algorithm.

A larger size will improve the precision of the CONREC algorithm, but will slow down the time that is needed to calculate the lines.

The default implementation returns rect.size() / 2 bounded to the resolution depending on pixelSize().

参数
areaRectangle, where to calculate the contour lines
rectRectangle in pixel coordinates, where to paint the contour lines
返回
Raster to be used by the CONREC contour algorithm.
注解
The size will be bounded to rect.size().
参见
drawContourLines(), QwtRasterData::contourLines()

◆ data() [1/2]

QwtRasterData * QwtPlotSpectrogram::data ( )

获取频谱图数据

◆ data() [2/2]

const QwtRasterData * QwtPlotSpectrogram::data ( ) const

获取频谱图数据(常量版本)

◆ defaultContourPen()

QPen QwtPlotSpectrogram::defaultContourPen ( ) const

获取默认等高线画笔

◆ draw()

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

绘制频谱图

重载 QwtPlotRasterItem .

◆ drawContourLines()

void QwtPlotSpectrogram::drawContourLines ( QPainter *  painter,
const QwtScaleMap xMap,
const QwtScaleMap yMap,
const QwtRasterData::ContourLines contourLines 
) const
protectedvirtual

Paint the contour lines

参数
painterPainter
xMapMaps x-values into pixel coordinates.
yMapMaps y-values into pixel coordinates.
contourLinesContour lines
参见
renderContourLines(), defaultContourPen(), contourPen()

◆ interval()

QwtInterval QwtPlotSpectrogram::interval ( Qt::Axis  axis) const
overridevirtual

获取轴的边界区间

重载 QwtPlotRasterItem .

◆ pixelHint()

QRectF QwtPlotSpectrogram::pixelHint ( const QRectF &  area) const
overridevirtual

获取像素提示

重载 QwtPlotRasterItem .

◆ renderContourLines()

QwtRasterData::ContourLines QwtPlotSpectrogram::renderContourLines ( const QRectF &  rect,
const QSize &  raster 
) const
protectedvirtual

Calculate contour lines

参数
rectRectangle, where to calculate the contour lines
rasterRaster, used by the CONREC algorithm
返回
Calculated contour lines
参见
contourLevels(), setConrecFlag(), QwtRasterData::contourLines()

◆ renderImage()

QImage QwtPlotSpectrogram::renderImage ( const QwtScaleMap xMap,
const QwtScaleMap yMap,
const QRectF &  area,
const QSize &  imageSize 
) const
overrideprotectedvirtual

Render an image from data and color map.

For each pixel of area the value is mapped into a color.

参数
xMapX-Scale Map
yMapY-Scale Map
areaRequested area for the image in scale coordinates
imageSizeSize of the requested image
返回
A QImage::Format_Indexed8 or QImage::Format_ARGB32 depending on the color map.
参见
QwtRasterData::value(), QwtColorMap::rgb(), QwtColorMap::colorIndex()

实现了 QwtPlotRasterItem.

◆ renderTile()

void QwtPlotSpectrogram::renderTile ( const QwtScaleMap xMap,
const QwtScaleMap yMap,
const QRect &  tile,
QImage *  image 
) const
protected

Render a tile of an image.

Rendering in tiles can be used to composite an image in parallel threads.

参数
xMapX-Scale Map
yMapY-Scale Map
tileGeometry of the tile in image coordinates
imageImage to be rendered

◆ rtti()

int QwtPlotSpectrogram::rtti ( ) const
overridevirtual

获取运行时类型信息

重载 QwtPlotItem .

◆ setColorMap()

void QwtPlotSpectrogram::setColorMap ( QwtColorMap colorMap)

更改颜色映射

◆ setColorTableSize()

void QwtPlotSpectrogram::setColorTableSize ( int  numColors)

限制颜色映射使用的颜色数量

◆ setConrecFlag()

void QwtPlotSpectrogram::setConrecFlag ( QwtRasterData::ConrecFlag  flag,
bool  on 
)

修改 CONREC 算法的属性

◆ setContourLevels()

void QwtPlotSpectrogram::setContourLevels ( const QList< double > &  levels)

设置等高线的级别

◆ setData()

void QwtPlotSpectrogram::setData ( QwtRasterData data)

设置要显示的数据

◆ setDefaultContourPen() [1/2]

void QwtPlotSpectrogram::setDefaultContourPen ( const QColor &  color,
qreal  width = 0.0,
Qt::PenStyle  style = Qt::SolidLine 
)

构建并分配等高线的默认画笔

◆ setDefaultContourPen() [2/2]

void QwtPlotSpectrogram::setDefaultContourPen ( const QPen &  pen)

设置等高线的默认画笔

◆ setDisplayMode()

void QwtPlotSpectrogram::setDisplayMode ( DisplayMode  mode,
bool  on = true 
)

设置显示模式

◆ testConrecFlag()

bool QwtPlotSpectrogram::testConrecFlag ( QwtRasterData::ConrecFlag  flag) const

测试 CONREC 算法的属性

◆ testDisplayMode()

bool QwtPlotSpectrogram::testDisplayMode ( DisplayMode  mode) const

测试显示模式


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