qwt_plot_spectrogram.h
/* -*- mode: C++ ; c-file-style: "stroustrup" -*- *****************************
* 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"
#include <qlist.h>
class QwtColorMap;
class QWT_EXPORT QwtPlotSpectrogram: public QwtPlotRasterItem
{
public:
enum DisplayMode
{
ImageMode = 0x01,
ContourMode = 0x02
};
typedef QFlags<DisplayMode> DisplayModes;
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;
virtual QwtInterval interval(Qt::Axis) const;
virtual QRectF pixelHint( const QRectF & ) const;
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;
virtual void draw( QPainter *,
const QwtScaleMap &xMap, const QwtScaleMap &yMap,
const QRectF &canvasRect ) const;
protected:
virtual QImage renderImage(
const QwtScaleMap &xMap, const QwtScaleMap &yMap,
const QRectF &area, const QSize &imageSize ) const;
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 *d_data;
};
Q_DECLARE_OPERATORS_FOR_FLAGS( QwtPlotSpectrogram::DisplayModes )
#endif
QwtColorMap
QwtColorMap is used to map values into colors.
Definition: qwt_color_map.h:34
QwtRasterData
QwtRasterData defines an interface to any type of raster data.
Definition: qwt_raster_data.h:33
QwtPlotSpectrogram::DisplayModes
QFlags< DisplayMode > DisplayModes
Display modes.
Definition: qwt_plot_spectrogram.h:56
QwtPlotRasterItem::pixelHint
virtual QRectF pixelHint(const QRectF &) const
Pixel hint.
Definition: qwt_plot_rasteritem.cpp:599
QwtPlotItem::rtti
virtual int rtti() const
Definition: qwt_plot_item.cpp:120
QwtPlotSpectrogram::DisplayMode
DisplayMode
Definition: qwt_plot_spectrogram.h:47
QwtPlotRasterItem
A class, which displays raster data.
Definition: qwt_plot_rasteritem.h:38
QwtPlotRasterItem::interval
virtual QwtInterval interval(Qt::Axis) const
Definition: qwt_plot_rasteritem.cpp:776
QwtPlotSpectrogram
A plot item, which displays a spectrogram.
Definition: qwt_plot_spectrogram.h:39
QwtRasterData::ConrecFlag
ConrecFlag
Flags to modify the contour algorithm.
Definition: qwt_raster_data.h:40
QwtPlotRasterItem::draw
virtual void draw(QPainter *, const QwtScaleMap &xMap, const QwtScaleMap &yMap, const QRectF &canvasRect) const
Draw the raster data.
Definition: qwt_plot_rasteritem.cpp:612
QwtScaleMap
A scale map.
Definition: qwt_scale_map.h:31
QwtPlotRasterItem::renderImage
virtual QImage renderImage(const QwtScaleMap &xMap, const QwtScaleMap &yMap, const QRectF &area, const QSize &imageSize) const =0
Render an image.
QwtRasterData::ContourLines
QMap< double, QPolygonF > ContourLines
Contour lines.
Definition: qwt_raster_data.h:36
QwtInterval
A class representing an interval.
Definition: qwt_interval.h:27