Mercurial > hg > svgui
comparison widgets/UnitConverter.h @ 885:6778a82d6b76
Adding the unit converter code might have enhanced the previous commit a little
author | Chris Cannam |
---|---|
date | Tue, 02 Dec 2014 13:30:24 +0000 |
parents | |
children | cd59f6e1aa26 |
comparison
equal
deleted
inserted
replaced
884:8be34e5ef7ff | 885:6778a82d6b76 |
---|---|
1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */ | |
2 | |
3 /* | |
4 Sonic Visualiser | |
5 An audio file viewer and annotation editor. | |
6 Centre for Digital Music, Queen Mary, University of London. | |
7 | |
8 This program is free software; you can redistribute it and/or | |
9 modify it under the terms of the GNU General Public License as | |
10 published by the Free Software Foundation; either version 2 of the | |
11 License, or (at your option) any later version. See the file | |
12 COPYING included with this distribution for more information. | |
13 */ | |
14 | |
15 #ifndef UNIT_CONVERTER_H | |
16 #define UNIT_CONVERTER_H | |
17 | |
18 #include <QDialog> | |
19 | |
20 class QSpinBox; | |
21 class QDoubleSpinBox; | |
22 class QComboBox; | |
23 | |
24 class UnitConverter : public QDialog | |
25 { | |
26 Q_OBJECT | |
27 | |
28 public: | |
29 UnitConverter(QWidget *parent = 0); | |
30 virtual ~UnitConverter(); | |
31 | |
32 private slots: | |
33 void hzChanged(double); | |
34 void midiChanged(int); | |
35 void noteChanged(int); | |
36 void octaveChanged(int); | |
37 void centsChanged(double); | |
38 void pianoChanged(int); | |
39 | |
40 private: | |
41 QDoubleSpinBox *m_hz; | |
42 QSpinBox *m_midi; | |
43 QComboBox *m_note; | |
44 QSpinBox *m_octave; | |
45 QDoubleSpinBox *m_cents; | |
46 QSpinBox *m_piano; | |
47 | |
48 void updateAllFromHz(); | |
49 }; | |
50 | |
51 #endif |