qwt_plot_spectrogram.h
Go to the documentation of this file.
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 "qwt_global.h"
14 #include "qwt_raster_data.h"
15 #include "qwt_plot_rasteritem.h"
16 #include <qlist.h>
17 
18 class QwtColorMap;
19 
39 {
40 public:
47  {
49  ImageMode = 0x01,
50 
52  ContourMode = 0x02
53  };
54 
56  typedef QFlags<DisplayMode> DisplayModes;
57 
58  explicit QwtPlotSpectrogram( const QString &title = QString() );
59  virtual ~QwtPlotSpectrogram();
60 
61  void setDisplayMode( DisplayMode, bool on = true );
62  bool testDisplayMode( DisplayMode ) const;
63 
64  void setData( QwtRasterData *data );
65  const QwtRasterData *data() const;
67 
68  void setColorMap( QwtColorMap * );
69  const QwtColorMap *colorMap() const;
70 
71  void setMaxRGBTableSize( int numColors );
72  int maxRGBTableSize() const;
73 
74  virtual QwtInterval interval(Qt::Axis) const;
75  virtual QRectF pixelHint( const QRectF & ) const;
76 
77  void setDefaultContourPen( const QColor &,
78  qreal width = 0.0, Qt::PenStyle = Qt::SolidLine );
79  void setDefaultContourPen( const QPen & );
80  QPen defaultContourPen() const;
81 
82  virtual QPen contourPen( double level ) const;
83 
84  void setConrecFlag( QwtRasterData::ConrecFlag, bool on );
85  bool testConrecFlag( QwtRasterData::ConrecFlag ) const;
86 
87  void setContourLevels( const QList<double> & );
88  QList<double> contourLevels() const;
89 
90  virtual int rtti() const;
91 
92  virtual void draw( QPainter *p,
93  const QwtScaleMap &xMap, const QwtScaleMap &yMap,
94  const QRectF &rect ) const;
95 
96 protected:
97  virtual QImage renderImage(
98  const QwtScaleMap &xMap, const QwtScaleMap &yMap,
99  const QRectF &area, const QSize &imageSize ) const;
100 
101  virtual QSize contourRasterSize(
102  const QRectF &, const QRect & ) const;
103 
104  virtual QwtRasterData::ContourLines renderContourLines(
105  const QRectF &rect, const QSize &raster ) const;
106 
107  virtual void drawContourLines( QPainter *p,
108  const QwtScaleMap &xMap, const QwtScaleMap &yMap,
109  const QwtRasterData::ContourLines& lines ) const;
110 
111  void renderTile( const QwtScaleMap &xMap, const QwtScaleMap &yMap,
112  const QRect &imageRect, QImage *image ) const;
113 
114 private:
115  class PrivateData;
117 };
118 
119 Q_DECLARE_OPERATORS_FOR_FLAGS( QwtPlotSpectrogram::DisplayModes )
120 
121 #endif
virtual QImage renderImage(const QwtScaleMap &xMap, const QwtScaleMap &yMap, const QRectF &area, const QSize &imageSize) const =0
Render an image.
virtual int rtti() const
A class representing an interval.
Definition: qwt_interval.h:26
A class, which displays raster data.
#define QWT_EXPORT
Definition: qwt_global.h:38
ConrecFlag
Flags to modify the contour algorithm.
virtual void draw(QPainter *p, const QwtScaleMap &xMap, const QwtScaleMap &yMap, const QRectF &rect) const
Draw the raster data.
QFlags< DisplayMode > DisplayModes
Display modes.
A plot item, which displays a spectrogram.
QMap< double, QPolygonF > ContourLines
Contour lines.
virtual QwtInterval interval(Qt::Axis) const
virtual QRectF pixelHint(const QRectF &) const
Pixel hint.
QwtColorMap is used to map values into colors.
Definition: qwt_color_map.h:33
A scale map.
Definition: qwt_scale_map.h:30
QwtRasterData defines an interface to any type of raster data.
empty_struct data[sizeof(T)/sizeof(empty_struct)]


plotjuggler
Author(s): Davide Faconti
autogenerated on Sat Jul 6 2019 03:44:17