1 /* ============================================================
2  *
3  * This file is a part of digiKam project
4  * https://www.digikam.org
5  *
6  * Date        : 2008-11-21
7  * Description : Batch Queue Manager GUI
8  *
9  * Copyright (C) 2008-2021 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_BQM_QUEUE_MGR_WINDOW_PRIVATE_H
25 #define DIGIKAM_BQM_QUEUE_MGR_WINDOW_PRIVATE_H
26 
27 #include "queuemgrwindow.h"
28 
29 // Qt includes
30 
31 #include <QLabel>
32 #include <QString>
33 #include <QAction>
34 #include <QDir>
35 #include <QFile>
36 #include <QFileInfo>
37 #include <QGridLayout>
38 #include <QGroupBox>
39 #include <QVBoxLayout>
40 #include <QKeySequence>
41 #include <QMenuBar>
42 #include <QStatusBar>
43 #include <QMenu>
44 #include <QMessageBox>
45 #include <QApplication>
46 
47 // KDE includes
48 
49 #include <klocalizedstring.h>
50 #include <kactioncollection.h>
51 #include <kconfiggroup.h>
52 #include <ksharedconfig.h>
53 
54 // Local includes
55 
56 #include "drawdecoder.h"
57 #include "digikam_debug.h"
58 #include "actions.h"
59 #include "album.h"
60 #include "batchtoolsfactory.h"
61 #include "actionthread.h"
62 #include "queuepool.h"
63 #include "workflowmanager.h"
64 #include "queuelist.h"
65 #include "queuesettings.h"
66 #include "queuesettingsview.h"
67 #include "assignedlist.h"
68 #include "toolsettingsview.h"
69 #include "toolsview.h"
70 #include "componentsinfodlg.h"
71 #include "digikamapp.h"
72 #include "thememanager.h"
73 #include "dimg.h"
74 #include "dlogoaction.h"
75 #include "albummanager.h"
76 #include "imagewindow.h"
77 #include "thumbnailsize.h"
78 #include "sidebar.h"
79 #include "dnotificationwrapper.h"
80 #include "statusprogressbar.h"
81 
82 namespace Digikam
83 {
84 
85 class BatchToolsFactory;
86 
87 class Q_DECL_HIDDEN QueueMgrWindow::Private
88 {
89 
90 public:
91 
Private()92     explicit Private()
93         : busy                          (false),
94           processingAllQueues           (false),
95           currentQueueToProcess         (0),
96           statusLabel                   (nullptr),
97           clearQueueAction              (nullptr),
98           removeItemsSelAction          (nullptr),
99           removeItemsDoneAction         (nullptr),
100           moveUpToolAction              (nullptr),
101           moveDownToolAction            (nullptr),
102           removeToolAction              (nullptr),
103           clearToolsAction              (nullptr),
104           runAction                     (nullptr),
105           runAllAction                  (nullptr),
106           stopAction                    (nullptr),
107           removeQueueAction             (nullptr),
108           newQueueAction                (nullptr),
109           saveQueueAction               (nullptr),
110           donateMoneyAction             (nullptr),
111           contributeAction              (nullptr),
112           rawCameraListAction           (nullptr),
113           topSplitter                   (nullptr),
114           bottomSplitter                (nullptr),
115           verticalSplitter              (nullptr),
116           batchToolsMgr                 (nullptr),
117           statusProgressBar             (nullptr),
118           thread                        (nullptr),
119           toolsView                     (nullptr),
120           toolSettings                  (nullptr),
121           assignedList                  (nullptr),
122           queuePool                     (nullptr),
123           queueSettingsView             (nullptr),
124           TOP_SPLITTER_CONFIG_KEY       (QLatin1String("BqmTopSplitter")),
125           BOTTOM_SPLITTER_CONFIG_KEY    (QLatin1String("BqmBottomSplitter")),
126           VERTICAL_SPLITTER_CONFIG_KEY  (QLatin1String("BqmVerticalSplitter"))
127     {
128     }
129 
130     bool                     busy;
131     bool                     processingAllQueues;
132 
133     int                      currentQueueToProcess;
134 
135     QLabel*                  statusLabel;
136 
137     QAction*                 clearQueueAction;
138     QAction*                 removeItemsSelAction;
139     QAction*                 removeItemsDoneAction;
140     QAction*                 moveUpToolAction;
141     QAction*                 moveDownToolAction;
142     QAction*                 removeToolAction;
143     QAction*                 clearToolsAction;
144 
145     QAction*                 runAction;
146     QAction*                 runAllAction;
147     QAction*                 stopAction;
148     QAction*                 removeQueueAction;
149     QAction*                 newQueueAction;
150     QAction*                 saveQueueAction;
151     QAction*                 donateMoneyAction;
152     QAction*                 contributeAction;
153     QAction*                 rawCameraListAction;
154 
155     SidebarSplitter*         topSplitter;
156     SidebarSplitter*         bottomSplitter;
157     SidebarSplitter*         verticalSplitter;
158 
159     BatchToolsFactory*       batchToolsMgr;
160 
161     StatusProgressBar*       statusProgressBar;
162 
163     ActionThread*            thread;
164 
165     ToolsView*               toolsView;
166     ToolSettingsView*        toolSettings;
167     AssignedListView*        assignedList;
168     QueuePool*               queuePool;
169     QueueSettingsView*       queueSettingsView;
170 
171     const QString            TOP_SPLITTER_CONFIG_KEY;
172     const QString            BOTTOM_SPLITTER_CONFIG_KEY;
173     const QString            VERTICAL_SPLITTER_CONFIG_KEY;
174 };
175 
176 } // namespace Digikam
177 
178 #endif // DIGIKAM_BQM_QUEUE_MGR_WINDOW_PRIVATE_H
179