1/* poppler-media.h: qt interface to poppler
2 * Copyright (C) 2012 Guillermo A. Amaral B. <gamaral@kde.org>
3 * Copyright (C) 2012, 2013, 2021 Albert Astals Cid <aacid@kde.org>
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2, or (at your option)
8 * any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
18 */
19
20#ifndef __POPPLER_MEDIARENDITION_H__
21#define __POPPLER_MEDIARENDITION_H__
22
23#include "poppler-export.h"
24
25#include <QtCore/QSize>
26#include <QtCore/QString>
27
28class MediaRendition;
29class QIODevice;
30
31namespace Poppler {
32class MediaRenditionPrivate;
33
34/**
35 Qt wrapper for MediaRendition.
36 */
37class POPPLER_QT6_EXPORT MediaRendition
38{
39public:
40 /**
41 Constructs a MediaRendition. Takes ownership of the passed rendition
42 */
43 explicit MediaRendition(::MediaRendition *rendition);
44 ~MediaRendition();
45
46 /**
47 Check if wrapper is holding a valid rendition object.
48 */
49 bool isValid() const;
50
51 /**
52 Returns content type.
53 */
54 QString contentType() const;
55
56 /**
57 Returns file name.
58 */
59 QString fileName() const;
60
61 /**
62 Returns true if media is embedded.
63 */
64 bool isEmbedded() const;
65
66 /**
67 Returns data buffer.
68 */
69 QByteArray data() const;
70
71 /**
72 Convenience accessor for auto-play parameter.
73 */
74 bool autoPlay() const;
75
76 /**
77 Convenience accessor for show controls parameter.
78 */
79 bool showControls() const;
80
81 /**
82 Convenience accessor for repeat count parameter.
83 */
84 float repeatCount() const;
85
86 /**
87 Convenience accessor for size parameter.
88 */
89 QSize size() const;
90
91private:
92 Q_DECLARE_PRIVATE(MediaRendition)
93 MediaRenditionPrivate *d_ptr;
94 Q_DISABLE_COPY(MediaRendition)
95};
96}
97
98#endif /* __POPPLER_MEDIARENDITION_H__ */
99

source code of poppler/qt6/src/poppler-media.h