1 /***************************************************** vim:set ts=4 sw=4 sts=4:
3 A dialog for user to select a Talker, either by specifying
4 selected Talker attributes, or by specifying all attributes
5 of an existing configured Talker.
8 (C) 2005 by Gary Cramblitt <garycramblitt@comcast.net>
10 Original author: Gary Cramblitt <garycramblitt@comcast.net>
12 This program is free software; you can redistribute it and/or modify
13 it under the terms of the GNU General Public License as published by
14 the Free Software Foundation; either version 2 of the License, or
15 (at your option) any later version.
17 This program is distributed in the hope that it will be useful,
18 but WITHOUT ANY WARRANTY; without even the implied warranty of
19 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 GNU General Public License for more details.
22 You should have received a copy of the GNU General Public License
23 along with this program; if not, write to the Free Software
24 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
25 ******************************************************************************/
27 #ifndef SELECTTALKERDLG_H
28 #define SELECTTALKERDLG_H
33 #include <kdemacros.h>
36 #include "talkercode.h"
37 #include "ui_selecttalkerwidget.h"
39 class TalkerListModel
;
41 class KDE_EXPORT SelectTalkerDlg
: public KDialog
48 * @param parent The parent for this dialog.
49 * @param name Name for this dialog.
50 * @param caption Displayed title for this dialog.
51 * @param talkerCode A suggested starting Talker Code.
52 * @param runningTalkers If true, lists configured and Applied Talkers in the running
53 * KTTSD. If false, lists Talkers in the KTTSMgr Talker tab
54 * (which may not yet have been Applied).
58 const char* name
= "selecttalkerdialog",
59 const QString
& caption
= i18n("Select Talker"),
60 const QString
& talkerCode
= QString(),
61 bool runningTalkers
= false);
69 * Returns the Talker Code user chose. QString() if default Talker chosen.
70 * Note that if user did not choose a specific Talker, this will be a partial Talker Code.
72 QString
getSelectedTalkerCode();
74 * Returns the Talker user chose in a translated displayable format.
76 QString
getSelectedTranslatedDescription();
79 void slotLanguageBrowseButton_clicked();
80 void slotTalkersView_clicked();
84 enum TalkerListViewColumn
94 void applyTalkerCodeToControls();
95 void applyControlsToTalkerCode();
96 void enableDisableControls();
98 // Main dialog widget.
99 Ui::SelectTalkerWidget
* m_widget
;
100 // Model containing list of Talker Codes.
101 TalkerListModel
* m_talkerListModel
;
102 // True if list of Talkers should be taken from config file.
103 bool m_runningTalkers
;
104 // Current Talker Code.
105 TalkerCode m_talkerCode
;
108 #endif // SELECTTALKERDLG_H