digiKam
slideosd.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 OSD 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  * Copyright (C) 2021 by Phuoc Khanh Le <phuockhanhnk94 at gmail dot com>
12  *
13  * This program is free software; you can redistribute it
14  * and/or modify it under the terms of the GNU General
15  * Public License as published by the Free Software Foundation;
16  * either version 2, or (at your option)
17  * any later version.
18  *
19  * This program is distributed in the hope that it will be useful,
20  * but WITHOUT ANY WARRANTY; without even the implied warranty of
21  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22  * GNU General Public License for more details.
23  *
24  * ============================================================ */
25 
26 #ifndef DIGIKAM_SLIDE_OSD_PLUGIN_H
27 #define DIGIKAM_SLIDE_OSD_PLUGIN_H
28 
29 // Qt includes
30 
31 #include <QWidget>
32 #include <QUrl>
33 
34 // Local includes
35 
36 #include "slideshowsettings.h"
37 
38 class QEvent;
39 
41 {
42 
43 class SlideShowLoader;
44 class SlideToolBar;
45 
46 class SlideOSD : public QWidget
47 {
48  Q_OBJECT
49 
50 public:
51 
52  explicit SlideOSD(SlideShowSettings* const settings, SlideShowLoader* const parent);
53  ~SlideOSD() override;
54 
55  void setCurrentUrl(const QUrl& url);
56 
57  void pause(bool b);
58  void video(bool b);
59  bool isPaused() const;
60  bool isUnderMouse() const;
61  void toggleProperties();
62  void setLoadingReady(bool b);
63 
64 
65  SlideToolBar* toolBar() const;
66  QSize slideShowSize() const;
67 
68 private Q_SLOTS:
69 
70  void slotUpdateSettings();
71  void slotProgressTimer();
72  void slotStart();
73 
74 private:
75 
76  bool eventFilter(QObject* obj, QEvent* ev) override;
77 
78 private:
79 
80  class Private;
81  Private* const d;
82 };
83 
84 } // namespace DigikamGenericSlideShowPlugin
85 
86 #endif // DIGIKAM_SLIDE_OSD_PLUGIN_H
void setCurrentUrl(const QUrl &url)
Definition: slideosd.cpp:258
SlideToolBar * toolBar() const
Definition: slideosd.cpp:253
void toggleProperties()
Definition: slideosd.cpp:406
SlideOSD(SlideShowSettings *const settings, SlideShowLoader *const parent)
Definition: slideosd.cpp:99
void setLoadingReady(bool b)
Definition: slideosd.cpp:411
void pause(bool b)
Definition: slideosd.cpp:375
~SlideOSD() override
Definition: slideosd.cpp:227
bool isUnderMouse() const
Definition: slideosd.cpp:395
bool isPaused() const
Definition: slideosd.cpp:390
QSize slideShowSize() const
Definition: slideosd.cpp:293
void video(bool b)
Definition: slideosd.cpp:385
Definition: slideshowloader.h:50
Definition: slideshowsettings.h:52
Definition: slidetoolbar.h:47
Definition: slideshowloader.cpp:70