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 | |
30 | class KTabWidget; |
31 | class KCModule; |
32 | class WordCompletionWidget; |
33 | |
34 | /**This class represents a configuration widget for user preferences. |
35 | *@author Gunnar Schmi Dt |
36 | */ |
37 | |
38 | class PreferencesWidget : public QWidget, public Ui::PreferencesUI { |
39 | Q_OBJECT |
40 | public: |
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 | |
52 | private: |
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 | |
61 | class OptionsDialog : public KPageDialog { |
62 | Q_OBJECT |
63 | public: |
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 | |
74 | signals: |
75 | void configurationChanged (); |
76 | |
77 | private slots: |
78 | void slotCancel(); |
79 | void slotOk(); |
80 | void slotApply(); |
81 | |
82 | private: |
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 | |