1 /***************************************************************************
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
9 * Copyright (C) 2007 by Dominik Wenger
10 * $Id: encoders.h 17902 2008-06-30 22:09:45Z bluebrother $
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
26 #include "encttssettings.h"
28 //! \brief Shows and manages a configuration gui for encoders and tts enignes
30 class EncTtsCfgGui
: public QDialog
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
);
38 //! accept current configuration values and close window
40 //! close window and dont save configuration
42 //! updates the corresponding setting from the sending Widget
44 //! updates corresponding Widget from the sending Setting.
46 //! shows a busy dialog. counts calls.
48 //! hides the busy dialog, counts calls
50 //! used via the SignalMapper for all Browse buttons
51 void browse(QObject
*);
54 //! creates all dynamic window content
56 //! creates the Widgets needed for one setting. returns a Layout with the widgets
57 QLayout
* 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
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,