本文整理汇总了C++中QBluetoothDeviceInfo::rssi方法的典型用法代码示例。如果您正苦于以下问题:C++ QBluetoothDeviceInfo::rssi方法的具体用法?C++ QBluetoothDeviceInfo::rssi怎么用?C++ QBluetoothDeviceInfo::rssi使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QBluetoothDeviceInfo
的用法示例。
在下文中一共展示了QBluetoothDeviceInfo::rssi方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: deviceDiscovered
void BtLocalDevice::deviceDiscovered(const QBluetoothDeviceInfo &info)
{
QString services;
if (info.serviceClasses() & QBluetoothDeviceInfo::PositioningService)
services += "Position|";
if (info.serviceClasses() & QBluetoothDeviceInfo::NetworkingService)
services += "Network|";
if (info.serviceClasses() & QBluetoothDeviceInfo::RenderingService)
services += "Rendering|";
if (info.serviceClasses() & QBluetoothDeviceInfo::CapturingService)
services += "Capturing|";
if (info.serviceClasses() & QBluetoothDeviceInfo::ObjectTransferService)
services += "ObjectTra|";
if (info.serviceClasses() & QBluetoothDeviceInfo::AudioService)
services += "Audio|";
if (info.serviceClasses() & QBluetoothDeviceInfo::TelephonyService)
services += "Telephony|";
if (info.serviceClasses() & QBluetoothDeviceInfo::InformationService)
services += "Information|";
services.truncate(services.length()-1); //cut last '/'
qDebug() << "Found new device: " << info.name() << info.isValid() << info.address().toString()
<< info.rssi() << info.majorDeviceClass()
<< info.minorDeviceClass() << services;
}