2 import com.nokia.meego 1.0
6 initialPage: categoryPage
8 signal longPressCategory(string catid)
9 signal longPressFeed(string key)
10 signal categoryReloadRequest()
11 signal feedReloadRequest()
12 signal articlesReloadRequest()
13 signal addFileSignal(string fullname, string filename)
15 property string articleid
16 property string feedid
19 property bool isUpdateInProgress: false
20 property int updateProgressValue: 0
22 function addFileNotification(fullname, filename) {
23 window.addFileSignal(fullname,filename)
26 function updateStarted() {
27 banner.show(qsTr("Update Started"))
28 updateProgressValue = 0
29 isUpdateInProgress = true
32 function updateFinished() {
33 categoryReloadRequest()
35 banner.show(qsTr("Updated Completed"))
36 isUpdateInProgress = false
39 function updateProgress(total, completed) {
41 updateProgressValue = Math.round(100*completed/total);
43 updateProgressValue = 0
47 function openFeed(feedid) {
48 window.feedid = feedid
49 pageStack.push(articlesListPage)
53 unsubscribeFeedMenu.openMenu(key)
56 onLongPressCategory: {
57 unsubscribeCategoryMenu.catid = catid
58 unsubscribeCategoryMenu.open()
64 ToolIcon { iconId: "toolbar-back"; onClicked: { myMenu.close(); pageStack.pop(); }
65 visible: pageStack.depth>1 }
67 platformIconId: "toolbar-view-menu"
68 anchors.right: (parent === undefined) ? undefined : parent.right
69 onClicked: (myMenu.status == DialogStatus.Closed) ? myMenu.open() : myMenu.close()
75 visualParent: pageStack
77 MenuItem { text: qsTr("Settings"); onClicked: {pageStack.push(settingsPage)} }
78 MenuItem { text: qsTr("Manage Subscriptions"); onClicked: { pageStack.push(addFeedPage) } }
79 MenuItem { text: qsTr("Update All Categories"); onClicked: controller.updateAll(); }
80 MenuItem { text: qsTr("About FeedingIt"); onClicked: query.open(); }
86 visualParent: pageStack
88 MenuItem { text: qsTr("Update All Feeds"); onClicked: controller.updateCategory(catid); }
89 //MenuItem { text: qsTr("About FeedingIt"); onClicked: query.open(); }
95 visualParent: pageStack
97 MenuItem { text: qsTr("Mark All As Read"); onClicked: {
98 controller.markAllAsRead(feedid);
99 articlesReloadRequest()
102 MenuItem { text: qsTr("Update Feed"); onClicked: controller.updateFeed(feedid); }
103 //MenuItem { text: qsTr("About FeedingIt"); onClicked: query.open(); }
108 id: unsubscribeFeedMenu
109 visualParent: pageStack
112 function openMenu(feedid) {
113 unsubscribeFeedMenu.key = feedid
114 menuItemEventFeed.text = controller.getFeedEventStatus(unsubscribeFeedMenu.key) ? qsTr("Show on Event Feed"): qsTr("Do not show on Event Feed")
115 unsubscribeFeedMenu.open()
119 //MenuItem { text: qsTr("Update"); onClicked: controller.updateFeed(parent.feedid); }
121 id: menuItemEventFeed
122 //text: controller.getFeedEventStatus(unsubscribeFeedMenu.key) ? qsTr("Show on Event Feed"): qsTr("Do not show on Event Feed")
124 controller.switchEventFeedStatus(unsubscribeFeedMenu.key)
125 unsubscribeFeedMenu.close()
128 MenuItem { text: qsTr("Delete");
131 unsubscribeFeedMenu.close()
137 //icon: "common/images/feedingit.png"
138 //titleText: "Delete Feed?"
139 message: "Delete this feed?"
140 acceptButtonText: "OK"
141 rejectButtonText: "Cancel"
143 controller.removeFeed(unsubscribeFeedMenu.key);
144 window.feedReloadRequest()
150 id: unsubscribeCategoryMenu
151 visualParent: pageStack
152 property string catid
154 //MenuItem { text: qsTr("Update"); onClicked: controller.updateFeed(parent.feedid); }
155 MenuItem { text: qsTr("Delete");
157 categoryConfirm.open()
158 unsubscribeFeedMenu.close()
164 //icon: "common/images/feedingit.png"
165 //titleText: "Delete Feed?"
166 message: "Delete this category?"
167 acceptButtonText: "OK"
168 rejectButtonText: "Cancel"
170 controller.removeCategory(unsubscribeCategoryMenu.catid);
171 window.categoryReloadRequest()
178 icon: "common/images/feedingit.png"
179 titleText: "Feedingit RSS Reader"
180 message: "Version: n9-0.1.0"
181 +"<br><br>FeedingIt RSS Reader.<br>"
182 +"<br>© 2011 feedingit.marcoz.org"
183 +"<br>http://feedingit.marcoz.org"
184 acceptButtonText: "OK"
195 pageStack.push(feedsPage)
201 onCategoryReloadRequest: {
202 console.log("category reloaded")
203 categoriesItem.reload()
215 property string catid: window.catid
219 window.openFeed(feedid)
226 ToolIcon { iconId: "toolbar-back";
228 myArticlesMenu.close();
229 window.categoryReloadRequest()
234 platformIconId: "toolbar-view-menu"
235 anchors.right: (parent === undefined) ? undefined : parent.right
236 onClicked: (myFeedsMenu.status == DialogStatus.Closed) ? myFeedsMenu.open() : myFeedsMenu.close()
241 onFeedReloadRequest: feedsItem.reload()
249 tools: articleListTools
250 property string feedid: window.feedid
256 window.articleid = articleid
257 pageStack.push(articleViewPage)
264 ToolIcon { iconId: "toolbar-back";
266 myArticlesMenu.close();
267 window.feedReloadRequest();
273 platformIconId: "toolbar-view-menu"
274 anchors.right: (parent === undefined) ? undefined : parent.right
275 onClicked: (myArticlesMenu.status == DialogStatus.Closed) ? myArticlesMenu.open() : myArticlesMenu.close()
280 onArticlesReloadRequest: flipper.reload()
289 property string feedid: window.feedid
294 property string mainArticleId: window.articleid;
300 ToolIcon { iconId: "toolbar-back";
302 window.articlesReloadRequest();
308 platformIconId: "toolbar-previous"
309 onClicked: articlePage.prev();
313 platformIconId: "toolbar-share"
315 controller.share(window.feedid, articlePage.mainArticleId);
320 platformIconId: "toolbar-next"
321 onClicked: articlePage.next()
325 // platformIconId: "toolbar-view-menu"
326 // anchors.right: (parent === undefined) ? undefined : parent.right
327 // onClicked: (myArticlesMenu.status == DialogStatus.Closed) ? myArticlesMenu.open() : myArticlesMenu.close()
332 // onArticlesReloadRequest: flipper.reload()
344 onAddFileSignal: addFeedItem.addFileToDialog(fullname, filename)
364 width: parent.width - 20
365 height: bannerText.height + 20
371 border.color: "white"
376 anchors.centerIn: parent
380 wrapMode: Text.WordWrap;
388 onTriggered: banner.visible = false
392 bannerText.text = str;
393 banner.visible = true
401 banner.visible= false
405 //text: "This is an info banner with no icon"
415 // onAutoUpdateEnabledChanged: {
416 // if (!settings.autoUpdateEnabled) {
417 // autoUpdate.stop();
419 // autoUpdate.start();