File indexing completed on 2025-01-05 03:56:18
0001 /* ============================================================ 0002 * 0003 * This file is a part of digiKam project 0004 * https://www.digikam.org 0005 * 0006 * Date : 2013-08-19 0007 * Description : Image quality Settings Container. 0008 * 0009 * SPDX-FileCopyrightText: 2013-2024 by Gilles Caulier <caulier dot gilles at gmail dot com> 0010 * SPDX-FileCopyrightText: 2021-2022 by Phuoc Khanh Le <phuockhanhnk94 at gmail dot com> 0011 * 0012 * SPDX-License-Identifier: GPL-2.0-or-later 0013 * 0014 * ============================================================ */ 0015 0016 #ifndef DIGIKAM_IMAGE_QUALITY_CONTAINER_H 0017 #define DIGIKAM_IMAGE_QUALITY_CONTAINER_H 0018 0019 // Qt includes 0020 0021 #include <QDebug> 0022 0023 // Local includes 0024 0025 #include "digikam_export.h" 0026 0027 class KConfigGroup; 0028 0029 namespace Digikam 0030 { 0031 0032 class DIGIKAM_EXPORT ImageQualityContainer 0033 { 0034 public: 0035 0036 ImageQualityContainer(); 0037 ImageQualityContainer(const ImageQualityContainer& other); 0038 ~ImageQualityContainer(); 0039 0040 ImageQualityContainer& operator=(const ImageQualityContainer& other); 0041 0042 public: 0043 0044 void readFromConfig(); 0045 void readFromConfig(const KConfigGroup&); 0046 void writeToConfig(); 0047 void writeToConfig(KConfigGroup&); 0048 0049 public: 0050 0051 bool detectBlur; ///< Enable image blur detection. 0052 bool detectNoise; ///< Enable image noise detection. 0053 bool detectCompression; ///< Enable image compression detection. 0054 bool detectExposure; ///< Enable image over and under exposure detection. 0055 bool detectAesthetic; ///< Enable image aesthetic detection. 0056 0057 bool lowQRejected; ///< Assign Rejected property to low quality. 0058 bool mediumQPending; ///< Assign Pending property to medium quality. 0059 bool highQAccepted; ///< Assign Accepted property to high quality. 0060 0061 int rejectedThreshold; ///< Item rejection threshold. 0062 int pendingThreshold; ///< Item pending threshold. 0063 int acceptedThreshold; ///< Item accepted threshold. 0064 int blurWeight; ///< Item blur level. 0065 int noiseWeight; ///< Item noise level. 0066 int compressionWeight; ///< Item compression level. 0067 int exposureWeight; ///< Item exposure level. 0068 }; 0069 0070 //! qDebug() stream operator. Writes property @a s to the debug output in a nicely formatted way. 0071 DIGIKAM_EXPORT QDebug operator<<(QDebug dbg, const ImageQualityContainer& s); 0072 0073 } // namespace Digikam 0074 0075 #endif // DIGIKAM_IMAGE_QUALITY_CONTAINER_H