kwave  18.07.70
BitrateWidget.h
Go to the documentation of this file.
1 /***************************************************************************
2  BitrateWidget.h - widget selecting a bitrate for MP3 or Ogg/Vorbis
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_WIDGET_H
19 #define BITRATE_WIDGET_H
20 
21 #include "config.h"
22 
23 #include <QList>
24 #include <QWidget>
25 
26 #include "ui_BitrateWidgetBase.h"
27 
28 namespace Kwave
29 {
30 
31  class BitrateWidget: public QWidget,
32  public Ui::BitrateWidgetBase
33  {
34  Q_OBJECT
35  public:
37  explicit BitrateWidget(QWidget *parent);
38 
40  virtual ~BitrateWidget();
41 
43  virtual void setValue(int bitrate);
44 
46  virtual int value();
47 
49  virtual void setSpecialValueText(const QString &text);
50 
52  virtual void allowRates(const QList<int> &list);
53 
54  signals:
55 
57  void valueChanged(int value);
58 
59  protected slots:
60 
62  void sliderChanged(int value);
63 
65  void spinboxChanged(int value);
66 
68  void snapInSlider();
69 
70  protected:
71 
73  int nearestIndex(int rate);
74 
75  private:
76 
78  QList<int> m_rates;
79 
80  };
81 }
82 
83 #endif /* BITRATE_WIDGET_H */
84 
85 //***************************************************************************
86 //***************************************************************************
void valueChanged(int value)
int nearestIndex(int rate)
Definition: App.h:33
void spinboxChanged(int value)
QList< int > m_rates
Definition: BitrateWidget.h:78
virtual void setValue(int bitrate)
virtual void setSpecialValueText(const QString &text)
virtual void allowRates(const QList< int > &list)
BitrateWidget(QWidget *parent)
void sliderChanged(int value)