4 property string catid : parent.catid
5 property bool inEditMode: false
6 width: parent.width; height: parent.height;
8 signal feedClicked(string feedid)
11 feeds.xml = catid == "" ? "<?xml version=\"1.0\" encoding=\"utf-8\"?><xml></xml>" : controller.getFeedsXml(catid);
13 //console.log(feeds.xml)
16 //Component.onCompleted: { console.log(catid + "/" + parent.catid); console.log(feeds.xml) }
18 //onCatidChanged: console.log("catid changed: "+catid)
21 id: feedList; model: feeds; delegate: feedDelegate; z: 6
22 width: parent.width; height: parent.height; /*x: 0;*/
24 flickDeceleration: 1500
31 //source: catid == "" ? "" : "http://localhost:8000/feeds/" + catid //+ "?onlyUnread=" + parent.hideReadArticles
32 xml: catid == "" ? "<?xml version=\"1.0\" encoding=\"utf-8\"?><xml></xml>" : controller.getFeedsXml(catid)
35 XmlRole { name: "title"; query: "feedname/string()" }
36 XmlRole { name: "feedid"; query: "feedid/string()"; isKey: true }
37 XmlRole { name: "unread"; query: "unread/string()"; isKey: true }
38 XmlRole { name: "updatedDate"; query: "updatedDate/string()" }
39 XmlRole { name: "icon"; query: "icon/string()" }
40 XmlRole { name: "updating"; query: "updating/string()"; isKey: true }
41 //XmlRole { name: "url"; query: "url/string()"; }
49 //Component.onCompleted: console.log("item:"+feedid + " "+ visible + " "+ height + " " + width)
51 //width: wrapper.ListView.view.width;
52 visible: (unread == "0" && settings.hideReadFeeds) ? false : true
54 height: (visible) ? 86 : 0
59 Rectangle { color: settings.backColour; opacity: index % 2 ? 0.2 : 0.4; height: 84; width: wrapper.width; y: 1 }
61 x: 3; y: 4; width: 77; height: 77;
62 color: "#000000"; smooth: true
63 Image { width:32; height: 32; anchors.verticalCenter: parent.verticalCenter;
64 anchors.horizontalCenter: parent.horizontalCenter;
65 source: (icon == "False") ? "common/images/feedingit.png" : icon
66 // (updating=="True")? "common/images/loading.png" : (icon == "False") ? "common/images/feedingit.png" : icon;
67 // NumberAnimation on rotation {
68 // from: 0; to: 360; running: (updating=="True"); loops: Animation.Infinite; duration: 900
74 x: 92; width: wrapper.ListView.view.width - 95; y: 5; spacing: 2
75 Text { text: title; color: settings.mainTextColour;
77 font.bold: true; elide: Text.ElideRight; style: Text.Raised; styleColor: settings.mainShadowColour;
78 font.pointSize: settings.mainTextSize
81 text: updatedDate + " / " + qsTr("%1 unread items").arg(unread);
82 color: (unread=="0") ? settings.mainTextColour : settings.secondaryTextColour;
83 width: parent.width; font.bold: false; elide: Text.ElideRight;
84 //style: Text.Raised; styleColor: settings.mainShadowColour;
85 font.pointSize: settings.secondaryTextSize
87 //Text { text: feedname; width: parent.width; elide: Text.ElideLeft; color: "#cccccc"; style: Text.Raised; styleColor: "black" }
90 //// x: wrapper.ListView.view.width - 128; y: 12
91 //// height: 58; width: 58;
92 //// //anchors.horizontalCenter: parent.horizontalCenter;
93 //// Image { source: "common/images/wmEditIcon.png" }
95 //// anchors.fill: parent; onClicked: { container.feedEdit(feedname, feedid, url); }
97 //// visible: inEditMode
100 // x: wrapper.ListView.view.width - 64; y: 12
101 // height: 58; width: 58;
102 // //anchors.horizontalCenter: parent.horizontalCenter;
103 // Image { source: "common/images/delete.png" }
105 // anchors.fill: parent; onClicked: { container.feedDeleted(feedid); }
107 // visible: inEditMode
111 anchors.fill: wrapper;
113 //controller.feedClicked(model.feed)
118 window.longPressFeed(feedid)