Changeset 9111ce0 in subsurface


Ignore:
Timestamp:
Jul 9, 2017, 4:07:48 PM (11 days ago)
Author:
Dirk Hohndel <dirk@…>
Branches:
master
Children:
e6c2b145
Parents:
8e0895e4
Message:

QML UI: show progress messages on the download page

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

Location:
mobile-widgets
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • mobile-widgets/qml/DownloadFromDiveComputer.qml

    r8e0895e4 r9111ce0  
    170170                        }
    171171                }
    172 
    173172                Kirigami.Label {
    174                         text: qsTr(" Downloaded dives")
     173                        text: divesDownloaded ? qsTr(" Downloaded dives") :
     174                                                (manager.progressMessage != "" ? qsTr("Info:") + " " + manager.progressMessage : qsTr(" No dives"))
     175                        wrapMode: Text.WrapAtWordBoundaryOrAnywhere
    175176                }
    176177
  • mobile-widgets/qmlmanager.cpp

    rfd96dac r9111ce0  
    3434#define NOCLOUD_LOCALSTORAGE format_string("%s/cloudstorage/localrepo[master]", system_default_directory())
    3535
     36static void progressCallback(const char *text)
     37{
     38        QMLManager *self = QMLManager::instance();
     39        if (self) {
     40                self->appendTextToLog(QString(text));
     41                self->setProgressMessage(QString(text));
     42        }
     43}
     44
    3645static void appendTextToLogStandalone(const char *text)
    3746{
     
    94103        // create location manager service
    95104        locationProvider = new GpsLocation(&appendTextToLogStandalone, this);
    96         progress_callback = &appendTextToLogStandalone;
     105        progress_callback = &progressCallback;
    97106        connect(locationProvider, SIGNAL(haveSourceChanged()), this, SLOT(hasLocationSourceChanged()));
    98107        setLocationServiceAvailable(locationProvider->hasLocationsSource());
Note: See TracChangeset for help on using the changeset viewer.