Debian Codegraph @

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