comparison widgets/UnitConverter.h @ 891:09b2940f483a

Update units when prefs change
author Chris Cannam
date Tue, 09 Dec 2014 12:17:04 +0000
parents cd59f6e1aa26
children af63372e9002
comparison
equal deleted inserted replaced
890:1f2dc7fcad92 891:09b2940f483a
15 #ifndef UNIT_CONVERTER_H 15 #ifndef UNIT_CONVERTER_H
16 #define UNIT_CONVERTER_H 16 #define UNIT_CONVERTER_H
17 17
18 #include <QDialog> 18 #include <QDialog>
19 19
20 #include "base/PropertyContainer.h"
21
20 class QSpinBox; 22 class QSpinBox;
21 class QDoubleSpinBox; 23 class QDoubleSpinBox;
22 class QComboBox; 24 class QComboBox;
25 class QLabel;
23 26
24 class UnitConverter : public QDialog 27 class UnitConverter : public QDialog
25 { 28 {
26 Q_OBJECT 29 Q_OBJECT
27 30
35 void noteChanged(int); 38 void noteChanged(int);
36 void octaveChanged(int); 39 void octaveChanged(int);
37 void centsChanged(double); 40 void centsChanged(double);
38 void pianoChanged(int); 41 void pianoChanged(int);
39 42
43 void preferenceChanged(PropertyContainer::PropertyName);
40 44
41 private: 45 private:
42 QDoubleSpinBox *m_freq; 46 QDoubleSpinBox *m_freq;
43 QSpinBox *m_midi; 47 QSpinBox *m_midi;
44 QComboBox *m_note; 48 QComboBox *m_note;
45 QSpinBox *m_octave; 49 QSpinBox *m_octave;
46 QDoubleSpinBox *m_cents; 50 QDoubleSpinBox *m_cents;
47 QSpinBox *m_piano; 51 QSpinBox *m_piano;
52 QLabel *m_pitchPrefsLabel;
53 void updatePitchesFromFreq();
54 void updatePitchPrefsLabel();
48 55
49 void updatePitchesFromFreq(); 56 QDoubleSpinBox *m_samples;
57
58 void updateTempiFromSamples();
50 }; 59 };
51 60
52 #endif 61 #endif