Home · All Namespaces · All Classes · Grouped Classes · Modules · Functions codeless banner

QBluetoothAddress Class Reference

The QBluetoothAddress class represents a bluetooth address. More...

    #include <QBluetoothAddress>

Public Functions

Static Public Members

Detailed Description

The QBluetoothAddress class represents a bluetooth address.

Each Bluetooth device can have one and only one address. There are certain special addresses defined, namely any, local, all.

The Bluetooth address can be constructed from a string representation. For instance,

    QBluetoothAddress addr("00:00:FF:FF:00:00");

If the address is a valid Bluetooth address, then isValid() will return true, and false otherwise.

See also QBluetoothLocalDevice and QBluetoothRemoteDevice.

Member Function Documentation

QBluetoothAddress::QBluetoothAddress ()

Constructs a new invalid bluetooth address.

QBluetoothAddress::QBluetoothAddress ( const QBluetoothAddress & other )

Constructs a copy of a bluetooth address from other.

QBluetoothAddress::QBluetoothAddress ( const QString & addr )

Constructs a bluetooth address based on string representation given by addr. The string should be in the format of XX:XX:XX:XX:XX:XX where XX represents a hexadecimal number. If the string is in an invalid format, an invalid bluetooth address is constructed.

QBluetoothAddress::~QBluetoothAddress ()

Destroys a Bluetooth address.

bool QBluetoothAddress::isValid () const

Returns whether the address is valid.

QString QBluetoothAddress::toString () const

Converts the Bluetooth address into a QString. The format will be of the form XX:XX:XX:XX:XX:XX where XX is a hexadecimal number. If the address is invalid, a null string is returned.

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

Compares the current address to other. Returns true if the addresses are not equal, false if they are.

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

Assigns the contents of the Bluetooth address other to the current address.

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

Returns the result of comparing the current Bluetooth address against a Bluetooth address given by other.

Member Variable Documentation

const QBluetoothAddress QBluetoothAddress::all

Bluetooth address that represents a special address all

const QBluetoothAddress QBluetoothAddress::any

Bluetooth address that represents a special address any

const QBluetoothAddress QBluetoothAddress::invalid

Invalid Bluetooth address.

const QBluetoothAddress QBluetoothAddress::local

Bluetooth address that represents a special address local

Copyright © 2009 Nokia Trademarks
Qt Extended 4.4.3