From 8dcb6fa25cc9a1e9227181d2e6e3908f0d99cc75 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Sun, 13 Mar 2016 11:13:04 -0700 Subject: QML UI: show user manual in browser window This is so obvious... and I know others asked for this before. Should definitely have been in the first version... Fixes #1026 Signed-off-by: Dirk Hohndel --- qt-mobile/qml/main.qml | 6 ++++++ qt-mobile/qmlmanager.cpp | 7 +++++++ qt-mobile/qmlmanager.h | 1 + 3 files changed, 14 insertions(+) (limited to 'qt-mobile') diff --git a/qt-mobile/qml/main.qml b/qt-mobile/qml/main.qml index 4e2c42f7b..259cb5d99 100644 --- a/qt-mobile/qml/main.qml +++ b/qt-mobile/qml/main.qml @@ -189,6 +189,12 @@ MobileComponents.ApplicationWindow { } } }, + Action { + text: "User manual" + onTriggered: { + manager.showUserManual() + } + }, Action { text: "About" onTriggered: { diff --git a/qt-mobile/qmlmanager.cpp b/qt-mobile/qmlmanager.cpp index 8de52cb81..5b47efbd0 100644 --- a/qt-mobile/qmlmanager.cpp +++ b/qt-mobile/qmlmanager.cpp @@ -986,6 +986,13 @@ void QMLManager::showMap(const QString& location) } } +#define MOBILEUSERMANUAL QUrl(QLatin1Literal("https://subsurface-divelog.org/documentation/subsurface-mobile-user-manual/")) + +void QMLManager::showUserManual() +{ + QDesktopServices::openUrl(MOBILEUSERMANUAL); +} + // where in the QML dive list is that dive? int QMLManager::getIndex(const QString &diveId) { diff --git a/qt-mobile/qmlmanager.h b/qt-mobile/qmlmanager.h index 04374bde6..01ccf0303 100644 --- a/qt-mobile/qmlmanager.h +++ b/qt-mobile/qmlmanager.h @@ -109,6 +109,7 @@ public slots: void finishSetup(); void openLocalThenRemote(QString url); void showMap(const QString& location); + void showUserManual(); int getIndex(const QString& diveId); QString getNumber(const QString& diveId); QString getDate(const QString& diveId); -- cgit v1.2.3-70-g09d2