-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathspectrogramplot.h
More file actions
70 lines (58 loc) · 2.12 KB
/
spectrogramplot.h
File metadata and controls
70 lines (58 loc) · 2.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
/**
* @file spectrogramplot.h
* @author Álvaro Sánchez González <[email protected]>
* @date Mon Jul 23 2012
*
* Copyright (c) 2012 Álvaro Sánchez González
*
* @brief Clase para la representación de datos bidimensionales en un espectrograma.
*
*/
#ifndef SPECTROGRAMPLOT_H
#define SPECTROGRAMPLOT_H
#include "plotdata2d.h"
#include <qwt_plot.h>
#include <qwt_plot_spectrogram.h>
#include <qprinter.h>
#include <qprintdialog.h>
#include <qwt_color_map.h>
#include <qwt_scale_widget.h>
#include <qwt_scale_draw.h>
#include <qwt_plot_zoomer.h>
#include <qwt_plot_panner.h>
#include <qwt_plot_layout.h>
#include <qwt_plot_renderer.h>
/*! \class SpectrogramPlot spectrogramplot.h "spectrogramplot.h"
* \brief Clase que implementa PlotData2D para representar un spectrograma.
*
* Utiliza la biblioteca QwtPlot.
*
*/
class SpectrogramPlot : public QwtPlot, public PlotData2D{
Q_OBJECT
public:
SpectrogramPlot(QWidget * parent);
/**< Constructor.
@param parent Widget padre.*/
~SpectrogramPlot();
/**< Destructor. */
void ConfigurePlot(Data2D * data);
void SetData2D(Data2D * data2d);
QPixmap * GetAsQPixmap();
public Q_SLOTS:
void ShowContour(bool show);
/**< Slot para activar o desactivar las curvas de nivel.
@param show Estado de activación deseado.*/
void ShowSpectrogram(bool show);
/**< Slot para activar o desactivar los colores del espectrograma.
@param show Estado de activación deseado.*/
private:
QwtPlotSpectrogram * spectrogram; /**< Puntero al objeto necesario para dibujar el espectrograma.*/
QwtScaleWidget * rightAxis; /**< Puntero al objeto necesario para mostrar la escala de color a la derecha.*/
QwtPlotZoomer * zoomer; /**< Puntero al objeto necesario para realizar zoom.*/
QwtPlotPanner *panner; /**< Puntero al objeto necesario para mover la imagen arrastrando.*/
private:
void Update();
/**< Redibuja con todos los posibles cambios de parámetros que haya habido en el gráfico.*/
};
#endif // SPECTROGRAMPLOT_H