Pitch Perfector
A real-time pitch-shifting microphone project at the University of Glasgow
 All Classes Functions
window.h
1 #ifndef WINDOW_H
2 #define WINDOW_H
3 
4 #include <qwt/qwt_thermo.h>
5 #include <qwt/qwt_knob.h>
6 #include <qwt/qwt_plot.h>
7 #include <qwt/qwt_plot_curve.h>
8 #include <qwt/qwt_dial.h>
9 #include <qwt/qwt_dial_needle.h>
10 #include <qwt/qwt_round_scale_draw.h>
11 #include <qwt/qwt_text_label.h>
12 
13 
14 #include <QBoxLayout>
15 
16 #include "audioStreamer.h"
17 
18 // class definition 'Window'
19 class Window : public QWidget
20 {
21  // must include the Q_OBJECT macro for for the Qt signals/slots framework to work with this class
22  Q_OBJECT
23 
24 public:
25  Window(); // default constructor - called when a Window is declared without arguments
26 
27  ~Window();
28 
29  void timerEvent( QTimerEvent * );
30 public slots:
31  void setGain(double gain);
32 
33 // internal variables for the window class
34 private:
35  QwtKnob *knob;
36  QwtThermo *thermo;
37  QwtPlot *plot;
38  QwtPlotCurve *curve;
39  QwtDial *dial;
40  QwtPlot *plot2;
41  QwtPlotCurve *curve2;
42  QwtTextLabel *currentNoteText;
43  QPainter *dialNoteText;
44 
45  QwtDialSimpleNeedle *needle;
46  QwtRoundScaleDraw *roundScale;
47 
48 
49  // layout elements from Qt itself http://qt-project.org/doc/qt-4.8/classes.html
50  QVBoxLayout *vLayout; // vertical layout
51  QHBoxLayout *hLayout; // horizontal layout
52  QVBoxLayout *dialLayout;
53 
54  static const int plotDataSize = 512;
55  static const int fftPlotDataSize = plotDataSize/2 + 1;
56  // data arrays for the plot
57  double xData[plotDataSize];
58  double yData[plotDataSize];
59 
60  double xData2[plotDataSize];
61  double yData2[plotDataSize];
62 
63  double gain;
64  int count;
65  audioStreamer *aStreamer;
66 };
67 
68 #endif // WINDOW_H
Definition: window.h:19
Definition: audioStreamer.h:8