knotifyclient.h
/* This file is part of the KDE libraries
Copyright (C) 2000 Charles Samuels <charles@kde.org>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License version 2 as published by the Free Software Foundation.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef _KNOTIFY_CLIENT
#define _KNOTIFY_CLIENT
#include <qstring.h>
#include "kdelibs_export.h"
class KInstance;
#undef None // X11 headers...
namespace KNotifyClient
{
struct InstancePrivate;
class InstanceStack;
class KDECORE_EXPORT Instance
{
public:
Instance(KInstance *instance);
~Instance();
bool useSystemBell() const;
static KInstance *current();
static Instance *currentInstance();
private:
static InstanceStack *instances();
InstancePrivate *d;
static InstanceStack *s_instances;
};
enum {
Default = -1,
None = 0,
Sound = 1,
Messagebox = 2,
Logfile = 4,
Stderr = 8,
PassivePopup = 16,
Execute = 32,
Taskbar = 64
};
enum {
Notification=1,
Warning=2,
Error=4,
Catastrophe=8
};
enum StandardEvent {
cannotOpenFile,
notification,
warning,
fatalError,
catastrophe
};
KDECORE_EXPORT bool startDaemon();
//#ifndef KDE_NO_COMPAT
KDECORE_EXPORT int event(const QString &message, const QString &text=QString::null) KDE_DEPRECATED;
KDECORE_EXPORT int event( StandardEvent event, const QString& text=QString::null ) KDE_DEPRECATED;
KDECORE_EXPORT int userEvent(const QString &text=QString::null, int present=Default, int level=Default,
const QString &sound=QString::null, const QString &file=QString::null) KDE_DEPRECATED;
//#endif
// KDE4: use WId instead of int
KDECORE_EXPORT int event( int winId, const QString& message,
const QString& text = QString::null );
// KDE4: use WId instead of int
KDECORE_EXPORT int event( int winId, StandardEvent event,
const QString& text = QString::null );
// KDE4: use WId instead of int
KDECORE_EXPORT int userEvent(int winId, const QString &text=QString::null, int present=Default, int level=Default,
const QString &sound=QString::null, const QString &file=QString::null);
KDECORE_EXPORT void beep(const QString& reason=QString::null);
KDECORE_EXPORT int getPresentation(const QString &eventname);
KDECORE_EXPORT QString getFile(const QString &eventname, int present);
KDECORE_EXPORT int getDefaultPresentation(const QString &eventname);
KDECORE_EXPORT QString getDefaultFile(const QString &eventname, int present);
KDECORE_EXPORT KInstance * instance();
}
#endif
KNotifyClient::startDaemon
bool startDaemon()
This starts the KNotify Daemon, if it's not already started.
Definition: knotifyclient.cpp:225
KNotifyClient::getPresentation
int getPresentation(const QString &eventname)
Gets the presentation associated with a certain event name Remeber that they may be ORed: ...
Definition: knotifyclient.cpp:163
KNotifyClient::beep
void beep(const QString &reason=QString::null)
This is a simple substitution for QApplication::beep().
Definition: knotifyclient.cpp:239
KNotifyClient::Execute
Definition: knotifyclient.h:146
KNotifyClient::PassivePopup
Definition: knotifyclient.h:145
KNotifyClient::Instance
Makes it possible to use KNotifyClient with a KInstance that is not the application.
Definition: knotifyclient.h:96
KNotifyClient::userEvent
int userEvent(const QString &text=QString::null, int present=Default, int level=Default, const QString &sound=QString::null, const QString &file=QString::null) KDE_DEPRECATED
Definition: knotifyclient.cpp:117
KInstance
Access to KDE global objects for use in shared libraries.
Definition: kinstance.h:43
KNotifyClient::StandardEvent
StandardEvent
default events you can use
Definition: knotifyclient.h:163
KNotifyClient::getFile
QString getFile(const QString &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
KNotifyClient::Taskbar
Definition: knotifyclient.h:147
KNotifyClient::instance
KInstance * instance()
Shortcut to KNotifyClient::Instance::current() :)
Definition: knotifyclient.cpp:267
KNotifyClient::getDefaultPresentation
int getDefaultPresentation(const QString &eventname)
Gets the default presentation for the event of this program.
Definition: knotifyclient.cpp:194
KNotifyClient::event
int event(const QString &message, const QString &text=QString::null) KDE_DEPRECATED
Definition: knotifyclient.cpp:112
KNotifyClient::getDefaultFile
QString getDefaultFile(const QString &eventname, int present)
Gets the default File for the event of this program.
Definition: knotifyclient.cpp:207

KDE Home | KDE Accessibility Home | Description of Access Keys