1 /***************************************************** vim:set ts=4 sw=4 sts=4:
2 Configuration for the Command Plug in
4 Copyright : (C) 2002,2004 by Gunnar Schmi Dt and Gary Cramblitt
6 Original author: Gunnar Schmi Dt <kmouth@schmi-dt.de>
7 Current Maintainer: Gary Cramblitt <garycramblitt@comcast.net>
8 ******************************************************************************/
10 /***************************************************************************
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; version 2 of the License. *
16 ***************************************************************************/
18 #ifndef _COMMANDCONF_H_
19 #define _COMMANDCONF_H_
28 #include <pluginconf.h>
30 // Command Plugin includes.
31 #include "ui_commandconfwidget.h"
34 class KProgressDialog
;
36 class CommandConf
: public PlugInConf
, public Ui::CommandConfWidget
{
41 CommandConf( QWidget
* parent
= 0, const QStringList
&args
= QStringList());
46 /** This method is invoked whenever the module should read its
47 * configuration (most of the times from a config file) and update the
48 * user interface. This happens when the user clicks the "Reset" button in
49 * the control center, to undo all of his changes and restore the currently
50 * valid settings. NOTE that this is not called after the modules is loaded,
51 * so you probably want to call this method in the constructor.
53 void load(KConfig
*config
, const QString
&configGroup
);
55 /** This function gets called when the user wants to save the settings in
56 * the user interface, updating the config files or wherever the
57 * configuration is stored. The method is called when the user clicks "Apply"
60 void save(KConfig
*config
, const QString
&configGroup
);
62 /** This function is called to set the settings in the module to sensible
63 * default values. It gets called when hitting the "Default" button. The
64 * default values should probably be the same as the ones the application
65 * uses when started without a config file.
70 * This function informs the plugin of the desired language to be spoken
71 * by the plugin. The plugin should attempt to adapt itself to the
72 * specified language code, choosing sensible defaults if necessary.
73 * If the passed-in code is QString(), no specific language has
75 * @param lang The desired language code or Null if none.
77 * If the plugin is unable to support the desired language, that is OK.
78 * Language codes are given by ISO 639-1 and are in lowercase.
79 * The code may also include an ISO 3166 country code in uppercase
80 * separated from the language code by underscore (_). For
81 * example, en_GB. If your plugin supports the given language, but
82 * not the given country, treat it as though the country
83 * code were not specified, i.e., adapt to the given language.
85 void setDesiredLanguage(const QString
&lang
);
88 * Return fully-specified talker code for the configured plugin. This code
89 * uniquely identifies the configured instance of the plugin and distinquishes
90 * one instance from another. If the plugin has not been fully configured,
91 * i.e., cannot yet synthesize, return QString().
92 * @return Fully-specified talker code.
94 QString
getTalkerCode();
98 // kDebug() << "CommandConf::configChanged: Running" << endl;
101 void slotCommandTest_clicked();
102 void slotSynthFinished();
103 void slotSynthStopped();
106 QString m_languageCode
;
108 // Command synthesizer.
109 CommandProc
* m_commandProc
;
110 // Synthesized wave file name.
113 KProgressDialog
* m_progressDlg
;
115 QStringList m_codecList
;
117 #endif // _COMMANDCONF_H_