• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • arts
 

arts

  • arts
  • knotify
knotify.h
1 /*
2  Copyright (c) 1997 Christian Esken (esken@kde.org)
3 
4  This program is free software; you can redistribute it and/or modify
5  it under the terms of the GNU General Public License as published by
6  the Free Software Foundation; either version 2, or (at your option)
7  any later version.
8 
9  This program is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  GNU General Public License for more details.
13 
14  You should have received a copy of the GNU General Public License
15  along with this program; if not, write to the Free Software
16  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17 
18 */
19 
20 #ifndef KNOTIFY_H
21 #define KNOTIFY_H
22 
23 #include <tqobject.h>
24 #include <knotifyclient.h>
25 #include <dcopobject.h>
26 
27 class KNotifyPrivate;
28 class KProcess;
29 class KConfig;
30 
31 class KNotify : public TQObject, public DCOPObject
32 {
33 Q_OBJECT
34 K_DCOP
35 
36 public:
37  KNotify( bool useArts );
38  ~KNotify();
39 
40  enum PlayingFinishedStatus
41  {
42  PlayedOK = 0, // success, all following mean failure
43  NoSoundFile,
44  FileAlreadyPlaying,
45  NoSoundSupport,
46  PlayerBusy,
47  Aborted,
48  Unknown = 5000
49  };
50 
51 protected:
52 k_dcop:
53  // deprecated
54  void notify(const TQString &event, const TQString &fromApp,
55  const TQString &text, TQString sound, TQString file,
56  int present, int level);
57 
58  // deprecated
59  void notify(const TQString &event, const TQString &fromApp,
60  const TQString &text, TQString sound, TQString file,
61  int present, int level, int winId);
62 
63  void notify(const TQString &event, const TQString &fromApp,
64  const TQString &text, TQString sound, TQString file,
65  int present, int level, int winId, int eventId);
66 
67 
68  void reconfigure();
69  void setVolume( int volume );
70  void sessionReady(); // from ksmserver
71 
72 private:
73  bool notifyBySound(const TQString &sound, const TQString &appname, int eventId);
74  bool notifyByMessagebox(const TQString &text, int level, WId winId);
75  bool notifyByLogfile(const TQString &text, const TQString &file);
76  bool notifyByStderr(const TQString &text);
77  bool notifyByPassivePopup(const TQString &text, const TQString &appName,
78  KConfig* eventsFile, WId winId );
79  bool notifyByExecute(const TQString &command,
80  const TQString& event,
81  const TQString& fromApp,
82  const TQString& text,
83  int winId,
84  int eventId );
85  bool notifyByTaskbar( WId winId );
86 
87  bool isPlaying( const TQString& soundFile ) const;
88 
89  void soundFinished( int eventId, PlayingFinishedStatus reason );
90  void abortFirstPlayObject();
91 
92  WId checkWinId( const TQString& appName, WId senderWinId );
93 
97  bool isGlobal(const TQString &eventname);
98 
99 private slots:
100  void playTimeout();
101  void slotPlayerProcessExited( KProcess *proc );
102  void restartedArtsd();
103 
104 private:
105  KNotifyPrivate* d;
106  void loadConfig();
107 };
108 
109 
110 #endif
111 
KProcess
KConfig

arts

Skip menu "arts"
  • Main Page
  • Alphabetical List
  • Class List
  • File List
  • Class Members
  • Related Pages

arts

Skip menu "arts"
  • arts
  • dcop
  • dnssd
  • interfaces
  •     interface
  •     library
  •   kspeech
  •   ktexteditor
  • kabc
  • kate
  • kcmshell
  • kdecore
  • kded
  • kdefx
  • kdeprint
  • kdesu
  • kdeui
  • kdoctools
  • khtml
  • kimgio
  • kinit
  • kio
  •   bookmarks
  •   httpfilter
  •   kfile
  •   kio
  •   kioexec
  •   kpasswdserver
  •   kssl
  • kioslave
  •   http
  • kjs
  • kmdi
  •   kmdi
  • knewstuff
  • kparts
  • krandr
  • kresources
  • kspell2
  • kunittest
  • kutils
  • kwallet
  • libkmid
  • libkscreensaver
Generated for arts by doxygen 1.8.13
This website is maintained by Timothy Pearson.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. |