QBluetooth 名称空间

The QBluetooth namespace provides classes and functions related to Bluetooth. 更多...

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

    类型

    enum AttAccessConstraint { AttAuthorizationRequired, AttAuthenticationRequired, AttEncryptionRequired }
    flags AttAccessConstraints
    typedef QLowEnergyHandle
    enum 安全性 { NoSecurity, Authorization, Authentication, Encryption, Secure }
    flags SecurityFlags

    函数

    QFlags<SecurityFlags::enum_type> operator| (SecurityFlags::enum_type f1 , SecurityFlags::enum_type f2 )
    QFlags<SecurityFlags::enum_type> operator| (SecurityFlags::enum_type f1 , QFlags<SecurityFlags::enum_type> f2 )
    QIncompatibleFlag operator| (SecurityFlags::enum_type f1 , int f2 )
    QFlags<AttAccessConstraints::enum_type> operator| (AttAccessConstraints::enum_type f1 , AttAccessConstraints::enum_type f2 )
    QFlags<AttAccessConstraints::enum_type> operator| (AttAccessConstraints::enum_type f1 , QFlags<AttAccessConstraints::enum_type> f2 )
    QIncompatibleFlag operator| (AttAccessConstraints::enum_type f1 , int f2 )
    int operator| ( int , int )

    详细描述

    The QBluetooth namespace provides classes and functions related to Bluetooth.

    类型文档编制

    enum QBluetooth:: AttAccessConstraint
    flags QBluetooth:: AttAccessConstraints

    This enum describes the possible requirements for reading or writing an ATT attribute.

    常量 描述
    QBluetooth::AttAuthorizationRequired 0x1 The client needs authorization from the ATT server to access the attribute.
    QBluetooth::AttAuthenticationRequired 0x2 The client needs to be authenticated to access the attribute.
    QBluetooth::AttEncryptionRequired 0x4 The attribute can only be accessed if the connection is encrypted.

    该枚举在 Qt 5.7 引入或被修改。

    The AttAccessConstraints type is a typedef for QFlags <AttAccessConstraint>. It stores an OR combination of AttAccessConstraint values.

    typedef QLowEnergyHandle

    Typedef for Bluetooth Low Energy ATT attribute handles.

    该 typedef 在 Qt 5.4 引入。

    enum QBluetooth:: 安全性
    flags QBluetooth:: SecurityFlags

    This enum describe the security requirements of a Bluetooth service.

    常量 描述
    QBluetooth::NoSecurity 0x00 服务不要求任何安全性。
    QBluetooth::Authorization 0x01 The service requires authorization by the user, unless the device is Authorized-Paired.
    QBluetooth::Authentication 0x02 The service requires authentication. Device must be paired, and the user is prompted on connection unless the device is Authorized-Paired.
    QBluetooth::Encryption 0x04 The service requires the communication link to be encrypted. This requires the device to be paired.
    QBluetooth::Secure 0x08 The service requires the communication link to be secure. Simple Pairing from Bluetooth 2.1 or greater is required. Legacy pairing is not permitted.

    The SecurityFlags type is a typedef for QFlags <Security>. It stores an OR combination of Security values.

    函数文档编制

    QFlags < SecurityFlags::enum_type > QBluetooth:: operator| ( SecurityFlags::enum_type f1 , SecurityFlags::enum_type f2 )

    QFlags < SecurityFlags::enum_type > QBluetooth:: operator| ( SecurityFlags::enum_type f1 , QFlags < SecurityFlags::enum_type > f2 )

    QIncompatibleFlag QBluetooth:: operator| ( SecurityFlags::enum_type f1 , int f2 )

    QFlags < AttAccessConstraints::enum_type > QBluetooth:: operator| ( AttAccessConstraints::enum_type f1 , AttAccessConstraints::enum_type f2 )

    QFlags < AttAccessConstraints::enum_type > QBluetooth:: operator| ( AttAccessConstraints::enum_type f1 , QFlags < AttAccessConstraints::enum_type > f2 )

    QIncompatibleFlag QBluetooth:: operator| ( AttAccessConstraints::enum_type f1 , int f2 )

    int QBluetooth:: operator| ( int , int )