-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvideo_object.h
46 lines (36 loc) · 910 Bytes
/
video_object.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
// Represents a video object detected on a PDF slide
// Author: Max Schwarz <max.schwarz@online.de>
#ifndef VIDEO_OBJECT_H
#define VIDEO_OBJECT_H
#include <QObject>
#include <QRectF>
#include <QObject>
#include <QUrl>
class RenderingPage;
class VideoObject : public QObject
{
Q_OBJECT
Q_PROPERTY(QRectF area READ area CONSTANT)
Q_PROPERTY(QUrl url READ url CONSTANT)
Q_PROPERTY(bool loop READ loop CONSTANT)
Q_PROPERTY(bool autostart READ autostart CONSTANT)
public:
explicit VideoObject(RenderingPage* page);
void setArea(const QRectF& area);
void setupFromLink(const QUrl& documentUrl, const QString& link);
QRectF area() const
{ return m_area; }
QUrl url() const
{ return m_url; }
bool loop() const
{ return m_loop; }
bool autostart() const
{ return m_autostart; }
private:
RenderingPage* m_page;
QRectF m_area;
bool m_autostart = false;
bool m_loop = false;
QUrl m_url;
};
#endif