Mercurial > hg > svgui
comparison widgets/RangeInputDialog.h @ 188:dd573e090eed
* Add range input dialog
* Make Panner support middle-click/ctrl-left-click to reset and emit
  doubleClicked when doubleClicked instead of resetting
* Use range input dialog to enter new values for panner on double-click
| author | Chris Cannam | 
|---|---|
| date | Fri, 12 Jan 2007 21:52:56 +0000 | 
| parents | |
| children | 05d614f6e46d | 
   comparison
  equal
  deleted
  inserted
  replaced
| 187:e7cf6044c2a0 | 188:dd573e090eed | 
|---|---|
| 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 This file copyright 2007 QMUL. | |
| 8 | |
| 9 This program is free software; you can redistribute it and/or | |
| 10 modify it under the terms of the GNU General Public License as | |
| 11 published by the Free Software Foundation; either version 2 of the | |
| 12 License, or (at your option) any later version. See the file | |
| 13 COPYING included with this distribution for more information. | |
| 14 */ | |
| 15 | |
| 16 #ifndef _RANGE_INPUT_DIALOG_H_ | |
| 17 #define _RANGE_INPUT_DIALOG_H_ | |
| 18 | |
| 19 #include <QDialog> | |
| 20 #include <QString> | |
| 21 | |
| 22 class QDoubleSpinBox; | |
| 23 | |
| 24 class RangeInputDialog : public QDialog | |
| 25 { | |
| 26 Q_OBJECT | |
| 27 | |
| 28 public: | |
| 29 RangeInputDialog(QString title, QString message, QString unit, | |
| 30 float min, float max, QWidget *parent = 0); | |
| 31 virtual ~RangeInputDialog(); | |
| 32 | |
| 33 void getRange(float &start, float &end); | |
| 34 | |
| 35 signals: | |
| 36 void rangeChanged(float start, float end); | |
| 37 | |
| 38 public slots: | |
| 39 void setRange(float start, float end); | |
| 40 | |
| 41 protected slots: | |
| 42 void rangeStartChanged(double); | |
| 43 void rangeEndChanged(double); | |
| 44 | |
| 45 protected: | |
| 46 QDoubleSpinBox *m_rangeStart; | |
| 47 QDoubleSpinBox *m_rangeEnd; | |
| 48 }; | |
| 49 | |
| 50 #endif | 
