Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qvideowidget.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 QVIDEOWIDGET_H
5#define QVIDEOWIDGET_H
6
7#include <QtWidgets/qwidget.h>
8
9#include <QtMultimediaWidgets/qtmultimediawidgetsglobal.h>
10
12
13class QVideoSink;
14
16class Q_MULTIMEDIAWIDGETS_EXPORT QVideoWidget : public QWidget
17{
19 Q_PROPERTY(bool fullScreen READ isFullScreen WRITE setFullScreen NOTIFY fullScreenChanged)
20 Q_PROPERTY(Qt::AspectRatioMode aspectRatioMode READ aspectRatioMode WRITE setAspectRatioMode NOTIFY aspectRatioModeChanged)
21
22public:
23 explicit QVideoWidget(QWidget *parent = nullptr);
24 ~QVideoWidget();
25
26 Q_INVOKABLE QVideoSink *videoSink() const;
27
28#ifdef Q_QDOC
29 bool isFullScreen() const;
30#endif
31
32 Qt::AspectRatioMode aspectRatioMode() const;
33
34 QSize sizeHint() const override;
35
36public Q_SLOTS:
37 void setFullScreen(bool fullScreen);
38 void setAspectRatioMode(Qt::AspectRatioMode mode);
39
41 void fullScreenChanged(bool fullScreen);
43
44protected:
45 bool event(QEvent *event) override;
46 void showEvent(QShowEvent *event) override;
47 void hideEvent(QHideEvent *event) override;
48 void resizeEvent(QResizeEvent *event) override;
49 void moveEvent(QMoveEvent *event) override;
51
52private:
53 Q_DECLARE_PRIVATE(QVideoWidget)
54};
55
57
58
59#endif
\inmodule QtCore
Definition qcoreevent.h:45
The QHideEvent class provides an event which is sent after a widget is hidden.
Definition qevent.h:586
The QMoveEvent class contains event parameters for move events.
Definition qevent.h:502
The QResizeEvent class contains event parameters for resize events.
Definition qevent.h:548
The QShowEvent class provides an event that is sent when a widget is shown.
Definition qevent.h:578
\inmodule QtCore
Definition qsize.h:25
The QVideoSink class represents a generic sink for video data.
Definition qvideosink.h:22
The QVideoWidget class provides a widget which presents video produced by a media object.
QVideoWidgetPrivate * d_ptr
void fullScreenChanged(bool fullScreen)
void aspectRatioModeChanged(Qt::AspectRatioMode mode)
The QWidget class is the base class of all user interface objects.
Definition qwidget.h:99
Combined button and popup list for selecting options.
Definition qcompare.h:63
AspectRatioMode
GLenum mode
struct _cl_event * event
#define Q_PROPERTY(...)
#define Q_OBJECT
#define Q_INVOKABLE
#define Q_SLOTS
#define Q_SIGNALS
#define explicit