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

List:       kde-commits
Subject:    =?utf-8?q?=5Bplasma-mobile=5D_research/applets/mobilemenu/conten?=
From:       Marco Martin <notmart () gmail ! com>
Date:       2011-02-12 14:00:54
Message-ID: 20110212140054.BBB85A609B () git ! kde ! org
[Download RAW message or body]

Git commit 520236b9c7c8832a621ad246967cbd49d25f8087 by Marco Martin.
Committed on 12/02/2011 at 13:59.
Pushed by mart into branch 'master'.

connector in a separate element

A  +39   -0    research/applets/mobilemenu/contents/ui/Connector.qml         \
[License: LGPL (v2+)] M  +3    -13   \
research/applets/mobilemenu/contents/ui/mobilemenu.qml     

http://commits.kde.org/scratch/mart/plasma-mobile/520236b9c7c8832a621ad246967cbd49d25f8087


diff --git a/research/applets/mobilemenu/contents/ui/Connector.qml \
b/research/applets/mobilemenu/contents/ui/Connector.qml new file mode 100644
index 0000000..ea8b552
--- /dev/null
+++ b/research/applets/mobilemenu/contents/ui/Connector.qml
@@ -0,0 +1,39 @@
+/*
+ *   Author: Marco Martin <mart@kde.org>
+ *   Date: Sun Feb 6 2011, 12:52:47
+ *
+ *   This program is free software; you can redistribute it and/or modify
+ *   it under the terms of the GNU Library General Public License as
+ *   published by the Free Software Foundation; either version 2 or
+ *   (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details
+ *
+ *   You should have received a copy of the GNU Library General Public
+ *   License along with this program; if not, write to the
+ *   Free Software Foundation, Inc.,
+ *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+
+import Qt 4.7
+
+Rectangle {
+    id: connectorRectangle
+
+    property Item itemA
+    property Item itemB
+
+    width: (itemB.x-64)/Math.cos(connectorAngle) -30
+    height: 12
+    color: "white"
+    smooth:true
+    x: -width
+    y: parent.height/2
+    transform: Rotation {
+        origin.x: connectorRectangle.width
+        angle: (180/Math.PI)*connectorAngle
+    }
+}
\ No newline at end of file
diff --git a/research/applets/mobilemenu/contents/ui/mobilemenu.qml \
b/research/applets/mobilemenu/contents/ui/mobilemenu.qml index 337de5f..4ca2b85 \
                100644
--- a/research/applets/mobilemenu/contents/ui/mobilemenu.qml
+++ b/research/applets/mobilemenu/contents/ui/mobilemenu.qml
@@ -1,4 +1,3 @@
-// -*- coding: iso-8859-1 -*-
 /*
  *   Author: Marco Martin <mart@kde.org>
  *   Date: Sun Feb 6 2011, 12:52:47
@@ -176,18 +175,9 @@ Rectangle {
                         elementId: "add"
                     }
                 }
-                Rectangle {
-                      id: connectorRect
-                      width: (delegate.x-64)/Math.cos(connectorAngle) -30
-                      height: 12
-                      color: "white"
-                      smooth:true
-                      x: -width
-                      y: parent.height/2
-                      transform: Rotation {
-                          origin.x: connectorRect.width
-                          angle: (180/Math.PI)*connectorAngle
-                      }
+                Connector {
+                    id: itemConnector
+                    itemB: delegate
                 }
 
                MouseArea {


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

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