File indexing completed on 2025-01-19 03:55:35

0001 /* ============================================================
0002  *
0003  * This file is a part of digiKam project
0004  * https://www.digikam.org
0005  *
0006  * Date        : 2017-05-06
0007  * Description : interface to item information for shared tools
0008  *               based on DMetadata. This interface is used in all cases
0009  *               where no database is available (aka Showfoto).
0010  *
0011  * SPDX-FileCopyrightText: 2017-2024 by Gilles Caulier <caulier dot gilles at gmail dot com>
0012  * SPDX-FileCopyrightText: 2019-2020 by Minh Nghia Duong <minhnghiaduong997 at gmail dot com>
0013  *
0014  * SPDX-License-Identifier: GPL-2.0-or-later
0015  *
0016  * ============================================================ */
0017 
0018 #ifndef DIGIKAM_DMETA_INFO_IFACE_H
0019 #define DIGIKAM_DMETA_INFO_IFACE_H
0020 
0021 // Local includes
0022 
0023 #include "digikam_export.h"
0024 #include "dinfointerface.h"
0025 
0026 namespace Digikam
0027 {
0028 
0029 class DIGIKAM_EXPORT DMetaInfoIface : public DInfoInterface
0030 {
0031     Q_OBJECT
0032 
0033 public:
0034 
0035     explicit DMetaInfoIface(QObject* const, const QList<QUrl>&);
0036     ~DMetaInfoIface()                                             override;
0037 
0038     Q_SLOT void slotDateTimeForUrl(const QUrl& url,
0039                                    const QDateTime& dt,
0040                                    bool updModDate)               override;
0041 
0042     Q_SLOT void slotMetadataChangedForUrl(const QUrl& url)        override;
0043 
0044     Q_SIGNAL void signalItemChanged(const QUrl& url);
0045 
0046 public:
0047 
0048     QList<QUrl> currentSelectedItems()                      const override;
0049     QList<QUrl> currentAlbumItems()                         const override;
0050     QList<QUrl> allAlbumItems()                             const override;
0051     void        parseAlbumItemsRecursive()                        override;
0052 
0053     DInfoMap    itemInfo(const QUrl&)                       const override;
0054     void        setItemInfo(const QUrl&, const DInfoMap&)         override;
0055 
0056     bool        supportAlbums()                             const override;
0057 
0058     QWidget* uploadWidget(QWidget* const parent)            const override;
0059     QUrl     uploadUrl()                                    const override;
0060 
0061     QUrl     defaultUploadUrl()                             const override;
0062     void     deleteImage(const QUrl& url)                         override;
0063 
0064     Q_SIGNAL void signalRemoveImageFromAlbum(const QUrl&);
0065 
0066 #ifdef HAVE_GEOLOCATION
0067 
0068     QList<GPSItemContainer*> currentGPSItems()              const override;
0069 
0070 #endif
0071 
0072 private:
0073 
0074     class Private;
0075     Private* const d;
0076 };
0077 
0078 } // namespace Digikam
0079 
0080 #endif // DIGIKAM_DMETA_INFO_IFACE_H