File indexing completed on 2025-01-19 03:53:47

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 database information for shared tools.
0008  *
0009  * SPDX-FileCopyrightText: 2017-2024 by Gilles Caulier <caulier dot gilles at gmail dot com>
0010  * SPDX-FileCopyrightText: 2019-2020 by Minh Nghia Duong <minhnghiaduong997 at gmail dot com>
0011  * SPDX-FileCopyrightText: 2017      by Mario Frank <mario dot frank at uni minus potsdam dot de>
0012  *
0013  * SPDX-License-Identifier: GPL-2.0-or-later
0014  *
0015  * ============================================================ */
0016 
0017 #ifndef DIGIKAM_DB_INFO_IFACE_H
0018 #define DIGIKAM_DB_INFO_IFACE_H
0019 
0020 // Local includes
0021 
0022 #include "applicationsettings.h"
0023 #include "dinfointerface.h"
0024 #include "digikam_export.h"
0025 
0026 namespace Digikam
0027 {
0028 
0029 class Album;
0030 
0031 class DIGIKAM_GUI_EXPORT DBInfoIface : public DInfoInterface
0032 {
0033     Q_OBJECT
0034 
0035 public:
0036 
0037     explicit DBInfoIface(QObject* const parent,
0038                          const QList<QUrl>& lst = QList<QUrl>(),
0039                          const ApplicationSettings::OperationType type = ApplicationSettings::Unspecified);
0040     ~DBInfoIface()                                                                        override;
0041 
0042 public:
0043 
0044     Q_SLOT void slotDateTimeForUrl(const QUrl& url, const QDateTime& dt, bool updModDate) override;
0045     Q_SLOT void slotMetadataChangedForUrl(const QUrl& url)                                override;
0046 
0047 public:
0048 
0049     QList<QUrl> currentSelectedItems()                                              const override;
0050     QList<QUrl> currentAlbumItems()                                                 const override;
0051     void        parseAlbumItemsRecursive()                                                override;
0052 
0053     QList<QUrl> albumItems(Album* const album)                                      const;
0054     QList<QUrl> albumItems(int id)                                                  const override;
0055     QList<QUrl> albumsItems(const DAlbumIDs&)                                       const override;
0056     QList<QUrl> allAlbumItems()                                                     const override;
0057 
0058     DInfoMap    albumInfo(int)                                                      const override;
0059 
0060     DInfoMap    itemInfo(const QUrl&)                                               const override;
0061     void        setItemInfo(const QUrl&, const DInfoMap&)                                 override;
0062 
0063     QWidget*    albumChooser(QWidget* const parent)                                 const override;
0064     DAlbumIDs   albumChooserItems()                                                 const override;
0065     bool        supportAlbums()                                                     const override;
0066 
0067     QWidget*    uploadWidget(QWidget* const parent)                                 const override;
0068     QUrl        uploadUrl()                                                         const override;
0069 
0070     QUrl        defaultUploadUrl()                                                  const override;
0071 
0072     QAbstractItemModel* tagFilterModel()                                                  override;
0073 
0074     void        deleteImage(const QUrl& url)                                              override;
0075 
0076     void        openSetupPage(SetupPage page)                                             override;
0077 
0078 #ifdef HAVE_GEOLOCATION
0079 
0080     QList<GPSItemContainer*> currentGPSItems()                                      const override;
0081 
0082 #endif
0083 
0084     QMap<QString, QString> passShortcutActionsToWidget(QWidget* const wdg)          const override;
0085 
0086 private:
0087 
0088     class Private;
0089     Private* const d;
0090 };
0091 
0092 } // namespace Digikam
0093 
0094 #endif // DIGIKAM_DB_INFO_IFACE_H