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::null );
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 *p,
const QwtScaleMap &xMap, const QwtScaleMap &yMap,
const QRectF &rect ) 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 *p,
const QwtScaleMap &xMap, const QwtScaleMap &yMap,
const QwtRasterData::ContourLines& lines ) const;
void renderTile( const QwtScaleMap &xMap, const QwtScaleMap &yMap,
const QRect &imageRect, QImage *image ) const;
private:
class PrivateData;
PrivateData *d_data;
};
Q_DECLARE_OPERATORS_FOR_FLAGS( QwtPlotSpectrogram::DisplayModes )
#endif
QwtPlotRasterItem::interval
virtual QwtInterval interval(Qt::Axis) const
Definition: qwt_plot_rasteritem.cpp:774
QwtPlotSpectrogram::DisplayMode
DisplayMode
Definition: qwt_plot_spectrogram.h:46
QwtScaleMap
A scale map.
Definition: qwt_scale_map.h:30
QwtRasterData
QwtRasterData defines an interface to any type of raster data.
Definition: qwt_raster_data.h:32
QwtRasterData::ContourLines
QMap< double, QPolygonF > ContourLines
Contour lines.
Definition: qwt_raster_data.h:36
QwtPlotItem::rtti
virtual int rtti() const
Definition: qwt_plot_item.cpp:120
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:597
QwtColorMap
QwtColorMap is used to map values into colors.
Definition: qwt_color_map.h:33
QwtPlotRasterItem::renderImage
virtual QImage renderImage(const QwtScaleMap &xMap, const QwtScaleMap &yMap, const QRectF &area, const QSize &imageSize) const =0
Render an image.
QwtPlotRasterItem
A class, which displays raster data.
Definition: qwt_plot_rasteritem.h:37
QwtInterval
A class representing an interval.
Definition: qwt_interval.h:26
QwtPlotSpectrogram
A plot item, which displays a spectrogram.
Definition: qwt_plot_spectrogram.h:38
QwtPlotRasterItem::draw
virtual void draw(QPainter *p, const QwtScaleMap &xMap, const QwtScaleMap &yMap, const QRectF &rect) const
Draw the raster data.
Definition: qwt_plot_rasteritem.cpp:610
QwtRasterData::ConrecFlag
ConrecFlag
Flags to modify the contour algorithm.
Definition: qwt_raster_data.h:39