knotifyclient.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef _KNOTIFY_CLIENT
00019 #define _KNOTIFY_CLIENT
00020 #include <qstring.h>
00021
00022 class KInstance;
00023 #undef None // X11 headers...
00024
00073 namespace KNotifyClient
00074 {
00075 struct InstancePrivate;
00076 class InstanceStack;
00077
00090 class Instance
00091 {
00092 public:
00098 Instance(KInstance *instance);
00103 ~Instance();
00109 bool useSystemBell() const;
00114 static KInstance *current();
00115
00120 static Instance *currentInstance();
00121
00122 private:
00123 static InstanceStack *instances();
00124 InstancePrivate *d;
00125 static InstanceStack *s_instances;
00126 };
00127
00128
00132 enum {
00133 Default = -1,
00134 None = 0,
00135 Sound = 1,
00136 Messagebox = 2,
00137 Logfile = 4,
00138 Stderr = 8,
00139 PassivePopup = 16,
00140 Execute = 32
00141 };
00142
00146 enum {
00147 Notification=1,
00148 Warning=2,
00149 Error=4,
00150 Catastrophe=8
00151 };
00152
00156 enum StandardEvent {
00157 cannotOpenFile,
00158 notification,
00159 warning,
00160 fatalError,
00161 catastrophe
00162 };
00163
00171 bool startDaemon();
00172
00183 bool event(const QString &message, const QString &text=QString::null);
00184
00191 bool event( StandardEvent event, const QString& text=QString::null );
00192
00202 bool userEvent(const QString &text=QString::null, int present=Default, int level=Default,
00203 const QString &sound=QString::null, const QString &file=QString::null);
00204
00213 void beep(const QString& reason=QString::null);
00214
00224 int getPresentation(const QString &eventname);
00225
00234 QString getFile(const QString &eventname, int present);
00235
00244 int getDefaultPresentation(const QString &eventname);
00245
00255 QString getDefaultFile(const QString &eventname, int present);
00256
00261 KInstance * instance();
00262 };
00263
00264 #endif
This file is part of the documentation for kdelibs Version 3.1.0.