1 /***************************************************** vim:set ts=4 sw=4 sts=4:
2 KTTSMgr System Tray Application
3 -------------------------------
5 (C) 2004-2006 by Gary Cramblitt <garycramblitt@comcast.net>
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 ******************************************************************************/
30 #include <ksystemtrayicon.h>
33 #include "kspeechinterface.h"
38 class KttsMgrTray
: public KSystemTrayIcon
43 KttsMgrTray(QWidget
*parent
=0);
46 void setExitWhenFinishedSpeaking();
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
);
58 void speakClipboardSelected();
61 void resumeSelected();
62 void repeatSelected();
63 void configureSelected();
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();
78 * DBUS KSpeech Interface.
80 org::kde::KSpeech
* m_kspeech
;
82 bool isKttsdRunning();
87 QAction
* actSpeakClipboard
;
88 QAction
* actConfigure
;