digiKam
Loading...
Searching...
No Matches
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 * SPDX-FileCopyrightText: 2006-2011 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
10 *
11 * SPDX-License-Identifier: GPL-2.0-or-later
12 *
13 * ============================================================ */
14
15#pragma once
16
17// Local includes
18
20#include "previewsettings.h"
21
22namespace Digikam
23{
24
25class DIGIKAM_EXPORT PreviewLoadThread : public ManagedLoadSaveThread
26{
27 Q_OBJECT
28
29public:
30
37 explicit PreviewLoadThread(QObject* const parent = nullptr);
38 ~PreviewLoadThread() override = default;
39
44 void loadFast(const QString& filePath, int size);
45
51 void loadFastButLarge(const QString& filePath, int minimumSize);
52
58 void loadHighQuality(const QString& filePath,
59 PreviewSettings::RawLoading rawLoadingMode = PreviewSettings::RawPreviewAutomatic);
60
68 void load(const QString& filePath, const PreviewSettings& settings, int size = 0);
69
73 void load(const LoadingDescription& description);
74
78 void setDisplayingWidget(QWidget* const widget);
79
84 static DImg loadFastSynchronously(const QString& filePath,
85 int size,
86 const IccProfile& profile = IccProfile());
87 static DImg loadFastButLargeSynchronously(const QString& filePath,
88 int minimumSize,
89 const IccProfile& profile = IccProfile());
90 static DImg loadHighQualitySynchronously(const QString& filePath,
91 PreviewSettings::RawLoading rawLoadingMode = PreviewSettings::RawPreviewAutomatic,
92 const IccProfile& profile = IccProfile());
93 static DImg loadSynchronously(const QString& filePath,
94 const PreviewSettings& previewSettings,
95 int size,
96 const IccProfile& profile = IccProfile());
97 static DImg loadSynchronously(const LoadingDescription& description);
98
99protected:
100
101 static LoadingDescription createLoadingDescription(const QString& filePath,
102 const PreviewSettings& settings,
103 int size,
104 const IccProfile& profile);
105 LoadingDescription createLoadingDescription(const QString& filePath,
106 const PreviewSettings& settings,
107 int size);
108
109protected:
110
111 QWidget* m_displayingWidget = nullptr;
112
113private:
114
115 // Disable
116 PreviewLoadThread(const PreviewLoadThread&) = delete;
117 PreviewLoadThread& operator=(const PreviewLoadThread&) = delete;
118};
119
120} // namespace Digikam
Definition dimg.h:52
Definition iccprofile.h:33
Definition loadingdescription.h:35
Definition managedloadsavethread.h:29
Definition previewloadthread.h:26
~PreviewLoadThread() override=default
Definition previewsettings.h:25
RawLoading
Definition previewsettings.h:51
Definition datefolderview.cpp:34