QML UI: add getBtAddress function
This allows us to get the BT address of the first dive computer that we found. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
e0771e50f1
commit
be271e7d48
@ -249,6 +249,18 @@ int QMLManager::getProductIndex()
|
||||
return -1;
|
||||
}
|
||||
|
||||
QString QMLManager::getBtAddress()
|
||||
{
|
||||
#if BT_SUPPORT
|
||||
if (!btDCs.isEmpty()) {
|
||||
QString btAddr = btDCs.first().btdi.address().toString();
|
||||
qDebug() << "getBtAddress" << btAddr;
|
||||
return btAddr;
|
||||
}
|
||||
return QString();
|
||||
#endif
|
||||
}
|
||||
|
||||
void QMLManager::finishSetup()
|
||||
{
|
||||
// Initialize cloud credentials.
|
||||
|
||||
@ -121,6 +121,7 @@ public:
|
||||
Q_INVOKABLE QStringList getDCListFromVendor(const QString& vendor);
|
||||
Q_INVOKABLE int getVendorIndex();
|
||||
Q_INVOKABLE int getProductIndex();
|
||||
Q_INVOKABLE QString getBtAddress();
|
||||
#if BT_SUPPORT
|
||||
void btDeviceDiscovered(const QBluetoothDeviceInfo &device);
|
||||
#endif
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user