QML UI: prepare to enter the cloud PIN on mobile UI

This just creates the properties to connect QML and C++ code.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2016-06-13 16:41:26 -07:00
parent d2f9803883
commit 5fa965df54
2 changed files with 35 additions and 0 deletions

View file

@ -95,6 +95,7 @@ QMLManager::QMLManager() : m_locationServiceEnabled(false),
qDebug() << QStringLiteral("build with Qt Version %1, runtime from Qt Version %2").arg(QT_VERSION_STR).arg(qVersion());
setStartPageText(tr("Starting..."));
setAccessingCloud(-1);
setShowPin(false);
// create location manager service
locationProvider = new GpsLocation(&appendTextToLogStandalone, this);
connect(locationProvider, SIGNAL(haveSourceChanged()), this, SLOT(hasLocationSourceChanged()));
@ -1183,6 +1184,17 @@ void QMLManager::setCloudPassword(const QString &cloudPassword)
emit cloudPasswordChanged();
}
QString QMLManager::cloudPin() const
{
return m_cloudPin;
}
void QMLManager::setCloudPin(const QString &cloudPin)
{
m_cloudPin = cloudPin;
emit cloudPinChanged();
}
QString QMLManager::cloudUserName() const
{
return m_cloudUserName;
@ -1421,3 +1433,14 @@ QStringList QMLManager::divemasterInit() const
divemasters.sort();
return divemasters;
}
bool QMLManager::showPin() const
{
return m_showPin;
}
void QMLManager::setShowPin(bool enable)
{
m_showPin = enable;
emit showPinChanged();
}