File indexing completed on 2025-01-05 03:53:48
0001 /* ============================================================ 0002 * 0003 * This file is a part of digiKam project 0004 * https://www.digikam.org 0005 * 0006 * Date : 2011-11-07 0007 * Description : Directory watch interface 0008 * 0009 * SPDX-FileCopyrightText: 2011 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de> 0010 * SPDX-FileCopyrightText: 2015-2024 by Gilles Caulier <caulier dot gilles at gmail dot com> 0011 * 0012 * SPDX-License-Identifier: GPL-2.0-or-later 0013 * 0014 * ============================================================ */ 0015 0016 #ifndef DIGIKAM_ALBUM_WATCH_H 0017 #define DIGIKAM_ALBUM_WATCH_H 0018 0019 // Qt includes 0020 0021 #include <QObject> 0022 #include <QString> 0023 #include <QUrl> 0024 0025 namespace Digikam 0026 { 0027 0028 class Album; 0029 class PAlbum; 0030 class AlbumManager; 0031 class DbEngineParameters; 0032 0033 class AlbumWatch : public QObject 0034 { 0035 Q_OBJECT 0036 0037 public: 0038 0039 explicit AlbumWatch(AlbumManager* const parent = nullptr); 0040 ~AlbumWatch() override; 0041 0042 void clear(); 0043 void removeWatchedPAlbums(const PAlbum* const album); 0044 void setDbEngineParameters(const DbEngineParameters& params); 0045 0046 protected Q_SLOTS: 0047 0048 void slotAlbumAdded(Album* album); 0049 void slotAlbumAboutToBeDeleted(Album* album); 0050 void slotQFSWatcherDirty(const QString& path); 0051 0052 private: 0053 0054 void rescanDirectory(const QString& dir); 0055 0056 private: 0057 0058 class Private; 0059 Private* const d; 0060 }; 0061 0062 } // namespace Digikam 0063 0064 #endif // DIGIKAM_ALBUM_WATCH_H