qwt_plot_spectrogram.h
Go to the documentation of this file.
1 /******************************************************************************
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 "qwt_global.h"
14 #include "qwt_raster_data.h"
15 #include "qwt_plot_rasteritem.h"
16 
17 class QwtColorMap;
18 template< typename T > class QList;
19 
37 {
38  public:
45  {
47  ImageMode = 0x01,
48 
50  ContourMode = 0x02
51  };
52 
53  Q_DECLARE_FLAGS( DisplayModes, DisplayMode )
54 
55  explicit QwtPlotSpectrogram( const QString& title = QString() );
56  virtual ~QwtPlotSpectrogram();
57 
58  void setDisplayMode( DisplayMode, bool on = true );
59  bool testDisplayMode( DisplayMode ) const;
60 
61  void setData( QwtRasterData* data );
62  const QwtRasterData* data() const;
64 
65  void setColorMap( QwtColorMap* );
66  const QwtColorMap* colorMap() const;
67 
68  void setColorTableSize( int numColors );
69  int colorTableSize() const;
70 
71  virtual QwtInterval interval( Qt::Axis ) const QWT_OVERRIDE;
72  virtual QRectF pixelHint( const QRectF& ) const QWT_OVERRIDE;
73 
74  void setDefaultContourPen( const QColor&,
75  qreal width = 0.0, Qt::PenStyle = Qt::SolidLine );
76  void setDefaultContourPen( const QPen& );
77  QPen defaultContourPen() const;
78 
79  virtual QPen contourPen( double level ) const;
80 
81  void setConrecFlag( QwtRasterData::ConrecFlag, bool on );
82  bool testConrecFlag( QwtRasterData::ConrecFlag ) const;
83 
84  void setContourLevels( const QList< double >& );
85  QList< double > contourLevels() const;
86 
87  virtual int rtti() const QWT_OVERRIDE;
88 
89  virtual void draw( QPainter*,
90  const QwtScaleMap& xMap, const QwtScaleMap& yMap,
91  const QRectF& canvasRect ) const QWT_OVERRIDE;
92 
93  protected:
94  virtual QImage renderImage(
95  const QwtScaleMap& xMap, const QwtScaleMap& yMap,
96  const QRectF& area, const QSize& imageSize ) const QWT_OVERRIDE;
97 
98  virtual QSize contourRasterSize(
99  const QRectF&, const QRect& ) const;
100 
101  virtual QwtRasterData::ContourLines renderContourLines(
102  const QRectF& rect, const QSize& raster ) const;
103 
104  virtual void drawContourLines( QPainter*,
105  const QwtScaleMap& xMap, const QwtScaleMap& yMap,
106  const QwtRasterData::ContourLines& ) const;
107 
108  void renderTile( const QwtScaleMap& xMap, const QwtScaleMap& yMap,
109  const QRect& tile, QImage* ) const;
110 
111  private:
112  class PrivateData;
113  PrivateData* m_data;
114 };
115 
116 Q_DECLARE_OPERATORS_FOR_FLAGS( QwtPlotSpectrogram::DisplayModes )
117 
118 #endif
qwt_plot_rasteritem.h
QwtPlotRasterItem::interval
virtual QwtInterval interval(Qt::Axis) const
Definition: qwt_plot_rasteritem.cpp:790
qwt_global.h
QwtPlotRasterItem
A class, which displays raster data.
Definition: qwt_plot_rasteritem.h:37
QwtPlotRasterItem::pixelHint
virtual QRectF pixelHint(const QRectF &) const
Pixel hint.
Definition: qwt_plot_rasteritem.cpp:601
QList
Definition: qwt_abstract_legend.h:17
QwtPolar::Axis
Axis
Definition: qwt_polar.h:52
qwt_raster_data.h
QwtInterval
A class representing an interval.
Definition: qwt_interval.h:22
QwtScaleMap
A scale map.
Definition: qwt_scale_map.h:26
QwtPlotSpectrogram::PrivateData
Definition: qwt_plot_spectrogram.cpp:48
QwtPlotSpectrogram
A plot item, which displays a spectrogram.
Definition: qwt_plot_spectrogram.h:36
QWT_OVERRIDE
#define QWT_OVERRIDE
Definition: qwt_global.h:53
QWT_EXPORT
#define QWT_EXPORT
Definition: qwt_global.h:38
mqtt_test.data
dictionary data
Definition: mqtt_test.py:22
QwtRasterData
QwtRasterData defines an interface to any type of raster data.
Definition: qwt_raster_data.h:42
QwtPlotSpectrogram::DisplayMode
DisplayMode
Definition: qwt_plot_spectrogram.h:44
QwtRasterData::ConrecFlag
ConrecFlag
Flags to modify the contour algorithm.
Definition: qwt_raster_data.h:77
QwtColorMap
QwtColorMap is used to map values into colors.
Definition: qwt_color_map.h:37
QwtPlotItem::rtti
virtual int rtti() const
Definition: qwt_plot_item.cpp:136


plotjuggler
Author(s): Davide Faconti
autogenerated on Mon Nov 11 2024 03:23:46