digiKam
importui_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 : 2004-09-16
7  * Description : Camera interface
8  *
9  * Copyright (C) 2004-2005 by Renchi Raju <renchi dot raju at gmail dot com>
10  * Copyright (C) 2006-2022 by Gilles Caulier <caulier dot gilles at gmail dot com>
11  * Copyright (C) 2006-2011 by Marcel Wiesweg <marcel dot wiesweg at gmx 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_IMPORTUI_PRIVATE_H
27 #define DIGIKAM_IMPORTUI_PRIVATE_H
28 
29 #include "importui.h"
30 
31 // Qt includes
32 
33 #include <QCheckBox>
34 #include <QCloseEvent>
35 #include <QDir>
36 #include <QFile>
37 #include <QFileInfo>
38 #include <QFrame>
39 #include <QGridLayout>
40 #include <QGroupBox>
41 #include <QHBoxLayout>
42 #include <QKeyEvent>
43 #include <QLabel>
44 #include <QLineEdit>
45 #include <QPixmap>
46 #include <QPointer>
47 #include <QPushButton>
48 #include <QRadioButton>
49 #include <QScrollArea>
50 #include <QSplitter>
51 #include <QTimer>
52 #include <QToolButton>
53 #include <QVBoxLayout>
54 #include <QWidget>
55 #include <QKeySequence>
56 #include <QInputDialog>
57 #include <QMenuBar>
58 #include <QMenu>
59 #include <QIcon>
60 #include <QMessageBox>
61 #include <QStatusBar>
62 #include <QApplication>
63 #include <QActionGroup>
64 #include <QLocale>
65 #include <QDateTime>
66 #include <QString>
67 #include <QUrl>
68 
69 // KDE includes
70 
71 #if !defined(Q_OS_DARWIN) && defined(Q_CC_GNU)
72 # pragma GCC diagnostic push
73 # pragma GCC diagnostic ignored "-Wdeprecated-declarations"
74 #endif
75 
76 #if defined(Q_CC_CLANG)
77 # pragma clang diagnostic push
78 # pragma clang diagnostic ignored "-Wdeprecated-declarations"
79 #endif
80 
81 #include <klocalizedstring.h>
82 #include <kactioncollection.h>
83 #include <kconfiggroup.h>
84 #include <ksharedconfig.h>
85 #include <kselectaction.h>
86 
87 // Restore warnings
88 #if !defined(Q_OS_DARWIN) && defined(Q_CC_GNU)
89 # pragma GCC diagnostic pop
90 #endif
91 
92 #if defined(Q_CC_CLANG)
93 # pragma clang diagnostic pop
94 #endif
95 
96 // Local includes
97 
98 #include "digikam_config.h"
99 #include "digikam_debug.h"
100 #include "digikam_globals.h"
101 #include "drawdecoder.h"
102 #include "dlayoutbox.h"
103 #include "dexpanderbox.h"
104 #include "dfileselector.h"
105 #include "cameramessagebox.h"
106 #include "advancedrenamemanager.h"
107 #include "album.h"
108 #include "albummanager.h"
109 #include "applicationsettings.h"
110 #include "albumselectdialog.h"
111 #include "cameracontroller.h"
112 #include "camerafolderdialog.h"
113 #include "camerainfodialog.h"
114 #include "cameralist.h"
115 #include "cameranamehelper.h"
116 #include "cameratype.h"
117 #include "capturedlg.h"
118 #include "collectionlocation.h"
119 #include "collectionmanager.h"
120 #include "componentsinfodlg.h"
121 #include "dlogoaction.h"
122 #include "coredbdownloadhistory.h"
123 #include "dzoombar.h"
124 #include "fileactionmngr.h"
125 #include "freespacewidget.h"
126 #include "iccsettings.h"
128 #include "importsettings.h"
129 #include "importview.h"
130 #include "imagedialog.h"
131 #include "dnotificationwrapper.h"
132 #include "parsesettings.h"
133 #include "renamecustomizer.h"
134 #include "scancontroller.h"
135 #include "setup.h"
136 #include "sidebar.h"
137 #include "statusprogressbar.h"
138 #include "thememanager.h"
139 #include "thumbnailsize.h"
140 #include "importthumbnailmodel.h"
141 #include "itempropertiestab.h"
142 #include "camerathumbsctrl.h"
143 #include "importfiltercombobox.h"
144 #include "albumcustomizer.h"
145 #include "advancedsettings.h"
146 #include "dngconvertsettings.h"
147 #include "scriptingsettings.h"
148 #include "filterstatusbar.h"
149 #include "dnotificationwidget.h"
150 
151 namespace Digikam
152 {
153 
154 class Q_DECL_HIDDEN ImportUI::Private
155 {
156 public:
157 
159  : deleteAfter (false),
160  busy (false),
161  closed (false),
162  downloadMenu (nullptr),
163  deleteMenu (nullptr),
164  imageMenu (nullptr),
165  cameraCancelAction (nullptr),
166  cameraCaptureAction (nullptr),
167  cameraInfoAction (nullptr),
168  increaseThumbsAction (nullptr),
169  decreaseThumbsAction (nullptr),
170  zoomFitToWindowAction (nullptr),
171  zoomTo100percents (nullptr),
172  deleteAction (nullptr),
173  deleteNewAction (nullptr),
174  deleteAllAction (nullptr),
175  deleteSelectedAction (nullptr),
176  downloadAction (nullptr),
177  downloadNewAction (nullptr),
178  downloadAllAction (nullptr),
179  downloadSelectedAction (nullptr),
180  downloadDelNewAction (nullptr),
181  downloadDelAllAction (nullptr),
182  downloadDelSelectedAction (nullptr),
183  lockAction (nullptr),
184  selectAllAction (nullptr),
185  selectInvertAction (nullptr),
186  selectLockedItemsAction (nullptr),
187  selectNewItemsAction (nullptr),
188  selectNoneAction (nullptr),
189  uploadAction (nullptr),
190  markAsDownloadedAction (nullptr),
191  resumeAction (nullptr),
192  pauseAction (nullptr),
193  connectAction (nullptr),
194  itemSortAction (nullptr),
195  itemSortOrderAction (nullptr),
196  itemsGroupAction (nullptr),
197  showPreferencesAction (nullptr),
198  showLogAction (nullptr),
199  showBarAction (nullptr),
200  imageViewSelectionAction (nullptr),
201  iconViewAction (nullptr),
202  camItemPreviewAction (nullptr),
203 
204 #ifdef HAVE_MARBLE
205 
206  mapViewAction (nullptr),
207 
208 #endif // HAVE_MARBLE
209 
210  viewCMViewAction (nullptr),
211  cameraActions (nullptr),
212  advBox (nullptr),
213  splitter (nullptr),
214  camThumbsCtrl (nullptr),
215  controller (nullptr),
216 /*
217  //historyUpdater (0),
218 */
219  view (nullptr),
220  renameCustomizer (nullptr),
221  albumCustomizer (nullptr),
222  advancedSettings (nullptr),
223  dngConvertSettings (nullptr),
224  scriptingSettings (nullptr),
225  filterStatusBar (nullptr),
226  rightSideBar (nullptr),
227  zoomBar (nullptr),
228  statusProgressBar (nullptr),
229  albumLibraryFreeSpace (nullptr),
230  cameraFreeSpace (nullptr),
231  progressTimer (nullptr),
232  progressValue (0),
233  historyView (nullptr),
234  filterComboBox (nullptr),
235  errorWidget (nullptr)
236  {
237  }
238 
239  static const QString configGroupName;
240  static const QString configUseFileMetadata;
241  static const QString configUseDefaultTargetAlbum;
242  static const QString configLastTargetAlbum;
243  static const QString configDefaultTargetAlbumId;
244  static const QString configFileSaveConflictRule;
245  static const QString importFiltersConfigGroupName;
246 
248  bool busy;
249  bool closed;
250 
251  QString cameraTitle;
252 
253  QStringList autoRotateItemsList;
254  QStringList currentlyDeleting;
255 
256  QMenu* downloadMenu;
257  QMenu* deleteMenu;
258  QMenu* imageMenu;
259 
267  QMenu* deleteAction;
268  QAction* deleteNewAction;
269  QAction* deleteAllAction;
278  QAction* lockAction;
279  QAction* selectAllAction;
284  QAction* uploadAction;
286  QAction* resumeAction;
287  QAction* pauseAction;
288  QAction* connectAction;
289  KSelectAction* itemSortAction;
290  KSelectAction* itemSortOrderAction;
291  KSelectAction* itemsGroupAction;
293  QAction* showLogAction;
294  QAction* showBarAction;
295  KSelectAction* imageViewSelectionAction;
296  QAction* iconViewAction;
298 
299 #ifdef HAVE_MARBLE
300 
301  QAction* mapViewAction;
302 
303 #endif // HAVE_MARBLE
304 
306 
307  QActionGroup* cameraActions;
308 
310 
312 
314 
317 /*
318  CameraHistoryUpdater* historyUpdater;
319 */
321 
327 
330 
333 
336 
337  QTimer* progressTimer;
338 
340 
343 /*
344  CHUpdateItemMap map;
345 */
347 };
348 
349 const QString ImportUI::Private::configGroupName(QLatin1String("Camera Settings"));
350 const QString ImportUI::Private::configUseFileMetadata(QLatin1String("UseFileMetadata"));
351 const QString ImportUI::Private::configUseDefaultTargetAlbum(QLatin1String("UseDefaultTargetAlbum"));
352 const QString ImportUI::Private::configLastTargetAlbum(QLatin1String("LastTargetAlbum"));
353 const QString ImportUI::Private::configDefaultTargetAlbumId(QLatin1String("DefaultTargetAlbumId"));
354 const QString ImportUI::Private::configFileSaveConflictRule(QLatin1String("FileSaveConflictRule"));
355 const QString ImportUI::Private::importFiltersConfigGroupName(QLatin1String("Import Filters"));
356 
357 } // namespace Digikam
358 
359 #endif // DIGIKAM_IMPORTUI_PRIVATE_H
Definition: advancedsettings.h:42
Definition: albumcustomizer.h:42
Definition: cameracontroller.h:51
Definition: camerathumbsctrl.h:48
Definition: dexpanderbox.h:244
Definition: dhistoryview.h:42
Definition: dngconvertsettings.h:42
Definition: dnotificationwidget.h:48
Definition: dzoombar.h:42
Definition: filterstatusbar.h:39
Definition: freespacewidget.h:36
Definition: importfiltercombobox.h:41
Definition: importitempropertiessidebar.h:46
Definition: importui_p.h:155
RenameCustomizer * renameCustomizer
Definition: importui_p.h:322
QMenu * deleteAction
Definition: importui_p.h:267
QMenu * downloadMenu
Definition: importui_p.h:256
QAction * downloadDelAllAction
Definition: importui_p.h:276
QAction * pauseAction
Definition: importui_p.h:287
float progressValue
Definition: importui_p.h:339
AdvancedSettings * advancedSettings
Definition: importui_p.h:324
QAction * downloadAllAction
Definition: importui_p.h:273
QAction * cameraCaptureAction
Definition: importui_p.h:261
QAction * markAsDownloadedAction
Definition: importui_p.h:285
QTimer * progressTimer
Definition: importui_p.h:337
QMenu * imageMenu
Definition: importui_p.h:258
FreeSpaceWidget * albumLibraryFreeSpace
Definition: importui_p.h:334
QMenu * deleteMenu
Definition: importui_p.h:257
DNGConvertSettings * dngConvertSettings
Definition: importui_p.h:325
SidebarSplitter * splitter
Definition: importui_p.h:313
QAction * increaseThumbsAction
Definition: importui_p.h:263
QAction * connectAction
Definition: importui_p.h:288
QAction * downloadNewAction
Definition: importui_p.h:272
QMenu * downloadAction
Definition: importui_p.h:271
QAction * decreaseThumbsAction
Definition: importui_p.h:264
KSelectAction * itemSortOrderAction
Definition: importui_p.h:290
AlbumCustomizer * albumCustomizer
Definition: importui_p.h:323
QAction * camItemPreviewAction
Definition: importui_p.h:297
static const QString configGroupName
Definition: importui_p.h:239
ScriptingSettings * scriptingSettings
Definition: importui_p.h:326
QAction * viewCMViewAction
Definition: importui_p.h:305
DNotificationWidget * errorWidget
Definition: importui_p.h:346
ImportFilterComboBox * filterComboBox
Definition: importui_p.h:342
static const QString importFiltersConfigGroupName
Definition: importui_p.h:245
QAction * iconViewAction
Definition: importui_p.h:296
QAction * cameraInfoAction
Definition: importui_p.h:262
QAction * showBarAction
Definition: importui_p.h:294
CameraController * controller
Definition: importui_p.h:316
QAction * downloadDelSelectedAction
Definition: importui_p.h:277
QAction * downloadSelectedAction
Definition: importui_p.h:274
QStringList autoRotateItemsList
Definition: importui_p.h:253
FilterStatusBar * filterStatusBar
Definition: importui_p.h:328
QAction * cameraCancelAction
Definition: importui_p.h:260
DZoomBar * zoomBar
Definition: importui_p.h:331
QAction * uploadAction
Definition: importui_p.h:284
QAction * zoomTo100percents
Definition: importui_p.h:266
KSelectAction * itemsGroupAction
Definition: importui_p.h:291
bool deleteAfter
Definition: importui_p.h:247
bool closed
Definition: importui_p.h:249
static const QString configUseFileMetadata
Definition: importui_p.h:240
static const QString configDefaultTargetAlbumId
Definition: importui_p.h:243
QAction * selectNoneAction
Definition: importui_p.h:283
QAction * selectLockedItemsAction
Definition: importui_p.h:281
FreeSpaceWidget * cameraFreeSpace
Definition: importui_p.h:335
DExpanderBox * advBox
Definition: importui_p.h:311
QAction * showLogAction
Definition: importui_p.h:293
static const QString configLastTargetAlbum
Definition: importui_p.h:242
static const QString configUseDefaultTargetAlbum
Definition: importui_p.h:241
ImportView * view
Definition: importui_p.h:320
static const QString configFileSaveConflictRule
Definition: importui_p.h:244
KSelectAction * itemSortAction
Definition: importui_p.h:289
QAction * lockAction
Definition: importui_p.h:278
QStringList currentlyDeleting
Definition: importui_p.h:254
ImportItemPropertiesSideBarImport * rightSideBar
Definition: importui_p.h:329
QAction * deleteSelectedAction
Definition: importui_p.h:270
QAction * selectInvertAction
Definition: importui_p.h:280
KSelectAction * imageViewSelectionAction
Definition: importui_p.h:295
DHistoryView * historyView
Definition: importui_p.h:341
QAction * deleteAllAction
Definition: importui_p.h:269
QAction * downloadDelNewAction
Definition: importui_p.h:275
QAction * showPreferencesAction
Definition: importui_p.h:292
StatusProgressBar * statusProgressBar
Definition: importui_p.h:332
QAction * resumeAction
Definition: importui_p.h:286
CameraThumbsCtrl * camThumbsCtrl
Definition: importui_p.h:315
QAction * deleteNewAction
Definition: importui_p.h:268
QAction * selectAllAction
Definition: importui_p.h:279
QAction * selectNewItemsAction
Definition: importui_p.h:282
QActionGroup * cameraActions
Definition: importui_p.h:307
QAction * zoomFitToWindowAction
Definition: importui_p.h:265
bool busy
Definition: importui_p.h:248
QString cameraTitle
Definition: importui_p.h:251
QUrl lastDestURL
Definition: importui_p.h:309
Private()
Definition: importui_p.h:158
Definition: importui.h:62
Definition: importview.h:42
Definition: renamecustomizer.h:46
Definition: scriptingsettings.h:43
Definition: sidebar.h:480
Definition: statusprogressbar.h:43
Definition: datefolderview.cpp:43