digiKam
slidevideo.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-22
7  * Description : Slideshow video viewer
8  *
9  * Copyright (C) 2014-2020 Gilles Caulier <caulier dot gilles at gmail dot com>
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_SLIDE_VIDEO_H
25 #define DIGIKAM_SLIDE_VIDEO_H
26 
27 // Qt includes
28 
29 #include <QWidget>
30 #include <QEvent>
31 #include <QUrl>
32 
33 // QtAV includes
34 
35 #include <QtAV/AVError.h> // krazy:exclude=includes
36 #include <QtAV/AVPlayer.h> // krazy:exclude=includes
37 
38 // Local includes
39 
40 #include "dinfointerface.h"
41 #include "digikam_export.h"
42 
43 namespace Digikam
44 {
45 
46 class DIGIKAM_EXPORT SlideVideo : public QWidget
47 {
48  Q_OBJECT
49 
50 public:
51 
52  explicit SlideVideo(QWidget* const parent);
53  ~SlideVideo() override;
54 
55  void setInfoInterface(DInfoInterface* const iface);
56  void setCurrentUrl(const QUrl& url);
57  void showIndicator(bool);
58  void pause(bool);
59  void stop();
60 
61 Q_SIGNALS:
62 
63  void signalVideoLoaded(bool);
65 
66  void signalVideoPosition(qint64);
67  void signalVideoDuration(qint64);
68 
69 private Q_SLOTS:
70 
71  void slotPlayerStateChanged(QtAV::AVPlayer::State state);
72  void slotMediaStatusChanged(QtAV::MediaStatus status);
73  void slotHandlePlayerError(const QtAV::AVError& err);
74 
75  void slotPositionChanged(qint64 position);
76  void slotDurationChanged(qint64 duration);
77  void slotVolumeChanged(int volume);
78  void slotPosition(int position);
79 
80 private:
81 
82  class Private;
83  Private* const d;
84 };
85 
86 } // namespace Digikam
87 
88 #endif // DIGIKAM_SLIDE_VIDEO_H
Definition: dinfointerface.h:56
Definition: slidevideo.h:47
void signalVideoDuration(qint64)
void signalVideoPosition(qint64)
void signalVideoLoaded(bool)
Definition: datefolderview.cpp:43
Definition: scan.h:26