~ubuntu-branches/ubuntu/oneiric/qwt/oneiric-proposed

« back to all changes in this revision

Viewing changes to qwt/src/qwt_plot_spectrogram.h

  • Committer: Bazaar Package Importer
  • Author(s): Fathi Boudra
  • Date: 2011-06-10 11:22:47 UTC
  • mfrom: (1.1.6 upstream) (2.1.4 sid)
  • Revision ID: james.westby@ubuntu.com-20110610112247-0i1019vvmzaq6p86
Tags: 6.0.0-1
* New upstream release (Closes: #624107):
  - drop Qt3 support. (Closes: #604379, #626868)
* Register documentation with doc-base. (Closes: #626567)
* Drop patches:
  - 01_makefiles.diff
  - 02_add_missing_warnings.diff
  - 03_qwt_branch_pull_r544.diff
* Add qwt_install_paths.patch to fix the hardcoded installation paths.
* Update debian/control:
  - drop libqt3-mt-dev build dependency.
  - bump Standards-Version to 3.9.2 (no changes).
  - drop Qt3 related packages.
  - due to bump soname (and as we dropper Qt3 support):
    - libqwt5-qt4-dev -> libqwt-dev
    - libqwt5-qt4 -> libqwt6
    - libqwt5-doc -> libqwt-doc
* Update debian/copyright file.
* Update debian/rules: drop Qt3 packages support.

Show diffs side-by-side

added added

removed removed

Lines of Context:
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 <qglobal.h>
14
 
 
15
 
#include "qwt_valuelist.h" 
16
 
#include "qwt_raster_data.h" 
17
 
#include "qwt_plot_rasteritem.h" 
18
 
 
19
 
class QwtColorMap;
20
 
 
21
 
/*!
22
 
  \brief A plot item, which displays a spectrogram
23
 
 
24
 
  A spectrogram displays threedimenional data, where the 3rd dimension
25
 
  ( the intensity ) is displayed using colors. The colors are calculated
26
 
  from the values using a color map.
27
 
 
28
 
  In ContourMode contour lines are painted for the contour levels.
29
 
  
30
 
  \image html spectrogram3.png
31
 
 
32
 
  \sa QwtRasterData, QwtColorMap
33
 
*/
34
 
 
35
 
class QWT_EXPORT QwtPlotSpectrogram: public QwtPlotRasterItem
36
 
{
37
 
public:
38
 
    /*!
39
 
      The display mode controls how the raster data will be represented.
40
 
      - ImageMode\n
41
 
        The values are mapped to colors using a color map.
42
 
      - ContourMode\n
43
 
        The data is displayed using contour lines
44
 
 
45
 
      When both modes are enabled the contour lines are painted on
46
 
      top of the spectrogram. The default setting enables ImageMode.
47
 
 
48
 
      \sa setDisplayMode(), testDisplayMode()
49
 
    */
50
 
 
51
 
    enum DisplayMode
52
 
    {
53
 
        ImageMode = 1,
54
 
        ContourMode = 2
55
 
    };
56
 
 
57
 
    explicit QwtPlotSpectrogram(const QString &title = QString::null);
58
 
    virtual ~QwtPlotSpectrogram();
59
 
 
60
 
    void setDisplayMode(DisplayMode, bool on = true);
61
 
    bool testDisplayMode(DisplayMode) const;
62
 
 
63
 
    void setData(const QwtRasterData &data);
64
 
    const QwtRasterData &data() const;
65
 
 
66
 
    void setColorMap(const QwtColorMap &);
67
 
    const QwtColorMap &colorMap() const;
68
 
 
69
 
    virtual QwtDoubleRect boundingRect() const;
70
 
    virtual QSize rasterHint(const QwtDoubleRect &) const;
71
 
 
72
 
    void setDefaultContourPen(const QPen &);
73
 
    QPen defaultContourPen() const;
74
 
 
75
 
    virtual QPen contourPen(double level) const;
76
 
 
77
 
    void setConrecAttribute(QwtRasterData::ConrecAttribute, bool on);
78
 
    bool testConrecAttribute(QwtRasterData::ConrecAttribute) const;
79
 
 
80
 
    void setContourLevels(const QwtValueList &);
81
 
    QwtValueList contourLevels() const;
82
 
 
83
 
    virtual int rtti() const;
84
 
 
85
 
    virtual void draw(QPainter *p,
86
 
        const QwtScaleMap &xMap, const QwtScaleMap &yMap,
87
 
        const QRect &rect) const;
88
 
 
89
 
protected:
90
 
    virtual QImage renderImage(
91
 
        const QwtScaleMap &xMap, const QwtScaleMap &yMap, 
92
 
        const QwtDoubleRect &rect) const;
93
 
 
94
 
    virtual QSize contourRasterSize(
95
 
        const QwtDoubleRect &, const QRect &) const;
96
 
 
97
 
    virtual QwtRasterData::ContourLines renderContourLines(
98
 
        const QwtDoubleRect &rect, const QSize &raster) const;
99
 
 
100
 
    virtual void drawContourLines(QPainter *p,
101
 
        const QwtScaleMap &xMap, const QwtScaleMap &yMap,
102
 
        const QwtRasterData::ContourLines& lines) const;
103
 
 
104
 
private:
105
 
    class PrivateData;
106
 
    PrivateData *d_data;
107
 
};
108
 
 
109
 
#endif