KConfig

kconfigwatcher.h
1 /*
2  SPDX-FileCopyrightText: 2018 David Edmundson <[email protected]>
3 
4  SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6 
7 #ifndef KCONFIGWATCHER_H
8 #define KCONFIGWATCHER_H
9 
10 #include <QObject>
11 #include <QSharedPointer>
12 
13 #include <KSharedConfig>
14 #include <KConfigGroup>
15 
16 #include <kconfigcore_export.h>
17 
18 class KConfigWatcherPrivate;
19 
26 class KCONFIGCORE_EXPORT KConfigWatcher: public QObject
27 {
28  Q_OBJECT
29 public:
31 
37  static Ptr create(const KSharedConfig::Ptr &config);
38 
39  ~KConfigWatcher() override;
40 
45  KSharedConfig::Ptr config() const;
46 
47 Q_SIGNALS:
55  void configChanged(const KConfigGroup &group, const QByteArrayList &names);
56 
57 private Q_SLOTS:
58  void onConfigChangeNotification(const QHash<QString, QByteArrayList> &changes);
59 
60 private:
61  KConfigWatcher(const KSharedConfig::Ptr &config);
64 };
65 
66 #endif
Notifies when another client has updated this config file with the Notify flag set.
A class for one specific group in a KConfig object.
Definition: kconfiggroup.h:38
Q_DISABLE_COPY(Class)
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Sat Jul 11 2020 22:47:24 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.