Save the internal name for tts / encoder in the configuration file, not the displayed...
[Rockbox.git] / rbutil / rbutilqt / encoders.h
blob64d57b0ff979dcbb4458fd834a81f30b497538cb
1 /***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
9 * Copyright (C) 2007 by Dominik Wenger
10 * $Id: encoders.h 15212 2007-10-19 21:49:07Z domonoky $
12 * All files in this archive are subject to the GNU General Public License.
13 * See the file COPYING in the source tree root for full license agreement.
15 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
16 * KIND, either express or implied.
18 ****************************************************************************/
20 #ifndef ENCODERS_H
21 #define ENCODERS_H
23 #include <QtGui>
25 #include "rbsettings.h"
27 extern "C"
29 #include "rbspeex.h"
32 class EncBase;
34 //inits the encoder List
35 void initEncodernamesList(void);
36 // function to get a specific encoder
37 EncBase* getEncoder(QString encname);
38 // get the list of encoders, nice names
39 QString getEncoderName(QString encoder);
40 QStringList getEncoderList(void);
43 class EncBase : public QDialog
45 Q_OBJECT
46 public:
47 EncBase(QWidget *parent );
49 virtual bool encode(QString input,QString output)
50 {(void)input; (void)output; return false;}
51 virtual bool start(){return false;}
52 virtual bool stop(){return false;}
53 virtual void showCfg(){}
54 virtual bool configOk(){return false;}
56 void setCfg(RbSettings *sett){settings = sett;}
58 public slots:
59 virtual void accept(void){}
60 virtual void reject(void){}
61 virtual void reset(void){}
63 protected:
65 RbSettings* settings;
70 class EncExes : public EncBase
72 Q_OBJECT
73 public:
74 EncExes(QString name,QWidget *parent = NULL);
75 virtual bool encode(QString input,QString output);
76 virtual bool start();
77 virtual bool stop() {return true;}
78 virtual void showCfg();
79 virtual bool configOk();
81 private:
82 QString m_name;
83 QString m_EncExec;
84 QString m_EncOpts;
85 QMap<QString,QString> m_TemplateMap;
86 QString m_EncTemplate;
89 class EncRbSpeex : public EncBase
91 Q_OBJECT
92 public:
93 EncRbSpeex(QWidget *parent = NULL);
94 virtual bool encode(QString input,QString output);
95 virtual bool start();
96 virtual bool stop() {return true;}
97 virtual void showCfg();
98 virtual bool configOk();
100 private:
101 float quality;
102 float volume;
103 int complexity;
104 bool narrowband;
106 float defaultQuality;
107 float defaultVolume;
108 int defaultComplexity;
109 bool defaultBand;
113 #endif