kwave  18.07.70
CompressionWidget.h
Go to the documentation of this file.
1 /***************************************************************************
2  CompressionWidget.cpp - widget for setting ogg or mp3 compression rates
3  -------------------
4  begin : Sat Jun 14 2003
5  copyright : (C) 2002 by Thomas Eschenbacher
6  email : 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 COMPRESSION_WIDGET_H
19 #define COMPRESSION_WIDGET_H
20 
21 #include "config.h"
22 
23 #include <QObject>
24 #include <QWidget>
25 
26 #include "libkwave/FileInfo.h"
27 #include "ui_CompressionWidgetBase.h"
28 
29 namespace Kwave
30 {
31  class FileInfo;
32 
33  class CompressionWidget: public QWidget,
34  public Ui::CompressionWidgetBase
35  {
36  Q_OBJECT
37  public:
39  typedef enum {
40  ABR_MODE = 0,
42  } Mode;
43 
45  explicit CompressionWidget(QWidget *parent);
46 
48  virtual ~CompressionWidget();
49 
53  virtual void init(Kwave::FileInfo &info);
54 
61  virtual void enableABR(bool enable, bool lowest, bool highest);
62 
64  virtual void enableVBR(bool enable);
65 
66 
73  virtual void setBitrates(int nominal, int lower, int upper);
74 
78  virtual void setQuality(int quality);
79 
81  virtual Mode mode();
82 
84  virtual void setMode(Mode mode);
85 
87  virtual bool lowestEnabled();
88 
90  virtual bool highestEnabled();
91 
98  virtual void getABRrates(int &nominal, int &lowest, int &highest);
99 
104  virtual int baseQuality();
105 
106  private slots:
107 
109  virtual void selectABR(bool checked);
110 
112  virtual void lowestToggled(bool on);
113 
115  virtual void abrChanged(int value);
116 
118  virtual void lowestChanged(int value);
119 
121  virtual void highestChanged(int value);
122 
124  virtual void highestToggled(bool on);
125 
126  private:
127 
135  void describeWidget(QWidget *widget, const QString &name,
136  const QString &description);
137 
146  void initInfo(QLabel *label, QWidget *widget,
147  Kwave::FileProperty property,
148  Kwave::FileInfo &info);
149  };
150 }
151 
152 #endif /* COMPRESSION_WIDGET_H */
153 
154 //***************************************************************************
155 //***************************************************************************
virtual void lowestChanged(int value)
virtual void highestChanged(int value)
Definition: App.h:33
void describeWidget(QWidget *widget, const QString &name, const QString &description)
virtual void enableABR(bool enable, bool lowest, bool highest)
virtual void setMode(Mode mode)
virtual void init(Kwave::FileInfo &info)
const char name[16]
Definition: memcpy.c:510
virtual void setBitrates(int nominal, int lower, int upper)
virtual void getABRrates(int &nominal, int &lowest, int &highest)
void initInfo(QLabel *label, QWidget *widget, Kwave::FileProperty property, Kwave::FileInfo &info)
virtual void selectABR(bool checked)
virtual void abrChanged(int value)
virtual void enableVBR(bool enable)
virtual void highestToggled(bool on)
CompressionWidget(QWidget *parent)
virtual void lowestToggled(bool on)
FileProperty
Definition: FileInfo.h:45
virtual void setQuality(int quality)