digiKam
lighttablewindow.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 : 2007-03-05
7  * Description : digiKam light table GUI
8  *
9  * Copyright (C) 2007-2022 by Gilles Caulier <caulier dot gilles at gmail dot com>
10  *
11  * This program is free software; you can redistribute it
12  * and/or modify it under the terms of the GNU General
13  * Public License as published by the Free Software Foundation;
14  * either version 2, or (at your option)
15  * any later version.
16  *
17  * This program is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20  * GNU General Public License for more details.
21  *
22  * ============================================================ */
23 
24 #ifndef DIGIKAM_LIGHT_TABLE_WINDOW_H
25 #define DIGIKAM_LIGHT_TABLE_WINDOW_H
26 
27 // Qt includes
28 
29 #include <QString>
30 #include <QCloseEvent>
31 #include <QUrl>
32 
33 // Local includes
34 
35 #include "dxmlguiwindow.h"
36 #include "iteminfo.h"
37 
38 namespace Digikam
39 {
40 
42 {
43  Q_OBJECT
44 
45 public:
46 
47  ~LightTableWindow() override;
48 
50  static bool lightTableWindowCreated();
51 
52  void loadItemInfos(const ItemInfoList& list, const ItemInfo& imageInfoCurrent, bool addTo);
53  void setLeftRightItems(const ItemInfoList& list, bool addTo);
54  void refreshView();
55  bool isEmpty() const;
56 
57  void toggleTag(int tagID);
58 
59 public:
60 
61  DInfoInterface* infoIface(DPluginAction* const ac) override;
62 
63 Q_SIGNALS:
64 
66 
67 public Q_SLOTS:
68 
69  void slotFileChanged(const QString& filePath);
70  void slotAssignPickLabel(int pickId);
71  void slotAssignColorLabel(int colorId);
72  void slotAssignRating(int rating);
73 
74 protected:
75 
76  void moveEvent(QMoveEvent* e) override;
77 
78 private:
79 
80  void customizedFullScreenMode(bool set) override;
81  void showSideBars(bool visible) override;
82  void closeEvent(QCloseEvent* e) override;
83  void showEvent(QShowEvent*) override;
84 
85  void deleteItem(bool permanently);
86  void deleteItem(const ItemInfo& info, bool permanently);
87 
88  // Disable
90  explicit LightTableWindow(QWidget*);
91 
92 private Q_SLOTS:
93 
94  void slotBackward();
95  void slotForward();
96  void slotFirst();
97  void slotLast();
98 
99  void slotSetItemLeft();
100  void slotSetItemRight();
101  void slotSetItemOnLeftPanel(const ItemInfo&);
102  void slotSetItemOnRightPanel(const ItemInfo&);
103  void slotLeftDroppedItems(const ItemInfoList&);
104  void slotRightDroppedItems(const ItemInfoList&);
105 
106  void slotLeftPanelLeftButtonClicked();
107  void slotRightPanelLeftButtonClicked();
108 
109  void slotLeftPreviewLoaded(bool);
110  void slotRightPreviewLoaded(bool);
111 
112  void slotLeftZoomFactorChanged(double);
113  void slotRightZoomFactorChanged(double);
114 
115  void slotToggleOnSyncPreview(bool);
116  void slotToggleSyncPreview();
117  void slotToggleNavigateByPair();
118 
119  void slotDeleteItem();
120  void slotDeleteItem(const ItemInfo&);
121 
122  void slotDeleteFinalItem();
123  void slotDeleteFinalItem(const ItemInfo&);
124 
125  void slotRemoveItem();
126  void slotRemoveItem(const ItemInfo&);
127 
128  void slotItemSelected(const ItemInfo&);
129  void slotClearItemsList();
130 
131  void slotThumbbarDroppedItems(const QList<ItemInfo>&);
132 
133  void slotToggleColorManagedView();
134  void slotComponentsInfo() override;
135  void slotDBStat() override;
136  void slotOnlineVersionCheck() override;
137 
138  void slotFileWithDefaultApplication();
139 
140  void slotRefreshStatusBar();
141 
142  void slotToggleLeftSideBar() override;
143  void slotToggleRightSideBar() override;
144  void slotPreviousLeftSideBarTab() override;
145  void slotNextLeftSideBarTab() override;
146  void slotPreviousRightSideBarTab() override;
147  void slotNextRightSideBarTab() override;
148 
149  void slotRightSideBarActivateTitles();
150  void slotRightSideBarActivateComments();
151  void slotRightSideBarActivateAssignedTags();
152  void slotLeftSideBarActivateTitles();
153  void slotLeftSideBarActivateComments();
154  void slotLeftSideBarActivateAssignedTags();
155 
156 // -- Internal setup methods implemented in lighttablewindow_config.cpp ----------------------------------------
157 
158 public:
159 
160  void applySettings();
161 
162 private:
163 
164  void readSettings();
165  void writeSettings();
166 
167 public Q_SLOTS:
168 
169  void slotSetup() override;
171 
172  void slotThemeChanged();
174 
175 // -- Internal setup methods implemented in lighttablewindow_setup.cpp ----------------------------------------
176 
177 private:
178 
179  void setupActions();
180  void setupConnections();
181  void setupUserArea();
182  void setupStatusBar();
183 
184 // -- Extra tool methods implemented in lighttablewindow_tools.cpp ----------------------------------------
185 
186 private Q_SLOTS:
187 
188  void slotEditItem();
189  void slotEditItem(const ItemInfo&);
190 
191  void slotLeftSlideShowManualFromCurrent();
192  void slotRightSlideShowManualFromCurrent();
193  void slotSlideShowLastItemUrl();
194 
195 // -- Import tools methods implemented in lighttablewindow_import.cpp -------------------------------------
196 
197 private Q_SLOTS:
198 
199  void slotImportedImagefromScanner(const QUrl& url);
200 
201 // -- Internal private container --------------------------------------------------------------------
202 
203 private:
204 
205  class Private;
206  Private* const d;
207 
208  static LightTableWindow* m_instance;
209 };
210 
211 } // namespace Digikam
212 
213 #endif // DIGIKAM_LIGHT_TABLE_WINDOW_H
Definition: dinfointerface.h:56
Definition: dpluginaction.h:40
Definition: dxmlguiwindow.h:98
Definition: iteminfolist.h:47
Definition: iteminfo.h:78
Definition: lighttablewindow_p.h:113
Definition: lighttablewindow.h:42
bool isEmpty() const
Definition: lighttablewindow.cpp:193
void slotThemeChanged()
Definition: lighttablewindow_config.cpp:44
void slotApplicationSettingsChanged()
Definition: lighttablewindow_config.cpp:50
static LightTableWindow * lightTableWindow()
Definition: lighttablewindow.cpp:31
void refreshView()
Definition: lighttablewindow.cpp:94
void moveEvent(QMoveEvent *e) override
Definition: lighttablewindow.cpp:958
void slotSetup() override
Definition: lighttablewindow_config.cpp:29
void setLeftRightItems(const ItemInfoList &list, bool addTo)
Definition: lighttablewindow.cpp:410
void slotAssignPickLabel(int pickId)
Definition: lighttablewindow.cpp:969
void toggleTag(int tagID)
Definition: lighttablewindow.cpp:964
void loadItemInfos(const ItemInfoList &list, const ItemInfo &imageInfoCurrent, bool addTo)
Definition: lighttablewindow.cpp:158
DInfoInterface * infoIface(DPluginAction *const ac) override
Definition: lighttablewindow.cpp:1095
void slotAssignRating(int rating)
Definition: lighttablewindow.cpp:979
void slotFileChanged(const QString &filePath)
Definition: lighttablewindow.cpp:206
void applySettings()
Definition: lighttablewindow_config.cpp:96
void slotColorManagementOptionsChanged()
Definition: lighttablewindow_config.cpp:34
static bool lightTableWindowCreated()
Definition: lighttablewindow.cpp:41
void slotAssignColorLabel(int colorId)
Definition: lighttablewindow.cpp:974
~LightTableWindow() override
Definition: lighttablewindow.cpp:84
Definition: datefolderview.cpp:43