1
.TH "QwtPlotSpectrogram" 3 "22 Mar 2009" "Version 5.1.2" "Qwt User's Guide" \" -*- nroff -*-
9
Inherits \fBQwtPlotRasterItem\fP.
11
.SH "Detailed Description"
13
A plot item, which displays a spectrogram.
15
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.
17
In ContourMode contour lines are painted for the contour levels.
22
\fBQwtRasterData\fP, \fBQwtColorMap\fP
27
Definition at line 35 of file qwt_plot_spectrogram.h.
32
.RI "enum \fBDisplayMode\fP { \fBAlwaysOff\fP, \fBAlwaysOn\fP, \fBActiveOnly\fP, \fBImageMode\fP = 1, \fBContourMode\fP = 2 }"
35
.SS "Public Member Functions"
39
.RI "\fBQwtPlotSpectrogram\fP (const QString &title=QString::null)"
42
.RI "virtual \fB~QwtPlotSpectrogram\fP ()"
45
.RI "void \fBsetDisplayMode\fP (\fBDisplayMode\fP, bool on=true)"
48
.RI "bool \fBtestDisplayMode\fP (\fBDisplayMode\fP) const "
51
.RI "void \fBsetData\fP (const \fBQwtRasterData\fP &data)"
54
.RI "const \fBQwtRasterData\fP & \fBdata\fP () const"
57
.RI "void \fBsetColorMap\fP (const \fBQwtColorMap\fP &)"
60
.RI "const \fBQwtColorMap\fP & \fBcolorMap\fP () const"
63
.RI "virtual \fBQwtDoubleRect\fP \fBboundingRect\fP () const"
66
.RI "virtual QSize \fBrasterHint\fP (const \fBQwtDoubleRect\fP &) const"
69
.RI "void \fBsetDefaultContourPen\fP (const QPen &)"
72
.RI "QPen \fBdefaultContourPen\fP () const"
75
.RI "virtual QPen \fBcontourPen\fP (double level) const "
78
.RI "void \fBsetConrecAttribute\fP (\fBQwtRasterData::ConrecAttribute\fP, bool on)"
81
.RI "bool \fBtestConrecAttribute\fP (\fBQwtRasterData::ConrecAttribute\fP) const"
84
.RI "void \fBsetContourLevels\fP (const QwtValueList &)"
87
.RI "QwtValueList \fBcontourLevels\fP () const"
90
.RI "virtual int \fBrtti\fP () const"
93
.RI "virtual void \fBdraw\fP (QPainter *p, const \fBQwtScaleMap\fP &xMap, const \fBQwtScaleMap\fP &yMap, const QRect &rect) const"
96
.SS "Protected Member Functions"
100
.RI "virtual QImage \fBrenderImage\fP (const \fBQwtScaleMap\fP &xMap, const \fBQwtScaleMap\fP &yMap, const \fBQwtDoubleRect\fP &rect) const"
103
.RI "virtual QSize \fBcontourRasterSize\fP (const \fBQwtDoubleRect\fP &, const QRect &) const"
106
.RI "virtual \fBQwtRasterData::ContourLines\fP \fBrenderContourLines\fP (const \fBQwtDoubleRect\fP &rect, const QSize &raster) const"
109
.RI "virtual void \fBdrawContourLines\fP (QPainter *p, const \fBQwtScaleMap\fP &xMap, const \fBQwtScaleMap\fP &yMap, const \fBQwtRasterData::ContourLines\fP &lines) const"
112
.SH "Member Enumeration Documentation"
114
.SS "enum \fBQwtPlotSpectrogram::DisplayMode\fP"
116
The display mode controls how the raster data will be represented.
120
The values are mapped to colors using a color map.
124
The data is displayed using contour lines
127
When both modes are enabled the contour lines are painted on top of the spectrogram. The default setting enables ImageMode.
131
\fBsetDisplayMode()\fP, \fBtestDisplayMode()\fP
136
Definition at line 51 of file qwt_plot_spectrogram.h.
137
.SH "Constructor & Destructor Documentation"
139
.SS "QwtPlotSpectrogram::QwtPlotSpectrogram (const QString & title = \fCQString::null\fP)\fC [explicit]\fP"
141
Sets the following item attributes:
143
QwtPlotItem::AutoScale: true
145
QwtPlotItem::Legend: false
148
The z value is initialized by 8.0.
157
\fBQwtPlotItem::setItemAttribute()\fP, \fBQwtPlotItem::setZ()\fP
162
Definition at line 134 of file qwt_plot_spectrogram.cpp.
164
References QwtPlotItem::setItemAttribute(), and QwtPlotItem::setZ().
165
.SS "QwtPlotSpectrogram::~QwtPlotSpectrogram ()\fC [virtual]\fP"
169
Definition at line 146 of file qwt_plot_spectrogram.cpp.
170
.SH "Member Function Documentation"
172
.SS "void QwtPlotSpectrogram::setDisplayMode (\fBDisplayMode\fP mode, bool on = \fCtrue\fP)"
174
The display mode controls how the raster data will be represented.
178
\fImode\fP Display mode
183
The default setting enables ImageMode.
187
\fBDisplayMode\fP, displayMode()
192
Definition at line 167 of file qwt_plot_spectrogram.cpp.
194
References QwtPlotItem::itemChanged().
195
.SS "bool QwtPlotSpectrogram::testDisplayMode (\fBDisplayMode\fP mode) const"
197
The display mode controls how the raster data will be represented.
201
\fImode\fP Display mode
206
true if mode is enabled
211
Definition at line 186 of file qwt_plot_spectrogram.cpp.
212
.SS "void QwtPlotSpectrogram::setData (const \fBQwtRasterData\fP & data)"
214
Set the data to be displayed
218
\fIdata\fP Spectrogram Data
228
Definition at line 342 of file qwt_plot_spectrogram.cpp.
230
References QwtRasterData::copy(), data(), QwtPlotRasterItem::invalidateCache(), and QwtPlotItem::itemChanged().
231
.SS "const \fBQwtRasterData\fP & QwtPlotSpectrogram::data () const"
245
Definition at line 355 of file qwt_plot_spectrogram.cpp.
247
Referenced by setData().
248
.SS "void QwtPlotSpectrogram::setColorMap (const \fBQwtColorMap\fP & colorMap)"
252
Often it is useful to display the mapping between intensities and colors as an additional plot axis, showing a color bar.
256
\fIcolorMap\fP Color Map
261
\fBcolorMap()\fP, \fBQwtScaleWidget::setColorBarEnabled()\fP, \fBQwtScaleWidget::setColorMap()\fP
266
Definition at line 202 of file qwt_plot_spectrogram.cpp.
268
References colorMap(), QwtColorMap::copy(), QwtPlotRasterItem::invalidateCache(), and QwtPlotItem::itemChanged().
269
.SS "const \fBQwtColorMap\fP & QwtPlotSpectrogram::colorMap () const"
273
Color Map used for mapping the intensity values to colors
283
Definition at line 215 of file qwt_plot_spectrogram.cpp.
285
Referenced by setColorMap().
286
.SS "\fBQwtDoubleRect\fP QwtPlotSpectrogram::boundingRect () const\fC [virtual]\fP"
290
Bounding rect of the data
295
\fBQwtRasterData::boundingRect\fP
300
Reimplemented from \fBQwtPlotItem\fP.
302
Definition at line 364 of file qwt_plot_spectrogram.cpp.
304
Referenced by draw().
305
.SS "QSize QwtPlotSpectrogram::rasterHint (const \fBQwtDoubleRect\fP & rect) const\fC [virtual]\fP"
307
Returns the recommended raster for a given rect.
309
F.e the raster hint is used to limit the resolution of the image that is rendered.
313
\fIrect\fP Rect for the raster hint
318
\fBdata()\fP.rasterHint(rect)
323
Reimplemented from \fBQwtPlotRasterItem\fP.
325
Definition at line 378 of file qwt_plot_spectrogram.cpp.
327
Referenced by contourRasterSize().
328
.SS "void QwtPlotSpectrogram::setDefaultContourPen (const QPen & pen)"
330
Set the default pen for the contour lines.
332
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.
336
\fBdefaultContourPen\fP, \fBcontourPen\fP
341
Definition at line 230 of file qwt_plot_spectrogram.cpp.
343
References QwtPlotItem::itemChanged().
344
.SS "QPen QwtPlotSpectrogram::defaultContourPen () const"
353
\fBsetDefaultContourPen\fP
358
Definition at line 243 of file qwt_plot_spectrogram.cpp.
360
Referenced by drawContourLines().
361
.SS "QPen QwtPlotSpectrogram::contourPen (double level) const\fC [virtual]\fP"
363
Calculate the pen for a contour line.
365
The color of the pen is the color for level calculated by the color map
369
\fIlevel\fP Contour level
374
Pen for the contour line
379
contourPen is only used if \fBdefaultContourPen()\fP.style() == Qt::NoPen
384
\fBsetDefaultContourPen\fP, \fBsetColorMap\fP, \fBsetContourLevels\fP
389
Definition at line 259 of file qwt_plot_spectrogram.cpp.
391
Referenced by drawContourLines().
392
.SS "void QwtPlotSpectrogram::setConrecAttribute (\fBQwtRasterData::ConrecAttribute\fP attribute, bool on)"
394
Modify an attribute of the CONREC algorithm, used to calculate the contour lines.
398
\fIattribute\fP CONREC attribute
405
\fBtestConrecAttribute\fP, \fBrenderContourLines\fP, \fBQwtRasterData::contourLines\fP
410
Definition at line 276 of file qwt_plot_spectrogram.cpp.
412
References QwtPlotItem::itemChanged().
413
.SS "bool QwtPlotSpectrogram::testConrecAttribute (\fBQwtRasterData::ConrecAttribute\fP attribute) const"
415
Test an attribute of the CONREC algorithm, used to calculate the contour lines.
419
\fIattribute\fP CONREC attribute
429
\fBsetConrecAttribute\fP, \fBrenderContourLines\fP, \fBQwtRasterData::contourLines\fP
434
Definition at line 299 of file qwt_plot_spectrogram.cpp.
435
.SS "void QwtPlotSpectrogram::setContourLevels (const QwtValueList & levels)"
437
Set the levels of the contour lines
441
\fIlevels\fP Values of the contour levels
446
\fBcontourLevels\fP, \fBrenderContourLines\fP, \fBQwtRasterData::contourLines\fP
451
contourLevels returns the same levels but sorted.
456
Definition at line 313 of file qwt_plot_spectrogram.cpp.
458
References QwtPlotItem::itemChanged().
459
.SS "QwtValueList QwtPlotSpectrogram::contourLevels () const"
461
Return the levels of the contour lines.
463
The levels are sorted in increasing order.
467
\fBcontourLevels\fP, \fBrenderContourLines\fP, \fBQwtRasterData::contourLines\fP
472
Definition at line 331 of file qwt_plot_spectrogram.cpp.
473
.SS "int QwtPlotSpectrogram::rtti () const\fC [virtual]\fP"
477
QwtPlotItem::Rtti_PlotSpectrogram
482
Reimplemented from \fBQwtPlotItem\fP.
484
Definition at line 152 of file qwt_plot_spectrogram.cpp.
485
.SS "void QwtPlotSpectrogram::draw (QPainter * painter, const \fBQwtScaleMap\fP & xMap, const \fBQwtScaleMap\fP & yMap, const QRect & canvasRect) const\fC [virtual]\fP"
487
Draw the spectrogram.
491
\fIpainter\fP Painter
493
\fIxMap\fP Maps x-values into pixel coordinates.
495
\fIyMap\fP Maps y-values into pixel coordinates.
497
\fIcanvasRect\fP Contents rect of the canvas in painter coordinates
502
\fBsetDisplayMode\fP, \fBrenderImage\fP, \fBQwtPlotRasterItem::draw\fP, \fBdrawContourLines\fP
507
Reimplemented from \fBQwtPlotRasterItem\fP.
509
Definition at line 615 of file qwt_plot_spectrogram.cpp.
511
References boundingRect(), contourRasterSize(), QwtPlotRasterItem::draw(), drawContourLines(), QwtPlotItem::invTransform(), renderContourLines(), and QwtPlotItem::transform().
512
.SS "QImage QwtPlotSpectrogram::renderImage (const \fBQwtScaleMap\fP & xMap, const \fBQwtScaleMap\fP & yMap, const \fBQwtDoubleRect\fP & area) const\fC [protected, virtual]\fP"
514
Render an image from the data and color map.
516
The area is translated into a rect of the paint device. For each pixel of this rect the intensity is mapped into a color.
520
\fIxMap\fP X-Scale Map
522
\fIyMap\fP Y-Scale Map
524
\fIarea\fP Area that should be rendered in scale coordinates.
529
A QImage::Format_Indexed8 or QImage::Format_ARGB32 depending on the color map.
534
QwtRasterData::intensity(), \fBQwtColorMap::rgb()\fP, \fBQwtColorMap::colorIndex()\fP
539
Implements \fBQwtPlotRasterItem\fP.
541
Definition at line 400 of file qwt_plot_spectrogram.cpp.
543
References QwtScaleMap::invTransform(), QwtScaleMap::p1(), QwtScaleMap::p2(), QwtScaleMap::s1(), QwtScaleMap::s2(), QwtScaleMap::setPaintInterval(), QwtScaleMap::setScaleInterval(), and QwtPlotItem::transform().
544
.SS "QSize QwtPlotSpectrogram::contourRasterSize (const \fBQwtDoubleRect\fP & area, const QRect & rect) const\fC [protected, virtual]\fP"
546
Return the raster to be used by the CONREC contour algorithm.
548
A larger size will improve the precisision of the CONREC algorithm, but will slow down the time that is needed to calculate the lines.
550
The default implementation returns rect.size() / 2 bounded to \fBdata()\fP.\fBrasterHint()\fP.
554
\fIarea\fP Rect, where to calculate the contour lines
556
\fIrect\fP Rect in pixel coordinates, where to paint the contour lines
561
Raster to be used by the CONREC contour algorithm.
566
The size will be bounded to rect.size().
571
\fBdrawContourLines\fP, \fBQwtRasterData::contourLines\fP
576
Definition at line 529 of file qwt_plot_spectrogram.cpp.
578
References rasterHint().
580
Referenced by draw().
581
.SS "\fBQwtRasterData::ContourLines\fP QwtPlotSpectrogram::renderContourLines (const \fBQwtDoubleRect\fP & rect, const QSize & raster) const\fC [protected, virtual]\fP"
583
Calculate contour lines
587
\fIrect\fP Rectangle, where to calculate the contour lines
589
\fIraster\fP Raster, used by the CONREC algorithm
594
\fBcontourLevels\fP, \fBsetConrecAttribute\fP, \fBQwtRasterData::contourLines\fP
599
Definition at line 549 of file qwt_plot_spectrogram.cpp.
601
Referenced by draw().
602
.SS "void QwtPlotSpectrogram::drawContourLines (QPainter * painter, const \fBQwtScaleMap\fP & xMap, const \fBQwtScaleMap\fP & yMap, const \fBQwtRasterData::ContourLines\fP & contourLines) const\fC [protected, virtual]\fP"
604
Paint the contour lines
608
\fIpainter\fP Painter
610
\fIxMap\fP Maps x-values into pixel coordinates.
612
\fIyMap\fP Maps y-values into pixel coordinates.
614
\fIcontourLines\fP Contour lines
619
\fBrenderContourLines\fP, \fBdefaultContourPen\fP, \fBcontourPen\fP
624
Definition at line 566 of file qwt_plot_spectrogram.cpp.
626
References contourPen(), defaultContourPen(), QwtPainter::drawLine(), and QwtScaleMap::transform().
628
Referenced by draw().
632
Generated automatically by Doxygen for Qwt User's Guide from the source code.