delay a few things on startup, such as setting the visibility mode, which ensures...
[personal-kdebase.git] / runtime / knotify / knotifyconfig.h
blob8b503a77a36be1cba137037553cbb8b39c7ec2e6
1 /*
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)
8 any later version.
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>
26 #include <QPair>
27 #include <QPixmap>
28 #include <QObject> //for Wid
30 typedef QList< QPair<QString,QString> > ContextList;
32 /**
33 * Represent the configuration for an event
34 * @author Olivier Goffart <ogoffart@kde.org>
36 class KNotifyConfig
38 public:
39 KNotifyConfig(const QString &appname, const ContextList &_contexts , const QString &_eventid);
40 ~KNotifyConfig();
42 /**
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);
52 /**
53 * the text of the notification
55 QString text;
56 /**
57 * the pixmap to put on the notification
59 QPixmap pix;
60 /**
61 * The windowsID of the window that initiated the notification
62 * (it is a window in the client)
64 WId winId;
65 /**
66 * the user-readable list of action.
68 QStringList actions;
70 /**
71 * the name of the application that triggered the notification
73 QString appname;
75 /**
76 * @internal
78 KSharedConfig::Ptr eventsfile,configfile;
79 ContextList contexts;
81 /**
82 * the name of the notification
84 QString eventid;
86 /**
87 * clear the config cache. to be used when the config may have changed
89 static void clearCache();
92 #endif