QVideoDeviceSelectorControl Class

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 (int index )
void selectedDeviceChanged (const QString & name )

保护函数

QVideoDeviceSelectorControl (QObject * parent = Q_NULLPTR)

QCameraInfoControl_iid
QVideoDeviceSelectorControl_iid

额外继承成员

详细描述

QVideoDeviceSelectorControl class provides an video device selector media control.

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.

接口名称对于 QVideoDeviceSelectorControl is org.qt-project.qt.videodeviceselectorcontrol/5.0 作为定义在 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 已改变。

注意: 信号 selectedDeviceChanged 在此类中是重载。要使用函数指针句法连接到此信号,必须在静态铸造中指定信号类型,如此范例所示:

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 已改变。

注意: 信号 selectedDeviceChanged 在此类中是重载。要使用函数指针句法连接到此信号,必须在静态铸造中指定信号类型,如此范例所示:

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

定义接口名为 QCameraInfoControl 类。

QVideoDeviceSelectorControl_iid

org.qt-project.qt.videodeviceselectorcontrol/5.0

定义接口名为 QVideoDeviceSelectorControl 类。