kwave  18.07.70
BitrateSpinBox.h
Go to the documentation of this file.
1 /***************************************************************************
2  BitrateSpinBox.h - spinbox for selecting a bitrate for MP3 or Ogg
3  -------------------
4  begin : Thu Oct 24 2002
5  copyright : (C) 2002 by Thomas Eschenbacher
6  email : Thomas Eschenbacher <thomas.eschenbacher@gmx.de>
7  ***************************************************************************/
8 
9 /***************************************************************************
10  * *
11  * This program is free software; you can redistribute it and/or modify *
12  * it under the terms of the GNU General Public License as published by *
13  * the Free Software Foundation; either version 2 of the License, or *
14  * (at your option) any later version. *
15  * *
16  ***************************************************************************/
17 
18 #ifndef BITRATE_SPIN_BOX_H
19 #define BITRATE_SPIN_BOX_H
20 
21 #include "config.h"
22 
23 #include <QList>
24 #include <QObject>
25 #include <QSpinBox>
26 
27 namespace Kwave
28 {
29 
30  class BitrateSpinBox: public QSpinBox
31  {
32  Q_OBJECT
33  public:
35  explicit BitrateSpinBox(QWidget *parent);
36 
38  virtual ~BitrateSpinBox();
39 
41  virtual void allowRates(const QList<int> &list);
42 
43  signals:
44 
46  void snappedIn(int bitrate);
47 
48  public slots:
49 
51  virtual void snapIn(int value);
52 
53  protected:
54 
56  int nearestIndex(int rate);
57 
58  private:
59 
61  QList<int> m_rates;
62 
63  };
64 }
65 
66 #endif /* BITRATE_SPIN_BOX_H */
67 
68 //***************************************************************************
69 //***************************************************************************
virtual void allowRates(const QList< int > &list)
Definition: App.h:33
void snappedIn(int bitrate)
virtual void snapIn(int value)
BitrateSpinBox(QWidget *parent)
int nearestIndex(int rate)