Libkleo

filesystemwatcher.h
1/* -*- mode: c++; c-basic-offset:4 -*-
2 filesystemwatcher.h
3
4 This file is part of Kleopatra, the KDE keymanager
5 SPDX-FileCopyrightText: 2008 Klarälvdalens Datakonsult AB
6
7 SPDX-License-Identifier: GPL-2.0-or-later
8*/
9
10#pragma once
11
12#include "kleo_export.h"
13
14#include <QObject>
15#include <QStringList>
16
17class QString;
18
19namespace Kleo
20{
21
22class KLEO_EXPORT FileSystemWatcher : public QObject
23{
24 Q_OBJECT
25public:
26 explicit FileSystemWatcher(QObject *parent = nullptr);
27 explicit FileSystemWatcher(const QStringList &paths, QObject *parent = nullptr);
28 ~FileSystemWatcher() override;
29
30 void setDelay(int ms);
31 int delay() const;
32
33 void setEnabled(bool enable);
34 bool isEnabled() const;
35
36 void addPaths(const QStringList &paths);
37 void addPath(const QString &path);
38
39 void blacklistFiles(const QStringList &patterns);
40 void whitelistFiles(const QStringList &patterns);
41
42 QStringList files() const;
43 void removePaths(const QStringList &path);
44 void removePath(const QString &path);
45
46Q_SIGNALS:
47 void directoryChanged(const QString &path);
48 void fileChanged(const QString &path);
49 void triggered();
50
51private:
52 class Private;
54};
55}
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:29:01 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.