File indexing completed on 2025-01-05 03:54:11

0001 /* ============================================================
0002  *
0003  * This file is a part of digiKam project
0004  * https://www.digikam.org
0005  *
0006  * Date        : 2010-12-06
0007  * Description : An item model based on a static list
0008  *
0009  * SPDX-FileCopyrightText: 2010-2011 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
0010  *
0011  * SPDX-License-Identifier: GPL-2.0-or-later
0012  *
0013  * ============================================================ */
0014 
0015 #ifndef DIGIKAM_ITEM_LIST_MODEL_H
0016 #define DIGIKAM_ITEM_LIST_MODEL_H
0017 
0018 // Local includes
0019 
0020 #include "itemthumbnailmodel.h"
0021 #include "digikam_export.h"
0022 
0023 namespace Digikam
0024 {
0025 
0026 class ImageChangeset;
0027 class CollectionImageChangeset;
0028 
0029 class DIGIKAM_DATABASE_EXPORT ItemListModel : public ItemThumbnailModel
0030 {
0031     Q_OBJECT
0032 
0033 public:
0034 
0035     explicit ItemListModel(QWidget* const parent);
0036     ~ItemListModel() override;
0037 
0038     // NOTE: necessary methods to add and remove ItemInfos to the model are inherited from ItemModel
0039 
0040 Q_SIGNALS:
0041 
0042     /**
0043      * Emitted when images are removed from the model because they are removed in the database
0044      */
0045     void imageInfosRemoved(const QList<ItemInfo>& infos);
0046 
0047 protected Q_SLOTS:
0048 
0049     void slotCollectionImageChange(const CollectionImageChangeset& changeset);
0050 };
0051 
0052 } // namespace Digikam
0053 
0054 #endif // DIGIKAM_ITEM_LIST_MODEL_H