annotate widgets/UnitConverter.h @ 889:cd59f6e1aa26

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