4 // anchors.fill: parent;
5 width: 300; //height: 0;
6 //anchors.top: parent.top; anchors.bottom: parent.bottom
11 var doc = new XMLHttpRequest();
12 doc.onreadystatechange = function() {
13 if (doc.readyState == XMLHttpRequest.DONE) {
14 var a = doc.responseXML.documentElement;
15 //for (var ii = 0; ii < a.childNodes.length; ++ii) {
16 // console.log(ii+ " " + a.childNodes[ii].firstChild.nodeValue);
19 //console.log("node: " + a.childNodes[0].nodeValue)
20 config.hideReadFeeds = a.childNodes[0].firstChild.nodeValue;
21 config.hideReadArticles = a.childNodes[1].firstChild.nodeValue;
22 //console.log("feed " + hideReadFeeds + "\n")
23 //console.log("Articles " + hideReadArticles + "\n")
24 // showRequestInfo("Headers -->");
25 // showRequestInfo(doc.getAllResponseHeaders ());
26 // showRequestInfo("Last modified -->");
27 // showRequestInfo(doc.getResponseHeader ("Last-Modified"));
31 doc.open("GET", "http://localhost:8000/config");
37 id: hideReadFeedsSwitch;
38 text: qsTr("Hide Read Feeds");
39 value: config.hideReadFeeds
40 onClicked: config.hideReadFeeds = (config.hideReadFeeds == "False") ? "True" : "False"
44 id: hideReadArticlesSwitch;
45 text: qsTr("Hide Read Articles");
46 value: config.hideReadArticles
47 onClicked: config.hideReadArticles = (config.hideReadArticles == "False") ? "True" : "False"
48 anchors.top: hideReadFeedsSwitch.bottom
53 text: qsTr("Lock Rotation");
54 value: container.lockRotation ? "True" : "False"
55 onClicked: { container.lockRotation=!container.lockRotation;
56 container.selectedOrientation = (container.lockRotation) ? container.activeOrientation : Orientation.UnknownOrientation }
57 anchors.top: hideReadArticlesSwitch.bottom
62 text: qsTr("Enter Edit Mode");
63 value: container.editMode ? "True" : "False"
64 onClicked: { container.editMode=!container.editMode; }
65 anchors.top: lockRotation.bottom
83 anchors.top: editMode.bottom
87 anchors.fill: closeButton
88 onClicked: { config.isShown = false }
93 // id: configList; model: configs; delegate: configDelegate; z: 6;
94 // cacheBuffer: 100; width: parent.width; height: parent.height;
101 // //source: "http://api.flickr.com/services/feeds/photos_public.gne?"+(tags ? "tags="+tags+"&" : "")+"format=rss2"
102 // //source: "/home/ymarcoz/feedlist.xml"
103 // source: "http://localhost:8000/config"
104 // query: "/xml/config"
105 // //namespaceDeclarations: "declare namespace media=\"http://search.yahoo.com/mrss/\";"
107 // XmlRole { name: "hideReadFeeds"; query: "hideReadFeeds/string()" }
108 // XmlRole { name: "hideReadArticles"; query: "hideReadArticles/string()" }
109 // //XmlRole { name: "catid"; query: "catid/string()"; isKey: true }
114 // id: configDelegate
118 // id: wrapper; width: wrapper.ListView.view.width; height: 86
121 // height: parent.height
122 // Rectangle { color: "black"; opacity: index % 2 ? 0.2 : 0.4; height: 84; width: wrapper.width; y: 1 }
124 // x: 6; y: 4; width: 77; height: parent.height - 9; color: "white"; smooth: true
128 // x: 92; width: wrapper.ListView.view.width - 95; y: 15; spacing: 2
129 // Text { text: title; color: "white"; width: parent.width; font.bold: true; elide: Text.ElideRight; style: Text.Raised; styleColor: "black" }
130 // //Text { text: feedname; width: parent.width; elide: Text.ElideLeft; color: "#cccccc"; style: Text.Raised; styleColor: "black" }
133 // MouseArea { anchors.fill: wrapper; onClicked: { container.categoryClicked(catid); } }
137 Component.onCompleted: getConfig();