File indexing completed on 2024-04-28 15:52:00
0001 /* 0002 SPDX-FileCopyrightText: 2008 Pino Toscano <pino@kde.org> 0003 0004 SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #ifndef _OKULAR_VIDEOWIDGET_H_ 0008 #define _OKULAR_VIDEOWIDGET_H_ 0009 0010 #include <qwidget.h> 0011 0012 namespace Okular 0013 { 0014 class Annotation; 0015 class Document; 0016 class Movie; 0017 class NormalizedRect; 0018 } 0019 0020 class VideoWidget : public QWidget 0021 { 0022 Q_OBJECT 0023 public: 0024 VideoWidget(const Okular::Annotation *annot, Okular::Movie *movie, Okular::Document *document, QWidget *parent = nullptr); 0025 ~VideoWidget() override; 0026 0027 void setNormGeometry(const Okular::NormalizedRect &rect); 0028 Okular::NormalizedRect normGeometry() const; 0029 0030 bool isPlaying() const; 0031 0032 /** 0033 * This method is called when the page the video widget is located on has been initialized. 0034 */ 0035 void pageInitialized(); 0036 0037 /** 0038 * This method is called when the page the video widget is located on has been entered. 0039 */ 0040 void pageEntered(); 0041 0042 /** 0043 * This method is called when the page the video widget is located on has been left. 0044 */ 0045 void pageLeft(); 0046 0047 public Q_SLOTS: 0048 void play(); 0049 void pause(); 0050 void stop(); 0051 0052 protected: 0053 bool eventFilter(QObject *object, QEvent *event) override; 0054 bool event(QEvent *event) override; 0055 void resizeEvent(QResizeEvent *event) override; 0056 0057 private: 0058 // private storage 0059 class Private; 0060 Private *d; 0061 }; 0062 0063 #endif