An item, which displays a spectrogram. More...
#include <qwt_polar_spectrogram.h>
Classes | |
class | PrivateData |
class | TileInfo |
Public Types | |
enum | PaintAttribute { ApproximatedAtan = 0x01 } |
Public Types inherited from QwtPolarItem | |
enum | ItemAttribute { Legend = 0x01, AutoScale = 0x02 } |
Plot Item Attributes. More... | |
enum | RenderHint { RenderAntialiased = 0x01 } |
Render hints. More... | |
enum | RttiValues { Rtti_PolarItem = 0, Rtti_PolarGrid, Rtti_PolarMarker, Rtti_PolarCurve, Rtti_PolarSpectrogram, Rtti_PolarUserItem = 1000 } |
Runtime type information. More... | |
Public Member Functions | |
virtual QwtInterval | boundingInterval (int scaleId) const QWT_OVERRIDE |
const QwtColorMap * | colorMap () const |
const QwtRasterData * | data () const |
virtual void | draw (QPainter *painter, const QwtScaleMap &azimuthMap, const QwtScaleMap &radialMap, const QPointF &pole, double radius, const QRectF &canvasRect) const QWT_OVERRIDE |
QwtPolarSpectrogram () | |
Constructor. More... | |
virtual int | rtti () const QWT_OVERRIDE |
void | setColorMap (QwtColorMap *) |
void | setData (QwtRasterData *data) |
void | setPaintAttribute (PaintAttribute, bool on=true) |
bool | testPaintAttribute (PaintAttribute) const |
virtual | ~QwtPolarSpectrogram () |
Destructor. More... | |
Public Member Functions inherited from QwtPolarItem | |
void | attach (QwtPolarPlot *plot) |
Attach the item to a plot. More... | |
void | detach () |
This method detaches a QwtPolarItem from the QwtPolarPlot it has been associated with. More... | |
void | hide () |
Hide the item. More... | |
bool | isVisible () const |
virtual void | itemChanged () |
virtual void | legendChanged () |
virtual QList< QwtLegendData > | legendData () const |
Return all information, that is needed to represent the item on the legend. More... | |
virtual QwtGraphic | legendIcon (int index, const QSizeF &) const |
QSize | legendIconSize () const |
virtual int | marginHint () const |
QwtPolarPlot * | plot () const |
QwtPolarItem (const QwtText &title=QwtText()) | |
uint | renderThreadCount () const |
void | setItemAttribute (ItemAttribute, bool on=true) |
void | setLegendIconSize (const QSize &) |
void | setRenderHint (RenderHint, bool on=true) |
void | setRenderThreadCount (uint numThreads) |
void | setTitle (const QString &title) |
void | setTitle (const QwtText &title) |
virtual void | setVisible (bool) |
void | setZ (double z) |
Set the z value. More... | |
void | show () |
Show the item. More... | |
bool | testItemAttribute (ItemAttribute) const |
bool | testRenderHint (RenderHint) const |
const QwtText & | title () const |
virtual void | updateScaleDiv (const QwtScaleDiv &, const QwtScaleDiv &, const QwtInterval &) |
Update the item to changes of the axes scale division. More... | |
double | z () const |
virtual | ~QwtPolarItem () |
Destroy the QwtPolarItem. More... | |
Protected Member Functions | |
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. More... | |
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. More... | |
Private Member Functions | |
void | renderTileInfo (const QwtScaleMap &, const QwtScaleMap &, const QPointF &pole, TileInfo *) const |
Private Attributes | |
PrivateData * | m_data |
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.
Definition at line 28 of file qwt_polar_spectrogram.h.
Attributes to modify the drawing algorithm. The default setting disables ApproximatedAtan
Enumerator | |
---|---|
ApproximatedAtan | Use qwtFastAtan2 instead of atan2 for translating widget into polar coordinates. |
Definition at line 37 of file qwt_polar_spectrogram.h.
|
explicit |
Constructor.
Definition at line 58 of file qwt_polar_spectrogram.cpp.
|
virtual |
Destructor.
Definition at line 70 of file qwt_polar_spectrogram.cpp.
|
virtual |
Interval, that is necessary to display the item This interval can be useful for operations like clipping or autoscaling
scaleId | Scale index |
Reimplemented from QwtPolarItem.
Definition at line 443 of file qwt_polar_spectrogram.cpp.
const QwtColorMap * QwtPolarSpectrogram::colorMap | ( | ) | const |
Definition at line 137 of file qwt_polar_spectrogram.cpp.
const QwtRasterData * QwtPolarSpectrogram::data | ( | ) | const |
|
virtual |
Draw the spectrogram
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 177 of file qwt_polar_spectrogram.cpp.
|
protectedvirtual |
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.
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 |
Definition at line 235 of file qwt_polar_spectrogram.cpp.
|
protectedvirtual |
Render a sub-rectangle of an image.
renderTile() is called by renderImage() to render different parts of the image by concurrent threads.
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 |
Definition at line 343 of file qwt_polar_spectrogram.cpp.
|
private |
Definition at line 319 of file qwt_polar_spectrogram.cpp.
|
virtual |
Reimplemented from QwtPolarItem.
Definition at line 76 of file qwt_polar_spectrogram.cpp.
void QwtPolarSpectrogram::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.
colorMap | Color Map |
Definition at line 122 of file qwt_polar_spectrogram.cpp.
void QwtPolarSpectrogram::setData | ( | QwtRasterData * | data | ) |
Set the data to be displayed
data | Spectrogram Data |
Definition at line 91 of file qwt_polar_spectrogram.cpp.
void QwtPolarSpectrogram::setPaintAttribute | ( | PaintAttribute | attribute, |
bool | on = true |
||
) |
Specify an attribute how to draw the curve
attribute | Paint attribute |
on | On/Off |
Definition at line 149 of file qwt_polar_spectrogram.cpp.
bool QwtPolarSpectrogram::testPaintAttribute | ( | PaintAttribute | attribute | ) | const |
attribute | Paint attribute |
Definition at line 162 of file qwt_polar_spectrogram.cpp.
|
private |
Definition at line 85 of file qwt_polar_spectrogram.h.