提供現有串口的有關信息。 更多...
| 頭: | #include <QSerialPortInfo> |
| qmake: | QT += serialport |
| Since: | Qt 5.1 |
| QSerialPortInfo () | |
| QSerialPortInfo (const QSerialPort & port ) | |
| QSerialPortInfo (const QString & name ) | |
| QSerialPortInfo (const QSerialPortInfo & other ) | |
| ~QSerialPortInfo () | |
| QString | description () const |
| bool | hasProductIdentifier () const |
| bool | hasVendorIdentifier () const |
| bool | isBusy () const |
| bool | isNull () const |
| QString | manufacturer () const |
| QString | portName () const |
| quint16 | productIdentifier () const |
| QString | serialNumber () const |
| void | swap (QSerialPortInfo & other ) |
| QString | systemLocation () const |
| quint16 | vendorIdentifier () const |
| QSerialPortInfo & | operator= (const QSerialPortInfo & other ) |
| QList<QSerialPortInfo> | availablePorts () |
| QList<qint32> | standardBaudRates () |
提供現有串口的有關信息。
使用靜態函數以生成列錶為 QSerialPortInfo 對象。每個 QSerialPortInfo object in the list represents a single serial port and can be queried for the port name, system location, description, and manufacturer. The QSerialPortInfo class can also be used as an input parameter for the setPort() method of the QSerialPort 類。
另請參閱 QSerialPort .
構造空的 QSerialPortInfo 對象。
另請參閱 isNull ().
構造 QSerialPortInfo object from serial port .
構造 QSerialPortInfo object from serial port name .
此構造函數在可用串口中找到相關串口,根據端口名稱 name ,並為該端口構造串口信息實例。
構造副本為 other .
銷毀 QSerialPortInfo 對象。引用對象中的值變為無效。
[static]
QList
<
QSerialPortInfo
> QSerialPortInfo::
availablePorts
()
返迴係統可用串口的列錶。
返迴串口的描述字符串,若可用;否則返迴空字符串。
另請參閱 manufacturer () 和 serialNumber ().
返迴
true
若存在有效
16-bit
産品編號呈現;否則返迴
false
.
另請參閱 productIdentifier (), vendorIdentifier (),和 hasVendorIdentifier ().
返迴
true
若存在有效
16-bit
供應商編號存在;否則返迴
false
.
另請參閱 vendorIdentifier (), productIdentifier (),和 hasProductIdentifier ().
返迴
true
if serial port is busy; otherwise returns
false
.
另請參閱 isNull ().
返迴是否此 QSerialPortInfo 對象保持串口定義。
另請參閱 isBusy ().
返迴串口的製造商字符串,若可用;否則返迴空字符串。
另請參閱 description () 和 serialNumber ().
返迴串口的名稱。
另請參閱 systemLocation ().
返迴串口的 16 位産品編號,若可用;否則返迴 0。
另請參閱 hasProductIdentifier (), vendorIdentifier (),和 hasVendorIdentifier ().
返迴串口的序列號字符串,若可用;否則返迴空字符串。
注意: 序列號可能包含字母。
該函數在 Qt 5.3 引入。
另請參閱 description () 和 manufacturer ().
[static]
QList
<
qint32
> QSerialPortInfo::
standardBaudRates
()
返迴由目標平颱支持的,可用標準波特率列錶。
交換 QSerialPortInfo other 采用此 QSerialPortInfo 。此操作很快且從不失敗。
返迴串口的係統位置。
另請參閱 portName ().
返迴串口的 16 位供應商編號,若可用;否則返迴 0。
另請參閱 hasVendorIdentifier (), productIdentifier (),和 hasProductIdentifier ().
設置 QSerialPortInfo 對象等於 other .