Remove this line
[kdeaccessibility.git] / kttsd / kttsmgr / kttsmgr.h
blob2a4375d9cf7b0d71694179a0756f161405cb6987
1 /***************************************************** vim:set ts=4 sw=4 sts=4:
2 KTTSMgr System Tray Application
3 -------------------------------
4 Copyright:
5 (C) 2004-2006 by Gary Cramblitt <garycramblitt@comcast.net>
6 -------------------
7 Original author: Gary Cramblitt <garycramblitt@comcast.net>
8 Current Maintainer: Gary Cramblitt <garycramblitt@comcast.net>
10 This program is free software; you can redistribute it and/or modify
11 it under the terms of the GNU General Public License as published by
12 the Free Software Foundation; either version 2 of the License, or
13 (at your option) any later version.
15 This program is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License for more details.
20 You should have received a copy of the GNU General Public License
21 along with this program; if not, write to the Free Software
22 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
23 ******************************************************************************/
25 #ifndef KTTSMGR_H
26 #define KTTSMGR_H
28 // KDE includes.
29 #include <kmenu.h>
30 #include <ksystemtrayicon.h>
32 // KTTS includes.
33 #include "kspeechinterface.h"
35 class QEvent;
36 class QAction;
38 class KttsMgrTray: public KSystemTrayIcon
40 Q_OBJECT
42 public:
43 KttsMgrTray(QWidget *parent=0);
44 ~KttsMgrTray();
46 void setExitWhenFinishedSpeaking();
47 QString getStatus();
49 protected Q_SLOTS:
50 Q_SCRIPTABLE void jobStateChanged(const QString &appId, int jobNum, int state);
52 bool event(QEvent *event);
53 void slotActivated(QSystemTrayIcon::ActivationReason reason);
54 virtual void contextMenuAboutToShow(KMenu* menu);
56 private slots:
58 void speakClipboardSelected();
59 void stopSelected();
60 void pauseSelected();
61 void resumeSelected();
62 void repeatSelected();
63 void configureSelected();
64 void aboutSelected();
65 void helpSelected();
66 void quitSelected();
68 private:
69 /**
70 * Convert a KTTSD job state integer into a display string.
71 * @param state KTTSD job state
72 * @return Display string for the state.
74 QString stateToStr(int state);
75 void exitWhenFinishedSpeaking();
77 /**
78 * DBUS KSpeech Interface.
80 org::kde::KSpeech* m_kspeech;
82 bool isKttsdRunning();
83 QAction* actStop;
84 QAction* actPause;
85 QAction* actResume;
86 QAction* actRepeat;
87 QAction* actSpeakClipboard;
88 QAction* actConfigure;
91 #endif // KTTSMGR_H