annotate widgets/UnitConverter.h @ 888:cb3a3e20634d

Fixes to limits etc in unit converter
author Chris Cannam
date Mon, 08 Dec 2014 15:37:49 +0000
parents 6778a82d6b76
children cd59f6e1aa26
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@885 33 void hzChanged(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@885 39
Chris@885 40 private:
Chris@885 41 QDoubleSpinBox *m_hz;
Chris@885 42 QSpinBox *m_midi;
Chris@885 43 QComboBox *m_note;
Chris@885 44 QSpinBox *m_octave;
Chris@885 45 QDoubleSpinBox *m_cents;
Chris@885 46 QSpinBox *m_piano;
Chris@885 47
Chris@885 48 void updateAllFromHz();
Chris@885 49 };
Chris@885 50
Chris@885 51 #endif