1/*
2 This file is part of the KDE project
3 SPDX-FileCopyrightText: 2005-2006 Olivier Goffart <ogoffart at kde.org>
4
5 SPDX-License-Identifier: LGPL-2.0-only
6*/
7
8#ifndef KNOTIFYCONFIGELEMENT_H
9#define KNOTIFYCONFIGELEMENT_H
10
11#include <QMap>
12#include <QString>
13
14class KConfig;
15class KConfigGroup;
16
17/**
18 * Represent the config for an event
19 @author Olivier Goffart <ogoffart@kde.org>
20 */
21class KNotifyConfigElement
22{
23public:
24 KNotifyConfigElement(const QString &eventid, KConfig *config);
25 ~KNotifyConfigElement();
26
27 KNotifyConfigElement(const KNotifyConfigElement &) = delete;
28 KNotifyConfigElement &operator=(const KNotifyConfigElement &) = delete;
29
30 QString readEntry(const QString &entry, bool path = false);
31 void writeEntry(const QString &entry, const QString &data);
32
33 QString eventId() const;
34
35 void save();
36
37private:
38 QMap<QString, QString> m_cache;
39 KConfigGroup *m_config;
40 QString m_eventId;
41};
42
43#endif
44

source code of knotifyconfig/src/knotifyconfigelement.h