SVN_SILENT made messages (.desktop file)
[kdeaccessibility.git] / kttsd / libkttsd / selecttalkerdlg.h
blob1b084d92aee735ffbe5e943937dc32c4d3ed10ee
1 /***************************************************** vim:set ts=4 sw=4 sts=4:
2 Description:
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.
7 Copyright:
8 (C) 2005 by Gary Cramblitt <garycramblitt@comcast.net>
9 -------------------
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
30 // KDE includes.
31 #include <kdialog.h>
32 #include <klocale.h>
33 #include <kdemacros.h>
35 // KTTS includes.
36 #include "talkercode.h"
37 #include "ui_selecttalkerwidget.h"
39 class TalkerListModel;
41 class KDE_EXPORT SelectTalkerDlg : public KDialog
43 Q_OBJECT
45 public:
46 /**
47 * Constructor.
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).
56 SelectTalkerDlg(
57 QWidget* parent = 0,
58 const char* name = "selecttalkerdialog",
59 const QString& caption = i18n("Select Talker"),
60 const QString& talkerCode = QString(),
61 bool runningTalkers = false);
63 /**
64 * Destructor.
66 ~SelectTalkerDlg();
68 /**
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();
73 /**
74 * Returns the Talker user chose in a translated displayable format.
76 QString getSelectedTranslatedDescription();
78 private slots:
79 void slotLanguageBrowseButton_clicked();
80 void slotTalkersView_clicked();
81 void configChanged();
83 private:
84 enum TalkerListViewColumn
86 tlvcLanguage,
87 tlvcSynthName,
88 tlvcVoice,
89 tlvcGender,
90 tlvcVolume,
91 tlvcRate
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