digiKam
itempropertiessidebardb.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 : 2004-11-17
7  * Description : item properties side bar using data from digiKam database.
8  *
9  * Copyright (C) 2004-2022 by Gilles Caulier <caulier dot gilles at gmail dot com>
10  * Copyright (C) 2007-2012 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
11  *
12  * This program is free software; you can redistribute it
13  * and/or modify it under the terms of the GNU General
14  * Public License as published by the Free Software Foundation;
15  * either version 2, or (at your option)
16  * any later version.
17  *
18  * This program is distributed in the hope that it will be useful,
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21  * GNU General Public License for more details.
22  *
23  * ============================================================ */
24 
25 #ifndef DIGIKAM_ITEM_PROPERTIES_SIDEBAR_DB_H
26 #define DIGIKAM_ITEM_PROPERTIES_SIDEBAR_DB_H
27 
28 // Qt includes
29 
30 #include <QUrl>
31 #include <QWidget>
32 #include <QRect>
33 
34 // Local includes
35 
36 #include "dimagehistory.h"
37 #include "iteminfolist.h"
38 #include "itempropertiessidebar.h"
39 #include "digikam_export.h"
40 #include "digikam_config.h"
41 
42 namespace Digikam
43 {
44 
45 class DImg;
46 class SidebarSplitter;
47 class ItemInfo;
48 class ImageChangeset;
49 class ItemDescEditTab;
50 class ImageTagChangeset;
51 class ItemPropertiesVersionsTab;
52 class GPSItemInfo;
53 
55 {
56  Q_OBJECT
57 
58 public:
59 
60  explicit ItemPropertiesSideBarDB(QWidget* const parent,
62  Qt::Edge side=Qt::LeftEdge,
63  bool mimimizedDefault=false);
64  ~ItemPropertiesSideBarDB() override;
65 
66  void populateTags();
67  void refreshTagsView();
68 
72 
73  void itemChanged(const QUrl& url, const QRect& rect = QRect(), DImg* const img = nullptr) override;
74 
75  virtual void itemChanged(const ItemInfo& info, const QRect& rect = QRect(),
76  DImg* const img = nullptr, const DImageHistory& history = DImageHistory());
77 
78  virtual void itemChanged(const ItemInfoList& infos, const ItemInfoList& allInfos);
79 
80 
81 #ifdef HAVE_MARBLE
82 
83  static bool GPSItemInfofromItemInfo(const ItemInfo&, GPSItemInfo* const);
84 
85 #endif // HAVE_MARBLE
86 
87 Q_SIGNALS:
88 
93 
94 public Q_SLOTS:
95 
96  void slotAssignRating(int rating);
103 
104  void slotPopupTagsView();
105 
106  void slotNoCurrentItem() override;
107 
108 private Q_SLOTS:
109 
110  void slotChangedTab(QWidget* tab) override;
111  void slotFileMetadataChanged(const QUrl& url);
112  void slotImageChangeDatabase(const ImageChangeset& changeset);
113  void slotImageTagChanged(const ImageTagChangeset& changeset);
114 
115 private:
116 
117  void itemChanged(const QUrl& url, const ItemInfo& info,
118  const QRect& rect, DImg* const img, const DImageHistory& history);
119  void itemChanged(const ItemInfoList& infos, const ItemInfoList& allInfos,
120  const QRect& rect, DImg* const img, const DImageHistory& history);
121  void setImagePropertiesInformation(const QUrl& url) override;
122  void setImageSelectionPropertiesInformation();
123 
124 protected:
125 
129  void doLoadState() override;
130 
134  void doSaveState() override;
135 
136 private:
137 
138  class Private;
139  Private* const d;
140 };
141 
142 } // namespace Digikam
143 
144 #endif // DIGIKAM_ITEM_PROPERTIES_SIDEBAR_DB_H
Definition: dimagehistory.h:49
Definition: dimg.h:62
DMultiTabBarTab * tab(int id) const
Definition: sidebar_dmultitabbar.cpp:130
Definition: gpsiteminfo.h:43
Definition: coredbchangesets.h:48
Definition: coredbchangesets.h:80
Definition: itemdescedittab.h:53
Definition: iteminfolist.h:47
Definition: iteminfo.h:78
Definition: itempropertiessidebardb.h:55
void slotAssignRatingThreeStar()
Definition: itempropertiessidebardb.cpp:518
void populateTags()
Definition: itempropertiessidebardb.cpp:225
void slotAssignRatingFiveStar()
Definition: itempropertiessidebardb.cpp:528
void slotAssignRatingNoStar()
Definition: itempropertiessidebardb.cpp:503
void slotAssignRating(int rating)
Definition: itempropertiessidebardb.cpp:498
void slotAssignRatingFourStar()
Definition: itempropertiessidebardb.cpp:523
ItemDescEditTab * imageDescEditTab() const
Definition: itempropertiessidebardb.cpp:721
void slotPopupTagsView()
Definition: itempropertiessidebardb.cpp:750
void slotAssignRatingTwoStar()
Definition: itempropertiessidebardb.cpp:513
void itemChanged(const QUrl &url, const QRect &rect=QRect(), DImg *const img=nullptr) override
Definition: itempropertiessidebardb.cpp:141
ItemPropertiesVersionsTab * getFiltersHistoryTab() const
This is for image editor to be able to update the filter list in sidebar.
Definition: itempropertiessidebardb.cpp:716
~ItemPropertiesSideBarDB() override
Definition: itempropertiessidebardb.cpp:130
void doLoadState() override
Definition: itempropertiessidebardb.cpp:726
void refreshTagsView()
Definition: itempropertiessidebardb.cpp:533
ItemPropertiesSideBarDB(QWidget *const parent, SidebarSplitter *const splitter, Qt::Edge side=Qt::LeftEdge, bool mimimizedDefault=false)
Definition: itempropertiessidebardb.cpp:95
void doSaveState() override
Definition: itempropertiessidebardb.cpp:738
void slotNoCurrentItem() override
Definition: itempropertiessidebardb.cpp:213
void slotAssignRatingOneStar()
Definition: itempropertiessidebardb.cpp:508
Definition: itempropertiessidebar.h:58
Definition: itempropertiesversionstab.h:51
Definition: sidebar.h:480
SidebarSplitter * splitter() const
Definition: sidebar.cpp:62
Definition: datefolderview.cpp:43