X-Git-Url: http://git.maemo.org/git/?p=feedingit;a=blobdiff_plain;f=psa_harmattan%2Ffeedingit%2Fqml%2Fmain.qml;h=cb77f64da2e7f30a6c4f2cb2c52c2f121d3c5c5e;hp=6e3457313dc8f6561b41d1e49739f3dfd4aacd73;hb=215f828b2a47fe01e1c6f05a12e632a8f117ef12;hpb=3554380b7d321e3a75201ae65184a968ebd6084b diff --git a/psa_harmattan/feedingit/qml/main.qml b/psa_harmattan/feedingit/qml/main.qml index 6e34573..cb77f64 100644 --- a/psa_harmattan/feedingit/qml/main.qml +++ b/psa_harmattan/feedingit/qml/main.qml @@ -12,6 +12,7 @@ PageStackWindow { signal articlesReloadRequest() signal addFileSignal(string fullname, string filename) + property string articleid property string feedid property string catid @@ -197,7 +198,7 @@ PageStackWindow { id: feedsItem onFeedClicked: { window.feedid = feedid - pageStack.push(articlesPage) + pageStack.push(articlesListPage) } } @@ -225,54 +226,37 @@ PageStackWindow { } Component { - id: articlesPage + id: articlesListPage Page { - tools: articleTools + tools: articleListTools property string feedid: window.feedid + ArticleViewer { id: flipper + + onOpenArticle: { + window.articleid = articleid + pageStack.push(articleViewPage) + } } ToolBarLayout { - id: articleTools + id: articleListTools visible: false ToolIcon { iconId: "toolbar-back"; onClicked: { myArticlesMenu.close(); - if (flipper.articleShown) { - flipper.reload() - flipper.articleShown = false; - } else { +// if (flipper.articleShown) { +// flipper.reload() +// flipper.articleShown = false; +// } else { window.feedReloadRequest(); pageStack.pop(); - } +// } } } ToolIcon { - platformIconId: "toolbar-previous" - visible: flipper.articleShown - //anchors.right: (parent === undefined) ? undefined : parent.right - onClicked: flipper.prev(); - } - - ToolIcon { - platformIconId: "toolbar-share" - visible: flipper.articleShown - //anchors.right: (parent === undefined) ? undefined : parent.right - onClicked: { - controller.share(window.feedid, flipper.getCurrentArticleId()); - } - } - - ToolIcon { - platformIconId: "toolbar-next" - visible: flipper.articleShown - //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() @@ -286,6 +270,63 @@ PageStackWindow { } Component { + id: articleViewPage + Page { + tools: articleTools + property string feedid: window.feedid + property string mainArticleId: window.articleid + + Articles { + } + + ToolBarLayout { + id: articleTools + visible: false + ToolIcon { iconId: "toolbar-back"; + onClicked: { + myArticlesMenu.close(); + window.articlesReloadRequest(); + pageStack.pop(); + } + } + +// ToolIcon { +// platformIconId: "toolbar-previous" +// visible: flipper.articleShown +// //anchors.right: (parent === undefined) ? undefined : parent.right +// onClicked: flipper.prev(); +// } + +// ToolIcon { +// platformIconId: "toolbar-share" +// visible: flipper.articleShown +// //anchors.right: (parent === undefined) ? undefined : parent.right +// onClicked: { +// controller.share(window.feedid, mainArticleId); +// } +// } + +// ToolIcon { +// platformIconId: "toolbar-next" +// visible: article.articleShown +// //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() +// } + } +// Connections { +// target: window +// onArticlesReloadRequest: flipper.reload() +// } + } + } + + Component { id: addFeedPage AddFeed { id: addFeedItem