File indexing completed on 2025-04-27 03:58:10
0001 /* ============================================================ 0002 * 0003 * This file is a part of digiKam project 0004 * https://www.digikam.org 0005 * 0006 * Date : 2004-09-07 0007 * Description : thumbnails size interface 0008 * 0009 * SPDX-FileCopyrightText: 2004 by Renchi Raju <renchi dot raju at gmail dot com> 0010 * SPDX-FileCopyrightText: 2005-2024 by Gilles Caulier <caulier dot gilles at gmail dot com> 0011 * 0012 * SPDX-License-Identifier: GPL-2.0-or-later 0013 * 0014 * ============================================================ */ 0015 0016 #ifndef DIGIKAM_THUMB_NAIL_SIZE_H 0017 #define DIGIKAM_THUMB_NAIL_SIZE_H 0018 0019 // Qt includes 0020 0021 #include <QString> 0022 0023 // Local includes 0024 0025 #include "digikam_export.h" 0026 0027 class KConfigGroup; 0028 0029 namespace Digikam 0030 { 0031 0032 class DIGIKAM_EXPORT ThumbnailSize 0033 { 0034 0035 public: 0036 0037 enum Size 0038 { 0039 Step = 8, 0040 Tiny = 32, 0041 VerySmall = 64, 0042 MediumSmall = 80, 0043 /** 0044 * Most usable small size of thumbnails to prevent overloaded 0045 * overlays show under thumbs (as Pick label and Group indicator) 0046 * See bugs #321337 and #275381 for details. 0047 */ 0048 Small = 100, 0049 Medium = 142, 0050 Large = 160, 0051 Huge = 256, 0052 HD = 512, 0053 MAX = 1024 0054 }; 0055 0056 public: 0057 0058 ThumbnailSize(); 0059 explicit ThumbnailSize(int size); 0060 ThumbnailSize(const ThumbnailSize& thumbsize); 0061 0062 ~ThumbnailSize(); 0063 0064 ThumbnailSize& operator=(const ThumbnailSize& thumbsize); 0065 bool operator==(const ThumbnailSize& thumbsize) const; 0066 bool operator!=(const ThumbnailSize& thumbsize) const; 0067 0068 int size() const; 0069 0070 public: 0071 0072 static void setUseLargeThumbs(bool val); 0073 static bool getUseLargeThumbs(); 0074 static void readSettings(const KConfigGroup& group); 0075 static void saveSettings(KConfigGroup& group, bool val); 0076 static int maxThumbsSize(); 0077 0078 private: 0079 0080 int m_Size; 0081 }; 0082 0083 } // namespace Digikam 0084 0085 #endif // DIGIKAM_THUMB_NAIL_SIZE_H