QVideoDeviceSelectorControl Class
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 |
- 32 个公有函数继承自 QObject
公有槽函数
virtual void | setSelectedDevice(int index) = 0 |
- 1 个公有槽函数继承自 QObject
信号
void | devicesChanged() |
void | selectedDeviceChanged(int index) |
void | selectedDeviceChanged(const QString &name) |
- 2 个信号继承自 QObject
受保护的函数
QVideoDeviceSelectorControl(QObject *parent = Q_NULLPTR) |
- 9 个受保护的函数继承自 QObject
Macros
其他继承的成员
详细描述
The QVideoDeviceSelectorControl class provides an video device selector media control.
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.
成员函数
[protected]
QVideoDeviceSelectorControl::QVideoDeviceSelectorControl(QObject *parent = Q_NULLPTR)
Constructs a video device selector control with the given parent.
[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.
[signal]
void QVideoDeviceSelectorControl::devicesChanged()
Signals that the list of available video devices has changed.
[pure virtual]
int QVideoDeviceSelectorControl::selectedDevice() const
Returns the index of the selected video device.
参见 setSelectedDevice().
[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 one using the function pointer syntax, you must specify the signal type in a static cast, as shown in this example:
connect(videoDeviceSelectorControl, static_cast<void(QVideoDeviceSelectorControl::*)(int)>(&QVideoDeviceSelectorControl::selectedDeviceChanged), [=](int index){ /* ... */ });
[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 one using the function pointer syntax, you must specify the signal type in a static cast, as shown in this example:
connect(videoDeviceSelectorControl, static_cast<void(QVideoDeviceSelectorControl::*)(const QString &)>(&QVideoDeviceSelectorControl::selectedDeviceChanged), [=](const QString &name){ /* ... */ });
[pure virtual slot]
void QVideoDeviceSelectorControl::setSelectedDevice(int index)
Sets the selected video device index.
参见 selectedDevice().
宏
QCameraInfoControl_iid
org.qt-project.qt.camerainfocontrol/5.3
Defines the interface name of the QCameraInfoControl class.
QVideoDeviceSelectorControl_iid
org.qt-project.qt.videodeviceselectorcontrol/5.0
Defines the interface name of the QVideoDeviceSelectorControl class.