digiKam
previewloadthread.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 : 2006-01-16
7  * Description : image file IO threaded interface.
8  *
9  * Copyright (C) 2006-2011 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
10  *
11  * This program is free software; you can redistribute it
12  * and/or modify it under the terms of the GNU General
13  * Public License as published by the Free Software Foundation;
14  * either version 2, or (at your option)
15  * any later version.
16  *
17  * This program is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20  * GNU General Public License for more details.
21  *
22  * ============================================================ */
23 
24 #ifndef DIGIKAM_PREVIEW_LOAD_THREAD_H
25 #define DIGIKAM_PREVIEW_LOAD_THREAD_H
26 
27 // Local includes
28 
29 #include "managedloadsavethread.h"
30 #include "previewsettings.h"
31 
32 namespace Digikam
33 {
34 
35 class DIGIKAM_EXPORT PreviewLoadThread : public ManagedLoadSaveThread
36 {
37  Q_OBJECT
38 
39 public:
40 
47  explicit PreviewLoadThread(QObject* const parent = nullptr);
48  ~PreviewLoadThread() override;
49 
54  void loadFast(const QString& filePath, int size);
55 
61  void loadFastButLarge(const QString& filePath, int minimumSize);
62 
68  void loadHighQuality(const QString& filePath,
70 
78  void load(const QString& filePath, const PreviewSettings& settings, int size = 0);
79 
83  void load(const LoadingDescription& description);
84 
88  void setDisplayingWidget(QWidget* const widget);
89 
94  static DImg loadFastSynchronously(const QString& filePath,
95  int size,
96  const IccProfile& profile = IccProfile());
97  static DImg loadFastButLargeSynchronously(const QString& filePath,
98  int minimumSize,
99  const IccProfile& profile = IccProfile());
100  static DImg loadHighQualitySynchronously(const QString& filePath,
102  const IccProfile& profile = IccProfile());
103  static DImg loadSynchronously(const QString& filePath,
104  const PreviewSettings& previewSettings,
105  int size,
106  const IccProfile& profile = IccProfile());
107  static DImg loadSynchronously(const LoadingDescription& description);
108 
109 protected:
110 
111  static LoadingDescription createLoadingDescription(const QString& filePath,
112  const PreviewSettings& settings,
113  int size,
114  const IccProfile& profile);
115  LoadingDescription createLoadingDescription(const QString& filePath,
116  const PreviewSettings& settings,
117  int size);
118 
119 protected:
120 
122 
123 private:
124 
125  // Disable
126  PreviewLoadThread(const PreviewLoadThread&) = delete;
127  PreviewLoadThread& operator=(const PreviewLoadThread&) = delete;
128 };
129 
130 } // namespace Digikam
131 
132 #endif // DIGIKAM_PREVIEW_LOAD_THREAD_H
Definition: dimg.h:62
Definition: iccprofile.h:43
Definition: loadingdescription.h:45
Definition: managedloadsavethread.h:39
Definition: previewloadthread.h:36
QWidget * m_displayingWidget
Definition: previewloadthread.h:121
Definition: previewsettings.h:35
RawLoading
Definition: previewsettings.h:61
@ RawPreviewAutomatic
Definition: previewsettings.h:62
Definition: datefolderview.cpp:43