From 9614a11e182ceafb28776f0e38260872f3c5559a Mon Sep 17 00:00:00 2001 From: Mikko Ahlroth Date: Mon, 27 Jan 2014 16:24:16 +0200 Subject: [PATCH] Add an about page and update licence comments for new year --- harbour-sailtime.pro | 3 +- qml/cover/CoverPage.qml | 2 +- qml/harbour-sailtime.qml | 3 +- qml/js/storage.js | 2 +- qml/pages/AboutPage.qml | 69 +++++++++++++++++++++++++++++++++++++++ qml/pages/FirstPage.qml | 13 ++++++-- qml/pages/SecondPage.qml | 2 +- rpm/harbour-sailtime.spec | 2 +- rpm/harbour-sailtime.yaml | 2 +- src/harbour-sailtime.cpp | 2 +- src/uptimechecker.cpp | 2 +- src/uptimechecker.h | 2 +- 12 files changed, 92 insertions(+), 12 deletions(-) create mode 100644 qml/pages/AboutPage.qml diff --git a/harbour-sailtime.pro b/harbour-sailtime.pro index e608c04..1b927b2 100644 --- a/harbour-sailtime.pro +++ b/harbour-sailtime.pro @@ -22,5 +22,6 @@ OTHER_FILES += qml/harbour-sailtime.qml \ qml/js/storage.js \ rpm/harbour-sailtime.spec \ rpm/harbour-sailtime.yaml \ - harbour-sailtime.desktop + harbour-sailtime.desktop \ + qml/pages/AboutPage.qml diff --git a/qml/cover/CoverPage.qml b/qml/cover/CoverPage.qml index 83f10cc..9a6aeaf 100644 --- a/qml/cover/CoverPage.qml +++ b/qml/cover/CoverPage.qml @@ -1,5 +1,5 @@ /* - * © Mikko Ahlroth 2013 + * © Mikko Ahlroth 2013–2014 * SailTime is open source software. For licensing information, please check * the LICENCE file. */ diff --git a/qml/harbour-sailtime.qml b/qml/harbour-sailtime.qml index ae6dc31..5b5a943 100644 --- a/qml/harbour-sailtime.qml +++ b/qml/harbour-sailtime.qml @@ -1,5 +1,5 @@ /* - * © Mikko Ahlroth 2013 + * © Mikko Ahlroth 2013–2014 * SailTime is open source software. For licensing information, please check * the LICENCE file. */ @@ -53,6 +53,7 @@ ApplicationWindow interval: secondpage.refreshInterval * 60 * 1000 onTriggered: { //console.log("Timer fired!") + //console.log("Time is now " + new Date()); updateDisplay() } repeat: true diff --git a/qml/js/storage.js b/qml/js/storage.js index d46bd7e..7a8db62 100644 --- a/qml/js/storage.js +++ b/qml/js/storage.js @@ -1,5 +1,5 @@ /* - * © Mikko Ahlroth 2013 + * © Mikko Ahlroth 2013–2014 * SailTime is open source software. For licensing information, please check * the LICENCE file. */ diff --git a/qml/pages/AboutPage.qml b/qml/pages/AboutPage.qml new file mode 100644 index 0000000..e9d318a --- /dev/null +++ b/qml/pages/AboutPage.qml @@ -0,0 +1,69 @@ +/* + * © Mikko Ahlroth 2013–2014 + * SailTime is open source software. For licensing information, please check + * the LICENCE file. + */ + +import QtQuick 2.0 +import Sailfish.Silica 1.0 + +Page { + id: aboutPage + + SilicaFlickable { + anchors.fill: parent + + // Tell SilicaFlickable the height of its content. + contentHeight: column.height + + // Place our content in a Column. The PageHeader is always placed at the top + // of the page, followed by our content. + Column { + id: column + + width: page.width + spacing: Theme.paddingLarge + PageHeader { + title: "About" + } + + Label { + anchors.horizontalCenter: parent.horizontalCenter + text: "SailTime 1.0.2" + color: Theme.highlightColor + font.pixelSize: Theme.fontSizeLarge + } + + Label { + anchors.horizontalCenter: parent.horizontalCenter + text: "© Mikko Ahlroth 2013–2014" + color: Theme.primaryColor + font.pixelSize: Theme.fontSizeMedium + } + + Separator { + x: Theme.paddingLarge + width: parent.width - Theme.paddingLarge * 2 + horizontalAlignment: Qt.AlignCenter + color: Theme.highlightColor + } + + Label { + anchors.horizontalCenter: parent.horizontalCenter + text: "SailTime is open source software. You can find the licence details and source code on BitBucket." + color: Theme.primaryColor + font.pixelSize: Theme.fontSizeMedium + wrapMode: Text.WordWrap + width: parent.width - Theme.paddingLarge * 2 + } + + Button { + text: "Open project website in browser" + anchors.horizontalCenter: parent.horizontalCenter + onClicked: Qt.openUrlExternally("https://bitbucket.org/Nicd/sailtime"); + } + } + } +} + + diff --git a/qml/pages/FirstPage.qml b/qml/pages/FirstPage.qml index 716c05f..090bc1d 100644 --- a/qml/pages/FirstPage.qml +++ b/qml/pages/FirstPage.qml @@ -1,5 +1,5 @@ /* - * © Mikko Ahlroth 2013 + * © Mikko Ahlroth 2013–2014 * SailTime is open source software. For licensing information, please check * the LICENCE file. */ @@ -8,6 +8,10 @@ import QtQuick 2.0 import Sailfish.Silica 1.0 Page { + AboutPage { + id: aboutpage + } + id: page property alias page : page @@ -30,9 +34,14 @@ Page { // PullDownMenu and PushUpMenu must be declared in SilicaFlickable, SilicaListView or SilicaGridView PullDownMenu { + MenuItem { + text: "About..." + onClicked: pageStack.push(aboutpage); + } + MenuItem { text: "Settings" - onClicked: pageStack.push(secondpage) + onClicked: pageStack.push(secondpage); } MenuItem { diff --git a/qml/pages/SecondPage.qml b/qml/pages/SecondPage.qml index 8616365..360a02a 100644 --- a/qml/pages/SecondPage.qml +++ b/qml/pages/SecondPage.qml @@ -1,5 +1,5 @@ /* - * © Mikko Ahlroth 2013 + * © Mikko Ahlroth 2013–2014 * SailTime is open source software. For licensing information, please check * the LICENCE file. */ diff --git a/rpm/harbour-sailtime.spec b/rpm/harbour-sailtime.spec index f925b16..f225fad 100644 --- a/rpm/harbour-sailtime.spec +++ b/rpm/harbour-sailtime.spec @@ -13,7 +13,7 @@ Name: harbour-sailtime %{!?qtc_make:%define qtc_make make} %{?qtc_builddir:%define _builddir %qtc_builddir} Summary: SailTime -Version: 1.0.1 +Version: 1.0.2 Release: 1 Group: Qt/Qt License: MIT Expat licence diff --git a/rpm/harbour-sailtime.yaml b/rpm/harbour-sailtime.yaml index 208c151..3371290 100644 --- a/rpm/harbour-sailtime.yaml +++ b/rpm/harbour-sailtime.yaml @@ -1,6 +1,6 @@ Name: harbour-sailtime Summary: SailTime -Version: 1.0.1 +Version: 1.0.2 Release: 1 Group: Qt/Qt URL: http://example.org/ diff --git a/src/harbour-sailtime.cpp b/src/harbour-sailtime.cpp index 4d605b4..30574af 100644 --- a/src/harbour-sailtime.cpp +++ b/src/harbour-sailtime.cpp @@ -1,5 +1,5 @@ /* - * © Mikko Ahlroth 2013 + * © Mikko Ahlroth 2013–2014 * SailTime is open source software. For licensing information, please check * the LICENCE file. */ diff --git a/src/uptimechecker.cpp b/src/uptimechecker.cpp index c83c229..253072b 100644 --- a/src/uptimechecker.cpp +++ b/src/uptimechecker.cpp @@ -1,5 +1,5 @@ /* - * © Mikko Ahlroth 2013 + * © Mikko Ahlroth 2013–2014 * SailTime is open source software. For licensing information, please check * the LICENCE file. */ diff --git a/src/uptimechecker.h b/src/uptimechecker.h index 7cae4d7..1898e82 100644 --- a/src/uptimechecker.h +++ b/src/uptimechecker.h @@ -1,5 +1,5 @@ /* - * © Mikko Ahlroth 2013 + * © Mikko Ahlroth 2013–2014 * SailTime is open source software. For licensing information, please check * the LICENCE file. */