digiKam
Loading...
Searching...
No Matches
dbinfoiface.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 : 2017-05-06
7 * Description : interface to database information for shared tools.
8 *
9 * SPDX-FileCopyrightText: 2017-2024 by Gilles Caulier <caulier dot gilles at gmail dot com>
10 * SPDX-FileCopyrightText: 2019-2020 by Minh Nghia Duong <minhnghiaduong997 at gmail dot com>
11 * SPDX-FileCopyrightText: 2017 by Mario Frank <mario dot frank at uni minus potsdam dot de>
12 *
13 * SPDX-License-Identifier: GPL-2.0-or-later
14 *
15 * ============================================================ */
16
17#pragma once
18
19// Local includes
20
21#include "digikam_config.h"
22#include "digikam_globals.h"
23#include "digikam_export.h"
24#include "dinfointerface.h"
25
26namespace Digikam
27{
28
29class Album;
30
31class DIGIKAM_GUI_EXPORT DBInfoIface : public DInfoInterface
32{
33 Q_OBJECT
34
35public:
36
37 explicit DBInfoIface(QObject* const parent,
38 const QList<QUrl>& lst = QList<QUrl>(),
39 const OperationType type = UnspecifiedOps);
40 ~DBInfoIface() override;
41
42public Q_SLOTS:
43
44 void slotDateTimeForUrl(const QUrl& url, const QDateTime& dt, bool updModDate) override;
45 void slotMetadataChangedForUrl(const QUrl& url) override;
46
47public:
48
49 QList<QUrl> currentSelectedItems() const override;
50 QList<QUrl> currentAlbumItems() const override;
51 void parseAlbumItemsRecursive() override;
52
53 QList<QUrl> albumItems(Album* const album) const;
54 QList<QUrl> albumItems(int id) const override;
55 QList<QUrl> albumsItems(const DAlbumIDs&) const override;
56 QList<QUrl> allAlbumItems() const override;
57
58 DInfoMap albumInfo(int) const override;
59
60 DInfoMap itemInfo(const QUrl&) const override;
61 void setItemInfo(const QUrl&, const DInfoMap&) override;
62
63 QWidget* albumChooser(QWidget* const parent) const override;
64 DAlbumIDs albumChooserItems() const override;
65 bool supportAlbums() const override;
66
67 QWidget* uploadWidget(QWidget* const parent) const override;
68 QUrl uploadUrl() const override;
69
70 QUrl defaultUploadUrl() const override;
71
72 QAbstractItemModel* tagFilterModel() override;
73
74 void deleteImage(const QUrl& url) override;
75
76 void openSetupPage(SetupPage page) override;
77
78#ifdef HAVE_GEOLOCATION
79
80 QList<GPSItemContainer*> currentGPSItems() const override;
81
82#endif
83
84 QMap<QString, QString> passShortcutActionsToWidget(QWidget* const wdg) const override;
85
86private:
87
88 class Private;
89 Private* const d = nullptr;
90};
91
92} // namespace Digikam
Abstract base class for all album types.
Definition album.h:57
Definition dbinfoiface.h:32
Definition dinfointerface.h:48
QList< int > DAlbumIDs
List of Album ids.
Definition dinfointerface.h:54
SetupPage
Definition dinfointerface.h:150
QMap< QString, QVariant > DInfoMap
Map of properties name and value.
Definition dinfointerface.h:53
@ Album
Definition coredbfields.h:48
Definition datefolderview.cpp:34
OperationType
Definition digikam_globals.h:161
@ UnspecifiedOps
This element must always come last.
Definition digikam_globals.h:169