[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    playground/base/plasma/declarative-applets/replacements/social-news/package/contents/ui
From:       Lukas Appelhans <l.appelhans () gmx ! de>
Date:       2010-12-28 19:38:41
Message-ID: 20101228193841.ED026AC8AD () svn ! kde ! org
[Download RAW message or body]

SVN commit 1209960 by lappelhans:

Starting to work on the visual side...


 M  +32 -3     main.qml  


--- trunk/playground/base/plasma/declarative-applets/replacements/social-news/package/contents/ui/main.qml \
#1209959:1209960 @@ -42,6 +42,7 @@
         //var sourceString = new String(source)
         //print("Configuration changed: " + source);
         feedSource.connectedSources = "Providers"
+        //feedSource.connectSource("Activities\\provider:https://api.opendesktop.org/v1/activity")
  
         //individualSources = String(source).split(" ")
         //repeater.model = individualSources.length
@@ -50,28 +51,56 @@
     PlasmaCore.DataSource {
         id: feedSource
         engine: "ocs"
-        interval: 50000
+        interval: 5000
         onDataChanged: {
             plasmoid.busy = false
+           // if (source = "Providers") {
+            //    connectSource("Activities\\provider:https://api.opendesktop.org/v1/activity")
 +            //    print("Provider updated");
+            //}
             if (source = "Providers") {
                 for (var i in data) {
-                    connectedSources = connectedSources + data.key(i);
+                    connectSource("Activities\\provider:" + data.key(i));
                 }
             }
         }
     }
     
     
-    PlasmaCore.DataModel {
+    /*PlasmaCore.DataModel {
         id: dataModel
         dataSource: feedSource
         keyRoleFilter: "timestamp"
+    }*/
+    
+    ListModel {
+        id: dataModel
+        
+        ListElement {
+            message: "bla has visited your profile page"
+            userAvatarUrl: \
"/home/kde-devel/kde/share/icons/oxygen/32x32/actions/address-book-new.png"  }
+    }
 
     PlasmaCore.Theme {
         id: theme
     }
 
+    ListView {
+        model: dataModel
+        delegate: Row {
+            spacing: 5
+            Image {
+                source: userAvatarUrl
+            }
+            Text {
+                height: parent.height
+                verticalAlignment: Text.AlignVCenter
+                text: message
+            }
+        }
+    }
+
     /*Column {
         PlasmaCore.SvgItem {
             id: svgItem


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic