digiKam
albumwatch.h
Go to the documentation of this file.
1 /* ============================================================
2  *
3  * This file is a part of digiKam project
4  * https://www.digikam.org
5  *
6  * Date : 2011-11-07
7  * Description : Directory watch interface
8  *
9  * Copyright (C) 2011 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
10  * Copyright (C) 2015-2022 by Gilles Caulier <caulier dot gilles at gmail dot com>
11  *
12  * This program is free software; you can redistribute it
13  * and/or modify it under the terms of the GNU General
14  * Public License as published by the Free Software Foundation;
15  * either version 2, or (at your option)
16  * any later version.
17  *
18  * This program is distributed in the hope that it will be useful,
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21  * GNU General Public License for more details.
22  *
23  * ============================================================ */
24 
25 #ifndef DIGIKAM_ALBUM_WATCH_H
26 #define DIGIKAM_ALBUM_WATCH_H
27 
28 // Qt includes
29 
30 #include <QObject>
31 #include <QString>
32 #include <QUrl>
33 
34 namespace Digikam
35 {
36 
37 class Album;
38 class PAlbum;
39 class AlbumManager;
40 class DbEngineParameters;
41 
42 class AlbumWatch : public QObject
43 {
44  Q_OBJECT
45 
46 public:
47 
48  explicit AlbumWatch(AlbumManager* const parent = nullptr);
49  ~AlbumWatch() override;
50 
51  void clear();
52  void removeWatchedPAlbums(const PAlbum* const album);
53  void setDbEngineParameters(const DbEngineParameters& params);
54 
55 protected Q_SLOTS:
56 
57  void slotAlbumAdded(Album* album);
58  void slotAlbumAboutToBeDeleted(Album* album);
59  void slotQFSWatcherDirty(const QString& path);
60 
61 private:
62 
63  void rescanDirectory(const QString& dir);
64 
65 private:
66 
67  class Private;
68  Private* const d;
69 };
70 
71 } // namespace Digikam
72 
73 #endif // DIGIKAM_ALBUM_WATCH_H
Definition: albummanager.h:73
Definition: albumwatch.h:43
AlbumWatch(AlbumManager *const parent=nullptr)
Definition: albumwatch.cpp:157
void setDbEngineParameters(const DbEngineParameters &params)
Definition: albumwatch.cpp:220
void slotQFSWatcherDirty(const QString &path)
Definition: albumwatch.cpp:300
void slotAlbumAboutToBeDeleted(Album *album)
Definition: albumwatch.cpp:270
~AlbumWatch() override
Definition: albumwatch.cpp:191
void removeWatchedPAlbums(const PAlbum *const album)
Definition: albumwatch.cpp:204
void slotAlbumAdded(Album *album)
Definition: albumwatch.cpp:245
void clear()
Definition: albumwatch.cpp:196
Abstract base class for all album types.
Definition: album.h:67
Definition: dbengineparameters.h:49
Definition: album.h:357
@ Album
Definition: coredbfields.h:58
Definition: datefolderview.cpp:43