File indexing completed on 2025-01-05 03:53:10

0001 /* ============================================================
0002  *
0003  * This file is a part of digiKam project
0004  * https://www.digikam.org
0005  *
0006  * Date        : 2012-03-15
0007  * Description : a tool to create panorama by fusion of several images.
0008  *
0009  * SPDX-FileCopyrightText: 2012-2015 by Benjamin Girault <benjamin dot girault at gmail dot com>
0010  *
0011  * SPDX-License-Identifier: GPL-2.0-or-later
0012  *
0013  * ============================================================ */
0014 
0015 #ifndef DIGIKAM_CREATE_PREVIEW_TASK_H
0016 #define DIGIKAM_CREATE_PREVIEW_TASK_H
0017 
0018 // Qt includes
0019 
0020 #include <QPointer>
0021 
0022 // Local includes
0023 
0024 #include "panotask.h"
0025 #include "ptotype.h"
0026 #include "metaengine.h"
0027 
0028 using namespace Digikam;
0029 
0030 namespace DigikamGenericPanoramaPlugin
0031 {
0032 
0033 class CreatePreviewTask : public PanoTask
0034 {
0035 public:
0036 
0037     explicit CreatePreviewTask(const QString& workDirPath,
0038                                QSharedPointer<const PTOType> inputPTO,
0039                                QUrl& previewPtoUrl,
0040                                const PanoramaItemUrlsMap& preProcessedUrlsMap);
0041     ~CreatePreviewTask() override;
0042 
0043 protected:
0044 
0045     void run(ThreadWeaver::JobPointer self, ThreadWeaver::Thread* thread) override;
0046 
0047 private:
0048 
0049     QUrl&                         previewPtoUrl;
0050     QSharedPointer<const PTOType> ptoData;
0051     const PanoramaItemUrlsMap     preProcessedUrlsMap;
0052     MetaEngine                    m_meta;
0053 
0054 private:
0055 
0056     // Disable
0057     CreatePreviewTask() = delete;
0058 
0059     Q_DISABLE_COPY(CreatePreviewTask)
0060 };
0061 
0062 } // namespace DigikamGenericPanoramaPlugin
0063 
0064 #endif // DIGIKAM_CREATE_PREVIEW_TASK_H