constQwtColorMap*QwtPlotSpectrogram::colorMap()constReturns:
Color Map used for mapping the intensity values to colors
Seealso:setColorMap()QList<double>QwtPlotSpectrogram::contourLevels()constReturns:
Levels of the contour lines.
The levels are sorted in increasing order.
Seealso:contourLevels(), renderContourLines(), QwtRasterData::contourLines()QPenQwtPlotSpectrogram::contourPen(doublelevel)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:
contourPen is only used if defaultContourPen().style() == Qt::NoPen
Seealso:setDefaultContourPen(), setColorMap(), setContourLevels()QSizeQwtPlotSpectrogram::contourRasterSize(constQRectF&area,constQRect&rect)const[protected],[virtual]
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().
Parameters:area Rectangle, where to calculate the contour lines
rect Rectangle 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().
Seealso:drawContourLines(), QwtRasterData::contourLines()constQwtRasterData*QwtPlotSpectrogram::data()constReturns:
Spectrogram data
Seealso:setData()QwtRasterData*QwtPlotSpectrogram::data()Returns:
Spectrogram data
Seealso:setData()QPenQwtPlotSpectrogram::defaultContourPen()constReturns:
Default contour pen
Seealso:setDefaultContourPen()voidQwtPlotSpectrogram::draw(QPainter*painter,constQwtScaleMap&xMap,constQwtScaleMap&yMap,constQRectF&canvasRect)const[virtual]
Draw the spectrogram.
Parameters:painter Painter
xMap Maps x-values into pixel coordinates.
yMap Maps y-values into pixel coordinates.
canvasRect Contents rectangle of the canvas in painter coordinates
Seealso:setDisplayMode(), renderImage(), QwtPlotRasterItem::draw(), drawContourLines()
Reimplemented from QwtPlotRasterItem.
voidQwtPlotSpectrogram::drawContourLines(QPainter*painter,constQwtScaleMap&xMap,constQwtScaleMap&yMap,constQwtRasterData::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
Seealso:renderContourLines(), defaultContourPen(), contourPen()QwtIntervalQwtPlotSpectrogram::interval(Qt::Axisaxis)const[virtual]Returns:
Bounding interval for an axis
The default implementation returns the interval of the associated raster data object.
Parameters:axis X, Y, or Z axis
Seealso:QwtRasterData::interval()
Reimplemented from QwtPlotRasterItem.
QRectFQwtPlotSpectrogram::pixelHint(constQRectF&area)const[virtual]
Pixel hint. The geometry of a pixel is used to calculated the resolution and alignment of the rendered
image.
The default implementation returns data()->pixelHint( rect );
Parameters:area In most implementations the resolution of the data doesn't depend on the requested area.
Returns:
Bounding rectangle of a pixel
Seealso:QwtPlotRasterItem::pixelHint(), QwtRasterData::pixelHint(), render(), renderImage()
Reimplemented from QwtPlotRasterItem.
QwtRasterData::ContourLinesQwtPlotSpectrogram::renderContourLines(constQRectF&rect,constQSize&raster)const[protected],[virtual]
Calculate contour lines
Parameters:rect Rectangle, where to calculate the contour lines
raster Raster, used by the CONREC algorithm
Returns:
Calculated contour lines
Seealso:contourLevels(), setConrecFlag(), QwtRasterData::contourLines()QImageQwtPlotSpectrogram::renderImage(constQwtScaleMap&xMap,constQwtScaleMap&yMap,constQRectF&area,constQSize&imageSize)const[protected],[virtual]
Render an image from data and color map. For each pixel of area the value is mapped into a color.
Parameters:xMap X-Scale Map
yMap Y-Scale Map
area Requested area for the image in scale coordinates
imageSize Size of the requested image
Returns:
A QImage::Format_Indexed8 or QImage::Format_ARGB32 depending on the color map.
Seealso:QwtRasterData::value(), QwtColorMap::rgb(), QwtColorMap::colorIndex()
Implements QwtPlotRasterItem.
voidQwtPlotSpectrogram::renderTile(constQwtScaleMap&xMap,constQwtScaleMap&yMap,constQRect&tile,QImage*image)const[protected]
Render a tile of an image. Rendering in tiles can be used to composite an image in parallel threads.
Parameters:xMap X-Scale Map
yMap Y-Scale Map
tile Geometry of the tile in image coordinates
image Image to be rendered
intQwtPlotSpectrogram::rtti()const[virtual]Returns:QwtPlotItem::Rtti_PlotSpectrogram
Reimplemented from QwtPlotItem.
voidQwtPlotSpectrogram::setColorMap(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
Seealso:colorMap(), QwtScaleWidget::setColorBarEnabled(), QwtScaleWidget::setColorMap()voidQwtPlotSpectrogram::setConrecFlag(QwtRasterData::ConrecFlagflag,boolon)
Modify an attribute of the CONREC algorithm, used to calculate the contour lines.
Parameters:flag CONREC flag
on On/Off
Seealso:testConrecFlag(), renderContourLines(), QwtRasterData::contourLines()voidQwtPlotSpectrogram::setContourLevels(constQList<double>&levels)
Set the levels of the contour lines
Parameters:levels Values of the contour levels
Seealso:contourLevels(), renderContourLines(), QwtRasterData::contourLines()Note:
contourLevels returns the same levels but sorted.
voidQwtPlotSpectrogram::setData(QwtRasterData*data)
Set the data to be displayed
Parameters:data Spectrogram Data
Seealso:data()voidQwtPlotSpectrogram::setDefaultContourPen(constQColor&color,qrealwidth=0.0,Qt::PenStylestyle=Qt::SolidLine)
Build and assign the default pen for the contour lines
In Qt5 the default pen width is 1.0 ( 0.0 in Qt4 ) what makes it non cosmetic ( see QPen::isCosmetic() ).
This method has been introduced to hide this incompatibility.
Parameters:color Pen color
width Pen width
style Pen style
Seealso:
pen(), brush()
voidQwtPlotSpectrogram::setDefaultContourPen(constQPen&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().
Seealso:defaultContourPen(), contourPen()voidQwtPlotSpectrogram::setDisplayMode(DisplayModemode,boolon=true)
The display mode controls how the raster data will be represented.
Parameters:mode Display mode
on On/Off
The default setting enables ImageMode.
Seealso:DisplayMode, displayMode()
boolQwtPlotSpectrogram::testConrecFlag(QwtRasterData::ConrecFlagflag)const
Test an attribute of the CONREC algorithm, used to calculate the contour lines.
Parameters:flag CONREC flag
Returns:
true, is enabled
The default setting enables QwtRasterData::IgnoreAllVerticesOnLevelSeealso:
setConrecClag(), renderContourLines(), QwtRasterData::contourLines()boolQwtPlotSpectrogram::testDisplayMode(DisplayModemode)const
The display mode controls how the raster data will be represented.
Parameters:mode Display mode
Returns:
true if mode is enabled