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.openMenu(key)
51 onLongPressCategory: {
52 unsubscribeCategoryMenu.catid = catid
53 unsubscribeCategoryMenu.open()
59 ToolIcon { iconId: "toolbar-back"; onClicked: { myMenu.close(); pageStack.pop(); }
60 visible: pageStack.depth>1 }
62 platformIconId: "toolbar-view-menu"
63 anchors.right: (parent === undefined) ? undefined : parent.right
64 onClicked: (myMenu.status == DialogStatus.Closed) ? myMenu.open() : myMenu.close()
70 visualParent: pageStack
72 MenuItem { text: qsTr("Settings"); onClicked: {pageStack.push(settingsPage)} }
73 MenuItem { text: qsTr("Manage Subscriptions"); onClicked: { pageStack.push(addFeedPage) } }
74 MenuItem { text: qsTr("Update All Categories"); onClicked: controller.updateAll(); }
75 MenuItem { text: qsTr("About FeedingIt"); onClicked: query.open(); }
81 visualParent: pageStack
83 MenuItem { text: qsTr("Update All Feeds"); onClicked: controller.updateCategory(catid); }
84 //MenuItem { text: qsTr("About FeedingIt"); onClicked: query.open(); }
90 visualParent: pageStack
92 MenuItem { text: qsTr("Mark All As Read"); onClicked: {
93 controller.markAllAsRead(feedid);
94 articlesReloadRequest()
97 MenuItem { text: qsTr("Update Feed"); onClicked: controller.updateFeed(feedid); }
98 //MenuItem { text: qsTr("About FeedingIt"); onClicked: query.open(); }
103 id: unsubscribeFeedMenu
104 visualParent: pageStack
107 function openMenu(feedid) {
108 unsubscribeFeedMenu.key = feedid
109 menuItemEventFeed.text = controller.getFeedEventStatus(unsubscribeFeedMenu.key) ? qsTr("Show on Event Feed"): qsTr("Do not show on Event Feed")
110 unsubscribeFeedMenu.open()
114 //MenuItem { text: qsTr("Update"); onClicked: controller.updateFeed(parent.feedid); }
116 id: menuItemEventFeed
117 //text: controller.getFeedEventStatus(unsubscribeFeedMenu.key) ? qsTr("Show on Event Feed"): qsTr("Do not show on Event Feed")
119 controller.switchEventFeedStatus(unsubscribeFeedMenu.key)
120 unsubscribeFeedMenu.close()
123 MenuItem { text: qsTr("Delete");
126 unsubscribeFeedMenu.close()
132 //icon: "common/images/feedingit.png"
133 //titleText: "Delete Feed?"
134 message: "Delete this feed?"
135 acceptButtonText: "OK"
136 rejectButtonText: "Cancel"
138 controller.removeFeed(unsubscribeFeedMenu.key);
139 window.feedReloadRequest()
145 id: unsubscribeCategoryMenu
146 visualParent: pageStack
147 property string catid
149 //MenuItem { text: qsTr("Update"); onClicked: controller.updateFeed(parent.feedid); }
150 MenuItem { text: qsTr("Delete");
152 categoryConfirm.open()
153 unsubscribeFeedMenu.close()
159 //icon: "common/images/feedingit.png"
160 //titleText: "Delete Feed?"
161 message: "Delete this category?"
162 acceptButtonText: "OK"
163 rejectButtonText: "Cancel"
165 controller.removeCategory(unsubscribeCategoryMenu.catid);
166 window.categoryReloadRequest()
173 icon: "common/images/feedingit.png"
174 titleText: "Feedingit RSS Reader"
175 message: "Version: n9-0.1.0"
176 +"<br><br>FeedingIt RSS Reader.<br>"
177 +"<br>© 2011 feedingit.marcoz.org"
178 +"<br>http://feedingit.marcoz.org"
179 acceptButtonText: "OK"
190 pageStack.push(feedsPage)
196 onCategoryReloadRequest: {
197 console.log("category reloaded")
198 categoriesItem.reload()
210 property string catid: window.catid
214 window.feedid = feedid
215 pageStack.push(articlesListPage)
222 ToolIcon { iconId: "toolbar-back";
224 myArticlesMenu.close();
225 window.categoryReloadRequest()
230 platformIconId: "toolbar-view-menu"
231 anchors.right: (parent === undefined) ? undefined : parent.right
232 onClicked: (myFeedsMenu.status == DialogStatus.Closed) ? myFeedsMenu.open() : myFeedsMenu.close()
237 onFeedReloadRequest: feedsItem.reload()
245 tools: articleListTools
246 property string feedid: window.feedid
252 window.articleid = articleid
253 pageStack.push(articleViewPage)
260 ToolIcon { iconId: "toolbar-back";
262 myArticlesMenu.close();
263 window.feedReloadRequest();
269 platformIconId: "toolbar-view-menu"
270 anchors.right: (parent === undefined) ? undefined : parent.right
271 onClicked: (myArticlesMenu.status == DialogStatus.Closed) ? myArticlesMenu.open() : myArticlesMenu.close()
276 onArticlesReloadRequest: flipper.reload()
285 property string feedid: window.feedid
290 property string mainArticleId: window.articleid;
296 ToolIcon { iconId: "toolbar-back";
298 window.articlesReloadRequest();
304 platformIconId: "toolbar-previous"
305 onClicked: articlePage.prev();
309 platformIconId: "toolbar-share"
311 controller.share(window.feedid, articlePage.mainArticleId);
316 platformIconId: "toolbar-next"
317 onClicked: articlePage.next()
321 // platformIconId: "toolbar-view-menu"
322 // anchors.right: (parent === undefined) ? undefined : parent.right
323 // onClicked: (myArticlesMenu.status == DialogStatus.Closed) ? myArticlesMenu.open() : myArticlesMenu.close()
328 // onArticlesReloadRequest: flipper.reload()
340 onAddFileSignal: addFeedItem.addFileToDialog(fullname, filename)
360 width: parent.width - 20
361 height: bannerText.height + 20
367 border.color: "white"
372 anchors.centerIn: parent
376 wrapMode: Text.WordWrap;
384 onTriggered: banner.visible = false
388 bannerText.text = str;
389 banner.visible = true
397 banner.visible= false
401 //text: "This is an info banner with no icon"
411 // onAutoUpdateEnabledChanged: {
412 // if (!settings.autoUpdateEnabled) {
413 // autoUpdate.stop();
415 // autoUpdate.start();