Eneboo - Documentación para desarrolladores
Clases | Tipos públicos | Métodos públicos | Métodos protegidos
Referencia de la Clase QwtPlotSpectrogram

A plot item, which displays a spectrogram. Más...

#include <qwt_plot_spectrogram.h>

Diagrama de herencias de QwtPlotSpectrogram
QwtPlotRasterItem QwtPlotItem QwtLegendItemManager

Lista de todos los miembros.

Clases

class  PrivateData

Tipos públicos

enum  DisplayMode { ImageMode = 1, ContourMode = 2 }

Métodos públicos

 QwtPlotSpectrogram (const QString &title=QString::null)
virtual ~QwtPlotSpectrogram ()
 Destructor.
void setDisplayMode (DisplayMode, bool on=true)
bool testDisplayMode (DisplayMode) const
void setData (const QwtRasterData &data)
const QwtRasterDatadata () const
void setColorMap (const QwtColorMap &)
const QwtColorMapcolorMap () const
virtual QwtDoubleRect boundingRect () const
virtual QSize rasterHint (const QwtDoubleRect &) const
 Returns the recommended raster for a given rect.
void setDefaultContourPen (const QPen &)
 Set the default pen for the contour lines.
QPen defaultContourPen () const
virtual QPen contourPen (double level) const
 Calculate the pen for a contour line.
void setConrecAttribute (QwtRasterData::ConrecAttribute, bool on)
bool testConrecAttribute (QwtRasterData::ConrecAttribute) const
void setContourLevels (const QwtValueList &)
QwtValueList contourLevels () const
 Return the levels of the contour lines.
virtual int rtti () const
virtual void draw (QPainter *p, const QwtScaleMap &xMap, const QwtScaleMap &yMap, const QRect &rect) const
 Draw the spectrogram.

Métodos protegidos

virtual QImage renderImage (const QwtScaleMap &xMap, const QwtScaleMap &yMap, const QwtDoubleRect &rect) const
 Render an image from the data and color map.
virtual QSize contourRasterSize (const QwtDoubleRect &, const QRect &) const
 Return the raster to be used by the CONREC contour algorithm.
virtual QwtRasterData::ContourLines renderContourLines (const QwtDoubleRect &rect, const QSize &raster) const
virtual void drawContourLines (QPainter *p, const QwtScaleMap &xMap, const QwtScaleMap &yMap, const QwtRasterData::ContourLines &lines) const

Descripción detallada

A plot 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.

In ContourMode contour lines are painted for the contour levels.

spectrogram3.png
Ver también:
QwtRasterData, QwtColorMap

Documentación de las enumeraciones miembro de la clase

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

When both modes are enabled the contour lines are painted on top of the spectrogram. The default setting enables ImageMode.

Ver también:
setDisplayMode(), testDisplayMode()
Valores de enumeraciones:
ImageMode 
ContourMode 

Documentación del constructor y destructor

QwtPlotSpectrogram::QwtPlotSpectrogram ( const QString title = QString::null) [explicit]

Sets the following item attributes:

The z value is initialized by 8.0.

Parámetros:
titleTitle
Ver también:
QwtPlotItem::setItemAttribute(), QwtPlotItem::setZ()
QwtPlotSpectrogram::~QwtPlotSpectrogram ( ) [virtual]

Destructor.


Documentación de las funciones miembro

QwtDoubleRect QwtPlotSpectrogram::boundingRect ( ) const [virtual]
Devuelve:
Bounding rect of the data
Ver también:
QwtRasterData::boundingRect

Reimplementado de QwtPlotItem.

const QwtColorMap & QwtPlotSpectrogram::colorMap ( ) const
Devuelve:
Color Map used for mapping the intensity values to colors
Ver también:
setColorMap()
QwtValueList QwtPlotSpectrogram::contourLevels ( ) const

Return the levels of the contour lines.

The levels are sorted in increasing order.

Ver también:
contourLevels, renderContourLines, QwtRasterData::contourLines
QPen QwtPlotSpectrogram::contourPen ( double  level) const [virtual]

Calculate the pen for a contour line.

The color of the pen is the color for level calculated by the color map

Parámetros:
levelContour level
Devuelve:
Pen for the contour line
Nota:
contourPen is only used if defaultContourPen().style() == Qt::NoPen
Ver también:
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().

Parámetros:
areaRect, where to calculate the contour lines
rectRect in pixel coordinates, where to paint the contour lines
Devuelve:
Raster to be used by the CONREC contour algorithm.
Nota:
The size will be bounded to rect.size().
Ver también:
drawContourLines, QwtRasterData::contourLines
const QwtRasterData & QwtPlotSpectrogram::data ( ) const
Devuelve:
Spectrogram data
Ver también:
setData()
QPen QwtPlotSpectrogram::defaultContourPen ( ) const
Devuelve:
Default contour pen
Ver también:
setDefaultContourPen
void QwtPlotSpectrogram::draw ( QPainter painter,
const QwtScaleMap xMap,
const QwtScaleMap yMap,
const QRect canvasRect 
) const [virtual]

Draw the spectrogram.

Parámetros:
painterPainter
xMapMaps x-values into pixel coordinates.
yMapMaps y-values into pixel coordinates.
canvasRectContents rect of the canvas in painter coordinates
Ver también:
setDisplayMode, renderImage, QwtPlotRasterItem::draw, drawContourLines

Reimplementado de QwtPlotRasterItem.

void QwtPlotSpectrogram::drawContourLines ( QPainter painter,
const QwtScaleMap xMap,
const QwtScaleMap yMap,
const QwtRasterData::ContourLines contourLines 
) const [protected, virtual]

Paint the contour lines

Parámetros:
painterPainter
xMapMaps x-values into pixel coordinates.
yMapMaps y-values into pixel coordinates.
contourLinesContour lines
Ver también:
renderContourLines, defaultContourPen, contourPen
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.

Parámetros:
rectRect for the raster hint
Devuelve:
data().rasterHint(rect)

Reimplementado de QwtPlotRasterItem.

QwtRasterData::ContourLines QwtPlotSpectrogram::renderContourLines ( const QwtDoubleRect rect,
const QSize raster 
) const [protected, virtual]

Calculate contour lines

Parámetros:
rectRectangle, where to calculate the contour lines
rasterRaster, used by the CONREC algorithm
Ver también:
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.

Parámetros:
xMapX-Scale Map
yMapY-Scale Map
areaArea that should be rendered in scale coordinates.
Devuelve:
A QImage::Format_Indexed8 or QImage::Format_ARGB32 depending on the color map.
Ver también:
QwtRasterData::intensity(), QwtColorMap::rgb(), QwtColorMap::colorIndex()

Implementa QwtPlotRasterItem.

int QwtPlotSpectrogram::rtti ( ) const [virtual]
Devuelve:
QwtPlotItem::Rtti_PlotSpectrogram

Reimplementado de QwtPlotItem.

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.

Parámetros:
colorMapColor Map
Ver también:
colorMap(), QwtScaleWidget::setColorBarEnabled(), QwtScaleWidget::setColorMap()
void QwtPlotSpectrogram::setConrecAttribute ( QwtRasterData::ConrecAttribute  attribute,
bool  on 
)

Modify an attribute of the CONREC algorithm, used to calculate the contour lines.

Parámetros:
attributeCONREC attribute
onOn/Off
Ver también:
testConrecAttribute, renderContourLines, QwtRasterData::contourLines
void QwtPlotSpectrogram::setContourLevels ( const QwtValueList levels)

Set the levels of the contour lines

Parámetros:
levelsValues of the contour levels
Ver también:
contourLevels, renderContourLines, QwtRasterData::contourLines
Nota:
contourLevels returns the same levels but sorted.
void QwtPlotSpectrogram::setData ( const QwtRasterData data)

Set the data to be displayed

Parámetros:
dataSpectrogram Data
Ver también:
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().

Ver también:
defaultContourPen, contourPen
void QwtPlotSpectrogram::setDisplayMode ( DisplayMode  mode,
bool  on = true 
)

The display mode controls how the raster data will be represented.

Parámetros:
modeDisplay mode
onOn/Off

The default setting enables ImageMode.

Ver también:
DisplayMode, displayMode()
bool QwtPlotSpectrogram::testConrecAttribute ( QwtRasterData::ConrecAttribute  attribute) const

Test an attribute of the CONREC algorithm, used to calculate the contour lines.

Parámetros:
attributeCONREC attribute
Devuelve:
true, is enabled
Ver también:
setConrecAttribute, renderContourLines, QwtRasterData::contourLines
bool QwtPlotSpectrogram::testDisplayMode ( DisplayMode  mode) const

The display mode controls how the raster data will be represented.

Parámetros:
modeDisplay mode
Devuelve:
true if mode is enabled

La documentación para esta clase fue generada a partir de los siguientes ficheros:
 Todo Clases Namespaces Archivos Funciones Variables 'typedefs' Enumeraciones Valores de enumeraciones Propiedades Amigas 'defines'