1/***************************************************************************
2 optionsdialog.h - description
3 -------------------
4 begin : Don Nov 21 2002
5 copyright : (C) 2002 by Gunnar Schmi Dt
6 email : kmouth@schmi-dt.de
7 ***************************************************************************/
8
9/***************************************************************************
10 * *
11 * This program is free software; you can redistribute it and/or modify *
12 * it under the terms of the GNU General Public License as published by *
13 * the Free Software Foundation; either version 2 of the License, or *
14 * (at your option) any later version. *
15 * *
16 ***************************************************************************/
17
18// $Id$
19
20#ifndef OPTIONSDIALOG_H
21#define OPTIONSDIALOG_H
22
23#include <kpagedialog.h>
24
25#include <QtCore/QObject>
26
27#include "ui_preferencesui.h"
28#include "texttospeechconfigurationwidget.h"
29
30class KTabWidget;
31class KCModule;
32class WordCompletionWidget;
33
34/**This class represents a configuration widget for user preferences.
35 *@author Gunnar Schmi Dt
36 */
37
38class PreferencesWidget : public QWidget, public Ui::PreferencesUI {
39 Q_OBJECT
40public:
41 PreferencesWidget(QWidget *parent, const char *name);
42 ~PreferencesWidget();
43
44 void readOptions (KConfig *config);
45 void saveOptions (KConfig *config);
46
47 void ok();
48 void cancel();
49
50 bool isSpeakImmediately();
51
52private:
53 bool speak;
54 int save;
55};
56
57/**This class represents a configuration dialog for the options of KMouth.
58 *@author Gunnar Schmi Dt
59 */
60
61class OptionsDialog : public KPageDialog {
62 Q_OBJECT
63public:
64 OptionsDialog(QWidget *parent);
65 ~OptionsDialog();
66
67 TextToSpeechSystem *getTTSSystem() const;
68
69 void readOptions (KConfig *config);
70 void saveOptions (KConfig *config);
71
72 bool isSpeakImmediately();
73
74signals:
75 void configurationChanged ();
76
77private slots:
78 void slotCancel();
79 void slotOk();
80 void slotApply();
81
82private:
83 KTabWidget *tabCtl;
84 TextToSpeechConfigurationWidget *commandWidget;
85 PreferencesWidget *behaviourWidget;
86 KCModule *kttsd;
87 WordCompletionWidget *completionWidget;
88
89 KCModule *loadKttsd ();
90 void unloadKttsd ();
91};
92
93#endif
94