signal longPressFeed(string key)
signal categoryReloadRequest()
signal feedReloadRequest()
+ signal articlesReloadRequest()
signal addFileSignal(string fullname, string filename)
+ property string articleid
property string feedid
property string catid
+ property bool isUpdateInProgress: false
+ property int updateProgressValue: 0
+
function addFileNotification(fullname, filename) {
window.addFileSignal(fullname,filename)
}
+ function updateStarted() {
+ banner.show(qsTr("Update Started"))
+ updateProgressValue = 0
+ isUpdateInProgress = true
+ }
+
+ function updateFinished() {
+ categoryReloadRequest()
+ feedReloadRequest()
+ banner.show(qsTr("Updated Completed"))
+ isUpdateInProgress = false
+ }
+
+ function updateProgress(total, completed) {
+ if (total>0) {
+ updateProgressValue = Math.round(100*completed/total);
+ } else {
+ updateProgressValue = 0
+ }
+ }
+
onLongPressFeed: {
unsubscribeFeedMenu.key = key
unsubscribeFeedMenu.open()
id: myArticlesMenu
visualParent: pageStack
MenuLayout {
- MenuItem { text: qsTr("Mark All As Read"); onClicked: controller.markAllAsRead(feedid); }
+ MenuItem { text: qsTr("Mark All As Read"); onClicked: {
+ controller.markAllAsRead(feedid);
+ articlesReloadRequest()
+ }
+ }
MenuItem { text: qsTr("Update Feed"); onClicked: controller.updateFeed(feedid); }
//MenuItem { text: qsTr("About FeedingIt"); onClicked: query.open(); }
}
id: query
icon: "common/images/feedingit.png"
titleText: "Feedingit RSS Reader"
- message: "Version: 0.0.9"
+ message: "Version: n9-0.1.0"
+"<br><br>FeedingIt RSS Reader.<br>"
+"<br>© 2011 feedingit.marcoz.org"
+"<br>http://feedingit.marcoz.org"
id: feedsItem
onFeedClicked: {
window.feedid = feedid
- pageStack.push(articlesPage)
+ pageStack.push(articlesListPage)
}
}
}
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.articleShown = false;
- flipper.reload()
- } else {
- window.feedReloadRequest();
- pageStack.pop();
- }
+ window.feedReloadRequest();
+ pageStack.pop();
+ }
+ }
+
+ 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: articleViewPage
+ Page {
+ tools: articleTools
+ property string feedid: window.feedid
+
+
+ Articles {
+ id: articlePage
+ property string mainArticleId: window.articleid;
+ }
+
+ ToolBarLayout {
+ id: articleTools
+ visible: false
+ ToolIcon { iconId: "toolbar-back";
+ onClicked: {
+ window.articlesReloadRequest();
+ pageStack.pop();
}
}
ToolIcon {
platformIconId: "toolbar-previous"
- visible: flipper.articleShown
- //anchors.right: (parent === undefined) ? undefined : parent.right
- onClicked: flipper.prev();
+ onClicked: articlePage.prev();
}
ToolIcon {
- platformIconId: "toolbar-next"
- visible: flipper.articleShown
- //anchors.right: (parent === undefined) ? undefined : parent.right
- onClicked: flipper.next()
+ platformIconId: "toolbar-share"
+ onClicked: {
+ controller.share(window.feedid, articlePage.mainArticleId);
+ }
}
ToolIcon {
- platformIconId: "toolbar-view-menu"
- anchors.right: (parent === undefined) ? undefined : parent.right
- onClicked: (myArticlesMenu.status == DialogStatus.Closed) ? myArticlesMenu.open() : myArticlesMenu.close()
+ platformIconId: "toolbar-next"
+ onClicked: articlePage.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()
+// }
}
}
//text: "This is an info banner with no icon"
}
+
+// Item {
+// AutomaticUpdate {
+// id: autoUpdate
+// }
+
+// Connections {
+// target: settings
+// onAutoUpdateEnabledChanged: {
+// if (!settings.autoUpdateEnabled) {
+// autoUpdate.stop();
+// } else {
+// autoUpdate.start();
+// }
+// }
+// }
+// }
}