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 ******************************************************************************/
29 #include <ksystemtrayicon.h>
32 #include "kspeechinterface.h"
37 class KttsMgrTray
: public KSystemTrayIcon
42 KttsMgrTray(QWidget
*parent
=0);
45 void setExitWhenFinishedSpeaking();
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
);
57 void speakClipboardSelected();
60 void resumeSelected();
61 void repeatSelected();
62 void configureSelected();
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();
77 * DBUS KSpeech Interface.
79 org::kde::KSpeech
* m_kspeech
;
81 bool isKttsdRunning();
86 QAction
* actSpeakClipboard
;
87 QAction
* actConfigure
;