Changeset 2c111bb in subsurface


Ignore:
Timestamp:
Jul 12, 2017, 4:14:24 AM (2 months ago)
Author:
Dirk Hohndel <dirk@…>
Branches:
master
Children:
b7b2e81
Parents:
bec5f3c
Message:

QML UI: make BT state available to QML

Signed-off-by: Dirk Hohndel <dirk@…>

Location:
mobile-widgets
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • mobile-widgets/qmlmanager.cpp

    r7b922a1 r2c111bb  
    114114        // to QML, but that doesn't seem to always work
    115115        BTDiscovery *btDiscovery = BTDiscovery::instance();
     116        m_btEnabled = btDiscovery->btAvailable();
     117#else
     118        m_btEnabled = false;
    116119#endif
    117120        setShowPin(false);
     
    15601563}
    15611564
     1565bool QMLManager::btEnabled() const
     1566{
     1567        return m_btEnabled;
     1568}
     1569
    15621570#if defined (Q_OS_ANDROID)
    15631571
  • mobile-widgets/qmlmanager.h

    r0a0c93e r2c111bb  
    130130        void setShowPin(bool enable);
    131131        Q_INVOKABLE void setStatusbarColor(QColor color);
     132        Q_INVOKABLE bool btEnabled() const;
     133
    132134#if defined(Q_OS_ANDROID)
    133135        void writeToAppLogFile(QString logText);
     
    217219        QString m_progressMessage;
    218220        bool m_libdcLog;
     221        bool m_btEnabled;
     222
    219223#if defined(Q_OS_ANDROID)
    220224        QString appLogFileName;
Note: See TracChangeset for help on using the changeset viewer.