QVideoDeviceSelectorControl Class
The QVideoDeviceSelectorControl class provides an video device selector media control. More...
| Header: | #include <QVideoDeviceSelectorControl> |
| qmake: | QT += multimedia |
| Inherits: | QMediaControl |
Public Functions
| virtual | ~QVideoDeviceSelectorControl() |
| virtual int | defaultDevice() const = 0 |
| virtual int | deviceCount() const = 0 |
| virtual QString | deviceDescription(int index) const = 0 |
| virtual QString | deviceName(int index) const = 0 |
| virtual int | selectedDevice() const = 0 |
- 30 public functions inherited from QObject
Public Slots
| virtual void | setSelectedDevice(int index) = 0 |
- 1 public slot inherited from QObject
Signals
| void | devicesChanged() |
| void | selectedDeviceChanged(const QString &name) |
| void | selectedDeviceChanged(int index) |
- 2 signals inherited from QObject
Protected Functions
| QVideoDeviceSelectorControl(QObject *parent = nullptr) |
- 9 protected functions inherited from QObject
Related Non-Members
| typedef | QObjectList |
| QList<T> | qFindChildren(const QObject *obj, const QRegExp ®Exp) |
| T | qobject_cast(QObject *object) |
| T | qobject_cast(const QObject *object) |
Macros
| QCameraInfoControl_iid | |
| QT_NO_NARROWING_CONVERSIONS_IN_CONNECT | |
| QVideoDeviceSelectorControl_iid | |
| Q_CLASSINFO(Name, Value) | |
| Q_DISABLE_COPY(Class) | |
| Q_DISABLE_COPY_MOVE(Class) | |
| Q_DISABLE_MOVE(Class) | |
| Q_EMIT | |
| Q_ENUM(...) | |
| Q_ENUM_NS(...) | |
| Q_FLAG(...) | |
| Q_FLAG_NS(...) | |
| Q_GADGET | |
| Q_INTERFACES(...) | |
| Q_INVOKABLE | |
| Q_MEDIA_DECLARE_CONTROL(Class, IId) | |
| Q_NAMESPACE | |
| Q_OBJECT | |
| Q_PROPERTY(...) | |
| Q_REVISION | |
| Q_SET_OBJECT_NAME(Object) | |
| Q_SIGNAL | |
| Q_SIGNALS | |
| Q_SLOT | |
| Q_SLOTS |
Additional Inherited Members
Detailed Description
The QVideoDeviceSelectorControl class provides descriptions of the video devices available on a system and allows one to be selected as the endpoint of a media service.
The interface name of QVideoDeviceSelectorControl is org.qt-project.qt.videodeviceselectorcontrol/5.0 as defined in QVideoDeviceSelectorControl_iid.
Member Function Documentation
[protected] QVideoDeviceSelectorControl::QVideoDeviceSelectorControl(QObject *parent = nullptr)
Constructs a video device selector control with the given parent.
[signal] void QVideoDeviceSelectorControl::devicesChanged()
Signals that the list of available video devices has changed.
[signal] void QVideoDeviceSelectorControl::selectedDeviceChanged(const QString &name)
Signals that the selected video device name has changed.
Note: Signal selectedDeviceChanged is overloaded in this class. To connect to this signal by using the function pointer syntax, Qt provides a convenient helper for obtaining the function pointer as shown in this example:
connect(videoDeviceSelectorControl, QOverload<const QString &>::of(&QVideoDeviceSelectorControl::selectedDeviceChanged), [=](const QString &name){ /* ... */ });
[signal] void QVideoDeviceSelectorControl::selectedDeviceChanged(int index)
Signals that the selected video device index has changed.
Note: Signal selectedDeviceChanged is overloaded in this class. To connect to this signal by using the function pointer syntax, Qt provides a convenient helper for obtaining the function pointer as shown in this example:
connect(videoDeviceSelectorControl, QOverload<int>::of(&QVideoDeviceSelectorControl::selectedDeviceChanged), [=](int index){ /* ... */ });
[pure virtual slot] void QVideoDeviceSelectorControl::setSelectedDevice(int index)
Sets the selected video device index.
See also selectedDevice().
[virtual] QVideoDeviceSelectorControl::~QVideoDeviceSelectorControl()
Destroys a video device selector control.
[pure virtual] int QVideoDeviceSelectorControl::defaultDevice() const
Returns the index of the default video device.
[pure virtual] int QVideoDeviceSelectorControl::deviceCount() const
Returns the number of available video devices;
[pure virtual] QString QVideoDeviceSelectorControl::deviceDescription(int index) const
Returns a description of the video device at index.
[pure virtual] QString QVideoDeviceSelectorControl::deviceName(int index) const
Returns the name of the video device at index.
[pure virtual] int QVideoDeviceSelectorControl::selectedDevice() const
Returns the index of the selected video device.
See also setSelectedDevice().
Macro Documentation
QVideoDeviceSelectorControl::QCameraInfoControl_iid
org.qt-project.qt.camerainfocontrol/5.3
Defines the interface name of the QCameraInfoControl class.
QVideoDeviceSelectorControl::QVideoDeviceSelectorControl_iid
org.qt-project.qt.videodeviceselectorcontrol/5.0
Defines the interface name of the QVideoDeviceSelectorControl class.