diff options
Diffstat (limited to 'utils/rbutilqt/encttscfggui.h')
-rw-r--r-- | utils/rbutilqt/encttscfggui.h | 79 |
1 files changed, 79 insertions, 0 deletions
diff --git a/utils/rbutilqt/encttscfggui.h b/utils/rbutilqt/encttscfggui.h new file mode 100644 index 0000000000..80af86dabc --- /dev/null +++ b/utils/rbutilqt/encttscfggui.h | |||
@@ -0,0 +1,79 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * | ||
9 | * Copyright (C) 2007 by Dominik Wenger | ||
10 | * | ||
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. | ||
15 | * | ||
16 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | ||
17 | * KIND, either express or implied. | ||
18 | * | ||
19 | ****************************************************************************/ | ||
20 | |||
21 | #ifndef ENCTTSCFGGUI_H | ||
22 | #define ENCTTSCFGGUI_H | ||
23 | |||
24 | #include <QDialog> | ||
25 | #include <QString> | ||
26 | #include <QProgressDialog> | ||
27 | #include "encttssettings.h" | ||
28 | |||
29 | //! \brief Shows and manages a configuration gui for encoders and tts enignes | ||
30 | //! | ||
31 | class EncTtsCfgGui: public QDialog | ||
32 | { | ||
33 | Q_OBJECT | ||
34 | public: | ||
35 | //! Creates the UI. give it a endoer or tts engine with already set config. uses show() or exec() to show it. | ||
36 | EncTtsCfgGui(QDialog* parent, EncTtsSettingInterface* iface, QString name); | ||
37 | |||
38 | private slots: | ||
39 | //! accept current configuration values and close window | ||
40 | void accept(void); | ||
41 | //! close window and dont save configuration | ||
42 | void reject(void); | ||
43 | //! updates the corresponding setting from the sending Widget | ||
44 | void updateSetting(); | ||
45 | //! updates corresponding Widget from the sending Setting. | ||
46 | void updateWidget(); | ||
47 | //! shows a busy dialog. counts calls. | ||
48 | void showBusy(); | ||
49 | //! hides the busy dialog, counts calls | ||
50 | void hideBusy(); | ||
51 | //! used via the SignalMapper for all Browse buttons | ||
52 | void browse(QObject*); | ||
53 | |||
54 | private: | ||
55 | //! creates all dynamic window content | ||
56 | void setUpWindow(); | ||
57 | //! creates the Widgets needed for one setting. returns a Layout with the widgets | ||
58 | QWidget* createWidgets(EncTtsSetting* setting); | ||
59 | //! creates a button when needed by the setting. | ||
60 | QWidget* createButton(EncTtsSetting* setting); | ||
61 | //! name of the Encoder or TTS for which this UI is | ||
62 | QString m_name; | ||
63 | //! the interface pointer to the TTS or encoder | ||
64 | EncTtsSettingInterface* m_settingInterface; | ||
65 | //! Dialog, shown when enc or tts is busy | ||
66 | QProgressDialog* m_busyDlg; | ||
67 | //! List of settings from the TTS or Encoder | ||
68 | QList<EncTtsSetting*> m_settingsList; | ||
69 | //! Maps settings and the correspondig Widget | ||
70 | QMap<EncTtsSetting*,QWidget*> m_settingsWidgetsMap; | ||
71 | //! Maps all browse buttons to the corresponding Setting | ||
72 | QSignalMapper m_browseBtnMap; | ||
73 | //! counter how often busyShow() is called, | ||
74 | int m_busyCnt; | ||
75 | }; | ||
76 | |||
77 | |||
78 | #endif | ||
79 | |||