SVN_SILENT made messages (.desktop file)
[kdeaccessibility.git] / kttsd / kttsmgr / kttsmgr.h
blob317af8232b1d86a64ccca287e2ba1d4eb4aea656
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 <ksystemtrayicon.h>
31 // KTTS includes.
32 #include "kspeechinterface.h"
34 class QEvent;
35 class QAction;
37 class KttsMgrTray: public KSystemTrayIcon
39 Q_OBJECT
41 public:
42 KttsMgrTray(QWidget *parent=0);
43 ~KttsMgrTray();
45 void setExitWhenFinishedSpeaking();
46 QString getStatus();
48 protected Q_SLOTS:
49 Q_SCRIPTABLE void jobStateChanged(const QString &appId, int jobNum, int state);
51 bool event(QEvent *event);
52 void slotActivated(QSystemTrayIcon::ActivationReason reason);
53 virtual void contextMenuAboutToShow(KMenu* menu);
55 private slots:
57 void speakClipboardSelected();
58 void stopSelected();
59 void pauseSelected();
60 void resumeSelected();
61 void repeatSelected();
62 void configureSelected();
63 void aboutSelected();
64 void helpSelected();
65 void quitSelected();
67 private:
68 /**
69 * Convert a KTTSD job state integer into a display string.
70 * @param state KTTSD job state
71 * @return Display string for the state.
73 QString stateToStr(int state);
74 void exitWhenFinishedSpeaking();
76 /**
77 * DBUS KSpeech Interface.
79 org::kde::KSpeech* m_kspeech;
81 bool isKttsdRunning();
82 QAction* actStop;
83 QAction* actPause;
84 QAction* actResume;
85 QAction* actRepeat;
86 QAction* actSpeakClipboard;
87 QAction* actConfigure;
90 #endif // KTTSMGR_H