QwtPolarSpectrogram − An item, which displays a spectrogram.
#include <qwt_polar_spectrogram.h>
Inherits QwtPolarItem.
enum
PaintAttribute { ApproximatedAtan = 0x01 }
typedef QFlags< PaintAttribute >
PaintAttributes
Public Types inherited from QwtPolarItem
enum RttiValues {
Rtti_PolarItem = 0, Rtti_PolarGrid,
Rtti_PolarMarker, Rtti_PolarCurve,
Rtti_PolarSpectrogram, Rtti_PolarUserItem =
1000 }
Runtime type information.
enum ItemAttribute { Legend = 0x01,
AutoScale = 0x02 }
Plot Item Attributes.
enum RenderHint { RenderAntialiased = 0x01 }
Render hints.
typedef QFlags< ItemAttribute >
ItemAttributes
typedef QFlags< RenderHint >
RenderHints
QwtPolarSpectrogram
()
Constructor.
virtual ˜QwtPolarSpectrogram ()
Destructor.
void setData (QwtRasterData *data)
const QwtRasterData * data () const
void setColorMap (QwtColorMap *)
const QwtColorMap * colorMap () const
void setPaintAttribute (PaintAttribute, bool
on=true)
bool testPaintAttribute (PaintAttribute) const
virtual int rtti () const override
virtual void draw (QPainter *painter, const
QwtScaleMap &azimuthMap, const QwtScaleMap
&radialMap, const QPointF &pole, double radius,
const QRectF &canvasRect) const override
virtual QwtInterval boundingInterval (int scaleId)
const override
Public Member Functions inherited from QwtPolarItem
QwtPolarItem (const
QwtText &title=QwtText())
virtual ˜QwtPolarItem ()
Destroy the QwtPolarItem.
void attach (QwtPolarPlot *plot)
Attach the item to a plot.
void detach ()
This method detaches a QwtPolarItem from the
QwtPolarPlot it has been associated with.
QwtPolarPlot * plot () const
void setTitle (const QString &title)
void setTitle (const QwtText
&title)
const QwtText & title () const
void setItemAttribute (ItemAttribute, bool
on=true)
bool testItemAttribute (ItemAttribute) const
void setRenderHint (RenderHint, bool on=true)
bool testRenderHint (RenderHint) const
void setRenderThreadCount (uint numThreads)
uint renderThreadCount () const
double z () const
void setZ (double z)
Set the z value.
void show ()
Show the item.
void hide ()
Hide the item.
virtual void setVisible (bool)
bool isVisible () const
virtual void itemChanged ()
virtual void legendChanged ()
virtual void updateScaleDiv (const QwtScaleDiv
&, const QwtScaleDiv &, const
QwtInterval &)
Update the item to changes of the axes scale division.
virtual int marginHint () const
void setLegendIconSize (const QSize &)
QSize legendIconSize () const
virtual QList< QwtLegendData >
legendData () const
Return all information, that is needed to represent the item
on the legend.
virtual QwtGraphic legendIcon (int index, const
QSizeF &) const
virtual QImage
renderImage (const QwtScaleMap
&azimuthMap, const QwtScaleMap &radialMap,
const QPointF &pole, const QRect &rect) const
Render an image from the data and color map.
virtual void renderTile (const QwtScaleMap
&azimuthMap, const QwtScaleMap &radialMap,
const QPointF &pole, const QPoint &imagePos, const
QRect &tile, QImage *image) const
Render a sub-rectangle of an image.
An item, which displays a spectrogram.
A spectrogram displays 3-dimensional data, where the 3rd dimension ( the intensity ) is displayed using colors. The colors are calculated from the values using a color map.
See also
QwtRasterData, QwtColorMap
Definition at line 28 of file qwt_polar_spectrogram.h.
An ORed combination of PaintAttribute values.
Definition at line 47 of file qwt_polar_spectrogram.h.
Attributes to modify the drawing algorithm. The default setting disables ApproximatedAtan
See also
setPaintAttribute(), testPaintAttribute()
Enumerator
ApproximatedAtan
Use qwtFastAtan2 instead of atan2 for translating widget into polar coordinates.
Definition at line 37 of file qwt_polar_spectrogram.h.
Constructor.
Definition at line 55 of file qwt_polar_spectrogram.cpp.
Destructor.
Definition at line 67 of file qwt_polar_spectrogram.cpp.
Interval, that is necessary to display the item This interval can be useful for operations like clipping or autoscaling
Parameters
scaleId Scale index
Returns
bounding interval ( == position )
See also
position()
Reimplemented from QwtPolarItem.
Definition at line 440 of file qwt_polar_spectrogram.cpp.
Returns
Color Map used for mapping the intensity values to colors
See also
setColorMap()
Definition at line 134 of file qwt_polar_spectrogram.cpp.
Returns
Spectrogram data
See also
setData()
Definition at line 103 of file qwt_polar_spectrogram.cpp.
Draw the spectrogram
Parameters
painter Painter
azimuthMap Maps azimuth values to values related to 0.0,
M_2PI
radialMap Maps radius values into painter coordinates.
pole Position of the pole in painter coordinates
radius Radius of the complete plot area in painter
coordinates
canvasRect Contents rect of the canvas in painter
coordinates
Implements QwtPolarItem.
Definition at line 174 of file qwt_polar_spectrogram.cpp.
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
azimuthMap Maps azimuth
values to values related to 0.0, M_2PI
radialMap Maps radius values into painter coordinates.
pole Position of the pole in painter coordinates
rect Target rectangle of the image in painter
coordinates
Returns
A QImage::Format_Indexed8 or QImage::Format_ARGB32 depending on the color map.
See also
QwtRasterData::intensity(), QwtColorMap::rgb(), QwtColorMap::colorIndex()
Definition at line 232 of file qwt_polar_spectrogram.cpp.
Render a sub-rectangle of an image. renderTile() is called by renderImage() to render different parts of the image by concurrent threads.
Parameters
azimuthMap Maps azimuth
values to values related to 0.0, M_2PI
radialMap Maps radius values into painter coordinates.
pole Position of the pole in painter coordinates
imagePos Top/left position of the image in painter
coordinates
tile Sub-rectangle of the tile in painter coordinates
image Image to be rendered
See also
setRenderThreadCount()
Note
renderTile needs to be reentrant
Definition at line 340 of file qwt_polar_spectrogram.cpp.
Returns
QwtPolarItem::Rtti_PolarSpectrogram
Reimplemented from QwtPolarItem.
Definition at line 73 of file qwt_polar_spectrogram.cpp.
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()
Definition at line 119 of file qwt_polar_spectrogram.cpp.
Set the data to be displayed
Parameters
data Spectrogram Data
See also
data()
Warning
QwtRasterData::initRaster() is called each time before the image is rendered, but without any useful parameters. Also QwtRasterData::rasterHint() is not used.
Definition at line 88 of file qwt_polar_spectrogram.cpp.
Specify an attribute how to draw the curve
Parameters
attribute Paint
attribute
on On/Off
See also
testPaintAttribute()
Definition at line 146 of file qwt_polar_spectrogram.cpp.
Parameters
attribute Paint attribute
Returns
True, when attribute has been set
See also
setPaintAttribute()
Definition at line 159 of file qwt_polar_spectrogram.cpp.
Generated automatically by Doxygen for Qwt User’s Guide from the source code.