digiKam
panomanager.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 : 2011-05-23
7  * Description : a tool to create panorama by fusion of several images.
8  *
9  * Copyright (C) 2011-2016 by Benjamin Girault <benjamin dot girault at gmail dot com>
10  * Copyright (C) 2009-2022 by Gilles Caulier <caulier dot gilles at gmail dot com>
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) 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_PANO_MANAGER_H
25 #define DIGIKAM_PANO_MANAGER_H
26 
27 // Qt includes
28 
29 #include <QObject>
30 #include <QPointer>
31 
32 // Local includes
33 
34 #include "panoactions.h"
35 #include "ptotype.h"
36 #include "dplugingeneric.h"
37 
38 using namespace Digikam;
39 
41 {
42 
43 class PanoActionThread;
44 class AutoOptimiserBinary;
45 class CPCleanBinary;
46 class CPFindBinary;
47 class EnblendBinary;
48 class MakeBinary;
49 class NonaBinary;
50 class PanoModifyBinary;
51 class Pto2MkBinary;
52 class HuginExecutorBinary;
53 
54 class PanoManager : public QObject
55 {
56  Q_OBJECT
57 
58 public:
59 
60  explicit PanoManager(QObject* const parent = nullptr);
61  ~PanoManager() override;
62 
63 public:
64 
65  static QPointer<PanoManager> internalPtr;
66  static PanoManager* instance();
67  static bool isCreated();
68 
69 public:
70 
71  bool checkBinaries();
72 
73  void checkForHugin2015();
74  bool hugin2015() const;
75 
76  void setGPano(bool gPano);
77  bool gPano() const;
78 /*
79  void setHDR(bool hdr);
80  bool hdr() const;
81 */
82  void setFileFormatJPEG();
83  void setFileFormatTIFF();
84  void setFileFormatHDR();
85  PanoramaFileType format() const;
86 
87  void setItemsList(const QList<QUrl>& urls);
88  QList<QUrl>& itemsList() const;
89 
90  void setPlugin(DPlugin* const plugin);
91 
92  QUrl& basePtoUrl() const;
93  QSharedPointer<PTOType> basePtoData();
94  void resetBasePto();
95  QUrl& cpFindPtoUrl() const;
96  QSharedPointer<PTOType> cpFindPtoData();
97  void resetCpFindPto();
98  QUrl& cpCleanPtoUrl() const;
99  QSharedPointer<PTOType> cpCleanPtoData();
100  void resetCpCleanPto();
101  QUrl& autoOptimisePtoUrl() const;
102  QSharedPointer<PTOType> autoOptimisePtoData();
103  void resetAutoOptimisePto();
104  QUrl& viewAndCropOptimisePtoUrl() const;
105  QSharedPointer<PTOType> viewAndCropOptimisePtoData();
106  void resetViewAndCropOptimisePto();
107  QUrl& previewPtoUrl() const;
108  QSharedPointer<PTOType> previewPtoData();
109  void resetPreviewPto();
110  QUrl& panoPtoUrl() const;
111  QSharedPointer<PTOType> panoPtoData();
112  void resetPanoPto();
113 
114  QUrl& previewMkUrl() const;
115  void resetPreviewMkUrl();
116  QUrl& previewUrl() const;
117  void resetPreviewUrl();
118  QUrl& mkUrl() const;
119  void resetMkUrl();
120  QUrl& panoUrl() const;
121  void resetPanoUrl();
122 
123  PanoramaItemUrlsMap& preProcessedMap() const;
124  PanoActionThread* thread() const;
125  AutoOptimiserBinary& autoOptimiserBinary() const;
126  CPCleanBinary& cpCleanBinary() const;
127  CPFindBinary& cpFindBinary() const;
128  EnblendBinary& enblendBinary() const;
129  MakeBinary& makeBinary() const;
130  NonaBinary& nonaBinary() const;
131  PanoModifyBinary& panoModifyBinary() const;
132  Pto2MkBinary& pto2MkBinary() const;
133  HuginExecutorBinary& huginExecutorBinary() const;
134 
135  void run();
136 
137 Q_SIGNALS:
138 
139  void updateHostApp(const QUrl& url);
140 
141 private Q_SLOTS:
142 
143  void setPreProcessedMap(const PanoramaItemUrlsMap& urls);
144 
145 private:
146 
147  void startWizard();
148 
149 private:
150 
151  class Private;
152  Private* const d;
153 };
154 
155 } // namespace DigikamGenericPanoramaPlugin
156 
157 #endif // DIGIKAM_PANO_MANAGER_H
Definition: autooptimiserbinary.h:36
Definition: cpcleanbinary.h:36
Definition: cpfindbinary.h:40
Definition: enblendbinary.h:36
Definition: huginexecutorbinary.h:36
Definition: makebinary.h:36
Definition: nonabinary.h:36
Definition: panoactionthread.h:50
Definition: panomanager.h:55
static QPointer< PanoManager > internalPtr
Definition: panomanager.h:65
Definition: panomodifybinary.h:36
Definition: pto2mkbinary.h:36
Definition: dplugin.h:61
Definition: panoactions.h:36
PanoramaFileType
Definition: panoactions.h:61
QMap< QUrl, PanoramaPreprocessedUrls > PanoramaItemUrlsMap
Map between original Url and processed temp Urls.
Definition: panoactions.h:87
Definition: datefolderview.cpp:43