The QVideoDeviceSelectorControl class provides an video device selector media control. 更多...
| 頭: | #include <QVideoDeviceSelectorControl> |
| qmake: | QT += multimedia |
| 繼承: | QMediaControl |
該類已過時。 提供它是為使舊源代碼能繼續工作。強烈建議不要在新代碼中使用它。
| 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 |
| virtual void | setSelectedDevice (int index ) = 0 |
| void | devicesChanged () |
| void | selectedDeviceChanged (const QString & name ) |
| void | selectedDeviceChanged (int index ) |
| QVideoDeviceSelectorControl (QObject * parent = nullptr) |
| QCameraInfoControl_iid | |
| QVideoDeviceSelectorControl_iid |
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
作為定義在
QVideoDeviceSelectorControl_iid
.
[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 已改變。
注意: 信號 selectedDeviceChanged 在此類中被重載。通過使用函數指針句法連接到此信號,Qt 提供用於獲得如此範例展示的函數指針的方便幫助程序:
connect(videoDeviceSelectorControl, QOverload<const QString &>::of(&QVideoDeviceSelectorControl::selectedDeviceChanged), [=](const QString &name){ /* ... */ });
[signal]
void
QVideoDeviceSelectorControl::
selectedDeviceChanged
(
int
index
)
Signals that the selected video device index 已改變。
注意: 信號 selectedDeviceChanged 在此類中被重載。通過使用函數指針句法連接到此信號,Qt 提供用於獲得如此範例展示的函數指針的方便幫助程序:
connect(videoDeviceSelectorControl, QOverload<int>::of(&QVideoDeviceSelectorControl::selectedDeviceChanged), [=](int index){ /* ... */ });
[pure virtual slot]
void
QVideoDeviceSelectorControl::
setSelectedDevice
(
int
index
)
Sets the selected video device index .
另請參閱 selectedDevice ().
[虛擬]
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.
另請參閱 setSelectedDevice ().
org.qt-project.qt.camerainfocontrol/5.3
Defines the interface name of the QCameraInfoControl class.
org.qt-project.qt.videodeviceselectorcontrol/5.0
定義接口名為 QVideoDeviceSelectorControl 類。