property string feedid: parent.feedid
//property string feedid: "61ac1458d761423344998dc76770e36e" //articlesItem.feedid;
//property string hideReadArticles: "";
- property alias articleShown: articleView.visible;
+ //property alias articleShown: articleView.visible;
property bool zoomEnabled: false;
property bool vertPanningEnabled: true
+ signal openArticle(string articleid);
+
function modulo(x,y) {
// Fixes modulo for negative numbers
return ((x%y)+y)%y;
clip: true
}
- ListView {
- id: articleView;
- property int webviewFontSize: settings.webviewFontSize
- model: articles;
- delegate: viewer
- orientation: ListView.Horizontal
- width: parent.width;
- height: updateBarArticles.visible? parent.height-updateBarArticles.height : parent.height;
- visible: false; z:8
- onCurrentIndexChanged: articleView.positionViewAtIndex(currentIndex, ListView.Contain)
- highlightRangeMode: ListView.StrictlyEnforceRange; snapMode: ListView.SnapOneItem
- //cacheBuffer: 5;
- onMovementStarted: articleViewer.vertPanningEnabled=false;
- onMovementEnded: articleViewer.vertPanningEnabled=true;
- highlightMoveDuration: 300;
- clip: true
- }
+// ListView {
+// id: articleView;
+// property int webviewFontSize: settings.webviewFontSize
+// model: articles;
+// delegate: viewer
+// orientation: ListView.Horizontal
+// width: parent.width;
+// height: updateBarArticles.visible? parent.height-updateBarArticles.height : parent.height;
+// visible: false; z:8
+// onCurrentIndexChanged: articleView.positionViewAtIndex(currentIndex, ListView.Contain)
+// highlightRangeMode: ListView.StrictlyEnforceRange; snapMode: ListView.SnapOneItem
+// //cacheBuffer: 5;
+// onMovementStarted: articleViewer.vertPanningEnabled=false;
+// onMovementEnded: articleViewer.vertPanningEnabled=true;
+// highlightMoveDuration: 300;
+// clip: true
+// }
ProgressBar {
id: updateBarArticles
font.pointSize: settings.articleListingTextSize
}
MouseArea { anchors.fill: listItem;
- onClicked: { articleView.currentIndex = index; articleView.visible = true; }
+ onClicked: {
+ articleViewer.openArticle(articleid)
+ //articleView.currentIndex = index; articleView.visible = true;
+ }
}
}
}
- Component {
- id: viewer
- Item {
- id: flipItem;
- width: articleDisplay.width;
- height: articleView.height;
-
- //property string url: (articleView.visible && Math.abs(articleView.currentIndex-index)<2) ? path: "";
- property string html: controller.getArticle(articleViewer.feedid, articleid)
- ArticleDisplay {
- id: articleDisplay
- zoomEnabled: articleViewer.zoomEnabled;
- property bool vertPanningEnabled: articleViewer.vertPanningEnabled;
-
- states: [ State {
- name: 'articleIsRead';
- when: articleView.visible && articleView.currentIndex == index;
- StateChangeScript {
- name: "myScript"
- script: {
- //flipItem.url=path;
- controller.setEntryRead(articleViewer.feedid, articleid)
- }
- }
- }
- ]
- }
- }
- }
+// Component {
+// id: viewer
+// Item {
+// id: flipItem;
+// width: articleDisplay.width;
+// height: articleView.height;
+
+// //property string url: (articleView.visible && Math.abs(articleView.currentIndex-index)<2) ? path: "";
+// property string html: controller.getArticle(articleViewer.feedid, articleid)
+// ArticleDisplay {
+// id: articleDisplay
+// zoomEnabled: articleViewer.zoomEnabled;
+// property bool vertPanningEnabled: articleViewer.vertPanningEnabled;
+
+// states: [ State {
+// name: 'articleIsRead';
+// when: articleView.visible && articleView.currentIndex == index;
+// StateChangeScript {
+// name: "myScript"
+// script: {
+// //flipItem.url=path;
+// controller.setEntryRead(articleViewer.feedid, articleid)
+// }
+// }
+// }
+// ]
+// }
+// }
+// }
XmlListModel {
id: articles