1 /***************************************************************************
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
9 * Copyright (C) 2007 by Dominik Wenger
11 * This program is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU General Public License
13 * as published by the Free Software Foundation; either version 2
14 * of the License, or (at your option) any later version.
16 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
17 * KIND, either express or implied.
19 ****************************************************************************/
21 #ifndef ENCTTSCFGGUI_H
22 #define ENCTTSCFGGUI_H
25 #include "encttssettings.h"
27 //! \brief Shows and manages a configuration gui for encoders and tts enignes
29 class EncTtsCfgGui
: public QDialog
33 //! Creates the UI. give it a endoer or tts engine with already set config. uses show() or exec() to show it.
34 EncTtsCfgGui(QDialog
* parent
, EncTtsSettingInterface
* interface
,QString name
);
37 //! accept current configuration values and close window
39 //! close window and dont save configuration
41 //! updates the corresponding setting from the sending Widget
43 //! updates corresponding Widget from the sending Setting.
45 //! shows a busy dialog. counts calls.
47 //! hides the busy dialog, counts calls
49 //! used via the SignalMapper for all Browse buttons
50 void browse(QObject
*);
53 //! creates all dynamic window content
55 //! creates the Widgets needed for one setting. returns a Layout with the widgets
56 QWidget
* createWidgets(EncTtsSetting
* setting
);
57 //! creates a button when needed by the setting.
58 QWidget
* createButton(EncTtsSetting
* setting
);
59 //! name of the Encoder or TTS for which this UI is
61 //! the interface pointer to the TTS or encoder
62 EncTtsSettingInterface
* m_settingInterface
;
63 //! Dialog, shown when enc or tts is busy
64 QProgressDialog
* m_busyDlg
;
65 //! List of settings from the TTS or Encoder
66 QList
<EncTtsSetting
*> m_settingsList
;
67 //! Maps settings and the correspondig Widget
68 QMap
<EncTtsSetting
*,QWidget
*> m_settingsWidgetsMap
;
69 //! Maps all browse buttons to the corresponding Setting
70 QSignalMapper m_browseBtnMap
;
71 //! counter how often busyShow() is called,