.TH "QwtPlotSpectrogram" 3 "Tue Nov 20 2012" "Version 5.2.3" "Qwt User's Guide" \" -*- nroff -*- .ad l .nh .SH NAME QwtPlotSpectrogram \- .SH SYNOPSIS .br .PP .PP \fC#include \fP .PP Inherits \fBQwtPlotRasterItem\fP\&. .SS "Public Types" .in +1c .ti -1c .RI "enum \fBDisplayMode\fP { \fBImageMode\fP = 1, \fBContourMode\fP = 2 }" .br .in -1c .SS "Public Member Functions" .in +1c .ti -1c .RI "\fBQwtPlotSpectrogram\fP (const QString &\fBtitle\fP=QString::null)" .br .ti -1c .RI "virtual \fB~QwtPlotSpectrogram\fP ()" .br .ti -1c .RI "virtual QwtDoubleRect \fBboundingRect\fP () const " .br .ti -1c .RI "const \fBQwtColorMap\fP & \fBcolorMap\fP () const " .br .ti -1c .RI "QwtValueList \fBcontourLevels\fP () const " .br .ti -1c .RI "virtual QPen \fBcontourPen\fP (double level) const " .br .ti -1c .RI "const \fBQwtRasterData\fP & \fBdata\fP () const " .br .ti -1c .RI "QPen \fBdefaultContourPen\fP () const " .br .ti -1c .RI "virtual void \fBdraw\fP (QPainter *p, const \fBQwtScaleMap\fP &xMap, const \fBQwtScaleMap\fP &yMap, const QRect &rect) const " .br .ti -1c .RI "virtual QSize \fBrasterHint\fP (const QwtDoubleRect &) const " .br .ti -1c .RI "virtual int \fBrtti\fP () const " .br .ti -1c .RI "void \fBsetColorMap\fP (const \fBQwtColorMap\fP &)" .br .ti -1c .RI "void \fBsetConrecAttribute\fP (\fBQwtRasterData::ConrecAttribute\fP, bool on)" .br .ti -1c .RI "void \fBsetContourLevels\fP (const QwtValueList &)" .br .ti -1c .RI "void \fBsetData\fP (const \fBQwtRasterData\fP &\fBdata\fP)" .br .ti -1c .RI "void \fBsetDefaultContourPen\fP (const QPen &)" .br .ti -1c .RI "void \fBsetDisplayMode\fP (\fBDisplayMode\fP, bool on=true)" .br .ti -1c .RI "bool \fBtestConrecAttribute\fP (\fBQwtRasterData::ConrecAttribute\fP) const " .br .ti -1c .RI "bool \fBtestDisplayMode\fP (\fBDisplayMode\fP) const " .br .in -1c .SS "Protected Member Functions" .in +1c .ti -1c .RI "virtual QSize \fBcontourRasterSize\fP (const QwtDoubleRect &, const QRect &) const " .br .ti -1c .RI "virtual void \fBdrawContourLines\fP (QPainter *p, const \fBQwtScaleMap\fP &xMap, const \fBQwtScaleMap\fP &yMap, const QwtRasterData::ContourLines &lines) const " .br .ti -1c .RI "virtual QwtRasterData::ContourLines \fBrenderContourLines\fP (const QwtDoubleRect &rect, const QSize &raster) const " .br .ti -1c .RI "virtual QImage \fBrenderImage\fP (const \fBQwtScaleMap\fP &xMap, const \fBQwtScaleMap\fP &yMap, const QwtDoubleRect &rect) const " .br .in -1c .SH "Detailed Description" .PP 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\&. .PP In ContourMode contour lines are painted for the contour levels\&. .PP .PP \fBSee also:\fP .RS 4 \fBQwtRasterData\fP, \fBQwtColorMap\fP .RE .PP .SH "Member Enumeration Documentation" .PP .SS "enum \fBQwtPlotSpectrogram::DisplayMode\fP" The display mode controls how the raster data will be represented\&. .IP "\(bu" 2 ImageMode .br The values are mapped to colors using a color map\&. .IP "\(bu" 2 ContourMode .br The data is displayed using contour lines .PP .PP When both modes are enabled the contour lines are painted on top of the spectrogram\&. The default setting enables ImageMode\&. .PP \fBSee also:\fP .RS 4 \fBsetDisplayMode()\fP, \fBtestDisplayMode()\fP .RE .PP .SH "Constructor & Destructor Documentation" .PP .SS "QwtPlotSpectrogram::QwtPlotSpectrogram (const QString &title = \fCQString::null\fP)\fC [explicit]\fP" Sets the following item attributes: .IP "\(bu" 2 QwtPlotItem::AutoScale: true .IP "\(bu" 2 QwtPlotItem::Legend: false .PP .PP The z value is initialized by 8\&.0\&. .PP \fBParameters:\fP .RS 4 \fItitle\fP Title .RE .PP \fBSee also:\fP .RS 4 \fBQwtPlotItem::setItemAttribute()\fP, \fBQwtPlotItem::setZ()\fP .RE .PP .SH "Member Function Documentation" .PP .SS "QwtDoubleRect QwtPlotSpectrogram::boundingRect () const\fC [virtual]\fP" \fBReturns:\fP .RS 4 Bounding rect of the data .RE .PP \fBSee also:\fP .RS 4 \fBQwtRasterData::boundingRect()\fP .RE .PP .PP Reimplemented from \fBQwtPlotItem\fP\&. .SS "const \fBQwtColorMap\fP & QwtPlotSpectrogram::colorMap () const" \fBReturns:\fP .RS 4 Color Map used for mapping the intensity values to colors .RE .PP \fBSee also:\fP .RS 4 \fBsetColorMap()\fP .RE .PP .SS "QwtValueList QwtPlotSpectrogram::contourLevels () const" .PP Return the levels of the contour lines\&. The levels are sorted in increasing order\&. .PP \fBSee also:\fP .RS 4 \fBcontourLevels()\fP, \fBrenderContourLines()\fP, \fBQwtRasterData::contourLines()\fP .RE .PP .SS "QPen QwtPlotSpectrogram::contourPen (doublelevel) const\fC [virtual]\fP" .PP Calculate the pen for a contour line\&. The color of the pen is the color for level calculated by the color map .PP \fBParameters:\fP .RS 4 \fIlevel\fP Contour level .RE .PP \fBReturns:\fP .RS 4 Pen for the contour line .RE .PP \fBNote:\fP .RS 4 contourPen is only used if \fBdefaultContourPen()\fP\&.style() == Qt::NoPen .RE .PP \fBSee also:\fP .RS 4 \fBsetDefaultContourPen()\fP, \fBsetColorMap()\fP, \fBsetContourLevels()\fP .RE .PP .SS "QSize QwtPlotSpectrogram::contourRasterSize (const QwtDoubleRect &area, const QRect &rect) const\fC [protected]\fP, \fC [virtual]\fP" .PP 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\&. .PP The default implementation returns rect\&.size() / 2 bounded to \fBdata()\fP\&.\fBrasterHint()\fP\&. .PP \fBParameters:\fP .RS 4 \fIarea\fP Rect, where to calculate the contour lines .br \fIrect\fP Rect in pixel coordinates, where to paint the contour lines .RE .PP \fBReturns:\fP .RS 4 Raster to be used by the CONREC contour algorithm\&. .RE .PP \fBNote:\fP .RS 4 The size will be bounded to rect\&.size()\&. .RE .PP \fBSee also:\fP .RS 4 \fBdrawContourLines()\fP, \fBQwtRasterData::contourLines()\fP .RE .PP .SS "const \fBQwtRasterData\fP & QwtPlotSpectrogram::data () const" \fBReturns:\fP .RS 4 Spectrogram data .RE .PP \fBSee also:\fP .RS 4 \fBsetData()\fP .RE .PP .SS "QPen QwtPlotSpectrogram::defaultContourPen () const" \fBReturns:\fP .RS 4 Default contour pen .RE .PP \fBSee also:\fP .RS 4 \fBsetDefaultContourPen()\fP .RE .PP .SS "void QwtPlotSpectrogram::draw (QPainter *painter, const \fBQwtScaleMap\fP &xMap, const \fBQwtScaleMap\fP &yMap, const QRect &canvasRect) const\fC [virtual]\fP" .PP Draw the spectrogram\&. \fBParameters:\fP .RS 4 \fIpainter\fP Painter .br \fIxMap\fP Maps x-values into pixel coordinates\&. .br \fIyMap\fP Maps y-values into pixel coordinates\&. .br \fIcanvasRect\fP Contents rect of the canvas in painter coordinates .RE .PP \fBSee also:\fP .RS 4 \fBsetDisplayMode()\fP, \fBrenderImage()\fP, \fBQwtPlotRasterItem::draw()\fP, \fBdrawContourLines()\fP .RE .PP .PP Reimplemented from \fBQwtPlotRasterItem\fP\&. .SS "void QwtPlotSpectrogram::drawContourLines (QPainter *painter, const \fBQwtScaleMap\fP &xMap, const \fBQwtScaleMap\fP &yMap, const QwtRasterData::ContourLines &contourLines) const\fC [protected]\fP, \fC [virtual]\fP" Paint the contour lines .PP \fBParameters:\fP .RS 4 \fIpainter\fP Painter .br \fIxMap\fP Maps x-values into pixel coordinates\&. .br \fIyMap\fP Maps y-values into pixel coordinates\&. .br \fIcontourLines\fP Contour lines .RE .PP \fBSee also:\fP .RS 4 \fBrenderContourLines()\fP, \fBdefaultContourPen()\fP, \fBcontourPen()\fP .RE .PP .SS "QSize QwtPlotSpectrogram::rasterHint (const QwtDoubleRect &rect) const\fC [virtual]\fP" .PP 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\&. .PP \fBParameters:\fP .RS 4 \fIrect\fP Rect for the raster hint .RE .PP \fBReturns:\fP .RS 4 \fBdata()\fP\&.rasterHint(rect) .RE .PP .PP Reimplemented from \fBQwtPlotRasterItem\fP\&. .SS "QwtRasterData::ContourLines QwtPlotSpectrogram::renderContourLines (const QwtDoubleRect &rect, const QSize &raster) const\fC [protected]\fP, \fC [virtual]\fP" Calculate contour lines .PP \fBParameters:\fP .RS 4 \fIrect\fP Rectangle, where to calculate the contour lines .br \fIraster\fP Raster, used by the CONREC algorithm .RE .PP \fBSee also:\fP .RS 4 \fBcontourLevels()\fP, \fBsetConrecAttribute()\fP, \fBQwtRasterData::contourLines()\fP .RE .PP .SS "QImage QwtPlotSpectrogram::renderImage (const \fBQwtScaleMap\fP &xMap, const \fBQwtScaleMap\fP &yMap, const QwtDoubleRect &area) const\fC [protected]\fP, \fC [virtual]\fP" .PP 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\&. .PP \fBParameters:\fP .RS 4 \fIxMap\fP X-Scale Map .br \fIyMap\fP Y-Scale Map .br \fIarea\fP Area that should be rendered in scale coordinates\&. .RE .PP \fBReturns:\fP .RS 4 A QImage::Format_Indexed8 or QImage::Format_ARGB32 depending on the color map\&. .RE .PP \fBSee also:\fP .RS 4 QwtRasterData::intensity(), \fBQwtColorMap::rgb()\fP, \fBQwtColorMap::colorIndex()\fP .RE .PP .PP Implements \fBQwtPlotRasterItem\fP\&. .SS "int QwtPlotSpectrogram::rtti () const\fC [virtual]\fP" \fBReturns:\fP .RS 4 QwtPlotItem::Rtti_PlotSpectrogram .RE .PP .PP Reimplemented from \fBQwtPlotItem\fP\&. .SS "void QwtPlotSpectrogram::setColorMap (const \fBQwtColorMap\fP &colorMap)" Change the color map .PP Often it is useful to display the mapping between intensities and colors as an additional plot axis, showing a color bar\&. .PP \fBParameters:\fP .RS 4 \fIcolorMap\fP Color Map .RE .PP \fBSee also:\fP .RS 4 \fBcolorMap()\fP, QwtScaleWidget::setColorBarEnabled(), QwtScaleWidget::setColorMap() .RE .PP .SS "void QwtPlotSpectrogram::setConrecAttribute (\fBQwtRasterData::ConrecAttribute\fPattribute, boolon)" Modify an attribute of the CONREC algorithm, used to calculate the contour lines\&. .PP \fBParameters:\fP .RS 4 \fIattribute\fP CONREC attribute .br \fIon\fP On/Off .RE .PP \fBSee also:\fP .RS 4 \fBtestConrecAttribute()\fP, \fBrenderContourLines()\fP, \fBQwtRasterData::contourLines()\fP .RE .PP .SS "void QwtPlotSpectrogram::setContourLevels (const QwtValueList &levels)" Set the levels of the contour lines .PP \fBParameters:\fP .RS 4 \fIlevels\fP Values of the contour levels .RE .PP \fBSee also:\fP .RS 4 \fBcontourLevels()\fP, \fBrenderContourLines()\fP, \fBQwtRasterData::contourLines()\fP .RE .PP \fBNote:\fP .RS 4 contourLevels returns the same levels but sorted\&. .RE .PP .SS "void QwtPlotSpectrogram::setData (const \fBQwtRasterData\fP &data)" Set the data to be displayed .PP \fBParameters:\fP .RS 4 \fIdata\fP Spectrogram Data .RE .PP \fBSee also:\fP .RS 4 \fBdata()\fP .RE .PP .SS "void QwtPlotSpectrogram::setDefaultContourPen (const QPen &pen)" .PP 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 \fBcontourPen()\fP\&. .PP \fBSee also:\fP .RS 4 \fBdefaultContourPen()\fP, \fBcontourPen()\fP .RE .PP .SS "void QwtPlotSpectrogram::setDisplayMode (\fBDisplayMode\fPmode, boolon = \fCtrue\fP)" The display mode controls how the raster data will be represented\&. .PP \fBParameters:\fP .RS 4 \fImode\fP Display mode .br \fIon\fP On/Off .RE .PP The default setting enables ImageMode\&. .PP \fBSee also:\fP .RS 4 \fBDisplayMode\fP, displayMode() .RE .PP .SS "bool QwtPlotSpectrogram::testConrecAttribute (\fBQwtRasterData::ConrecAttribute\fPattribute) const" Test an attribute of the CONREC algorithm, used to calculate the contour lines\&. .PP \fBParameters:\fP .RS 4 \fIattribute\fP CONREC attribute .RE .PP \fBReturns:\fP .RS 4 true, is enabled .RE .PP \fBSee also:\fP .RS 4 \fBsetConrecAttribute()\fP, \fBrenderContourLines()\fP, \fBQwtRasterData::contourLines()\fP .RE .PP .SS "bool QwtPlotSpectrogram::testDisplayMode (\fBDisplayMode\fPmode) const" The display mode controls how the raster data will be represented\&. .PP \fBParameters:\fP .RS 4 \fImode\fP Display mode .RE .PP \fBReturns:\fP .RS 4 true if mode is enabled .RE .PP .SH "Author" .PP Generated automatically by Doxygen for Qwt User's Guide from the source code\&.