Loading...
Searching...
No Matches
qwt_plot_spectrogram.h
/******************************************************************************
* Qwt Widget Library
* Copyright (C) 1997 Josef Wilgen
* Copyright (C) 2002 Uwe Rathmann
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the Qwt License, Version 1.0
*****************************************************************************/
#ifndef QWT_PLOT_SPECTROGRAM_H
#define QWT_PLOT_SPECTROGRAM_H
#include "qwt_global.h"
#include "qwt_raster_data.h"
#include "qwt_plot_rasteritem.h"
class QwtColorMap;
template< typename T > class QList;
class QWT_EXPORT QwtPlotSpectrogram : public QwtPlotRasterItem
{
public:
enum DisplayMode
{
ImageMode = 0x01,
ContourMode = 0x02
};
Q_DECLARE_FLAGS( DisplayModes, DisplayMode )
explicit QwtPlotSpectrogram( const QString& title = QString() );
virtual ~QwtPlotSpectrogram();
void setDisplayMode( DisplayMode, bool on = true );
bool testDisplayMode( DisplayMode ) const;
void setData( QwtRasterData* data );
const QwtRasterData* data() const;
QwtRasterData* data();
void setColorMap( QwtColorMap* );
const QwtColorMap* colorMap() const;
void setColorTableSize( int numColors );
int colorTableSize() const;
virtual QwtInterval interval( Qt::Axis ) const QWT_OVERRIDE;
virtual QRectF pixelHint( const QRectF& ) const QWT_OVERRIDE;
void setDefaultContourPen( const QColor&,
qreal width = 0.0, Qt::PenStyle = Qt::SolidLine );
void setDefaultContourPen( const QPen& );
QPen defaultContourPen() const;
virtual QPen contourPen( double level ) const;
void setConrecFlag( QwtRasterData::ConrecFlag, bool on );
bool testConrecFlag( QwtRasterData::ConrecFlag ) const;
void setContourLevels( const QList< double >& );
QList< double > contourLevels() const;
virtual int rtti() const QWT_OVERRIDE;
virtual void draw( QPainter*,
const QwtScaleMap& xMap, const QwtScaleMap& yMap,
const QRectF& canvasRect ) const QWT_OVERRIDE;
protected:
virtual QImage renderImage(
const QwtScaleMap& xMap, const QwtScaleMap& yMap,
const QRectF& area, const QSize& imageSize ) const QWT_OVERRIDE;
virtual QSize contourRasterSize(
const QRectF&, const QRect& ) const;
virtual QwtRasterData::ContourLines renderContourLines(
const QRectF& rect, const QSize& raster ) const;
virtual void drawContourLines( QPainter*,
const QwtScaleMap& xMap, const QwtScaleMap& yMap,
const QwtRasterData::ContourLines& ) const;
void renderTile( const QwtScaleMap& xMap, const QwtScaleMap& yMap,
const QRect& tile, QImage* ) const;
private:
class PrivateData;
PrivateData* m_data;
};
Q_DECLARE_OPERATORS_FOR_FLAGS( QwtPlotSpectrogram::DisplayModes )
#endif
QList
Definition qwt_abstract_legend.h:17
QwtColorMap
QwtColorMap is used to map values into colors.
Definition qwt_color_map.h:38
QwtInterval
A class representing an interval.
Definition qwt_interval.h:23
QwtPlotItem::rtti
virtual int rtti() const
Definition qwt_plot_item.cpp:136
QwtPlotRasterItem
A class, which displays raster data.
Definition qwt_plot_rasteritem.h:38
QwtPlotRasterItem::pixelHint
virtual QRectF pixelHint(const QRectF &) const
Pixel hint.
Definition qwt_plot_rasteritem.cpp:601
QwtPlotRasterItem::interval
virtual QwtInterval interval(Qt::Axis) const
Definition qwt_plot_rasteritem.cpp:790
QwtPlotSpectrogram
A plot item, which displays a spectrogram.
Definition qwt_plot_spectrogram.h:37
QwtPlotSpectrogram::DisplayModes
QFlags< DisplayMode > DisplayModes
Definition qwt_plot_spectrogram.h:53
QwtPlotSpectrogram::DisplayMode
DisplayMode
Definition qwt_plot_spectrogram.h:45
QwtRasterData
QwtRasterData defines an interface to any type of raster data.
Definition qwt_raster_data.h:43
QwtRasterData::ConrecFlag
ConrecFlag
Flags to modify the contour algorithm.
Definition qwt_raster_data.h:78
QwtScaleMap
A scale map.
Definition qwt_scale_map.h:27