Debian Codegraph @

core/libs/threadimageio/thumb/thumbnailtask.h

raw
1 /* ============================================================
2 *
3 * This file is a part of digiKam project
4 * https://www.digikam.org
5 *
6 * Date : 2007-06-05
7 * Description : Multithreaded loader for thumbnails
8 *
9 * SPDX-FileCopyrightText: 2006-2008 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
10 * SPDX-FileCopyrightText: 2006-2026 by Gilles Caulier <caulier dot gilles at gmail dot com>
11 *
12 * SPDX-License-Identifier: GPL-2.0-or-later
13 *
14 * ============================================================ */
15
16 #pragma once
17
18 // Qt includes
19
20 #include <QImage>
21
22 // Local includes
23
24 #include "loadsavetask.h"
25
26 namespace Digikam
27 {
28
29 class ThumbnailCreator;
30
31 class ThumbnailLoadingTask : public SharedLoadingTask
32 {
33 public:
34
35 explicit ThumbnailLoadingTask(LoadSaveThread* const thread,
36 const LoadingDescription& description);
37
38 void execute() override;
39 void postProcess() override;
40 void setThumbResult(const LoadingDescription& loadingDescription,
41 const QImage& qimage);
42
43 private:
44
45 void setupCreator();
46
47 private:
48
49 QImage m_qimage;
50 ThumbnailCreator* m_creator = nullptr;
51
52 private:
53
54 /// @note disabled
55 ThumbnailLoadingTask(const ThumbnailLoadingTask&) = delete;
56 ThumbnailLoadingTask& operator=(const ThumbnailLoadingTask&) = delete;
57 };
58
59 } // namespace Digikam