Changeset fd96dac in subsurface


Ignore:
Timestamp:
Jul 9, 2017, 3:07:44 PM (2 months ago)
Author:
Dirk Hohndel <dirk@…>
Branches:
master
Children:
f67b3a9
Parents:
8e5c211e
git-author:
Dirk Hohndel <dirk@…> (07/09/17 15:07:16)
git-committer:
Dirk Hohndel <dirk@…> (07/09/17 15:07:44)
Message:

QML UI: add progress message variable

To be shared between C/C++ and QML code in order to show the updates
and potential error messages from libdivecomputer.

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

Location:
mobile-widgets
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • mobile-widgets/qmlmanager.cpp

    rd2a5bf8 rfd96dac  
    15091509}
    15101510
     1511QString QMLManager::progressMessage() const
     1512{
     1513        return m_progressMessage;
     1514}
     1515
     1516void QMLManager::setProgressMessage(QString text)
     1517{
     1518        m_progressMessage = text;
     1519        emit progressMessageChanged();
     1520}
     1521
    15111522#if defined (Q_OS_ANDROID)
    15121523
  • mobile-widgets/qmlmanager.h

    r206df22 rfd96dac  
    4141        Q_PROPERTY(QStringList cylinderInit READ cylinderInit CONSTANT)
    4242        Q_PROPERTY(bool showPin READ showPin WRITE setShowPin NOTIFY showPinChanged)
     43        Q_PROPERTY(QString progressMessage READ progressMessage WRITE setProgressMessage NOTIFY progressMessageChanged)
    4344
    4445public:
     
    111112        int selectedDiveTimestamp() const;
    112113        void setSelectedDiveTimestamp(int when);
     114
     115        QString progressMessage() const;
     116        void setProgressMessage(QString text);
    113117
    114118        typedef void (QMLManager::*execute_function_type)();
     
    204208        bool m_showPin;
    205209        DCDeviceData *m_device_data;
     210        QString m_progressMessage;
    206211
    207212signals:
     
    226231        void showPinChanged();
    227232        void sendScreenChanged(QScreen *screen);
     233        void progressMessageChanged();
    228234};
    229235
Note: See TracChangeset for help on using the changeset viewer.