Changeset be271e7 in subsurface


Ignore:
Timestamp:
May 31, 2017, 10:14:24 AM (4 weeks ago)
Author:
Dirk Hohndel <dirk@…>
Branches:
master
Children:
782caf5
Parents:
e0771e50
git-author:
Dirk Hohndel <dirk@…> (05/30/17 17:48:58)
git-committer:
Dirk Hohndel <dirk@…> (05/31/17 10:14:24)
Message:

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@…>

Location:
mobile-widgets
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • mobile-widgets/qmlmanager.cpp

    r18eff8f rbe271e7  
    248248#endif
    249249        return -1;
     250}
     251
     252QString QMLManager::getBtAddress()
     253{
     254#if BT_SUPPORT
     255        if (!btDCs.isEmpty()) {
     256                QString btAddr = btDCs.first().btdi.address().toString();
     257                qDebug() << "getBtAddress" << btAddr;
     258                return btAddr;
     259        }
     260        return QString();
     261#endif
    250262}
    251263
  • mobile-widgets/qmlmanager.h

    r18eff8f rbe271e7  
    122122        Q_INVOKABLE int getVendorIndex();
    123123        Q_INVOKABLE int getProductIndex();
     124        Q_INVOKABLE QString getBtAddress();
    124125#if BT_SUPPORT
    125126        void btDeviceDiscovered(const QBluetoothDeviceInfo &device);
Note: See TracChangeset for help on using the changeset viewer.