|
QWT API (English) 7.0.1
Qt Widget Library for Technical Applications - English API Documentation
|
A plot item, which displays a spectrogram. More...
#include <qwt_plot_spectrogram.h>
Classes | |
| class | PrivateData |
Public Member Functions | |
| QwtPlotSpectrogram (const QString &title=QString()) | |
| Constructor. | |
| virtual | ~QwtPlotSpectrogram () |
| Destructor . | |
| void | setDisplayMode (DisplayMode, bool on=true) |
| Set a display mode. | |
| bool | testDisplayMode (DisplayMode) const |
| Test a display mode. | |
| void | setData (QwtRasterData *data) |
| Set the data to be displayed. | |
| const QwtRasterData * | data () const |
| Get the spectrogram data (const version) | |
| QwtRasterData * | data () |
| Get the spectrogram data. | |
| void | setColorMap (QwtColorMap *) |
| Change the color map. | |
| const QwtColorMap * | colorMap () const |
| Get the color map used for mapping intensity values to colors. | |
| void | setColorTableSize (int numColors) |
| Limit the number of colors being used by the color map. | |
| int | colorTableSize () const |
| Get the color table size. | |
| virtual QwtInterval | interval (Qt::Axis) const override |
| Get the bounding interval for an axis. | |
| virtual QRectF | pixelHint (const QRectF &) const override |
| Get the pixel hint. | |
| void | setDefaultContourPen (const QColor &, qreal width=0.0, Qt::PenStyle=Qt::SolidLine) |
| Build and assign the default pen for the contour lines. | |
| void | setDefaultContourPen (const QPen &) |
| Set the default pen for the contour lines. | |
| QPen | defaultContourPen () const |
| Get the default contour pen. | |
| virtual QPen | contourPen (double level) const |
| Calculate the pen for a contour line. | |
| void | setConrecFlag (QwtRasterData::ConrecFlag, bool on) |
| Modify an attribute of the CONREC algorithm. | |
| bool | testConrecFlag (QwtRasterData::ConrecFlag) const |
| Test an attribute of the CONREC algorithm. | |
| void | setContourLevels (const QList< double > &) |
| Set the levels of the contour lines. | |
| QList< double > | contourLevels () const |
| Get the levels of the contour lines. | |
| virtual int | rtti () const override |
| Get the runtime type information. | |
| virtual void | draw (QPainter *, const QwtScaleMap &xMap, const QwtScaleMap &yMap, const QRectF &canvasRect) const override |
| Draw the spectrogram. | |
Public Member Functions inherited from QwtPlotRasterItem | |
| QwtPlotRasterItem (const QString &title=QString()) | |
| Constructor. | |
| QwtPlotRasterItem (const QwtText &title) | |
| Constructor with title. | |
| virtual | ~QwtPlotRasterItem () |
| Destructor . | |
| void | setPaintAttribute (PaintAttribute, bool on=true) |
| Set a paint attribute. | |
| bool | testPaintAttribute (PaintAttribute) const |
| Test a paint attribute. | |
| void | setAlpha (int alpha) |
| Set an alpha value for the raster data. | |
| int | alpha () const |
| Get the alpha value of the raster item. | |
| void | setCachePolicy (CachePolicy) |
| Change the cache policy. | |
| CachePolicy | cachePolicy () const |
| Get the cache policy. | |
| void | invalidateCache () |
| Invalidate the paint cache. | |
| virtual QRectF | boundingRect () const override |
| Get the bounding rectangle of the data. | |
Public Member Functions inherited from 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. | |
| virtual QwtGraphic | legendIcon (int index, const QSizeF &) const |
| Return a legend icon. | |
Protected Member Functions | |
| virtual QImage | renderImage (const QwtScaleMap &xMap, const QwtScaleMap &yMap, const QRectF &area, const QSize &imageSize) const override |
| Render the image . | |
| virtual QSize | contourRasterSize (const QRectF &, const QRect &) const |
| Calculate the contour raster size . | |
| virtual QwtRasterData::ContourLines | renderContourLines (const QRectF &rect, const QSize &raster) const |
| Render the contour lines . | |
| virtual void | drawContourLines (QPainter *, const QwtScaleMap &xMap, const QwtScaleMap &yMap, const QwtRasterData::ContourLines &) const |
| Draw the contour lines . | |
| void | renderTile (const QwtScaleMap &xMap, const QwtScaleMap &yMap, const QRect &tile, QImage *) const |
| Render a tile . | |
Protected Member Functions inherited from QwtPlotRasterItem | |
| virtual QwtScaleMap | imageMap (Qt::Orientation, const QwtScaleMap &map, const QRectF &area, const QSize &imageSize, double pixelSize) const |
| Get the image map. | |
Protected Member Functions inherited from QwtPlotItem | |
| QwtGraphic | defaultIcon (const QBrush &, const QSizeF &) const |
| Create a default icon. | |
A plot item, which displays a spectrogram.
|
explicit |
Constructor.
|
virtual |
Destructor .
| const QwtColorMap * QwtPlotSpectrogram::colorMap | ( | ) | const |
Get the color map used for mapping intensity values to colors.
| int QwtPlotSpectrogram::colorTableSize | ( | ) | const |
Get the color table size.
| QList< double > QwtPlotSpectrogram::contourLevels | ( | ) | const |
Get the levels of the contour lines.
|
virtual |
Calculate the pen for a contour line.
|
protectedvirtual |
Calculate the contour raster size .
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().
| area | Rectangle, where to calculate the contour lines |
| rect | Rectangle in pixel coordinates, where to paint the contour lines |
| QwtRasterData * QwtPlotSpectrogram::data | ( | ) |
Get the spectrogram data.
| const QwtRasterData * QwtPlotSpectrogram::data | ( | ) | const |
Get the spectrogram data (const version)
| QPen QwtPlotSpectrogram::defaultContourPen | ( | ) | const |
Get the default contour pen.
|
overridevirtual |
Draw the spectrogram.
Reimplemented from QwtPlotRasterItem.
|
protectedvirtual |
Draw the contour lines .
Paint the contour lines.
| painter | Painter |
| xMap | Maps x-values into pixel coordinates. |
| yMap | Maps y-values into pixel coordinates. |
| contourLines | Contour lines |
|
overridevirtual |
Get the bounding interval for an axis.
Reimplemented from QwtPlotRasterItem.
|
overridevirtual |
Get the pixel hint.
Reimplemented from QwtPlotRasterItem.
|
protectedvirtual |
Render the contour lines .
Calculate contour lines.
| rect | Rectangle, where to calculate the contour lines |
| raster | Raster, used by the CONREC algorithm |
|
overrideprotectedvirtual |
Render the image .
Render an image from data and color map.
For each pixel of area the value is mapped into a color.
| xMap | X-Scale Map |
| yMap | Y-Scale Map |
| area | Requested area for the image in scale coordinates |
| imageSize | Size of the requested image |
Implements QwtPlotRasterItem.
|
protected |
Render a tile .
Render a tile of an image.
Rendering in tiles can be used to composite an image in parallel threads.
| xMap | X-Scale Map |
| yMap | Y-Scale Map |
| tile | Geometry of the tile in image coordinates |
| image | Image to be rendered |
|
overridevirtual |
Get the runtime type information.
Reimplemented from QwtPlotItem.
| void QwtPlotSpectrogram::setColorMap | ( | QwtColorMap * | colorMap | ) |
Change the color map.
| void QwtPlotSpectrogram::setColorTableSize | ( | int | numColors | ) |
Limit the number of colors being used by the color map.
| void QwtPlotSpectrogram::setConrecFlag | ( | QwtRasterData::ConrecFlag | flag, |
| bool | on | ||
| ) |
Modify an attribute of the CONREC algorithm.
| void QwtPlotSpectrogram::setContourLevels | ( | const QList< double > & | levels | ) |
Set the levels of the contour lines.
| void QwtPlotSpectrogram::setData | ( | QwtRasterData * | data | ) |
Set the data to be displayed.
| void QwtPlotSpectrogram::setDefaultContourPen | ( | const QColor & | color, |
| qreal | width = 0.0, |
||
| Qt::PenStyle | style = Qt::SolidLine |
||
| ) |
Build and assign the default pen for the contour lines.
| void QwtPlotSpectrogram::setDefaultContourPen | ( | const QPen & | pen | ) |
Set the default pen for the contour lines.
| void QwtPlotSpectrogram::setDisplayMode | ( | DisplayMode | mode, |
| bool | on = true |
||
| ) |
Set a display mode.
| bool QwtPlotSpectrogram::testConrecFlag | ( | QwtRasterData::ConrecFlag | flag | ) | const |
Test an attribute of the CONREC algorithm.
| bool QwtPlotSpectrogram::testDisplayMode | ( | DisplayMode | mode | ) | const |
Test a display mode.