File indexing completed on 2024-04-28 15:51:59

0001 /*
0002     SPDX-FileCopyrightText: 2012 Tobias Koening <tokoe@kde.org>
0003 
0004     SPDX-License-Identifier: GPL-2.0-or-later
0005 */
0006 
0007 #ifndef SNAPSHOTTAKER_H
0008 #define SNAPSHOTTAKER_H
0009 #include "config-okular.h"
0010 
0011 #if HAVE_PHONON
0012 
0013 #include <phonon/videoplayer.h>
0014 
0015 #include <QObject>
0016 
0017 class QImage;
0018 
0019 class SnapshotTaker : public QObject
0020 {
0021     Q_OBJECT
0022 
0023 public:
0024     explicit SnapshotTaker(const QUrl &url, QObject *parent = nullptr);
0025     ~SnapshotTaker() override;
0026 
0027 Q_SIGNALS:
0028     void finished(const QImage &image);
0029 
0030 private Q_SLOTS:
0031     void stateChanged(Phonon::State, Phonon::State);
0032 
0033 private:
0034     Phonon::VideoPlayer *m_player;
0035 };
0036 
0037 #endif
0038 #endif