diff options
author | Alan Alpert <alan.alpert@nokia.com> | 2009-09-03 04:46:25 (GMT) |
---|---|---|
committer | Alan Alpert <alan.alpert@nokia.com> | 2009-09-03 04:46:25 (GMT) |
commit | 3732fb8ac1ef79b47a4e8df9c37154618a1adc5e (patch) | |
tree | a312b450bdb39744f79ed563ab3b6f9d6fa8a547 | |
parent | b4fdd60aeb66520d55a8cf4710c9eb648ed7937d (diff) | |
download | Qt-3732fb8ac1ef79b47a4e8df9c37154618a1adc5e.zip Qt-3732fb8ac1ef79b47a4e8df9c37154618a1adc5e.tar.gz Qt-3732fb8ac1ef79b47a4e8df9c37154618a1adc5e.tar.bz2 |
Move minehunt and twitter to demos directory
Minehunt is more a demo than an example, and the twitter app goes with
the flickr app.
-rw-r--r-- | demos/declarative/minehunt/Description.qml (renamed from examples/declarative/minehunt/Description.qml) | 0 | ||||
-rw-r--r-- | demos/declarative/minehunt/Explosion.qml (renamed from examples/declarative/minehunt/Explosion.qml) | 0 | ||||
-rw-r--r-- | demos/declarative/minehunt/main.cpp (renamed from examples/declarative/minehunt/main.cpp) | 0 | ||||
-rw-r--r-- | demos/declarative/minehunt/minehunt.pro (renamed from examples/declarative/minehunt/minehunt.pro) | 0 | ||||
-rw-r--r-- | demos/declarative/minehunt/minehunt.qml (renamed from examples/declarative/minehunt/minehunt.qml) | 0 | ||||
-rw-r--r-- | demos/declarative/minehunt/pics/No-Ones-Laughing-3.jpg (renamed from examples/declarative/minehunt/pics/No-Ones-Laughing-3.jpg) | bin | 30730 -> 30730 bytes | |||
-rw-r--r-- | demos/declarative/minehunt/pics/back.png (renamed from examples/declarative/minehunt/pics/back.png) | bin | 558 -> 558 bytes | |||
-rw-r--r-- | demos/declarative/minehunt/pics/bomb-color.png (renamed from examples/declarative/minehunt/pics/bomb-color.png) | bin | 284 -> 284 bytes | |||
-rw-r--r-- | demos/declarative/minehunt/pics/bomb.png (renamed from examples/declarative/minehunt/pics/bomb.png) | bin | 535 -> 535 bytes | |||
-rw-r--r-- | demos/declarative/minehunt/pics/face-sad.png (renamed from examples/declarative/minehunt/pics/face-sad.png) | bin | 14844 -> 14844 bytes | |||
-rw-r--r-- | demos/declarative/minehunt/pics/face-smile-big.png (renamed from examples/declarative/minehunt/pics/face-smile-big.png) | bin | 13810 -> 13810 bytes | |||
-rw-r--r-- | demos/declarative/minehunt/pics/face-smile.png (renamed from examples/declarative/minehunt/pics/face-smile.png) | bin | 15408 -> 15408 bytes | |||
-rw-r--r-- | demos/declarative/minehunt/pics/flag-color.png (renamed from examples/declarative/minehunt/pics/flag-color.png) | bin | 219 -> 219 bytes | |||
-rw-r--r-- | demos/declarative/minehunt/pics/flag.png (renamed from examples/declarative/minehunt/pics/flag.png) | bin | 196 -> 196 bytes | |||
-rw-r--r-- | demos/declarative/minehunt/pics/front.png (renamed from examples/declarative/minehunt/pics/front.png) | bin | 580 -> 580 bytes | |||
-rw-r--r-- | demos/declarative/minehunt/pics/star.png (renamed from examples/declarative/minehunt/pics/star.png) | bin | 2677 -> 2677 bytes | |||
-rw-r--r-- | demos/declarative/twitter/content/AuthView.qml | 92 | ||||
-rw-r--r-- | demos/declarative/twitter/content/FatDelegate.qml | 47 | ||||
-rw-r--r-- | demos/declarative/twitter/content/HomeTitleBar.qml | 125 | ||||
-rw-r--r-- | demos/declarative/twitter/content/MultiTitleBar.qml | 25 | ||||
-rw-r--r-- | demos/declarative/twitter/content/RssModel.qml | 42 | ||||
-rw-r--r-- | demos/declarative/twitter/content/UserModel.qml | 26 | ||||
-rw-r--r-- | demos/declarative/twitter/twitter.qml | 87 |
23 files changed, 444 insertions, 0 deletions
diff --git a/examples/declarative/minehunt/Description.qml b/demos/declarative/minehunt/Description.qml index df4881c..df4881c 100644 --- a/examples/declarative/minehunt/Description.qml +++ b/demos/declarative/minehunt/Description.qml diff --git a/examples/declarative/minehunt/Explosion.qml b/demos/declarative/minehunt/Explosion.qml index a997048..a997048 100644 --- a/examples/declarative/minehunt/Explosion.qml +++ b/demos/declarative/minehunt/Explosion.qml diff --git a/examples/declarative/minehunt/main.cpp b/demos/declarative/minehunt/main.cpp index 20f7492..20f7492 100644 --- a/examples/declarative/minehunt/main.cpp +++ b/demos/declarative/minehunt/main.cpp diff --git a/examples/declarative/minehunt/minehunt.pro b/demos/declarative/minehunt/minehunt.pro index 01791b1..01791b1 100644 --- a/examples/declarative/minehunt/minehunt.pro +++ b/demos/declarative/minehunt/minehunt.pro diff --git a/examples/declarative/minehunt/minehunt.qml b/demos/declarative/minehunt/minehunt.qml index fa169aa..fa169aa 100644 --- a/examples/declarative/minehunt/minehunt.qml +++ b/demos/declarative/minehunt/minehunt.qml diff --git a/examples/declarative/minehunt/pics/No-Ones-Laughing-3.jpg b/demos/declarative/minehunt/pics/No-Ones-Laughing-3.jpg Binary files differindex 445567f..445567f 100644 --- a/examples/declarative/minehunt/pics/No-Ones-Laughing-3.jpg +++ b/demos/declarative/minehunt/pics/No-Ones-Laughing-3.jpg diff --git a/examples/declarative/minehunt/pics/back.png b/demos/declarative/minehunt/pics/back.png Binary files differindex f6b3f0b..f6b3f0b 100644 --- a/examples/declarative/minehunt/pics/back.png +++ b/demos/declarative/minehunt/pics/back.png diff --git a/examples/declarative/minehunt/pics/bomb-color.png b/demos/declarative/minehunt/pics/bomb-color.png Binary files differindex 61ad0a9..61ad0a9 100644 --- a/examples/declarative/minehunt/pics/bomb-color.png +++ b/demos/declarative/minehunt/pics/bomb-color.png diff --git a/examples/declarative/minehunt/pics/bomb.png b/demos/declarative/minehunt/pics/bomb.png Binary files differindex a992575..a992575 100644 --- a/examples/declarative/minehunt/pics/bomb.png +++ b/demos/declarative/minehunt/pics/bomb.png diff --git a/examples/declarative/minehunt/pics/face-sad.png b/demos/declarative/minehunt/pics/face-sad.png Binary files differindex cf00aaf..cf00aaf 100644 --- a/examples/declarative/minehunt/pics/face-sad.png +++ b/demos/declarative/minehunt/pics/face-sad.png diff --git a/examples/declarative/minehunt/pics/face-smile-big.png b/demos/declarative/minehunt/pics/face-smile-big.png Binary files differindex f9c2335..f9c2335 100644 --- a/examples/declarative/minehunt/pics/face-smile-big.png +++ b/demos/declarative/minehunt/pics/face-smile-big.png diff --git a/examples/declarative/minehunt/pics/face-smile.png b/demos/declarative/minehunt/pics/face-smile.png Binary files differindex 3d66d72..3d66d72 100644 --- a/examples/declarative/minehunt/pics/face-smile.png +++ b/demos/declarative/minehunt/pics/face-smile.png diff --git a/examples/declarative/minehunt/pics/flag-color.png b/demos/declarative/minehunt/pics/flag-color.png Binary files differindex aadad0f..aadad0f 100644 --- a/examples/declarative/minehunt/pics/flag-color.png +++ b/demos/declarative/minehunt/pics/flag-color.png diff --git a/examples/declarative/minehunt/pics/flag.png b/demos/declarative/minehunt/pics/flag.png Binary files differindex 39cde4d..39cde4d 100644 --- a/examples/declarative/minehunt/pics/flag.png +++ b/demos/declarative/minehunt/pics/flag.png diff --git a/examples/declarative/minehunt/pics/front.png b/demos/declarative/minehunt/pics/front.png Binary files differindex 834331b..834331b 100644 --- a/examples/declarative/minehunt/pics/front.png +++ b/demos/declarative/minehunt/pics/front.png diff --git a/examples/declarative/minehunt/pics/star.png b/demos/declarative/minehunt/pics/star.png Binary files differindex 3772359..3772359 100644 --- a/examples/declarative/minehunt/pics/star.png +++ b/demos/declarative/minehunt/pics/star.png diff --git a/demos/declarative/twitter/content/AuthView.qml b/demos/declarative/twitter/content/AuthView.qml new file mode 100644 index 0000000..6bd98b9 --- /dev/null +++ b/demos/declarative/twitter/content/AuthView.qml @@ -0,0 +1,92 @@ +import Qt 4.6 +import "../../flickr/common" +import "../../flickr/mobile" + +Item { + id: wrapper + Column { + width: childrenRect.width; height:childrenRect.height; anchors.centerIn: parent + spacing: 20 + Row{ + width: childrenRect.width; height:childrenRect.height; + spacing: 4 + Text { + width: 100 + text: "Screen name:" + font.pointSize: 10; font.bold: true; color: "white"; style: "Raised"; styleColor: "black" + anchors.verticalCenter: parent.verticalCenter + horizontalAlignment: Qt.AlignRight + } + Item { + width: 160 + height: 28 + BorderImage { source: "../../flickr/mobile/images/lineedit.sci"; anchors.fill: parent } + TextInput{ + id: nameIn + width: parent.width - 8 + height: parent.height - 12 + anchors.centerIn: parent + maximumLength:21 + font.bold: true + color: "#151515"; highlightColor: "green" + KeyProxy { + id: Proxy + targets: [(tabber), (nameIn)] + focus: true + } + Item { + id: tabber + //Note: it's not working yet + Keys.onPressed: {if(event.key == Qt.Key_Tab){print('Tab works!'); passIn.focus = true; accept(); }} + } + } + } + } + Row{ + width: childrenRect.width; height:childrenRect.height; + spacing: 4 + Text { + width: 100 + text: "Password:" + font.pointSize: 10; font.bold: true; color: "white"; style: "Raised"; styleColor: "black" + anchors.verticalCenter: parent.verticalCenter + horizontalAlignment: Qt.AlignRight + } + Item { + width: 160 + height: 28 + BorderImage { source: "../../flickr/mobile/images/lineedit.sci"; anchors.fill: parent } + TextInput{ + id: passIn + width: parent.width - 8 + height: parent.height - 12 + anchors.centerIn: parent + maximumLength:21 + echoMode: 2 + font.bold: true + color: "#151515"; highlightColor: "green" + } + } + } + Item{ + width: childrenRect.width; anchors.horizontalCenter: parent.horizontalCenter + height: childrenRect.height + Button { + x: 10 + width: 100 + height: 32 + id: login + text: "Log in" + onClicked: {RssModel.authName=nameIn.text; RssModel.authPass=passIn.text; RssModel.tags='my timeline';} + } + Button { + x: 120 + width: 100 + height: 32 + id: guest + text: "Guest" + onClicked: RssModel.authName='inv' + } + } + } +} diff --git a/demos/declarative/twitter/content/FatDelegate.qml b/demos/declarative/twitter/content/FatDelegate.qml new file mode 100644 index 0000000..a2e9c39 --- /dev/null +++ b/demos/declarative/twitter/content/FatDelegate.qml @@ -0,0 +1,47 @@ +import Qt 4.6 +import "../../flickr/common" + +Component { + id: ListDelegate + Item { + id: Wrapper; width: Wrapper.ListView.view.width; height: if(txt.height > 58){txt.height+8}else{58}//50+4+4 + Script { + function handleLink(link){ + if(link.slice(0,3) == 'app'){ + setUser(link.slice(7)); + Screen.setMode(true); + }else if(link.slice(0,4) == 'http'){ + Qt.DesktopServices.openUrl(link); + } + } + function addTags(str){ + ret = str.replace(/@[a-zA-Z0-9_]+/g, '<a href="app://$&">$&</a>');//click to jump to user? + ret2 = ret.replace(/http:\/\/[^ \n\t]+/g, '<a href="$&">$&</a>');//surrounds http links with html link tags + return ret2; + } + } + Item { + id: MoveMe; height: parent.height + Rectangle { + id: BlackRect + color: "black"; opacity: Wrapper.ListView.index % 2 ? 0.2 : 0.3; height: Wrapper.height-2; width: Wrapper.width; y: 1 + } + Rectangle { + id: WhiteRect; x: 6; width: 50; height: 50; color: "white"; smooth: true + anchors.verticalCenter: parent.verticalCenter + + Loading { x: 1; y: 1; width: 48; height: 48; visible: RealImage.status != 1 } + Image { id: RealImage; source: userImage; x: 1; y: 1; width:48; height:48 } + } + Text { id:txt; y:4; x: 56 + text: '<html><style type="text/css">a:link {color:"#aaccaa"}; a:visited {color:"#336633"}</style>' + + '<a href="app://@'+userScreenName+'"><b>'+userScreenName + "</b></a> from " +source + + "<br /><b>" + addTags(statusText) + "</b></html>"; + textFormat: Qt.RichText + color: "white"; color: "#cccccc"; style: "Raised"; styleColor: "black"; wrap: true + anchors.left: WhiteRect.right; anchors.right: BlackRect.right; anchors.leftMargin: 6; anchors.rightMargin: 6 + onLinkActivated: handleLink(link) + } + } + } +} diff --git a/demos/declarative/twitter/content/HomeTitleBar.qml b/demos/declarative/twitter/content/HomeTitleBar.qml new file mode 100644 index 0000000..878a83e --- /dev/null +++ b/demos/declarative/twitter/content/HomeTitleBar.qml @@ -0,0 +1,125 @@ +import Qt 4.6 +import "../../flickr/mobile" +import "../../flickr/common" + +Item { + id: TitleBar + + signal update() + onYChanged: state="" //When switching titlebars + + BorderImage { source: "../../flickr/mobile/images/titlebar.sci"; width: parent.width; height: parent.height + 14; y: -7 } + Item { + id: Container + width: (parent.width * 2) - 55 ; height: parent.height + + Script { + function accept() { + if(RssModel.authName == '' || RssModel.authPass == '') + return false;//Can't login like that + + var postData = "status=" + Editor.text; + var postman = new XMLHttpRequest(); + postman.open("POST", "http://twitter.com/statuses/update.xml", true, RssModel.authName, RssModel.authPass); + postman.onreadystatechange = function() { + if (postman.readyState == postman.DONE) { + TitleBar.update(); + } + } + postman.send(postData); + + TitleBar.state = "" + } + } + + Rectangle { + id: WhiteRect; x: 6; width: 50; height: 50; color: "white"; smooth: true + anchors.verticalCenter: parent.verticalCenter + + UserModel { user: RssModel.authName; id: userModel } + Component { id: imgDelegate; + Item { id: Wrapper + Loading { width:48; height:48; visible: realImage.status != 1 } + Image { source: image; width:48; height:48; id: realImage } + } + } + ListView { model: userModel.model; x:1; y:1; delegate: imgDelegate } + } + + Text { + id: CategoryText + anchors.left: parent.left; anchors.right: TagButton.left + anchors.leftMargin: 58; anchors.rightMargin: 10 + anchors.verticalCenter: parent.verticalCenter + elide: "ElideLeft" + text: "Timeline for " + RssModel.authName + font.pointSize: 10; font.bold: true; color: "white"; style: "Raised"; styleColor: "black" + } + + Button { + id: TagButton; x: TitleBar.width - 90; width: 85; height: 32; text: "New Post..." + anchors.verticalCenter: parent.verticalCenter; + onClicked: if (TitleBar.state == "Posting") accept(); else TitleBar.state = "Posting" + } + + Text { + id: charsLeftText; anchors.horizontalCenter: TagButton.horizontalCenter; + anchors.top: TagButton.bottom; anchors.topMargin: 2 + text: {140 - Editor.text.length;} visible: TitleBar.state == "Posting" + font.pointSize: 10; font.bold: true; color: "white"; style: "Raised"; styleColor: "black" + } + Item { + id: txtEdit; + anchors.left: TagButton.right; anchors.leftMargin: 5; y: 4 + anchors.right: parent.right; anchors.rightMargin: 40; height: parent.height - 9 + BorderImage { source: "../../flickr/mobile/images/lineedit.sci"; anchors.fill: parent } + + Binding {//TODO: Can this be a function, which also resets the cursor? And flashes? + when: Editor.text.length > 140 + target: Editor + property: "text" + value: Editor.text.slice(0,140) + } + TextEdit { + id: Editor + anchors.left: parent.left; + anchors.leftMargin: 8; + anchors.bottom: parent.bottom + anchors.bottomMargin: 4; + cursorVisible: true; font.bold: true + width: parent.width - 12 + height: parent.height - 8 + font.pointSize: 10 + wrap:true + color: "#151515"; highlightColor: "green" + } + KeyProxy { + id: Proxy + anchors.fill: parent + targets: [(ReturnKey), (Editor)] + } + Item { + id: ReturnKey + Keys.onReturnPressed: accept() + Keys.onEscapePressed: TitleBar.state = "" + } + } + } + states: [ + State { + name: "Posting" + PropertyChanges { target: Container; x: -TagButton.x + 5 } + PropertyChanges { target: TitleBar; height: 80 } + PropertyChanges { target: TagButton; text: "OK" } + PropertyChanges { target: TagButton; width: 28 } + PropertyChanges { target: TagButton; height: 24 } + PropertyChanges { target: Proxy; focus: true } + } + ] + transitions: [ + Transition { + from: "*"; to: "*" + NumberAnimation { properties: "x,y,width,height"; easing: "easeInOutQuad" } + } + ] +} diff --git a/demos/declarative/twitter/content/MultiTitleBar.qml b/demos/declarative/twitter/content/MultiTitleBar.qml new file mode 100644 index 0000000..6a6a28f --- /dev/null +++ b/demos/declarative/twitter/content/MultiTitleBar.qml @@ -0,0 +1,25 @@ +import Qt 4.6 +import "../../flickr/mobile" + +Item { + height: HomeBar.height + HomeTitleBar { id: HomeBar; width: parent.width; height: 60; + onUpdate: RssModel.reload() + } + TitleBar { id: TitleBar; width: parent.width; height: 60; + y: -80 + untaggedString: "Latest tweets from everyone" + taggedString: "Latest tweets from " + } + states: [ + State { + name: "search"; when: Screen.userView + PropertyChanges { target: TitleBar; y: 0 } + PropertyChanges { target: HomeBar; y: -80 } + } + ] + transitions: [ + Transition { NumberAnimation { properties: "x,y"; duration: 500; easing: "easeInOutQuad" } } + ] +} + diff --git a/demos/declarative/twitter/content/RssModel.qml b/demos/declarative/twitter/content/RssModel.qml new file mode 100644 index 0000000..144d7af --- /dev/null +++ b/demos/declarative/twitter/content/RssModel.qml @@ -0,0 +1,42 @@ +import Qt 4.6 + +Item { id: wrapper + property var model: xmlModel + property string tags : "" + property string authName : "" + property string authPass : "" + property string mode : "everyone" + property int status: xmlModel.status + function reload() { xmlModel.reload(); } +XmlListModel { + id: xmlModel + + source: if (wrapper.authName == ""){ + ""; //Avoid worthless calls to twitter servers + }else if(wrapper.mode == 'user'){ + "https://"+ ((wrapper.authName!="" && wrapper.authPass!="")? (wrapper.authName+":"+wrapper.authPass+"@") : "" )+"twitter.com/statuses/user_timeline.xml?screen_name="+wrapper.tags; + }else if(wrapper.mode == 'self'){ + "https://"+ ((wrapper.authName!="" && wrapper.authPass!="")? (wrapper.authName+":"+wrapper.authPass+"@") : "" )+"twitter.com/statuses/friends_timeline.xml"; + }else{//everyone/public + "http://twitter.com/statuses/public_timeline.xml"; + } + query: "/statuses/status" + + XmlRole { name: "statusText"; query: "text/string()" } + XmlRole { name: "timestamp"; query: "created_at/string()" } + XmlRole { name: "source"; query: "source/string()" } + XmlRole { name: "userName"; query: "user/name/string()" } + XmlRole { name: "userScreenName"; query: "user/screen_name/string()" } + XmlRole { name: "userImage"; query: "user/profile_image_url/string()" } + XmlRole { name: "userLocation"; query: "user/location/string()" } + XmlRole { name: "userDescription"; query: "user/description/string()" } + XmlRole { name: "userFollowers"; query: "user/followers_count/string()" } + XmlRole { name: "userStatuses"; query: "user/statuses_count/string()" } + //TODO: Could also get the user's color scheme, timezone and a few other things +} +Binding { + property: "mode" + target: wrapper + value: {if(wrapper.tags==''){"everyone";}else if(wrapper.tags=='my timeline'){"self";}else{"user";}} +} +} diff --git a/demos/declarative/twitter/content/UserModel.qml b/demos/declarative/twitter/content/UserModel.qml new file mode 100644 index 0000000..c146b84 --- /dev/null +++ b/demos/declarative/twitter/content/UserModel.qml @@ -0,0 +1,26 @@ +import Qt 4.6 + +//This "model" gets the user information about the searched user. Mainly for the icon. +//Copied from RssModel + +Item { id: wrapper + property var model: xmlModel + property string user : "" + property int status: xmlModel.status + function reload() { xmlModel.reload(); } +XmlListModel { + id: xmlModel + + source: {if(user!="") {"http://twitter.com/users/show.xml?screen_name="+user;}else{"";}} + query: "/user" + + XmlRole { name: "name"; query: "name/string()" } + XmlRole { name: "screenName"; query: "screen_name/string()" } + XmlRole { name: "image"; query: "profile_image_url/string()" } + XmlRole { name: "location"; query: "location/string()" } + XmlRole { name: "description"; query: "description/string()" } + XmlRole { name: "followers"; query: "followers_count/string()" } + //XmlRole { name: "protected"; query: "protected/bool()" } + //TODO: Could also get the user's color scheme, timezone and a few other things +} +} diff --git a/demos/declarative/twitter/twitter.qml b/demos/declarative/twitter/twitter.qml new file mode 100644 index 0000000..566832b --- /dev/null +++ b/demos/declarative/twitter/twitter.qml @@ -0,0 +1,87 @@ +import Qt 4.6 +import "content" as Twitter +import "../flickr/common" as Common +import "../flickr/mobile" as Mobile + +Item { + id: Screen; width: 320; height: 480 + property bool userView : false + function setMode(m){ + Screen.userView = m; + if(m == false){ + RssModel.tags='my timeline'; + RssModel.reload(); + ToolBar.button2Label = "View others"; + } else { + ToolBar.button2Label = "Return home"; + } + } + //Workaround for bug 260266 + Timer{ interval: 1; running: false; repeat: false; onTriggered: reallySetUser(); id:hack } + Script{ + var tmpStr; + function setUser(str){hack.running = true; tmpStr = str} + function reallySetUser(){RssModel.tags = tmpStr;} + } + + Rectangle { + id: Background + anchors.fill: parent; color: "#343434"; + + Image { source: "mobile/images/stripes.png"; fillMode: "Tile"; anchors.fill: parent; opacity: 0.3 } + + Twitter.RssModel { id: RssModel } + Common.Loading { anchors.centerIn: parent; visible: RssModel.status && state!='unauthed'} + + Item { + id: Views + x: 2; width: parent.width - 4 + y:60 //Below the title bars + height: 320 + + Twitter.AuthView{ + id: authView + anchors.verticalCenter: parent.verticalCenter + width: parent.width; height: parent.height-60; + x: -(Screen.width * 1.5) + } + + Twitter.FatDelegate { id: FatDelegate } + ListView { + id: MainView; model: RssModel.model; delegate: FatDelegate; + width: parent.width; height: parent.height; x: 0; cacheBuffer: 100; + } + } + + Twitter.MultiTitleBar { id: TitleBar; width: parent.width } + Mobile.ToolBar { id: ToolBar; height: 40; + //anchors.bottom: parent.bottom; + //TODO: Use anchor changes instead of hard coding + y: 440 + width: parent.width; opacity: 0.9 + button1Label: "Update" + button2Label: "View others" + onButton2Clicked: + { + if(Screen.userView == true){ + Screen.setMode(false); + }else{ + Screen.setMode(true); + } + } + } + + states: [ + State { + name: "unauthed"; when: RssModel.authName=="" + PropertyChanges { target: authView; x: 0 } + PropertyChanges { target: MainView; x: -(parent.width * 1.5) } + PropertyChanges { target: TitleBar; y: -80 } + PropertyChanges { target: ToolBar; y: Screen.height + 80 } + } + ] + transitions: [ + Transition { NumberAnimation { properties: "x,y"; duration: 500; easing: "easeInOutQuad" } } + ] + } +} |