digiKam
thumbnailsize.h
Go to the documentation of this file.
1 /* ============================================================
2  *
3  * This file is a part of digiKam project
4  * https://www.digikam.org
5  *
6  * Date : 2004-09-07
7  * Description : thumbnails size interface
8  *
9  * Copyright (C) 2004 by Renchi Raju <renchi dot raju at gmail dot com>
10  * Copyright (C) 2005-2022 by Gilles Caulier <caulier dot gilles at gmail dot com>
11  *
12  * This program is free software; you can redistribute it
13  * and/or modify it under the terms of the GNU General
14  * Public License as published by the Free Software Foundation;
15  * either version 2, or (at your option)
16  * any later version.
17  *
18  * This program is distributed in the hope that it will be useful,
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21  * GNU General Public License for more details.
22  *
23  * ============================================================ */
24 
25 #ifndef DIGIKAM_THUMB_NAIL_SIZE_H
26 #define DIGIKAM_THUMB_NAIL_SIZE_H
27 
28 // Qt includes
29 
30 #include <QString>
31 
32 // Local includes
33 
34 #include "digikam_export.h"
35 
36 class KConfigGroup;
37 
38 namespace Digikam
39 {
40 
41 class DIGIKAM_EXPORT ThumbnailSize
42 {
43 
44 public:
45 
46  enum Size
47  {
48  Step = 8,
49  Tiny = 32,
50  VerySmall = 64,
51  MediumSmall = 80,
57  Small = 100,
58  Medium = 142,
59  Large = 160,
60  Huge = 256,
61  HD = 512,
62  MAX = 1024
63  };
64 
65 public:
66 
67  ThumbnailSize();
68  explicit ThumbnailSize(int size);
69  ThumbnailSize(const ThumbnailSize& thumbsize);
70 
71  ~ThumbnailSize();
72 
73  ThumbnailSize& operator=(const ThumbnailSize& thumbsize);
74  bool operator==(const ThumbnailSize& thumbsize) const;
75  bool operator!=(const ThumbnailSize& thumbsize) const;
76 
77  int size() const;
78 
79 public:
80 
81  static void setUseLargeThumbs(bool val);
82  static bool getUseLargeThumbs();
83  static void readSettings(const KConfigGroup& group);
84  static void saveSettings(KConfigGroup& group, bool val);
85  static int maxThumbsSize();
86 
87 private:
88 
89  int m_Size;
90 };
91 
92 } // namespace Digikam
93 
94 #endif // DIGIKAM_THUMB_NAIL_SIZE_H
Definition: thumbnailsize.h:42
Size
Definition: thumbnailsize.h:47
Definition: datefolderview.cpp:43
bool operator==(const SearchTextSettings &a, const SearchTextSettings &b)
Definition: searchtextbar.cpp:49