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
48 unsubscribeFeedMenu.key = key
49 unsubscribeFeedMenu.open()
52 onLongPressCategory: {
53 unsubscribeCategoryMenu.catid = catid
54 unsubscribeCategoryMenu.open()
60 ToolIcon { iconId: "toolbar-back"; onClicked: { myMenu.close(); pageStack.pop(); }
61 visible: pageStack.depth>1 }
63 platformIconId: "toolbar-view-menu"
64 anchors.right: (parent === undefined) ? undefined : parent.right
65 onClicked: (myMenu.status == DialogStatus.Closed) ? myMenu.open() : myMenu.close()
71 visualParent: pageStack
73 MenuItem { text: qsTr("Settings"); onClicked: {pageStack.push(settingsPage)} }
74 MenuItem { text: qsTr("Manage Subscriptions"); onClicked: { pageStack.push(addFeedPage) } }
75 MenuItem { text: qsTr("Update All Categories"); onClicked: controller.updateAll(); }
76 MenuItem { text: qsTr("About FeedingIt"); onClicked: query.open(); }
82 visualParent: pageStack
84 MenuItem { text: qsTr("Update All Feeds"); onClicked: controller.updateCategory(catid); }
85 //MenuItem { text: qsTr("About FeedingIt"); onClicked: query.open(); }
91 visualParent: pageStack
93 MenuItem { text: qsTr("Mark All As Read"); onClicked: {
94 controller.markAllAsRead(feedid);
95 articlesReloadRequest()
98 MenuItem { text: qsTr("Update Feed"); onClicked: controller.updateFeed(feedid); }
99 //MenuItem { text: qsTr("About FeedingIt"); onClicked: query.open(); }
104 id: unsubscribeFeedMenu
105 visualParent: pageStack
108 //MenuItem { text: qsTr("Update"); onClicked: controller.updateFeed(parent.feedid); }
110 text: controller.getFeedEventStatus(key) ? qsTr("Show on Event Feed"): qsTr("Do not show on Event Feed")
112 controller.switchEventFeedStatus(key)
113 text = controller.getFeedEventStatus(key) ? qsTr("Show on Event Feed"): qsTr("Do not show on Event Feed")
114 unsubscribeFeedMenu.close()
117 MenuItem { text: qsTr("Delete");
120 unsubscribeFeedMenu.close()
126 //icon: "common/images/feedingit.png"
127 //titleText: "Delete Feed?"
128 message: "Delete this feed?"
129 acceptButtonText: "OK"
130 rejectButtonText: "Cancel"
132 controller.removeFeed(unsubscribeFeedMenu.key);
133 window.feedReloadRequest()
139 id: unsubscribeCategoryMenu
140 visualParent: pageStack
141 property string catid
143 //MenuItem { text: qsTr("Update"); onClicked: controller.updateFeed(parent.feedid); }
144 MenuItem { text: qsTr("Delete");
146 categoryConfirm.open()
147 unsubscribeFeedMenu.close()
153 //icon: "common/images/feedingit.png"
154 //titleText: "Delete Feed?"
155 message: "Delete this category?"
156 acceptButtonText: "OK"
157 rejectButtonText: "Cancel"
159 controller.removeCategory(unsubscribeCategoryMenu.catid);
160 window.categoryReloadRequest()
167 icon: "common/images/feedingit.png"
168 titleText: "Feedingit RSS Reader"
169 message: "Version: n9-0.1.0"
170 +"<br><br>FeedingIt RSS Reader.<br>"
171 +"<br>© 2011 feedingit.marcoz.org"
172 +"<br>http://feedingit.marcoz.org"
173 acceptButtonText: "OK"
184 pageStack.push(feedsPage)
190 onCategoryReloadRequest: {
191 console.log("category reloaded")
192 categoriesItem.reload()
204 property string catid: window.catid
208 window.feedid = feedid
209 pageStack.push(articlesListPage)
216 ToolIcon { iconId: "toolbar-back";
218 myArticlesMenu.close();
219 window.categoryReloadRequest()
224 platformIconId: "toolbar-view-menu"
225 anchors.right: (parent === undefined) ? undefined : parent.right
226 onClicked: (myFeedsMenu.status == DialogStatus.Closed) ? myFeedsMenu.open() : myFeedsMenu.close()
231 onFeedReloadRequest: feedsItem.reload()
239 tools: articleListTools
240 property string feedid: window.feedid
246 window.articleid = articleid
247 pageStack.push(articleViewPage)
254 ToolIcon { iconId: "toolbar-back";
256 myArticlesMenu.close();
257 window.feedReloadRequest();
263 platformIconId: "toolbar-view-menu"
264 anchors.right: (parent === undefined) ? undefined : parent.right
265 onClicked: (myArticlesMenu.status == DialogStatus.Closed) ? myArticlesMenu.open() : myArticlesMenu.close()
270 onArticlesReloadRequest: flipper.reload()
279 property string feedid: window.feedid
284 property string mainArticleId: window.articleid;
290 ToolIcon { iconId: "toolbar-back";
292 window.articlesReloadRequest();
298 platformIconId: "toolbar-previous"
299 onClicked: articlePage.prev();
303 platformIconId: "toolbar-share"
305 controller.share(window.feedid, articlePage.mainArticleId);
310 platformIconId: "toolbar-next"
311 onClicked: articlePage.next()
315 // platformIconId: "toolbar-view-menu"
316 // anchors.right: (parent === undefined) ? undefined : parent.right
317 // onClicked: (myArticlesMenu.status == DialogStatus.Closed) ? myArticlesMenu.open() : myArticlesMenu.close()
322 // onArticlesReloadRequest: flipper.reload()
334 onAddFileSignal: addFeedItem.addFileToDialog(fullname, filename)
354 width: parent.width - 20
355 height: bannerText.height + 20
361 border.color: "white"
366 anchors.centerIn: parent
370 wrapMode: Text.WordWrap;
378 onTriggered: banner.visible = false
382 bannerText.text = str;
383 banner.visible = true
391 banner.visible= false
395 //text: "This is an info banner with no icon"
405 // onAutoUpdateEnabledChanged: {
406 // if (!settings.autoUpdateEnabled) {
407 // autoUpdate.stop();
409 // autoUpdate.start();