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

List:       kde-commits
Subject:    playground/base/plasma/declarative-applets/replacements/microblog/contents/ui
From:       Marco Martin <notmart () gmail ! com>
Date:       2011-04-10 11:21:14
Message-ID: 20110410112115.05797AC8D1 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1227555 by mart:

make the tabbar work


 M  +3 -5      ComplexComponents/MessageList.qml  
 M  +22 -0     MainWidget/MainWidget.qml  


--- trunk/playground/base/plasma/declarative-applets/replacements/microblog/contents/ui/ComplexComponents/MessageList.qml \
#1227554:1227555 @@ -29,10 +29,10 @@
 
     clip: true
 
-    property string timeline: "TimelineWithFriends"
+    property string timelineType: "TimelineWithFriends"
     property string login: userName
     property string url: serviceUrl
-    property string source: timeline+":"+login+"@"+url
+    property string source: timelineType+":"+login+"@"+url
     onSourceChanged: {
         timer.running = true
     }
@@ -42,17 +42,15 @@
         running: false
         interval: 500
         onTriggered: {
-            dataSource.connectSource(source)
+            microblogSource.connectSource(source)
         }
     }
 
-    spacing: 5
     model: PlasmaCore.DataModel {
         dataSource: microblogSource
         sourceFilter: entryList.source
         keyRoleFilter: "[\\d]*"
     }
-    header: PostingWidget {}
 
     delegate: MessageWidget {
         width: entryList.width
--- trunk/playground/base/plasma/declarative-applets/replacements/microblog/contents/ui/MainWidget/MainWidget.qml \
#1227554:1227555 @@ -23,6 +23,7 @@
 import org.kde.plasma.graphicswidgets 0.1 as PlasmaWidgets
 
 import "plasmapackage:/ui/ComplexComponents"
+import "plasmapackage:/ui/BasicComponents"
 
 Column {
     id: mainWidget
@@ -31,11 +32,32 @@
         id: tabBar
         anchors.left: parent.left
         anchors.right: parent.right
+        Component.onCompleted: {
+            tabBar.addTab(i18n("Timeline"))
+            tabBar.addTab(i18n("Replies"))
+            tabBar.addTab(i18n("Messages"))
     }
+        onCurrentChanged: {
+            switch (index) {
+            case 0:
+                messageList.timelineType = "TimelineWithFriends"
+                break;
+            case 1:
+                messageList.timelineType = "Replies"
+                break;
+            case 2:
+            default:
+                messageList.timelineType = "Messages"
+                break;
+            }
+        }
+    }
 
     MessageList {
+        id: messageList
         anchors.left: mainWidget.left
         anchors.right: mainWidget.right
         height: mainWidget.height - tabBar.height
+        header: PostingWidget {}
     }
 }
\ No newline at end of file


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

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