digiKam
itemiconview_p.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 : 2002-16-10
7  * Description : implementation of item icon view interface.
8  *
9  * Copyright (C) 2002-2005 by Renchi Raju <renchi dot raju at gmail dot com>
10  * Copyright (C) 2002-2022 by Gilles Caulier <caulier dot gilles at gmail dot com>
11  * Copyright (C) 2009-2011 by Johannes Wienke <languitar at semipol dot de>
12  * Copyright (C) 2010-2011 by Andi Clemens <andi dot clemens at gmail dot com>
13  * Copyright (C) 2011-2013 by Michael G. Hansen <mike at mghansen dot de>
14  * Copyright (C) 2014-2015 by Mohamed_Anwer <m_dot_anwer at gmx dot com>
15  * Copyright (C) 2017 by Simon Frei <freisim93 at gmail dot com>
16  *
17  * This program is free software; you can redistribute it
18  * and/or modify it under the terms of the GNU General
19  * Public License as published by the Free Software Foundation;
20  * either version 2, or (at your option)
21  * any later version.
22  *
23  * This program is distributed in the hope that it will be useful,
24  * but WITHOUT ANY WARRANTY; without even the implied warranty of
25  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26  * GNU General Public License for more details.
27  *
28  * ============================================================ */
29 
30 #ifndef DIGIKAM_ITEM_ICON_VIEW_P_H
31 #define DIGIKAM_ITEM_ICON_VIEW_P_H
32 
33 #include "itemiconview.h"
34 
35 // Qt includes
36 
37 #include <QTimer>
38 #include <QShortcut>
39 #include <QApplication>
40 
41 // KDE includes
42 
43 #include <klocalizedstring.h>
44 #include <kconfiggroup.h>
45 #include <ksharedconfig.h>
46 
47 // Local includes
48 
49 #include "digikam_config.h"
50 #include "digikam_debug.h"
51 #include "digikam_globals.h"
52 #include "albumhistory.h"
53 #include "labelstreeview.h"
54 #include "albumpointer.h"
55 #include "coredbsearchxml.h"
56 #include "dbinfoiface.h"
57 #include "digikamapp.h"
58 #include "digikamitemview.h"
59 #include "dfileoperations.h"
60 #include "dmessagebox.h"
61 #include "dzoombar.h"
62 #include "dtrashitemmodel.h"
63 #include "facescansettings.h"
64 #include "facesdetector.h"
65 #include "fileactionmngr.h"
66 #include "fileactionprogress.h"
67 #include "filtersidebarwidget.h"
68 #include "filterstatusbar.h"
69 #include "itemalbummodel.h"
70 #include "itemdescedittab.h"
71 #include "itempreviewview.h"
74 #include "itemthumbnailbar.h"
75 #include "itemviewutilities.h"
78 #include "timelinesidebarwidget.h"
79 #include "searchsidebarwidget.h"
81 #include "labelssidebarwidget.h"
82 #include "peoplesidebarwidget.h"
83 #include "tagviewsidebarwidget.h"
84 #include "loadingcacheinterface.h"
85 #include "metadatahub.h"
86 #include "metaenginesettings.h"
87 #include "metadatasynchronizer.h"
88 #include "newitemsfinder.h"
89 #include "queuemgrwindow.h"
90 #include "scancontroller.h"
91 #include "setup.h"
92 #include "sidebar.h"
93 #include "statusprogressbar.h"
94 #include "tableview.h"
95 #include "tagmodificationhelper.h"
96 #include "tagsactionmngr.h"
97 #include "tagscache.h"
98 #include "tagsmanager.h"
99 #include "thumbsgenerator.h"
100 #include "trashview.h"
101 #include "versionmanagersettings.h"
102 #include "contextmenuhelper.h"
104 #include "dnotificationwidget.h"
105 #include "coredb.h"
106 #include "coredbaccess.h"
107 
108 #ifdef HAVE_MEDIAPLAYER
109 # include "mediaplayerview.h"
110 #endif //HAVE_MEDIAPLAYER
111 
112 #ifdef HAVE_MARBLE
113 #include "gpssearchsidebarwidget.h"
114 # include "mapwidgetview.h"
115 #endif // HAVE_MARBLE
116 
117 namespace Digikam
118 {
119 
120 class Q_DECL_HIDDEN ItemIconView::Private
121 {
122 public:
123 
124  explicit Private()
125  : needDispatchSelection (false),
126  useAlbumHistory (false),
127  initialAlbumID (0),
128  thumbSize (ThumbnailSize::Medium),
129  dockArea (nullptr),
130  splitter (nullptr),
131  selectionTimer (nullptr),
132  thumbSizeTimer (nullptr),
133  msgNotifyTimer (nullptr),
134  albumFolderSideBar (nullptr),
135  tagViewSideBar (nullptr),
136  labelsSideBar (nullptr),
137  dateViewSideBar (nullptr),
138  timelineSideBar (nullptr),
139  searchSideBar (nullptr),
140  fuzzySearchSideBar (nullptr),
141 
142 #ifdef HAVE_MARBLE
143 
144  gpsSearchSideBar (nullptr),
145  mapView (nullptr),
146 
147 #endif // HAVE_MARBLE
148 
149  peopleSideBar (nullptr),
150  parent (nullptr),
151  iconView (nullptr),
152  tableView (nullptr),
153  trashView (nullptr),
154  utilities (nullptr),
155  albumManager (nullptr),
156  albumHistory (nullptr),
157  stackedview (nullptr),
158  lastViewMode (StackedView::IconViewMode),
159  albumModificationHelper (nullptr),
160  tagModificationHelper (nullptr),
161  searchModificationHelper(nullptr),
162  leftSideBar (nullptr),
163  rightSideBar (nullptr),
164  filterWidget (nullptr),
165  optionAlbumViewPrefix (QLatin1String("AlbumView")),
166  modelCollection (nullptr),
167  labelsSearchHandler (nullptr),
168  errorWidget (nullptr)
169  {
170  }
171 
172 public:
173 
174  QString userPresentableAlbumTitle(const QString& title) const
175  {
177  {
178  return i18n("Fuzzy Sketch Search");
179  }
181  {
182  return i18n("Fuzzy Image Search");
183  }
185  {
186  return i18n("Map Search");
187  }
190  {
191  return i18n("Last Search");
192  }
194  {
195  return i18n("Timeline");
196  }
197 
198  return title;
199  }
200 
201  void addPageUpDownActions(ItemIconView* const q, QWidget* const w)
202  {
203  defineShortcut(w, Qt::Key_PageDown, q, SLOT(slotNextItem()));
204  defineShortcut(w, Qt::Key_Down, q, SLOT(slotNextItem()));
205  defineShortcut(w, Qt::Key_Right, q, SLOT(slotNextItem()));
206 
207  defineShortcut(w, Qt::Key_PageUp, q, SLOT(slotPrevItem()));
208  defineShortcut(w, Qt::Key_Up, q, SLOT(slotPrevItem()));
209  defineShortcut(w, Qt::Key_Left, q, SLOT(slotPrevItem()));
210  }
211 
212 public:
213 
216 
219 
220  QMainWindow* dockArea;
221 
223 
224  QTimer* selectionTimer;
225  QTimer* thumbSizeTimer;
226  QTimer* msgNotifyTimer;
227 
228  // left side bar
229 
237 
238 #ifdef HAVE_MARBLE
239 
240  GPSSearchSideBarWidget* gpsSearchSideBar;
241  MapWidgetView* mapView;
242 
243 #endif // HAVE_MARBLE
244 
255 
259 
262 
264 
266 
268 
272 };
273 
274 } // namespace Digikam
275 
276 #endif // DIGIKAM_ITEM_ICON_VIEW_P_H
Definition: albumfolderviewsidebarwidget.h:43
Definition: albumhistory.h:54
Definition: albumlabelssearchhandler.h:34
Definition: albummanager.h:73
Definition: albummodificationhelper.h:46
Definition: dmodelfactory.h:49
Definition: dnotificationwidget.h:48
Definition: datefolderviewsidebarwidget.h:43
Definition: digikamapp.h:56
Definition: digikamitemview.h:43
Definition: filtersidebarwidget.h:64
Definition: fuzzysearchsidebarwidget.h:41
Definition: gpssearchsidebarwidget.h:43
Definition: itemiconview_p.h:121
QString userPresentableAlbumTitle(const QString &title) const
Definition: itemiconview_p.h:174
TrashView * trashView
Definition: itemiconview_p.h:249
DateFolderViewSideBarWidget * dateViewSideBar
Definition: itemiconview_p.h:233
DNotificationWidget * errorWidget
Definition: itemiconview_p.h:271
AlbumModificationHelper * albumModificationHelper
Definition: itemiconview_p.h:256
TagViewSideBarWidget * tagViewSideBar
Definition: itemiconview_p.h:231
AlbumLabelsSearchHandler * labelsSearchHandler
Definition: itemiconview_p.h:270
QTimer * thumbSizeTimer
Definition: itemiconview_p.h:225
TableView * tableView
Definition: itemiconview_p.h:248
QTimer * msgNotifyTimer
Definition: itemiconview_p.h:226
Private()
Definition: itemiconview_p.h:124
Sidebar * leftSideBar
Definition: itemiconview_p.h:260
FuzzySearchSideBarWidget * fuzzySearchSideBar
Definition: itemiconview_p.h:236
AlbumHistory * albumHistory
Definition: itemiconview_p.h:252
ItemPropertiesSideBarDB * rightSideBar
Definition: itemiconview_p.h:261
FilterSideBarWidget * filterWidget
Definition: itemiconview_p.h:263
void addPageUpDownActions(ItemIconView *const q, QWidget *const w)
Definition: itemiconview_p.h:201
DigikamItemView * iconView
Definition: itemiconview_p.h:247
QTimer * selectionTimer
Definition: itemiconview_p.h:224
QList< SidebarWidget * > leftSideBarWidgets
Definition: itemiconview_p.h:267
DModelFactory * modelCollection
Definition: itemiconview_p.h:269
SearchSideBarWidget * searchSideBar
Definition: itemiconview_p.h:235
AlbumManager * albumManager
Definition: itemiconview_p.h:251
int thumbSize
Definition: itemiconview_p.h:218
SidebarSplitter * splitter
Definition: itemiconview_p.h:222
QMainWindow * dockArea
Definition: itemiconview_p.h:220
LabelsSideBarWidget * labelsSideBar
Definition: itemiconview_p.h:232
bool needDispatchSelection
Definition: itemiconview_p.h:214
ItemViewUtilities * utilities
Definition: itemiconview_p.h:250
TagModificationHelper * tagModificationHelper
Definition: itemiconview_p.h:257
AlbumFolderViewSideBarWidget * albumFolderSideBar
Definition: itemiconview_p.h:230
SearchModificationHelper * searchModificationHelper
Definition: itemiconview_p.h:258
QString optionAlbumViewPrefix
Definition: itemiconview_p.h:265
int initialAlbumID
Definition: itemiconview_p.h:217
StackedView::StackedViewMode lastViewMode
Definition: itemiconview_p.h:254
DigikamApp * parent
Definition: itemiconview_p.h:246
bool useAlbumHistory
Definition: itemiconview_p.h:215
PeopleSideBarWidget * peopleSideBar
Definition: itemiconview_p.h:245
StackedView * stackedview
Definition: itemiconview_p.h:253
TimelineSideBarWidget * timelineSideBar
Definition: itemiconview_p.h:234
Definition: itemiconview.h:60
Definition: itempropertiessidebardb.h:55
Definition: itemviewutilities.h:44
Definition: labelssidebarwidget.h:40
Class containing digiKam's central map view.
Definition: mapwidgetview.h:51
Definition: peoplesidebarwidget.h:40
static QString getTemporaryTitle(DatabaseSearch::Type type, DatabaseSearch::HaarSearchType haarType=DatabaseSearch::HaarImageSearch)
Definition: album.cpp:764
static QString getTemporaryHaarTitle(DatabaseSearch::HaarSearchType haarType)
Definition: album.cpp:791
Definition: searchmodificationhelper.h:59
Definition: searchsidebarwidget.h:41
Definition: sidebar.h:480
Definition: sidebar.h:333
Definition: stackedview.h:64
StackedViewMode
Definition: stackedview.h:70
Definition: tableview.h:56
Definition: tagmodificationhelper.h:53
Definition: tagviewsidebarwidget.h:43
Definition: thumbnailsize.h:42
Definition: timelinesidebarwidget.h:43
Definition: trashview.h:38
Definition: piwigotalker.h:48
@ HaarSketchSearch
Definition: coredbconstants.h:74
@ HaarImageSearch
Definition: coredbconstants.h:73
@ KeywordSearch
Definition: coredbconstants.h:62
@ AdvancedSearch
Definition: coredbconstants.h:63
@ TimeLineSearch
Definition: coredbconstants.h:65
@ MapSearch
Definition: coredbconstants.h:67
Definition: datefolderview.cpp:43
QShortcut * defineShortcut(QWidget *const w, const QKeySequence &key, const QObject *receiver, const char *slot)
Definition: digikam_globals.cpp:29