[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [gluon/creator-qmlintro-shreya] creator: Removing PropertyChanges from each state
From: Shreya Pandit <shreya () shreyapandit ! com>
Date: 2012-06-14 18:37:00
Message-ID: 20120614183700.D26BBA60A9 () git ! kde ! org
[Download RAW message or body]
Git commit 5316ad6cda49aa0e4b36a0db90ea9e0745ae2872 by Shreya Pandit.
Committed on 14/06/2012 at 20:36.
Pushed by pandit into branch 'creator-qmlintro-shreya'.
Removing PropertyChanges from each state
M +2 -2 creator/introduction.cpp
M +19 -42 creator/ui/introduction.qml
http://commits.kde.org/gluon/5316ad6cda49aa0e4b36a0db90ea9e0745ae2872
diff --git a/creator/introduction.cpp b/creator/introduction.cpp
index a2a3287..fb8a1c3 100644
--- a/creator/introduction.cpp
+++ b/creator/introduction.cpp
@@ -65,11 +65,11 @@ void IntroSlideShow::setdockername(QString name)
{
docker=name;
- if(QString::compare(docker,"", Qt::CaseInsensitive)) {
+// if(QString::compare(docker,"", Qt::CaseInsensitive)) {
updateDocker();
- }
+emit dockernameChanged();
}
qreal IntroSlideShow::getdockX()
diff --git a/creator/ui/introduction.qml b/creator/ui/introduction.qml
index 23bfbd7..2b71416 100644
--- a/creator/ui/introduction.qml
+++ b/creator/ui/introduction.qml
@@ -71,20 +71,24 @@ Item {
Item {
+
+
+ IntroSlideShow {
+ id :animator;
+ dockername: "ComponentsDock";
+ }
+
id: viewport;
- width: parent.width / 2;
- height: parent.height / 2;
- x: parent.width / 4;
- y: parent.height / 4;
+ width: animator.implicitWidth;
+ height: animator.implicitHeight;
+ x: animator.x;
+ y: animator.y;
Behavior on width { NumberAnimation { duration: 500; } }
Behavior on height { NumberAnimation { duration: 500; } }
Behavior on x { NumberAnimation { duration: 500; } }
Behavior on y { NumberAnimation { duration: 500; } }
- IntroSlideShow {
- id :animator;
- }
Text {
id : text;
@@ -123,6 +127,7 @@ Item {
if ((animator.getdockX() +animator.getdockWidth()) < \
(animator.getrefWidth())){ text.state = "right";
+ console.log("dockname is");
console.log(animator.dockername);
}
else{
@@ -137,7 +142,7 @@ Item {
function show(){opacity=1; showText = false ;}
Behavior on opacity {
- NumberAnimation { properties:"opacity"; duration: 100 }
+ NumberAnimation { properties:"opacity"; duration: 100 }
}
}
@@ -152,8 +157,10 @@ Item {
switch(animator.dockername){
case(""):
+ {console.log("HAHAHAHAHHA");
viewport.state = 'component';
- break;
+ }
+ break;
case("ComponentsDock"):
@@ -200,10 +207,9 @@ Item {
State {
name: "component"
PropertyChanges { target:animator; dockername: "ComponentsDock"}
- PropertyChanges { target: viewport; x: animator.x; y: animator.y; \
width:animator.implicitWidth; height:animator.implicitHeight; } StateChangeScript {
name: "myScript"
- script: { text.orient(animator.dockername); \
showTimer.stop();} + script: { text.orient(); \
showTimer.stop();}
}
},
@@ -211,7 +217,6 @@ Item {
State {
name: "project"
PropertyChanges { target:animator; dockername : "ProjectDock"}
- PropertyChanges { target: viewport; x: animator.x; y: animator.y; \
width:animator.implicitWidth; height:animator.implicitHeight } StateChangeScript {
name: "myScript"
script: { text.orient();showTimer.stop();}
@@ -222,7 +227,6 @@ Item {
State {
name: "message"
PropertyChanges { target:animator; dockername : "MessageDock"}
- PropertyChanges { target: viewport; x: animator.x; y: animator.y; \
width:animator.implicitWidth; height:animator.implicitHeight } StateChangeScript {
name: "myScript"
script: { text.orient();showTimer.stop();}
@@ -233,7 +237,6 @@ Item {
State {
name: "scene"
PropertyChanges { target:animator; dockername : "SceneDock"}
- PropertyChanges { target: viewport; x: animator.x; y: animator.y; \
width:animator.implicitWidth; height:animator.implicitHeight } StateChangeScript {
name: "myScript"
script: { text.orient();showTimer.stop();}
@@ -244,7 +247,6 @@ Item {
State {
name: "property"
PropertyChanges { target:animator; dockername : "PropertiesDock"}
- PropertyChanges { target: viewport; x: animator.x; y: animator.y; \
width:animator.implicitWidth; height:animator.implicitHeight } StateChangeScript {
name: "myScript"
script: { text.orient();showTimer.stop();}
@@ -256,35 +258,10 @@ Item {
transitions: [
Transition {
- from: "*"; to: "component"
- NumberAnimation { properties: "x,y,width,height"; duration: 1000 }
+ from: "*"; to: "*"
+ NumberAnimation { properties: "x,y,width,height"; duration: 500 }
ScriptAction { scriptName: "myScript" }
- },
-
- Transition {
- from: "*"; to: "project"
- NumberAnimation { properties: "x,y,width,height"; duration: 1000 }
- ScriptAction { scriptName: "myScript" }
- },
-
- Transition {
- from: "*"; to: "message"
- NumberAnimation { properties: "x,y,width,height"; duration: 1000 }
- ScriptAction { scriptName: "myScript" }
- },
-
- Transition {
- from: "*"; to: "scene"
- NumberAnimation { properties: "x,y,width,height"; duration: 1000 }
- ScriptAction { scriptName: "myScript" }
- },
-
- Transition {
- from: "*"; to: "property"
- NumberAnimation { properties: "x,y,width,height"; duration: 1000 }
- ScriptAction { scriptName: "myScript" }
}
-
]
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic