mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
QML UI: make BT state available to QML
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
bec5f3c44f
commit
2c111bb4cc
2 changed files with 12 additions and 0 deletions
|
@ -113,6 +113,9 @@ QMLManager::QMLManager() : m_locationServiceEnabled(false),
|
||||||
// ensure that we start the BTDiscovery - this should be triggered by the export of the class
|
// ensure that we start the BTDiscovery - this should be triggered by the export of the class
|
||||||
// to QML, but that doesn't seem to always work
|
// to QML, but that doesn't seem to always work
|
||||||
BTDiscovery *btDiscovery = BTDiscovery::instance();
|
BTDiscovery *btDiscovery = BTDiscovery::instance();
|
||||||
|
m_btEnabled = btDiscovery->btAvailable();
|
||||||
|
#else
|
||||||
|
m_btEnabled = false;
|
||||||
#endif
|
#endif
|
||||||
setShowPin(false);
|
setShowPin(false);
|
||||||
// create location manager service
|
// create location manager service
|
||||||
|
@ -1559,6 +1562,11 @@ void QMLManager::setLibdcLog(bool value)
|
||||||
emit libdcLogChanged();
|
emit libdcLogChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool QMLManager::btEnabled() const
|
||||||
|
{
|
||||||
|
return m_btEnabled;
|
||||||
|
}
|
||||||
|
|
||||||
#if defined (Q_OS_ANDROID)
|
#if defined (Q_OS_ANDROID)
|
||||||
|
|
||||||
void writeToAppLogFile(QString logText)
|
void writeToAppLogFile(QString logText)
|
||||||
|
|
|
@ -129,6 +129,8 @@ public:
|
||||||
bool showPin() const;
|
bool showPin() const;
|
||||||
void setShowPin(bool enable);
|
void setShowPin(bool enable);
|
||||||
Q_INVOKABLE void setStatusbarColor(QColor color);
|
Q_INVOKABLE void setStatusbarColor(QColor color);
|
||||||
|
Q_INVOKABLE bool btEnabled() const;
|
||||||
|
|
||||||
#if defined(Q_OS_ANDROID)
|
#if defined(Q_OS_ANDROID)
|
||||||
void writeToAppLogFile(QString logText);
|
void writeToAppLogFile(QString logText);
|
||||||
#endif
|
#endif
|
||||||
|
@ -216,6 +218,8 @@ private:
|
||||||
DCDeviceData *m_device_data;
|
DCDeviceData *m_device_data;
|
||||||
QString m_progressMessage;
|
QString m_progressMessage;
|
||||||
bool m_libdcLog;
|
bool m_libdcLog;
|
||||||
|
bool m_btEnabled;
|
||||||
|
|
||||||
#if defined(Q_OS_ANDROID)
|
#if defined(Q_OS_ANDROID)
|
||||||
QString appLogFileName;
|
QString appLogFileName;
|
||||||
QFile appLogFile;
|
QFile appLogFile;
|
||||||
|
|
Loading…
Add table
Reference in a new issue