digiKam
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  * Copyright (C) 2017-2022 by Gilles Caulier <caulier dot gilles at gmail dot com>
10  * Copyright (C) 2019-2020 by Minh Nghia Duong <minhnghiaduong997 at gmail dot com>
11  * Copyright (C) 2017 by Mario Frank <mario dot frank at uni minus potsdam dot de>
12  *
13  * This program is free software; you can redistribute it
14  * and/or modify it under the terms of the GNU General
15  * Public License as published by the Free Software Foundation;
16  * either version 2, or (at your option)
17  * any later version.
18  *
19  * This program is distributed in the hope that it will be useful,
20  * but WITHOUT ANY WARRANTY; without even the implied warranty of
21  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22  * GNU General Public License for more details.
23  *
24  * ============================================================ */
25 
26 #ifndef DIGIKAM_DB_INFO_IFACE_H
27 #define DIGIKAM_DB_INFO_IFACE_H
28 
29 // Local includes
30 
31 #include "applicationsettings.h"
32 #include "dinfointerface.h"
33 #include "digikam_export.h"
34 
35 namespace Digikam
36 {
37 
38 class Album;
39 
40 class DIGIKAM_GUI_EXPORT DBInfoIface : public DInfoInterface
41 {
42  Q_OBJECT
43 
44 public:
45 
46  explicit DBInfoIface(QObject* const parent,
47  const QList<QUrl>& lst = QList<QUrl>(),
49  ~DBInfoIface() override;
50 
51 public:
52 
53  Q_SLOT void slotDateTimeForUrl(const QUrl& url, const QDateTime& dt, bool updModDate) override;
54  Q_SLOT void slotMetadataChangedForUrl(const QUrl& url) override;
55 
56 public:
57 
58  QList<QUrl> currentSelectedItems() const override;
59  QList<QUrl> currentAlbumItems() const override;
60  void parseAlbumItemsRecursive() override;
61 
62  QList<QUrl> albumItems(Album* const album) const;
63  QList<QUrl> albumItems(int id) const override;
64  QList<QUrl> albumsItems(const DAlbumIDs&) const override;
65  QList<QUrl> allAlbumItems() const override;
66 
67  DInfoMap albumInfo(int) const override;
68 
69  DInfoMap itemInfo(const QUrl&) const override;
70  void setItemInfo(const QUrl&, const DInfoMap&) const override;
71 
72  QWidget* albumChooser(QWidget* const parent) const override;
73  DAlbumIDs albumChooserItems() const override;
74  bool supportAlbums() const override;
75 
76  QWidget* uploadWidget(QWidget* const parent) const override;
77  QUrl uploadUrl() const override;
78 
79  QUrl defaultUploadUrl() const override;
80 
81  QAbstractItemModel* tagFilterModel() override;
82 
83  void deleteImage(const QUrl& url) override;
84 
85  void openSetupPage(SetupPage page) override;
86 
87 #ifdef HAVE_MARBLE
88 
89  QList<GPSItemContainer*> currentGPSItems() const override;
90 
91 #endif
92 
93  QMap<QString, QString> passShortcutActionsToWidget(QWidget* const wdg) const override;
94 
95 private:
96 
97  class Private;
98  Private* const d;
99 };
100 
101 } // namespace Digikam
102 
103 #endif // DIGIKAM_DB_INFO_IFACE_H
Abstract base class for all album types.
Definition: album.h:67
OperationType
Definition: applicationsettings.h:99
@ Unspecified
This element must always come last.
Definition: applicationsettings.h:107
Definition: dbinfoiface.h:41
Definition: dinfointerface.h:56
SetupPage
Definition: dinfointerface.h:158
QMap< QString, QVariant > DInfoMap
Map of properties name and value.
Definition: dinfointerface.h:62
@ Album
Definition: coredbfields.h:58
Definition: datefolderview.cpp:43