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

List:       kde-commits
Subject:    [kde-workspace/plasma/sreich/sal-qml] plasma/netbook/containments/sal/package/contents/ui: now runs
From:       Shaun Reich <shaun.reich () kdemail ! net>
Date:       2012-03-01 0:02:16
Message-ID: 20120301000216.1A6B5A60A9 () git ! kde ! org
[Download RAW message or body]

Git commit 74a759b157c15a7ae6f9d647b63383f89769c18c by Shaun Reich.
Committed on 01/03/2012 at 01:01.
Pushed by sreich into branch 'plasma/sreich/sal-qml'.

now runs apps! yay. and youtube too

M  +29   -28   plasma/netbook/containments/sal/package/contents/ui/ResultsView.qml
M  +5    -0    plasma/netbook/containments/sal/package/contents/ui/main.qml

http://commits.kde.org/kde-workspace/74a759b157c15a7ae6f9d647b63383f89769c18c

diff --git a/plasma/netbook/containments/sal/package/contents/ui/ResultsView.qml \
b/plasma/netbook/containments/sal/package/contents/ui/ResultsView.qml index \
                3667e30..db9241e 100644
--- a/plasma/netbook/containments/sal/package/contents/ui/ResultsView.qml
+++ b/plasma/netbook/containments/sal/package/contents/ui/ResultsView.qml
@@ -28,46 +28,47 @@ Item {
     property int resultItemHeight: 200
     property int resultItemWidth: 200
 
+    property int appIndexToRun: 0
+
     property alias model: gridView.model
 
+    GridView {
+        id: gridView
+        anchors {
+            top: parent.top
+            bottom: parent.bottom
+            left: parent.left
+            right: parent.right
+        }
+
+        cellWidth: resultItemWidth
+        cellHeight: resultItemHeight
 
-        GridView {
-            id: gridView
-            anchors {
-                top: parent.top
-                bottom: parent.bottom
-                left: parent.left
-                right: parent.right
-            }
+        clip: true
 
-            cellWidth: resultItemWidth
-            cellHeight: resultItemHeight
+        highlight: highlight
+        highlightFollowsCurrentItem: true
 
-            highlightFollowsCurrentItem: true
-            clip: true
+        delegate: Result {
+            id: result
+            currentText: model["label"]
+            currentIcon: model["icon"]
+            currentId: model["id"]
 
-            highlight: highlight
-            delegate: Result {
-                id: result
-                currentText: model["label"]
-                currentIcon: model["icon"]
-                currentId: model["id"]
+            MouseArea {
+                anchors.fill: parent
+                hoverEnabled: true
 
-                onWasClickedChanged:  {
-                    print(result.currentId)
-//                        appIndexToRun = result.currentIndex:
+                onEntered: {
+                    gridView.currentIndex = index
                 }
 
-                MouseArea {
-                    anchors.fill: parent
-                    hoverEnabled: true
-
-                    onEntered: {
-                        gridView.currentIndex = index
-                    }
+                onClicked: {
+                    appIndexToRun = gridView.currentIndex;
                 }
             }
         }
+    }
 
     PlasmaComponents.ScrollBar {
         id: scrollBar
diff --git a/plasma/netbook/containments/sal/package/contents/ui/main.qml \
b/plasma/netbook/containments/sal/package/contents/ui/main.qml index bb1116d..8be1d0d \
                100644
--- a/plasma/netbook/containments/sal/package/contents/ui/main.qml
+++ b/plasma/netbook/containments/sal/package/contents/ui/main.qml
@@ -213,6 +213,11 @@ Item {
         ResultsView {
             anchors.fill: parent
             model: runnerModel
+
+            onAppIndexToRunChanged: {
+                print("RUNNING APP!")
+                runnerModel.run(appIndexToRun);
+            }
         }
 
         Component.onCompleted: {


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

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