Fix manual download links.
[kugel-rb.git] / rbutil / rbutilqt / encttscfggui.h
blob40f29fe858a3d82f1cccf6d69b4686e457cc4f30
1 /***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
9 * Copyright (C) 2007 by Dominik Wenger
10 * $Id$
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
17 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
18 * KIND, either express or implied.
20 ****************************************************************************/
22 #ifndef ENCTTSCFGGUI_H
23 #define ENCTTSCFGGUI_H
25 #include <QtGui>
26 #include "encttssettings.h"
28 //! \brief Shows and manages a configuration gui for encoders and tts enignes
29 //!
30 class EncTtsCfgGui: public QDialog
32 Q_OBJECT
33 public:
34 //! Creates the UI. give it a endoer or tts engine with already set config. uses show() or exec() to show it.
35 EncTtsCfgGui(QDialog* parent, EncTtsSettingInterface* interface,QString name);
37 private slots:
38 //! accept current configuration values and close window
39 void accept(void);
40 //! close window and dont save configuration
41 void reject(void);
42 //! updates the corresponding setting from the sending Widget
43 void updateSetting();
44 //! updates corresponding Widget from the sending Setting.
45 void updateWidget();
46 //! shows a busy dialog. counts calls.
47 void showBusy();
48 //! hides the busy dialog, counts calls
49 void hideBusy();
50 //! used via the SignalMapper for all Browse buttons
51 void browse(QObject*);
53 private:
54 //! creates all dynamic window content
55 void setUpWindow();
56 //! creates the Widgets needed for one setting. returns a Layout with the widgets
57 QWidget* createWidgets(EncTtsSetting* setting);
58 //! creates a button when needed by the setting.
59 QWidget* createButton(EncTtsSetting* setting);
60 //! name of the Encoder or TTS for which this UI is
61 QString m_name;
62 //! the interface pointer to the TTS or encoder
63 EncTtsSettingInterface* m_settingInterface;
64 //! Dialog, shown when enc or tts is busy
65 QProgressDialog* m_busyDlg;
66 //! List of settings from the TTS or Encoder
67 QList<EncTtsSetting*> m_settingsList;
68 //! Maps settings and the correspondig Widget
69 QMap<EncTtsSetting*,QWidget*> m_settingsWidgetsMap;
70 //! Maps all browse buttons to the corresponding Setting
71 QSignalMapper m_browseBtnMap;
72 //! counter how often busyShow() is called,
73 int m_busyCnt;
77 #endif