conflicting packages
QwtPlotSpectrogram(3) | Qwt User's Guide | QwtPlotSpectrogram(3) |
NAME¶
QwtPlotSpectrogram - A plot item, which displays a spectrogram.SYNOPSIS¶
#include <qwt_plot_spectrogram.h> Inherits QwtPlotRasterItem.Public Types¶
enum CachePolicy { NoCache, PaintCache, ScreenCache }
Public Member Functions¶
int alpha () const
Protected Member Functions¶
virtual QSize contourRasterSize (const QwtDoubleRect &, const QRect &) const
Detailed Description¶
A plot item, which displays a spectrogram.QwtRasterData, QwtColorMap
Member Enumeration Documentation¶
enum QwtPlotRasterItem::CachePolicy [inherited] .IP • 2¶
NoCacherenderImage() is called, whenever the item has to be repainted
- •
- PaintCache
renderImage() is called, whenever the image cache is not valid, or the scales, or the size of the canvas has changed. This type of cache is only useful for improving the performance of hide/show operations. All other situations are already handled by the plot canvas cache.
- •
- ScreenCache
The screen cache is an image in size of the screen. As long as the scales don't change the target image is scaled from the cache. This might improve the performance when resizing the plot widget, but suffers from scaling effects.
enum QwtPlotSpectrogram::DisplayMode The display mode controls how the raster data will be represented.¶
- •
- ImageMode
The values are mapped to colors using a color map.
- •
- ContourMode
The data is displayed using contour lines
setDisplayMode(),
testDisplayMode()
enum QwtPlotItem::ItemAttribute [inherited] Plot Item Attributes¶
- •
- Legend
The item is represented on the legend.
- •
- AutoScale
The boundingRect() of the item is included in the autoscaling calculation.
setItemAttribute(),
testItemAttribute()
enum QwtPlotItem::RenderHint [inherited]¶
Render hints.enum QwtPlotItem::RttiValues [inherited]¶
Runtime type information. RttiValues is used to cast plot items, without having to enable runtime type information of the compiler.Constructor & Destructor Documentation¶
QwtPlotSpectrogram::QwtPlotSpectrogram (const QString &title = QString::null) [explicit] Sets the following item attributes:¶
- •
- QwtPlotItem::AutoScale: true
- •
- QwtPlotItem::Legend: false
title Title
See also:
QwtPlotItem::setItemAttribute(),
QwtPlotItem::setZ()
QwtPlotSpectrogram::~QwtPlotSpectrogram () [virtual]¶
Destructor.Member Function Documentation¶
int QwtPlotRasterItem::alpha () const [inherited] Returns:¶
Alpha value of the raster item
See also:
setAlpha()
void QwtPlotItem::attach (QwtPlot *plot) [inherited]¶
Attach the item to a plot. This method will attach a QwtPlotItem to the QwtPlot argument. It will first detach the QwtPlotItem from any plot from a previous call to attach (if necessary). If a NULL argument is passed, it will detach from any QwtPlot it was attached to. Parameters:plot Plot widget
See also:
QwtPlotItem::detach()
QwtDoubleRect QwtPlotSpectrogram::boundingRect () const [virtual] Returns:¶
Bounding rect of the data
See also:
QwtRasterData::boundingRect()
QwtPlotRasterItem::CachePolicy QwtPlotRasterItem::cachePolicy () const [inherited] Returns:¶
Cache policy
See also:
CachePolicy,
setCachePolicy()
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. See also:contourLevels(),
renderContourLines(), QwtRasterData::contourLines()
QPen QwtPlotSpectrogram::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
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. 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 QwtPlotItem::detach () [inline, inherited]¶
This method detaches a QwtPlotItem from any QwtPlot it has been associated with. detach() is equivalent to calling attach( NULL ) See also:attach( QwtPlot* plot )
void QwtPlotSpectrogram::draw (QPainter *painter, const QwtScaleMap &xMap, const QwtScaleMap &yMap, const QRect &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 rect of the canvas in painter coordinates
See also:
setDisplayMode(), renderImage(),
QwtPlotRasterItem::draw(), drawContourLines()
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()
void QwtPlotItem::hide () [inherited]¶
Hide the item.void QwtPlotRasterItem::invalidateCache () [inherited] Invalidate the paint cache¶
See also:setCachePolicy()
QwtDoubleRect QwtPlotItem::invTransform (const QwtScaleMap &xMap, const QwtScaleMap &yMap, const QRect &rect) const [inherited] Transform a rectangle from paint to scale coordinates¶
Parameters:xMap X map
yMap Y map
rect Rectangle in paint coordinates
Returns:
Rectangle in scale coordinates
See also:
transform()
bool QwtPlotItem::isVisible () const [inherited] Returns:¶
true if visible
See also:
setVisible(), show(),
hide()
void QwtPlotItem::itemChanged () [virtual, inherited] Update the legend and call QwtPlot::autoRefresh for the parent plot.¶
See also:updateLegend()
QWidget * QwtPlotItem::legendItem () const [virtual, inherited]¶
Allocate the widget that represents the item on the legend. The default implementation is made for QwtPlotCurve and returns a QwtLegendItem(), but an item could be represented by any type of widget, by overloading legendItem() and updateLegend(). Returns:QwtLegendItem()
See also:
updateLegend() QwtLegend()
QRect QwtPlotItem::paintRect (const QwtScaleMap &xMap, const QwtScaleMap &yMap) const [inherited]¶
Calculate the bounding paint rect of 2 maps. Parameters:xMap X map
yMap X map
Returns:
Bounding rect of the scale maps
QwtPlot * QwtPlotItem::plot () const [inherited]¶
Return attached plot.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)
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. 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()
int QwtPlotSpectrogram::rtti () const [virtual] Returns:¶
QwtPlotItem::Rtti_PlotSpectrogram
QwtDoubleRect QwtPlotItem::scaleRect (const QwtScaleMap &xMap, const QwtScaleMap &yMap) const [inherited]¶
Calculate the bounding scale rect of 2 maps. Parameters:xMap X map
yMap X map
Returns:
Bounding rect of the scale maps
void QwtPlotRasterItem::setAlpha (intalpha) [inherited]¶
Set an alpha value for the raster data. Often a plot has several types of raster data organized in layers. ( f.e a geographical map, with weather statistics ). Using setAlpha() raster items can be stacked easily. The alpha value is a value [0, 255] to control the transparency of the image. 0 represents a fully transparent color, while 255 represents a fully opaque color. Parameters:alpha Alpha value
- •
- alpha >= 0
All alpha values of the pixels returned by renderImage() will be set to alpha, beside those with an alpha value of 0 (invalid pixels).
- •
- alpha < 0 The alpha values returned by renderImage() are not changed.
alpha()
void QwtPlotItem::setAxis (intxAxis, intyAxis) [inherited] Set X and Y axis¶
The item will painted according to the coordinates its Axes. Parameters:xAxis X Axis
yAxis Y Axis
See also:
setXAxis(), setYAxis(),
xAxis(), yAxis()
void QwtPlotRasterItem::setCachePolicy (QwtPlotRasterItem::CachePolicypolicy) [inherited] Change the cache policy¶
The default policy is NoCache Parameters:policy Cache policy
See also:
CachePolicy, cachePolicy()
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::ConrecAttributeattribute, boolon) 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 (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.
See also:
DisplayMode, displayMode()
void QwtPlotItem::setItemAttribute (ItemAttributeattribute, boolon = true) [inherited] Toggle an item attribute¶
Parameters:attribute Attribute type
on true/false
See also:
testItemAttribute(),
ItemAttribute
void QwtPlotItem::setRenderHint (RenderHinthint, boolon = true) [inherited] Toggle an render hint¶
Parameters:hint Render hint
on true/false
See also:
testRenderHint(),
RenderHint
void QwtPlotItem::setTitle (const QwtText &title) [inherited] Set a new title¶
Parameters:title Title
See also:
title()
void QwtPlotItem::setTitle (const QString &title) [inherited] Set a new title¶
Parameters:title Title
See also:
title()
void QwtPlotItem::setVisible (boolon) [virtual, inherited] Show/Hide the item¶
Parameters:on Show if true, otherwise hide
See also:
isVisible(), show(),
hide()
void QwtPlotItem::setXAxis (intaxis) [inherited] Set the X axis¶
The item will painted according to the coordinates its Axes. Parameters:axis X Axis
See also:
setAxis(), setYAxis(),
xAxis()
void QwtPlotItem::setYAxis (intaxis) [inherited] Set the Y axis¶
The item will painted according to the coordinates its Axes. Parameters:axis Y Axis
See also:
setAxis(), setXAxis(),
yAxis()
void QwtPlotItem::setZ (doublez) [inherited]¶
Set the z value. Plot items are painted in increasing z-order. Parameters:z Z-value
See also:
z(),
QwtPlotDict::itemList()
void QwtPlotItem::show () [inherited]¶
Show the item.bool QwtPlotSpectrogram::testConrecAttribute (QwtRasterData::ConrecAttributeattribute) 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 (DisplayModemode) const The display mode controls how the raster data will be represented.¶
Parameters:mode Display mode
Returns:
true if mode is enabled
bool QwtPlotItem::testItemAttribute (ItemAttributeattribute) const [inherited] Test an item attribute¶
Parameters:attribute Attribute type
Returns:
true/false
See also:
setItemAttribute(),
ItemAttribute
bool QwtPlotItem::testRenderHint (RenderHinthint) const [inherited] Test a render hint¶
Parameters:hint Render hint
Returns:
true/false
See also:
setRenderHint(),
RenderHint
const QwtText & QwtPlotItem::title () const [inherited] Returns:¶
Title of the item
See also:
setTitle()
QRect QwtPlotItem::transform (const QwtScaleMap &xMap, const QwtScaleMap &yMap, const QwtDoubleRect &rect) const [inherited] Transform a rectangle¶
Parameters:xMap X map
yMap Y map
rect Rectangle in scale coordinates
Returns:
Rectangle in paint coordinates
See also:
invTransform()
void QwtPlotItem::updateLegend (QwtLegend *legend) const [virtual, inherited]¶
Update the widget that represents the item on the legend. updateLegend() is called from itemChanged() to adopt the widget representing the item on the legend to its new configuration. The default implementation is made for QwtPlotCurve and updates a QwtLegendItem(), but an item could be represented by any type of widget, by overloading legendItem() and updateLegend(). Parameters:legend Legend
See also:
legendItem(), itemChanged(),
QwtLegend()
void QwtPlotItem::updateScaleDiv (const QwtScaleDiv &, const QwtScaleDiv &) [virtual, inherited]¶
Update the item to changes of the axes scale division. Update the item, when the axes of plot have changed. The default implementation does nothing, but items that depend on the scale division (like QwtPlotGrid()) have to reimplement updateScaleDiv() Parameters:xScaleDiv Scale division of the x-axis
yScaleDiv Scale division of the y-axis
See also:
QwtPlot::updateAxes()
int QwtPlotItem::xAxis () const [inherited]¶
Return xAxis.int QwtPlotItem::yAxis () const [inherited]¶
Return yAxis.double QwtPlotItem::z () const [inherited] Plot items are painted in increasing z-order.¶
Returns:setZ(),
QwtPlotDict::itemList()
Author¶
Generated automatically by Doxygen for Qwt User's Guide from the source code.Mon Aug 1 2011 | Version 5.2.2 |