Qml support for harmattan version improved
[feedingit] / psa_harmattan / feedingit / deb_dist / feedingit-0.1.0 / debian / feedingit / usr / share / feedingit / qml / Feeds.qml
index 3aadc56..fa6a6c0 100644 (file)
@@ -1,19 +1,19 @@
 import Qt 4.7
 
 Item {
-    //anchors.fill: parent;
-    width: parent.width;
-    property string catid : ""
-    property bool inEditMode: true
-    x: parent.width; height: parent.height;
-    anchors.top: parent.top; anchors.bottom: parent.bottom
+    property string catid : parent.catid
+    property bool inEditMode: false
+    width: parent.width; height: parent.height;
+
+    signal feedClicked(string feedid)
 
     function reload() {
        feeds.xml = catid == "" ? "" : controller.getFeedsXml(catid);
         //feeds.reload()
+        console.log(feeds.xml)
     }
 
-    //Component.onCompleted: { console.log(x + " /") }
+    Component.onCompleted: { console.log(catid + "/" + parent.catid) }
 
     ListView {
         id: feedList; model: feeds; delegate: feedDelegate; z: 6
@@ -27,7 +27,7 @@ Item {
         id: feeds
 
         //source: catid == "" ? "" : "http://localhost:8000/feeds/" + catid //+ "?onlyUnread=" + parent.hideReadArticles
-        //xml: catid == "" ? "" : controller.getFeedsXml(catid)
+        xml: catid == "" ? "" : controller.getFeedsXml(catid)
         query: "/xml/feed"
 
         XmlRole { name: "title"; query: "feedname/string()" }
@@ -43,6 +43,8 @@ Item {
         id: feedDelegate
 
         Item {
+
+            Component.onCompleted: console.log("item:"+feedid)
             id: wrapper; width: wrapper.ListView.view.width;
             visible: (unread == "0" && feedsItem.hideReadFeeds=="True") ? false : true
             height: (visible) ? 86 : 0
@@ -90,13 +92,13 @@ Item {
             MouseArea { 
                 anchors.fill: wrapper; 
                 onClicked: { 
-                    controller.feedClicked(model.feed)
-                    container.feedClicked(feedid, updating=="True") 
+                    //controller.feedClicked(model.feed)
+                    feedClicked(feedid)
                     
                 }
             }
-        }
 
+        }
     }
 
 }