digiKam
slideimage.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 : 2014-09-18
7  * Description : slideshow image widget
8  *
9  * Copyright (C) 2014-2022 by Gilles Caulier <caulier dot gilles at gmail dot com>
10  * Copyright (C) 2019-2020 by Minh Nghia Duong <minhnghiaduong997 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_SLIDE_IMAGE_PLUGIN_H
26 #define DIGIKAM_SLIDE_IMAGE_PLUGIN_H
27 
28 // Qt includes
29 
30 #include <QWidget>
31 #include <QUrl>
32 
33 // Local includes
34 
35 #include "digikam_export.h"
36 #include "loadingdescription.h"
37 #include "previewsettings.h"
38 #include "dimg.h"
39 
40 using namespace Digikam;
41 
43 {
44 
45 class SlideImage : public QWidget
46 {
47  Q_OBJECT
48 
49 public:
50 
51  explicit SlideImage(QWidget* const parent = nullptr);
52  ~SlideImage() override;
53 
54  void setPreviewSettings(const PreviewSettings& settings);
55  void setLoadUrl(const QUrl& url);
56  void setPreloadUrl(const QUrl& url);
57 
58 Q_SIGNALS:
59 
60  void signalImageLoaded(bool);
61 
62 private Q_SLOTS:
63 
64  void slotGotImagePreview(const LoadingDescription&, const DImg&);
65 
66 private:
67 
68  void paintEvent(QPaintEvent*) override;
69  void updatePixmap();
70 
71 private:
72 
73  class Private;
74  Private* const d;
75 };
76 
77 } // namespace DigikamGenericSlideShowPlugin
78 
79 #endif // DIGIKAM_SLIDE_IMAGE_PLUGIN_H
Definition: dimg.h:62
Definition: loadingdescription.h:45
Definition: previewsettings.h:35
Definition: slideshowloader.cpp:70
Definition: datefolderview.cpp:43