QBluetoothAddress Class

The QBluetoothAddress class assigns an address to the Bluetooth device. 更多...

头: #include <QBluetoothAddress>
qmake: QT += bluetooth
Since: Qt 5.2

公共函数

QBluetoothAddress ()
QBluetoothAddress (quint64 address )
QBluetoothAddress (const QString & address )
QBluetoothAddress (const QBluetoothAddress & other )
~QBluetoothAddress ()
void clear ()
bool isNull () const
QString toString () const
quint64 toUInt64 () const
bool operator!= (const QBluetoothAddress & other ) const
bool operator< (const QBluetoothAddress & other ) const
QBluetoothAddress & operator= (const QBluetoothAddress & other )
bool operator== (const QBluetoothAddress & other ) const

详细描述

The QBluetoothAddress class assigns an address to the Bluetooth device.

This class holds a Bluetooth address in a platform- and protocol-independent manner.

成员函数文档编制

QBluetoothAddress:: QBluetoothAddress ()

Constructs an null Bluetooth address.

QBluetoothAddress:: QBluetoothAddress ( quint64 address )

Constructs a new Bluetooth address and assigns address 到它。

QBluetoothAddress:: QBluetoothAddress (const QString & address )

Constructs a new Bluetooth address and assigns address 到它。

The format of address can be either XX:XX:XX:XX:XX:XX or XXXXXXXXXXXX, where X is a hexadecimal digit. Case is not important.

QBluetoothAddress:: QBluetoothAddress (const QBluetoothAddress & other )

Constructs a new Bluetooth address which is a copy of other .

QBluetoothAddress:: ~QBluetoothAddress ()

销毁 QBluetoothAddress .

void QBluetoothAddress:: clear ()

Sets the Bluetooth address to 00:00:00:00:00:00.

bool QBluetoothAddress:: isNull () const

Returns true if the Bluetooth address is null, otherwise returns false.

QString QBluetoothAddress:: toString () const

Returns the Bluetooth address as a string of the form, XX:XX:XX:XX:XX:XX.

quint64 QBluetoothAddress:: toUInt64 () const

Returns this Bluetooth address as a quint64.

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

Compares this Bluetooth address with other .

Returns true if the Bluetooth addresses are not equal, otherwise returns false.

bool QBluetoothAddress:: operator< (const QBluetoothAddress & other ) const

Returns true if the Bluetooth address is less than other ,否则返回 false。

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

赋值 other to this Bluetooth address.

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

Compares this Bluetooth address to other .

Returns true if the two Bluetooth addresses are equal, otherwise returns false.