summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2016-03-13 11:13:04 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2016-03-13 11:13:04 -0700
commit8dcb6fa25cc9a1e9227181d2e6e3908f0d99cc75 (patch)
tree5e7d7b1a99f6829f72a8b3cd649d5f50b995c4b6
parent087cda05e624e0c6e053ec03d749bbba08b31d74 (diff)
downloadsubsurface-8dcb6fa25cc9a1e9227181d2e6e3908f0d99cc75.tar.gz
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 <dirk@hohndel.org>
-rw-r--r--qt-mobile/qml/main.qml6
-rw-r--r--qt-mobile/qmlmanager.cpp7
-rw-r--r--qt-mobile/qmlmanager.h1
3 files changed, 14 insertions, 0 deletions
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
@@ -190,6 +190,12 @@ MobileComponents.ApplicationWindow {
}
},
Action {
+ text: "User manual"
+ onTriggered: {
+ manager.showUserManual()
+ }
+ },
+ Action {
text: "About"
onTriggered: {
stackView.push(aboutWindow)
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);