QBluetoothHostInfo Class

The QBluetoothHostInfo class encapsulates the details of a local QBluetooth device. 更多...

头文件: #include <QBluetoothHostInfo>
qmake: QT += bluetooth
开始支持版本: Qt 5.2

公有函数

QBluetoothHostInfo()
QBluetoothHostInfo(const QBluetoothHostInfo &other)
~QBluetoothHostInfo()
QBluetoothAddress address() const
QString name() const
void setAddress(const QBluetoothAddress &address)
void setName(const QString &name)
bool operator!=(const QBluetoothHostInfo &other) const
QBluetoothHostInfo &operator=(const QBluetoothHostInfo &other)
bool operator==(const QBluetoothHostInfo &other) const

详细描述

The QBluetoothHostInfo class encapsulates the details of a local QBluetooth device.

This class holds the name and address of a local Bluetooth device.

成员函数

QBluetoothHostInfo::QBluetoothHostInfo()

Constructs a null QBluetoothHostInfo object.

QBluetoothHostInfo::QBluetoothHostInfo(const QBluetoothHostInfo &other)

Constructs a new QBluetoothHostInfo which is a copy of other.

QBluetoothHostInfo::~QBluetoothHostInfo()

Destroys the QBluetoothHostInfo.

QBluetoothAddress QBluetoothHostInfo::address() const

Returns the Bluetooth address as a QBluetoothAddress.

参见 setAddress().

QString QBluetoothHostInfo::name() const

Returns the user visible name of the host info object.

参见 setName().

void QBluetoothHostInfo::setAddress(const QBluetoothAddress &address)

Sets the Bluetooth address for this Bluetooth host info object.

参见 address().

void QBluetoothHostInfo::setName(const QString &name)

Sets the name of the host info object.

参见 name().

bool QBluetoothHostInfo::operator!=(const QBluetoothHostInfo &other) const

Returns true if other is not equal to this QBluetoothHostInfo, otherwise false.

This function was introduced in Qt 5.5.

QBluetoothHostInfo &QBluetoothHostInfo::operator=(const QBluetoothHostInfo &other)

Assigns other to this QBluetoothHostInfo instance.

bool QBluetoothHostInfo::operator==(const QBluetoothHostInfo &other) const

Returns true if other is equal to this QBluetoothHostInfo, otherwise false.

This function was introduced in Qt 5.5.