Mercurial > hg > svgui
comparison widgets/UnitConverter.h @ 895:a3b3b64fbc43 alignment_view
Merge from default branch
author | Chris Cannam |
---|---|
date | Thu, 15 Jan 2015 10:44:10 +0000 |
parents | 78ae34f388f6 |
children |
comparison
equal
deleted
inserted
replaced
894:d4446f267e12 | 895:a3b3b64fbc43 |
---|---|
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 #include "base/PropertyContainer.h" | |
21 | |
22 class QSpinBox; | |
23 class QDoubleSpinBox; | |
24 class QComboBox; | |
25 class QLabel; | |
26 | |
27 class UnitConverter : public QDialog | |
28 { | |
29 Q_OBJECT | |
30 | |
31 public: | |
32 UnitConverter(QWidget *parent = 0); | |
33 virtual ~UnitConverter(); | |
34 | |
35 private slots: | |
36 void freqChanged(); | |
37 void midiChanged(); | |
38 void noteChanged(); | |
39 void octaveChanged(); | |
40 void centsChanged(); | |
41 | |
42 void samplesChanged(); | |
43 void periodChanged(); | |
44 void bpmChanged(); | |
45 void tempofreqChanged(); | |
46 void samplerateChanged(); | |
47 | |
48 void preferenceChanged(PropertyContainer::PropertyName); | |
49 | |
50 private: | |
51 QDoubleSpinBox *m_freq; | |
52 QSpinBox *m_midi; | |
53 QComboBox *m_note; | |
54 QSpinBox *m_octave; | |
55 QDoubleSpinBox *m_cents; | |
56 QLabel *m_pitchPrefsLabel; | |
57 void updatePitchesFromFreq(); | |
58 void updatePitchPrefsLabel(); | |
59 | |
60 QDoubleSpinBox *m_samples; | |
61 QDoubleSpinBox *m_period; | |
62 QDoubleSpinBox *m_bpm; | |
63 QDoubleSpinBox *m_tempofreq; | |
64 QComboBox *m_samplerate; | |
65 void updateTempiFromSamples(); | |
66 | |
67 double getSampleRate(); | |
68 | |
69 void setTo(QSpinBox *, int); | |
70 void setTo(QDoubleSpinBox *, double); | |
71 }; | |
72 | |
73 #endif |