File indexing completed on 2025-04-27 03:58:08
0001 /* ============================================================ 0002 * 0003 * This file is a part of digiKam project 0004 * https://www.digikam.org 0005 * 0006 * Date : 2014-11-14 0007 * Description : Settings container for preview settings 0008 * 0009 * SPDX-FileCopyrightText: 2014 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de> 0010 * 0011 * SPDX-License-Identifier: GPL-2.0-or-later 0012 * 0013 * ============================================================ */ 0014 0015 #include "previewsettings.h" 0016 0017 namespace Digikam 0018 { 0019 0020 PreviewSettings::PreviewSettings(Quality quality, RawLoading rawLoading) 0021 : quality (quality), 0022 rawLoading (rawLoading), 0023 convertToEightBit(false) 0024 { 0025 } 0026 0027 PreviewSettings::~PreviewSettings() 0028 { 0029 } 0030 0031 PreviewSettings PreviewSettings::fastPreview() 0032 { 0033 return PreviewSettings(FastPreview, RawPreviewAutomatic); 0034 } 0035 0036 PreviewSettings PreviewSettings::highQualityPreview() 0037 { 0038 return PreviewSettings(FastButLargePreview, RawPreviewAutomatic); 0039 } 0040 0041 bool PreviewSettings::operator==(const PreviewSettings& other) const 0042 { 0043 return ( 0044 (quality == other.quality) && 0045 (rawLoading == other.rawLoading) && 0046 (convertToEightBit == other.convertToEightBit) 0047 ); 0048 } 0049 0050 } // namespace Digikam