Classes | Public Types | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
QwtPolarSpectrogram Class Reference

An item, which displays a spectrogram. More...

#include <qwt_polar_spectrogram.h>

Inheritance diagram for QwtPolarSpectrogram:
Inheritance graph
[legend]

Classes

class  PrivateData
 
class  TileInfo
 

Public Types

enum  PaintAttribute { ApproximatedAtan = 0x01 }
 
typedef QFlags< PaintAttributePaintAttributes
 Paint attributes. More...
 
- Public Types inherited from QwtPolarItem
enum  ItemAttribute { Legend = 0x01, AutoScale = 0x02 }
 Plot Item Attributes. More...
 
typedef QFlags< ItemAttributeItemAttributes
 Item attributes. More...
 
enum  RenderHint { RenderAntialiased = 0x01 }
 Render hints. More...
 
typedef QFlags< RenderHintRenderHints
 Item attributes. 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 QwtColorMapcolorMap () const
 
const QwtRasterDatadata () 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< QwtLegendDatalegendData () 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
 
QwtPolarPlotplot () 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 QwtTexttitle () 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 renderTile (const QwtScaleMap &, const QwtScaleMap &, const QPointF &pole, TileInfo *) const
 

Private Attributes

PrivateDatad_data
 

Detailed Description

An item, which displays a spectrogram.

A spectrogram displays threedimenional 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.

Member Typedef Documentation

Paint attributes.

Definition at line 48 of file qwt_polar_spectrogram.h.

Member Enumeration Documentation

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 & Destructor Documentation

QwtPolarSpectrogram::QwtPolarSpectrogram ( )
explicit

Constructor.

Definition at line 55 of file qwt_polar_spectrogram.cpp.

QwtPolarSpectrogram::~QwtPolarSpectrogram ( )
virtual

Destructor.

Definition at line 67 of file qwt_polar_spectrogram.cpp.

Member Function Documentation

QwtInterval QwtPolarSpectrogram::boundingInterval ( int  scaleId) const
virtual

Interval, that is necessary to display the item This interval can be useful for operations like clipping or autoscaling

Parameters
scaleIdScale index
Returns
bounding interval ( == position )
See also
position()

Reimplemented from QwtPolarItem.

Definition at line 434 of file qwt_polar_spectrogram.cpp.

const QwtColorMap * QwtPolarSpectrogram::colorMap ( ) const
Returns
Color Map used for mapping the intensity values to colors
See also
setColorMap()

Definition at line 134 of file qwt_polar_spectrogram.cpp.

const QwtRasterData * QwtPolarSpectrogram::data ( ) const
Returns
Spectrogram data
See also
setData()

Definition at line 103 of file qwt_polar_spectrogram.cpp.

void QwtPolarSpectrogram::draw ( QPainter *  painter,
const QwtScaleMap azimuthMap,
const QwtScaleMap radialMap,
const QPointF &  pole,
double  radius,
const QRectF &  canvasRect 
) const
virtual

Draw the spectrogram

Parameters
painterPainter
azimuthMapMaps azimuth values to values related to 0.0, M_2PI
radialMapMaps radius values into painter coordinates.
polePosition of the pole in painter coordinates
radiusRadius of the complete plot area in painter coordinates
canvasRectContents rect of the canvas in painter coordinates

Implements QwtPolarItem.

Definition at line 174 of file qwt_polar_spectrogram.cpp.

QImage QwtPolarSpectrogram::renderImage ( const QwtScaleMap azimuthMap,
const QwtScaleMap radialMap,
const QPointF &  pole,
const QRect &  rect 
) const
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.

Parameters
azimuthMapMaps azimuth values to values related to 0.0, M_2PI
radialMapMaps radius values into painter coordinates.
polePosition of the pole in painter coordinates
rectTarget 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.

void QwtPolarSpectrogram::renderTile ( const QwtScaleMap azimuthMap,
const QwtScaleMap radialMap,
const QPointF &  pole,
const QPoint &  imagePos,
const QRect &  tile,
QImage *  image 
) const
protectedvirtual

Render a sub-rectangle of an image.

renderTile() is called by renderImage() to render different parts of the image by concurrent threads.

Parameters
azimuthMapMaps azimuth values to values related to 0.0, M_2PI
radialMapMaps radius values into painter coordinates.
polePosition of the pole in painter coordinates
imagePosTop/left position of the image in painter coordinates
tileSub-rectangle of the tile in painter coordinates
imageImage to be rendered
See also
setRenderThreadCount()
Note
renderTile needs to be reentrant

Definition at line 334 of file qwt_polar_spectrogram.cpp.

void QwtPolarSpectrogram::renderTile ( const QwtScaleMap azimuthMap,
const QwtScaleMap radialMap,
const QPointF &  pole,
TileInfo tileInfo 
) const
private

Definition at line 310 of file qwt_polar_spectrogram.cpp.

int QwtPolarSpectrogram::rtti ( ) const
virtual
Returns
QwtPolarItem::Rtti_PolarSpectrogram

Reimplemented from QwtPolarItem.

Definition at line 73 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.

Parameters
colorMapColor Map
See also
colorMap(), QwtScaleWidget::setColorBarEnabled(), QwtScaleWidget::setColorMap()

Definition at line 119 of file qwt_polar_spectrogram.cpp.

void QwtPolarSpectrogram::setData ( QwtRasterData data)

Set the data to be displayed

Parameters
dataSpectrogram 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.

void QwtPolarSpectrogram::setPaintAttribute ( PaintAttribute  attribute,
bool  on = true 
)

Specify an attribute how to draw the curve

Parameters
attributePaint attribute
onOn/Off
See also
testPaintAttribute()

Definition at line 146 of file qwt_polar_spectrogram.cpp.

bool QwtPolarSpectrogram::testPaintAttribute ( PaintAttribute  attribute) const
Parameters
attributePaint attribute
Returns
True, when attribute has been set
See also
setPaintAttribute()

Definition at line 159 of file qwt_polar_spectrogram.cpp.

Member Data Documentation

PrivateData* QwtPolarSpectrogram::d_data
private

Definition at line 86 of file qwt_polar_spectrogram.h.


The documentation for this class was generated from the following files:


plotjuggler
Author(s): Davide Faconti
autogenerated on Sun Dec 6 2020 04:02:50