digiKam
itemalbumfiltermodel.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 : 2009-03-11
7  * Description : Qt item model for database entries, using AlbumManager
8  *
9  * Copyright (C) 2009-2011 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
10  *
11  * This program is free software; you can redistribute it
12  * and/or modify it under the terms of the GNU General
13  * Public License as published by the Free Software Foundation;
14  * either version 2, or (at your option)
15  * any later version.
16  *
17  * This program is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20  * GNU General Public License for more details.
21  *
22  * ============================================================ */
23 
24 #ifndef DIGIKAM_ITEM_ALBUM_FILTER_MODEL_H
25 #define DIGIKAM_ITEM_ALBUM_FILTER_MODEL_H
26 
27 // Local includes
28 
29 #include "itemfiltermodel.h"
30 
31 namespace Digikam
32 {
33 
34 class Album;
35 class ItemAlbumModel;
36 class ItemAlbumFilterModelPrivate;
37 class FaceTagsIface;
38 
40 {
41  Q_OBJECT
42 
43 public:
44 
45  explicit ItemAlbumFilterModel(QObject* const parent = nullptr);
46  ~ItemAlbumFilterModel() override;
47 
49  ItemAlbumModel* sourceModel() const;
50 
51  void setItemFilterSettings(const ItemFilterSettings& settings) override;
52 
53 protected:
54 
55  int compareInfosCategories(const ItemInfo& left,
56  const ItemInfo& right) const override;
57 
58  int compareInfosCategories(const ItemInfo& left,
59  const ItemInfo& right,
60  const FaceTagsIface& leftFace,
61  const FaceTagsIface& rightFace) const override;
62 
63 protected Q_SLOTS:
64 
65  void slotAlbumRenamed(Album* album);
66  void slotAlbumAdded(Album* album);
67  void slotAlbumAboutToBeDeleted(Album* album);
68  void slotAlbumsCleared();
69 
70 private:
71 
72  void albumChange(Album* album);
73 
74 private Q_SLOTS:
75 
76  void slotDelayedAlbumNamesTimer();
77  void slotDelayedTagNamesTimer();
78 
79 private:
80 
81  Q_DECLARE_PRIVATE(ItemAlbumFilterModel)
82 };
83 
84 } // namespace Digikam
85 
86 #endif // DIGIKAM_ITEM_ALBUM_FILTER_MODEL_H
Abstract base class for all album types.
Definition: album.h:67
Definition: facetagsiface.h:44
Definition: itemalbumfiltermodel.h:40
~ItemAlbumFilterModel() override
Definition: itemalbumfiltermodel.cpp:110
void setSourceItemModel(ItemAlbumModel *model)
Definition: itemalbumfiltermodel.cpp:114
ItemAlbumFilterModel(QObject *const parent=nullptr)
Definition: itemalbumfiltermodel.cpp:68
ItemAlbumModel * sourceModel() const
Definition: itemalbumfiltermodel.cpp:119
int compareInfosCategories(const ItemInfo &left, const ItemInfo &right) const override
Definition: itemalbumfiltermodel.cpp:136
void slotAlbumAdded(Album *album)
Definition: itemalbumfiltermodel.cpp:224
void slotAlbumRenamed(Album *album)
Definition: itemalbumfiltermodel.cpp:219
void setItemFilterSettings(const ItemFilterSettings &settings) override
Definition: itemalbumfiltermodel.cpp:126
void slotAlbumAboutToBeDeleted(Album *album)
Definition: itemalbumfiltermodel.cpp:229
void slotAlbumsCleared()
Definition: itemalbumfiltermodel.cpp:234
Definition: itemalbummodel.h:47
Definition: itemfiltermodel.h:125
Definition: itemfiltersettings.h:98
Definition: iteminfo.h:78
@ Album
Definition: coredbfields.h:58
Definition: datefolderview.cpp:43