QwtPlotSpectrogram(3)
π QwtPlotSpectrogram(3) π
okay so bestie, welcome to the Qwt User's Guide page for QwtPlotSpectrogram β yes, that's the whole NAME section, it's giving mysterious β¨ and honestly? iconic of it. Let's get into it π«Ά
π SYNOPSIS π
#include <qwt_plot_spectrogram.h>
It inherits QwtPlotRasterItem β so it's a raster item at heart, but with extra sparkle π
π Public Types π
enum DisplayMode { ImageMode = 1, ContourMode = 2 }
π¦ Public Member Functions π¦
QwtPlotSpectrogram (const QString &title=QString::null)virtual ~QwtPlotSpectrogram ()virtual QwtDoubleRect boundingRect () constconst QwtColorMap & colorMap () constQwtValueList contourLevels () constvirtual QPen contourPen (double level) constconst QwtRasterData & data () constQPen defaultContourPen () constvirtual void draw (QPainter *p, const QwtScaleMap &xMap, const QwtScaleMap &yMap, const QRect &rect) constvirtual QSize rasterHint (const QwtDoubleRect &) constvirtual int rtti () constvoid setColorMap (const QwtColorMap &)void setConrecAttribute (QwtRasterData::ConrecAttribute, bool on)void setContourLevels (const QwtValueList &)void setData (const QwtRasterData &data)void setDefaultContourPen (const QPen &)void setDisplayMode (DisplayMode, bool on=true)bool testConrecAttribute (QwtRasterData::ConrecAttribute) constbool testDisplayMode (DisplayMode) const
πΈ Protected Member Functions πΈ
virtual QSize contourRasterSize (const QwtDoubleRect &, const QRect &) constvirtual void drawContourLines (QPainter *p, const QwtScaleMap &xMap, const QwtScaleMap &yMap, const QwtRasterData::ContourLines &lines) constvirtual QwtRasterData::ContourLines renderContourLines (const QwtDoubleRect &rect, const QSize &raster) constvirtual QImage renderImage (const QwtScaleMap &xMap, const QwtScaleMap &yMap, const QwtDoubleRect &rect) const
β¨ Detailed Description β¨
A plot item, which displays a spectrogram. periodt π
A spectrogram displays threedimenional data β like, three-dimensional, bestie β where the 3rd dimension (the intensity) gets shown off using colors. The colors are calculated from the values using a color map. π¨
In ContourMode contour lines are painted for the contour levels. chef's kiss π
See also: QwtRasterData, QwtColorMap
π Member Enumeration Documentation π
π enum QwtPlotSpectrogram::DisplayMode
The display mode controls how the raster data will be represented. like, it's the whole vibe check of the output π₯
ImageModeβ the values are mapped to colors using a color map.ContourModeβ the data is displayed using contour lines.
When both modes are enabled the contour lines are painted on top of the spectrogram. Layering? she invented it β¨ The default setting enables ImageMode.
See also: setDisplayMode(), testDisplayMode()
π Constructor & Destructor Documentation π
β QwtPlotSpectrogram::QwtPlotSpectrogram (const QString &title = QString::null) [explicit]
Sets the following item attributes:
QwtPlotItem::AutoScale: trueQwtPlotItem::Legend: false
The z value is initialized by 8.0. no cap, that's the starting z, bestie π«Ά
Parameters:
- title β Title
See also: QwtPlotItem::setItemAttribute(), QwtPlotItem::setZ()
π Member Function Documentation π
π¦ QwtDoubleRect QwtPlotSpectrogram::boundingRect () const [virtual]
Returns: Bounding rect of the data
See also: QwtRasterData::boundingRect()
Reimplemented from QwtPlotItem.
π¦ const QwtColorMap & QwtPlotSpectrogram::colorMap () const
Returns: Color Map used for mapping the intensity values to colors
See also: setColorMap()
π¦ QwtValueList QwtPlotSpectrogram::contourLevels () const
Return the levels of the contour lines. The levels are sorted in increasing order β she keeps it tidy π
See also: contourLevels(), renderContourLines(), QwtRasterData::contourLines()
π¦ QPen QwtPlotSpectrogram::contourPen (double level) const [virtual]
Calculate the pen for a contour line. The color of the pen is the color for level calculated by the color map. ποΈβ¨
Parameters:
- level β Contour level
Returns: Pen for the contour line
Note:contourPenis only used ifdefaultContourPen().style() == Qt::NoPen
See also: setDefaultContourPen(), setColorMap(), setContourLevels()
π¦ QSize QwtPlotSpectrogram::contourRasterSize (const QwtDoubleRect &area, const QRect &rect) const [protected], [virtual]
Return the raster to be used by the CONREC contour algorithm. A larger size will improve the precisision of the CONREC algorithm, but will slow down the time that is needed to calculate the lines. so likeβ¦ pretty but slow, choose your fighter π
The default implementation returns rect.size() / 2 bounded to data().rasterHint().
Parameters:
- area β Rect, where to calculate the contour lines
- rect β Rect in pixel coordinates, where to paint the contour lines
Returns: Raster to be used by the CONREC contour algorithm.
Note: The size will be bounded to rect.size().
See also: drawContourLines(), QwtRasterData::contourLines()
π¦ const QwtRasterData & QwtPlotSpectrogram::data () const
Returns: Spectrogram data
See also: setData()
π¦ QPen QwtPlotSpectrogram::defaultContourPen () const
Returns: Default contour pen
See also: setDefaultContourPen()
π¦ void QwtPlotSpectrogram::draw (QPainter *painter, const QwtScaleMap &xMap, const QwtScaleMap &yMap, const QRect &canvasRect) const [virtual]
Draw the spectrogram. the main character moment, fr fr π
Parameters:
- painter β Painter
- xMap β Maps x-values into pixel coordinates.
- yMap β Maps y-values into pixel coordinates.
- canvasRect β Contents rect of the canvas in painter coordinates
See also: setDisplayMode(), renderImage(), QwtPlotRasterItem::draw(), drawContourLines()
Reimplemented from QwtPlotRasterItem.
π¦ void QwtPlotSpectrogram::drawContourLines (QPainter *painter, const QwtScaleMap &xMap, const QwtScaleMap &yMap, const QwtRasterData::ContourLines &contourLines) const [protected], [virtual]
Paint the contour lines ποΈ
Parameters:
- painter β Painter
- xMap β Maps x-values into pixel coordinates.
- yMap β Maps y-values into pixel coordinates.
- contourLines β Contour lines
See also: renderContourLines(), defaultContourPen(), contourPen()
π¦ QSize QwtPlotSpectrogram::rasterHint (const QwtDoubleRect &rect) const [virtual]
Returns the recommended raster for a given rect. F.e the raster hint is used to limit the resolution of the image that is rendered.
Parameters:
- rect β Rect for the raster hint
Returns: data().rasterHint(rect)
Reimplemented from QwtPlotRasterItem.
π¦ QwtRasterData::ContourLines QwtPlotSpectrogram::renderContourLines (const QwtDoubleRect &rect, const QSize &raster) const [protected], [virtual]
Calculate contour lines βοΈ
Parameters:
- rect β Rectangle, where to calculate the contour lines
- raster β Raster, used by the CONREC algorithm
See also: contourLevels(), setConrecAttribute(), QwtRasterData::contourLines()
π¦ QImage QwtPlotSpectrogram::renderImage (const QwtScaleMap &xMap, const QwtScaleMap &yMap, const QwtDoubleRect &area) const [protected], [virtual]
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. every pixel ate and left no crumbs π
Parameters:
- xMap β X-Scale Map
- yMap β Y-Scale Map
- area β Area that should be rendered in scale coordinates.
Returns: A QImage::Format_Indexed8 or QImage::Format_ARGB32 depending on the color map.
See also: QwtRasterData::intensity(), QwtColorMap::rgb(), QwtColorMap::colorIndex()
Implements QwtPlotRasterItem.
π¦ int QwtPlotSpectrogram::rtti () const [virtual]
Returns: QwtPlotItem::Rtti_PlotSpectrogram
Reimplemented from QwtPlotItem.
π¦ void QwtPlotSpectrogram::setColorMap (const QwtColorMap &colorMap)
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.
Parameters:
- colorMap β Color Map
See also: colorMap(), QwtScaleWidget::setColorBarEnabled(), QwtScaleWidget::setColorMap()
π¦ void QwtPlotSpectrogram::setConrecAttribute (QwtRasterData::ConrecAttribute attribute, bool on)
Modify an attribute of the CONREC algorithm, used to calculate the contour lines.
Parameters:
- attribute β CONREC attribute
- on β On/Off
See also: testConrecAttribute(), renderContourLines(), QwtRasterData::contourLines()
π¦ void QwtPlotSpectrogram::setContourLevels (const QwtValueList &levels)
Set the levels of the contour lines
Parameters:
- levels β Values of the contour levels
See also: contourLevels(), renderContourLines(), QwtRasterData::contourLines()
Note: contourLevels returns the same levels but sorted.
π¦ void QwtPlotSpectrogram::setData (const QwtRasterData &data)
Set the data to be displayed
Parameters:
- data β Spectrogram Data
See also: data()
π¦ void QwtPlotSpectrogram::setDefaultContourPen (const QPen &pen)
Set the default pen for the contour lines. If the spectrogram has a valid default contour pen a contour line is painted using the default contour pen. Otherwise (pen.style() == Qt::NoPen) the pen is calculated for each contour level using contourPen().
See also: defaultContourPen(), contourPen()
π¦ void QwtPlotSpectrogram::setDisplayMode (DisplayMode mode, bool on = true)
The display mode controls how the raster data will be represented.
Parameters:
- mode β Display mode
- on β On/Off
The default setting enables ImageMode.
See also: DisplayMode, displayMode()
π¦ bool QwtPlotSpectrogram::testConrecAttribute (QwtRasterData::ConrecAttribute attribute) const
Test an attribute of the CONREC algorithm, used to calculate the contour lines.
Parameters:
- attribute β CONREC attribute
Returns: true, is enabled
See also: setConrecAttribute(), renderContourLines(), QwtRasterData::contourLines()
π¦ bool QwtPlotSpectrogram::testDisplayMode (DisplayMode mode) const
The display mode controls how the raster data will be represented.
Parameters:
- mode β Display mode
Returns: true if mode is enabled
π Author π
Generated automatically by Doxygen for Qwt User's Guide from the source code. (yes the robots wrote it, and they slayed β¨)
and that's the whole page, bestie!! π this was Version 5.2.3, dated Tue Nov 20 2012, from the Qwt User's Guide β go forth and plot those spectrograms, you absolute legend ππ¦
π¦ where this page comes from
- epel 9: qwt5-qt5-devel 5.2.3a-12.20210522gita2b11e3.el9 Β· LGPLv2+ with exceptions
- fedora 43: qwt5-qt5-devel 5.2.3a-22.20210522gita2b11e3.fc43 Β· LGPL-2.1-or-later WITH Qwt-exception-1.0
- fedora 43: qwt5-qt5-devel 5.2.3a-22.20210522gita2b11e3.fc43 Β· LGPL-2.1-or-later WITH Qwt-exception-1.0
- fedora 44: qwt5-qt5-devel 5.2.3a-23.20210522gita2b11e3.fc44 Β· LGPL-2.1-or-later WITH Qwt-exception-1.0
- fedora 44: qwt5-qt5-devel 5.2.3a-23.20210522gita2b11e3.fc44 Β· LGPL-2.1-or-later WITH Qwt-exception-1.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms