2 Copyright (C) 2005-2006 by Olivier Goffart <ogoffart at kde.org>
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2, or (at your option)
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21 #ifndef KNOTIFYCONFIG_H
22 #define KNOTIFYCONFIG_H
24 #include <ksharedconfig.h>
28 #include <QObject> //for Wid
30 typedef QList
< QPair
<QString
,QString
> > ContextList
;
33 * Represent the configuration for an event
34 * @author Olivier Goffart <ogoffart@kde.org>
39 KNotifyConfig(const QString
&appname
, const ContextList
&_contexts
, const QString
&_eventid
);
43 * @return entry from the knotifyrc file
45 * This will return the configuration from the user for the given key.
46 * It first look into the user config file, and then in the global config file.
48 * return a null string if the entry doesn't exist
50 QString
readEntry(const QString
& entry
, bool path
=false);
53 * the text of the notification
57 * the pixmap to put on the notification
61 * The windowsID of the window that initiated the notification
62 * (it is a window in the client)
66 * the user-readable list of action.
71 * the name of the application that triggered the notification
78 KSharedConfig::Ptr eventsfile
,configfile
;
82 * the name of the notification
87 * clear the config cache. to be used when the config may have changed
89 static void clearCache();