Qwt User's Guide 5.2.3

- Main Page
- Related Pages
- Classes

qwt_plot_spectrogram.h
1 /* -*- mode: C++ ; c-file-style: "stroustrup" -*- *****************************
2 * Qwt Widget Library
3 * Copyright (C) 1997 Josef Wilgen
4 * Copyright (C) 2002 Uwe Rathmann
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the Qwt License, Version 1.0
8 *****************************************************************************/
9
10 #ifndef QWT_PLOT_SPECTROGRAM_H
11 #define QWT_PLOT_SPECTROGRAM_H
12
13 #include <qglobal.h>
14
15 #include "qwt_valuelist.h"
16 #include "qwt_raster_data.h"
17 #include "qwt_plot_rasteritem.h"
18
19 class QwtColorMap;
20
35 class QWT_EXPORT QwtPlotSpectrogram: public QwtPlotRasterItem
36 {
37 public:
51 enum DisplayMode
52 {
53 ImageMode = 1,
54 ContourMode = 2
55 };
56
57 explicit QwtPlotSpectrogram(const QString &title = QString::null);
58 virtual ~QwtPlotSpectrogram();
59
60 void setDisplayMode(DisplayMode, bool on = true);
61 bool testDisplayMode(DisplayMode) const;
62
63 void setData(const QwtRasterData &data);
64 const QwtRasterData &data() const;
65
66 void setColorMap(const QwtColorMap &);
67 const QwtColorMap &colorMap() const;
68
69 virtual QwtDoubleRect boundingRect() const;
70 virtual QSize rasterHint(const QwtDoubleRect &) const;
71
72 void setDefaultContourPen(const QPen &);
73 QPen defaultContourPen() const;
74
75 virtual QPen contourPen(double level) const;
76
77 void setConrecAttribute(QwtRasterData::ConrecAttribute, bool on);
78 bool testConrecAttribute(QwtRasterData::ConrecAttribute) const;
79
80 void setContourLevels(const QwtValueList &);
81 QwtValueList contourLevels() const;
82
83 virtual int rtti() const;
84
85 virtual void draw(QPainter *p,
86 const QwtScaleMap &xMap, const QwtScaleMap &yMap,
87 const QRect &rect) const;
88
89 protected:
90 virtual QImage renderImage(
91 const QwtScaleMap &xMap, const QwtScaleMap &yMap,
92 const QwtDoubleRect &rect) const;
93
94 virtual QSize contourRasterSize(
95 const QwtDoubleRect &, const QRect &) const;
96
97 virtual QwtRasterData::ContourLines renderContourLines(
98 const QwtDoubleRect &rect, const QSize &raster) const;
99
100 virtual void drawContourLines(QPainter *p,
101 const QwtScaleMap &xMap, const QwtScaleMap &yMap,
102 const QwtRasterData::ContourLines& lines) const;
103
104 private:
105 class PrivateData;
106 PrivateData *d_data;
107 };
108
109 #endif