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

kdecore

  • kdecore
knotifyclient.h
1 /* This file is part of the KDE libraries
2  Copyright (C) 2000 Charles Samuels <charles@kde.org>
3 
4  This library is free software; you can redistribute it and/or
5  modify it under the terms of the GNU Library General Public
6  License version 2 as published by the Free Software Foundation.
7 
8  This library is distributed in the hope that it will be useful,
9  but WITHOUT ANY WARRANTY; without even the implied warranty of
10  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11  Library General Public License for more details.
12 
13  You should have received a copy of the GNU Library General Public License
14  along with this library; see the file COPYING.LIB. If not, write to
15  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
16  Boston, MA 02110-1301, USA.
17 */
18 #ifndef _KNOTIFY_CLIENT
19 #define _KNOTIFY_CLIENT
20 #include <tqstring.h>
21 #include "kdelibs_export.h"
22 
23 class KInstance;
24 #undef None // X11 headers...
25 
79 namespace KNotifyClient
80 {
81  struct InstancePrivate;
82  class InstanceStack;
83 
96  class KDECORE_EXPORT Instance
97  {
98  public:
104  Instance(KInstance *instance);
109  ~Instance();
115  bool useSystemBell() const;
120  static KInstance *current();
121 
126  static Instance *currentInstance();
127 
128  private:
129  static InstanceStack *instances();
130  InstancePrivate *d;
131  static InstanceStack *s_instances;
132  };
133 
134 
138  enum {
139  Default = -1,
140  None = 0,
141  Sound = 1,
142  Messagebox = 2,
143  Logfile = 4,
144  Stderr = 8,
145  PassivePopup = 16,
146  Execute = 32,
147  Taskbar = 64
148  };
149 
153  enum {
154  Notification=1,
155  Warning=2,
156  Error=4,
157  Catastrophe=8
158  };
159 
163  enum StandardEvent {
164  cannotOpenFile,
165  notification,
166  warning,
167  fatalError,
168  catastrophe
169  };
170 
178  KDECORE_EXPORT bool startDaemon();
179 
180 //#ifndef KDE_NO_COMPAT
188  KDECORE_EXPORT int event(const TQString &message, const TQString &text=TQString::null) KDE_DEPRECATED;
189 
197  KDECORE_EXPORT int event( StandardEvent event, const TQString& text=TQString::null ) KDE_DEPRECATED;
198 
209  KDECORE_EXPORT int userEvent(const TQString &text=TQString::null, int present=Default, int level=Default,
210  const TQString &sound=TQString::null, const TQString &file=TQString::null) KDE_DEPRECATED;
211 
212 //#endif
213 
229  // KDE4: use WId instead of int
230  KDECORE_EXPORT int event( int winId, const TQString& message,
231  const TQString& text = TQString::null );
232 
244  // KDE4: use WId instead of int
245  KDECORE_EXPORT int event( int winId, StandardEvent event,
246  const TQString& text = TQString::null );
247 
262  // KDE4: use WId instead of int
263  KDECORE_EXPORT int userEvent(int winId, const TQString &text=TQString::null, int present=Default, int level=Default,
264  const TQString &sound=TQString::null, const TQString &file=TQString::null);
265 
274  KDECORE_EXPORT void beep(const TQString& reason=TQString::null);
275 
285  KDECORE_EXPORT int getPresentation(const TQString &eventname);
286 
295  KDECORE_EXPORT TQString getFile(const TQString &eventname, int present);
296 
305  KDECORE_EXPORT int getDefaultPresentation(const TQString &eventname);
306 
316  KDECORE_EXPORT TQString getDefaultFile(const TQString &eventname, int present);
317 
322  KDECORE_EXPORT KInstance * instance();
323 }
324 
325 #endif
KNotifyClient::event
int event(const TQString &message, const TQString &text=TQString::null) KDE_DEPRECATED
Definition: knotifyclient.cpp:112
KNotifyClient::startDaemon
bool startDaemon()
This starts the KNotify Daemon, if it's not already started.
Definition: knotifyclient.cpp:225
KNotifyClient::beep
void beep(const TQString &reason=TQString::null)
This is a simple substitution for TQApplication::beep().
Definition: knotifyclient.cpp:239
KNotifyClient::Execute
Definition: knotifyclient.h:146
KNotifyClient::userEvent
int userEvent(const TQString &text=TQString::null, int present=Default, int level=Default, const TQString &sound=TQString::null, const TQString &file=TQString::null) KDE_DEPRECATED
Definition: knotifyclient.cpp:117
KNotifyClient::getDefaultPresentation
int getDefaultPresentation(const TQString &eventname)
Gets the default presentation for the event of this program.
Definition: knotifyclient.cpp:194
KNotifyClient::PassivePopup
Definition: knotifyclient.h:145
KNotifyClient
This namespace provides a method for issuing events to a KNotifyServer call KNotifyClient::event("eve...
Definition: knotifyclient.h:79
KNotifyClient::Instance
Makes it possible to use KNotifyClient with a KInstance that is not the application.
Definition: knotifyclient.h:96
KNotifyClient::getFile
TQString getFile(const TQString &eventname, int present)
Gets the default file associated with a certain event name The control panel module will list all the...
Definition: knotifyclient.cpp:176
KInstance
Access to KDE global objects for use in shared libraries.
Definition: kinstance.h:43
KNotifyClient::getPresentation
int getPresentation(const TQString &eventname)
Gets the presentation associated with a certain event name Remeber that they may be ORed: ...
Definition: knotifyclient.cpp:163
KNotifyClient::StandardEvent
StandardEvent
default events you can use
Definition: knotifyclient.h:163
KNotifyClient::getDefaultFile
TQString getDefaultFile(const TQString &eventname, int present)
Gets the default File for the event of this program.
Definition: knotifyclient.cpp:207
KNotifyClient::Taskbar
Definition: knotifyclient.h:147
KNotifyClient::instance
KInstance * instance()
Shortcut to KNotifyClient::Instance::current() :)
Definition: knotifyclient.cpp:267

kdecore

Skip menu "kdecore"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdecore

Skip menu "kdecore"
  • 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 kdecore by doxygen 1.8.8
This website is maintained by Timothy Pearson.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. |