File indexing completed on 2025-03-09 03:50:50
0001 /* ============================================================ 0002 * 0003 * This file is a part of digiKam project 0004 * https://www.digikam.org 0005 * 0006 * Date : 2009-11-13 0007 * Description : a tool to blend bracketed images. 0008 * 0009 * SPDX-FileCopyrightText: 2009-2024 by Gilles Caulier <caulier dot gilles at gmail dot com> 0010 * SPDX-FileCopyrightText: 2015 by Benjamin Girault <benjamin dot girault at gmail dot com> 0011 * 0012 * SPDX-License-Identifier: GPL-2.0-or-later 0013 * 0014 * ============================================================ */ 0015 0016 #ifndef DIGIKAM_EXPO_BLENDING_ACTIONS_H 0017 #define DIGIKAM_EXPO_BLENDING_ACTIONS_H 0018 0019 // Qt includes 0020 0021 #include <QString> 0022 #include <QImage> 0023 #include <QMetaType> 0024 #include <QMap> 0025 0026 // Local includes 0027 0028 #include "enfusesettings.h" 0029 0030 namespace DigikamGenericExpoBlendingPlugin 0031 { 0032 0033 enum ExpoBlendingAction 0034 { 0035 EXPOBLENDING_NONE = 0, 0036 EXPOBLENDING_IDENTIFY, 0037 EXPOBLENDING_PREPROCESSING, 0038 EXPOBLENDING_ENFUSEPREVIEW, 0039 EXPOBLENDING_ENFUSEFINAL, 0040 EXPOBLENDING_LOAD 0041 }; 0042 0043 class ExpoBlendingItemPreprocessedUrls 0044 { 0045 public: 0046 0047 ExpoBlendingItemPreprocessedUrls() = default; 0048 0049 ExpoBlendingItemPreprocessedUrls(const QUrl& preprocessed, const QUrl& preview) 0050 : preprocessedUrl(preprocessed), 0051 previewUrl (preview) 0052 { 0053 }; 0054 0055 ~ExpoBlendingItemPreprocessedUrls() = default; 0056 0057 QUrl preprocessedUrl; ///< Can be original file or aligned version, depending of user choice. 0058 QUrl previewUrl; ///< The JPEG preview version, accordingly of preprocessedUrl constant. 0059 }; 0060 0061 typedef QMap<QUrl, ExpoBlendingItemPreprocessedUrls> ExpoBlendingItemUrlsMap; ///< Map between original Url and processed temp Urls. 0062 0063 class ExpoBlendingActionData 0064 { 0065 public: 0066 0067 explicit ExpoBlendingActionData() 0068 : starting(false), 0069 success (false), 0070 action (EXPOBLENDING_NONE) 0071 { 0072 } 0073 0074 bool starting; 0075 bool success; 0076 0077 QString message; 0078 0079 QImage image; 0080 0081 QList<QUrl> inUrls; 0082 QList<QUrl> outUrls; 0083 0084 EnfuseSettings enfuseSettings; 0085 0086 ExpoBlendingItemUrlsMap preProcessedUrlsMap; 0087 0088 ExpoBlendingAction action; 0089 }; 0090 0091 } // namespace DigikamGenericExpoBlendingPlugin 0092 0093 Q_DECLARE_METATYPE(DigikamGenericExpoBlendingPlugin::ExpoBlendingActionData) 0094 Q_DECLARE_METATYPE(DigikamGenericExpoBlendingPlugin::ExpoBlendingItemPreprocessedUrls) 0095 0096 #endif // DIGIKAM_EXPO_BLENDING_ACTIONS_H