X-Git-Url: https://vcs.maemo.org/git/?a=blobdiff_plain;f=psa_harmattan%2Ffeedingit%2Fdeb_dist%2Ffeedingit-0.1.0%2Fqml%2Fmain.qml;h=dad5f3a1bbc8572308fe1fba52669ab9b441d60d;hb=8f86c50051d4f155f32c84ab3ee3256c240a3083;hp=5a6a1179c0a75030aca5d92e59c776a292e9e786;hpb=67e057e8ff211b20833bcd2952a11396c79e03dc;p=feedingit diff --git a/psa_harmattan/feedingit/deb_dist/feedingit-0.1.0/qml/main.qml b/psa_harmattan/feedingit/deb_dist/feedingit-0.1.0/qml/main.qml index 5a6a117..dad5f3a 100644 --- a/psa_harmattan/feedingit/deb_dist/feedingit-0.1.0/qml/main.qml +++ b/psa_harmattan/feedingit/deb_dist/feedingit-0.1.0/qml/main.qml @@ -3,8 +3,13 @@ import com.nokia.meego 1.0 PageStackWindow { + id: window initialPage: categoryPage + signal articleClosed() + property string feedid + property string catid + ToolBarLayout { id: commonTools visible: false @@ -21,6 +26,28 @@ PageStackWindow { id: myMenu visualParent: pageStack MenuLayout { + MenuItem { text: qsTr("Settings"); onClicked: {} } + MenuItem { text: qsTr("Add Feeds"); onClicked: { pageStack.push(addFeedPage) } } + MenuItem { text: qsTr("Update All Categories"); visible: pageStack.depth==3; onClicked: controller.updateAll(); } + MenuItem { text: qsTr("About FeedingIt"); onClicked: query.open(); } + } + } + + Menu { + id: myFeedsMenu + visualParent: pageStack + MenuLayout { + MenuItem { text: qsTr("Update All Feeds"); onClicked: controller.updateAll(); } + MenuItem { text: qsTr("About FeedingIt"); onClicked: query.open(); } + } + } + + Menu { + id: myArticlesMenu + visualParent: pageStack + MenuLayout { + MenuItem { text: qsTr("Mark All As Read"); onClicked: controller.markAllAsRead(feedid); } + MenuItem { text: qsTr("Update Feed"); onClicked: controller.updateFeed(feedid); } MenuItem { text: qsTr("About FeedingIt"); onClicked: query.open(); } } } @@ -49,31 +76,98 @@ PageStackWindow { Page { tools: commonTools Categories { - onCategoryClicked: pageStack.push(feedsPage, {catid: cat}) + onCategoryClicked: { + window.catid = cat + pageStack.push(feedsPage) + } } } } Component { id: feedsPage + Page { - tools: commonTools - property string catid + tools: feedsTools + anchors.fill: parent + property string catid: window.catid Feeds { id: feedsItem - onFeedClicked: pageStack.push(articlesPage, {feedid: feedid}) + onFeedClicked: { + window.feedid = feedid + pageStack.push(articlesPage) + } + } + ToolBarLayout { + id: feedsTools + visible: false + ToolIcon { iconId: "toolbar-back"; + onClicked: { + myArticlesMenu.close(); + pageStack.pop(); + } + } + ToolIcon { + platformIconId: "toolbar-view-menu" + anchors.right: (parent === undefined) ? undefined : parent.right + onClicked: (myFeedsMenu.status == DialogStatus.Closed) ? myFeedsMenu.open() : myFeedsMenu.close() + } } + Connections { + target: window + onArticleClosed: feedsItem.reload() + } } } Component { id: articlesPage Page { - tools: commonTools - property string feedid + tools: articleTools + property string feedid: window.feedid ArticleViewer { id: flipper } + + ToolBarLayout { + id: articleTools + visible: false + ToolIcon { iconId: "toolbar-back"; + onClicked: { + myArticlesMenu.close(); + if (flipper.articleShown) { + flipper.articleShown = false; + flipper.reload() + } else { + window.articleClosed(); + pageStack.pop(); + } + } + } + + ToolIcon { + platformIconId: "toolbar-prev" + //anchors.right: (parent === undefined) ? undefined : parent.right + onClicked: flipper.prev(); + } + + ToolIcon { + platformIconId: "toolbar-next" + //anchors.right: (parent === undefined) ? undefined : parent.right + onClicked: flipper.next() + } + + ToolIcon { + platformIconId: "toolbar-view-menu" + anchors.right: (parent === undefined) ? undefined : parent.right + onClicked: (myArticlesMenu.status == DialogStatus.Closed) ? myArticlesMenu.open() : myArticlesMenu.close() + } + } } } + + Component { + id: addFeedPage + AddFeed {} + } }