Debian Codegraph @

qt6/src/poppler-media.h

raw
1 /* poppler-media.h: qt interface to poppler
2 * Copyright (C) 2012 Guillermo A. Amaral B. <[email protected]>
3 * Copyright (C) 2012, 2013, 2021, 2024 Albert Astals Cid <[email protected]>
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
28 class MediaRendition;
29 class QIODevice;
30
31 namespace Poppler {
32 class MediaRenditionPrivate;
33
34 /**
35 Qt wrapper for MediaRendition.
36 */
37 class POPPLER_QT6_EXPORT MediaRendition
38 {
39 public:
40 /**
41 Constructs a MediaRendition. Takes ownership of the passed rendition
42 */
43 [[deprecated]] explicit MediaRendition(::MediaRendition *rendition);
44
45 /**
46 Constructs a MediaRendition.
47 */
48 explicit MediaRendition(std::unique_ptr<::MediaRendition> &&rendition);
49
50 ~MediaRendition();
51
52 /**
53 Check if wrapper is holding a valid rendition object.
54 */
55 bool isValid() const;
56
57 /**
58 Returns content type.
59 */
60 QString contentType() const;
61
62 /**
63 Returns file name.
64 */
65 QString fileName() const;
66
67 /**
68 Returns true if media is embedded.
69 */
70 bool isEmbedded() const;
71
72 /**
73 Returns data buffer.
74 */
75 QByteArray data() const;
76
77 /**
78 Convenience accessor for auto-play parameter.
79 */
80 bool autoPlay() const;
81
82 /**
83 Convenience accessor for show controls parameter.
84 */
85 bool showControls() const;
86
87 /**
88 Convenience accessor for repeat count parameter.
89 */
90 float repeatCount() const;
91
92 /**
93 Convenience accessor for size parameter.
94 */
95 QSize size() const;
96
97 private:
98 Q_DECLARE_PRIVATE(MediaRendition)
99 MediaRenditionPrivate *d_ptr;
100 Q_DISABLE_COPY(MediaRendition)
101 };
102 }
103
104 #endif /* __POPPLER_MEDIARENDITION_H__ */