diff --git a/common/GPodderCore.qml b/common/GPodderCore.qml index a4c38d8..3ddb328 100644 --- a/common/GPodderCore.qml +++ b/common/GPodderCore.qml @@ -28,6 +28,10 @@ Python { property string progname: 'gpodder' property bool ready: false property bool refreshing: false + + property string coreversion + property string uiversion + signal downloadProgress(int episode_id, real progress) signal playbackProgress(int episode_id, real progress) signal podcastListChanged() @@ -39,8 +43,11 @@ Python { Component.onCompleted: { setHandler('hello', function (coreversion, uiversion) { - console.log('gPodder Core ' + coreversion); - console.log('gPodder QML UI ' + uiversion); + py.coreversion = coreversion; + py.uiversion = uiversion; + + console.log('gPodder Core ' + py.coreversion); + console.log('gPodder QML UI ' + py.uiversion); console.log('PyOtherSide ' + py.pluginVersion()); console.log('Python ' + py.pythonVersion()); }); diff --git a/touch/AboutPage.qml b/touch/AboutPage.qml new file mode 100644 index 0000000..8d86d8e --- /dev/null +++ b/touch/AboutPage.qml @@ -0,0 +1,83 @@ + +/** + * + * gPodder QML UI Reference Implementation + * Copyright (c) 2013, Thomas Perl + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH + * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + * AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, + * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM + * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR + * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + * PERFORMANCE OF THIS SOFTWARE. + * + */ + +import QtQuick 2.0 + +SlidePage { + id: aboutPage + + Flickable { + id: flickable + anchors.fill: parent + boundsBehavior: Flickable.StopAtBounds + + contentWidth: detailColumn.width + contentHeight: detailColumn.height + detailColumn.spacing + + Column { + id: detailColumn + + width: aboutPage.width + spacing: 5 * pgst.scalef + + SlidePageHeader { + title: 'About gPodder' + } + + SectionHeader { + text: 'How to use' + width: parent.width + } + + PLabel { + width: parent.width * .9 + font.pixelSize: 30 * pgst.scalef + anchors.horizontalCenter: parent.horizontalCenter + wrapMode: Text.WordWrap + text: 'Swipe left on a page to reveal the menu for that page. Go back by swiping pages to the right.\n\nAdd subscriptions via their feed URL or use gpodder.net to search for podcasts.' + } + + SectionHeader { + text: 'More information' + width: parent.width + } + + PLabel { + width: parent.width * .9 + font.pixelSize: 20 * pgst.scalef + anchors.horizontalCenter: parent.horizontalCenter + wrapMode: Text.WordWrap + text: [ + '© 2005-2014 Thomas Perl and the gPodder Team', + 'License: ISC / GPLv3 or later', + 'Website: http://gpodder.org/', + '', + 'gPodder Core ' + py.coreversion, + 'gPodder QML UI ' + py.uiversion, + 'PyOtherSide ' + py.pluginVersion(), + 'Python ' + py.pythonVersion() + ].join('\n') + } + } + } + + PScrollDecorator { flickable: flickable } +} + diff --git a/touch/StartPage.qml b/touch/StartPage.qml index 28fa7db..a3f3d21 100644 --- a/touch/StartPage.qml +++ b/touch/StartPage.qml @@ -27,6 +27,19 @@ import 'common/util.js' as Util SlidePage { id: startPage canClose: false + hasPull: true + + PullMenu { + PullMenuItem { + text: 'Now Playing' + color: Constants.colors.playback + icon: Icons.play + onClicked: { + pgst.loadPage('PlayerPage.qml'); + startPage.unPull(); + } + } + } function update_stats() { py.call('main.get_stats', [], function (result) { @@ -182,35 +195,26 @@ SlidePage { } } - ButtonArea { - onClicked: pgst.loadPage('PlayerPage.qml'); - - anchors { - left: freshEpisodes.left - right: freshEpisodes.right + Repeater { + model: ListModel { + ListElement { caption: 'gpodder.net'; target: 'Directory.qml' } + ListElement { caption: 'Help'; target: 'AboutPage.qml' } } - height: 100 * pgst.scalef + delegate: ButtonArea { + onClicked: pgst.loadPage(target) - PLabel { - anchors.centerIn: parent - text: 'Now playing' - } - } + anchors { + left: freshEpisodes.left + right: freshEpisodes.right + } - ButtonArea { - onClicked: pgst.loadPage('Directory.qml'); + height: 80 * pgst.scalef - anchors { - left: freshEpisodes.left - right: freshEpisodes.right - } - - height: 100 * pgst.scalef - - PLabel { - anchors.centerIn: parent - text: 'gpodder.net' + PLabel { + anchors.centerIn: parent + text: caption + } } } }