File indexing completed on 2024-04-21 03:51:47
0001 /* 0002 SPDX-FileCopyrightText: 2013 Vishesh Handa <me@vhanda.in> 0003 0004 SPDX-License-Identifier: LGPL-2.1-or-later 0005 */ 0006 0007 #ifndef BALOO_FILEMONITOR_H 0008 #define BALOO_FILEMONITOR_H 0009 0010 #include <QObject> 0011 #include <QUrl> 0012 0013 #include "core_export.h" 0014 0015 #include <memory> 0016 0017 namespace Baloo { 0018 0019 /** 0020 * @class FileMonitor filemonitor.h <Baloo/FileMonitor> 0021 */ 0022 class BALOO_CORE_EXPORT FileMonitor : public QObject 0023 { 0024 Q_OBJECT 0025 public: 0026 explicit FileMonitor(QObject* parent = nullptr); 0027 ~FileMonitor() override; 0028 0029 void addFile(const QString& fileUrl); 0030 void addFile(const QUrl& url); 0031 0032 void setFiles(const QStringList& fileList); 0033 0034 QStringList files() const; 0035 0036 void clear(); 0037 0038 Q_SIGNALS: 0039 void fileMetaDataChanged(const QString& fileUrl); 0040 0041 private Q_SLOTS: 0042 BALOO_CORE_NO_EXPORT void slotFileMetaDataChanged(const QStringList& fileUrl); 0043 0044 private: 0045 class Private; 0046 std::unique_ptr<Private> const d; 0047 }; 0048 0049 } 0050 #endif // BALOO_FILEMONITOR_H