Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
Loading...
Searching...
No Matches
qgraphicsvideoitem.h
Go to the documentation of this file.
1
// Copyright (C) 2016 The Qt Company Ltd.
2
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4
#
ifndef
QGRAPHICSVIDEOITEM_H
5
#
define
QGRAPHICSVIDEOITEM_H
6
7
#
include
<
QtMultimediaWidgets
/
qvideowidget
.
h
>
8
9
#
include
<
QtWidgets
/
qgraphicsitem
.
h
>
10
11
#
if
QT_CONFIG
(
graphicsview
)
12
13
QT_BEGIN_NAMESPACE
14
15
class
QGraphicsVideoItemPrivate;
16
class
Q_MULTIMEDIAWIDGETS_EXPORT QGraphicsVideoItem :
public
QGraphicsObject
17
{
18
Q_OBJECT
19
Q_PROPERTY(Qt::AspectRatioMode aspectRatioMode READ aspectRatioMode WRITE setAspectRatioMode)
20
Q_PROPERTY(QPointF offset READ offset WRITE setOffset)
21
Q_PROPERTY(QSizeF size READ size WRITE setSize)
22
Q_PROPERTY(QSizeF nativeSize READ nativeSize NOTIFY nativeSizeChanged)
23
Q_PROPERTY(QVideoSink* videoSink READ videoSink CONSTANT)
24
public
:
25
explicit
QGraphicsVideoItem(QGraphicsItem *parent =
nullptr
);
26
~QGraphicsVideoItem() override;
27
28
Q_INVOKABLE QVideoSink *videoSink()
const
;
29
30
Qt::AspectRatioMode aspectRatioMode()
const
;
31
void
setAspectRatioMode(Qt::AspectRatioMode mode);
32
33
QPointF offset()
const
;
34
void
setOffset(
const
QPointF &offset);
35
36
QSizeF size()
const
;
37
void
setSize(
const
QSizeF &size);
38
39
QSizeF nativeSize()
const
;
40
41
QRectF boundingRect()
const
override;
42
43
void
paint(QPainter *painter,
const
QStyleOptionGraphicsItem *option, QWidget *widget =
nullptr
) override;
44
45
enum
{ Type = 14 };
46
int
type()
const
override
47
{
48
// Enable the use of qgraphicsitem_cast with this item.
49
return
Type;
50
}
51
52
Q_SIGNALS:
53
void
nativeSizeChanged(
const
QSizeF &size);
54
55
protected
:
56
void
timerEvent(QTimerEvent *event) override;
57
QVariant itemChange(GraphicsItemChange change,
const
QVariant &value) override;
58
59
QGraphicsVideoItemPrivate *d_ptr;
60
61
private
:
62
Q_DECLARE_PRIVATE(QGraphicsVideoItem)
63
Q_PRIVATE_SLOT(d_func(),
void
_q_present(
const
QVideoFrame &))
64
};
65
66
QT_END_NAMESPACE
67
68
#
endif
// QT_CONFIG(graphicsview)
69
70
#
endif
// QGRAPHICSVIDEOITEM_H
MyVideoProducer
[Video producer]
Definition
video.cpp:17
QVideoSinkPrivate
Definition
qvideosink.cpp:20
QVideoSink
The QVideoSink class represents a generic sink for video data.
Definition
qvideosink.h:22
VideoExample
[Video producer]
Definition
video.cpp:45
VideoExample::VideoWindowControl
void VideoWindowControl()
VideoExample::VideoWidgetControl
void VideoWidgetControl()
VideoExample::VideoSurface
void VideoSurface()
Definition
video.cpp:85
VideoExample::VideoWidget
void VideoWidget()
Definition
video.cpp:65
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
qtmultimedia
src
multimediawidgets
qgraphicsvideoitem.h
Generated on
for Qt by
1.18.0