import Qt 4.7 Item { id: articleViewer //width: 480; height: 360; width: parent.width; height: parent.height; property string feedid: parent.feedid //property string feedid: "61ac1458d761423344998dc76770e36e" //articlesItem.feedid; //property string hideReadArticles: ""; property alias articleShown: articleView.visible; property bool zoomEnabled: false; property bool vertPanningEnabled: true function modulo(x,y) { // Fixes modulo for negative numbers return ((x%y)+y)%y; } function reload() { articles.xml = articleViewer.feedid == "" ? "" : controller.getArticlesXml(articleViewer.feedid); articles.reload() } function next() { if (articleView.visible) { //articleView.positionViewAtIndex(modulo(articleView.currentIndex+1, articleView.count), ListView.Contain); articleView.incrementCurrentIndex(); } } function prev() { if (articleView.visible) { //articleView.positionViewAtIndex(modulo(articleView.currentIndex-1, articleView.count), ListView.Contain); articleView.decrementCurrentIndex(); } } function markAllAsRead() { if (feedid!="") { controller.markAllAsRead(feedid) articles.reload(); } } function viewArticle(articleid) { var index = 0; for (var i=0; i