[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [Gluon] 3084510: Fix all the mainview.state lines and add the provi
From: Laszlo Papp <djszapi () archlinux ! us>
Date: 2010-11-15 20:10:44
Message-ID: 20101115201044.2A0D1A60A6 () git ! kde ! org
[Download RAW message or body]
commit 3084510ea41bf411a8ed319fd855f31f37563c5d
branch master
Author: Laszlo Papp <djszapi@archlinux.us>
Date: Mon Nov 15 22:10:41 2010 +0200
Fix all the mainview.state lines and add the providerSet slots, so on'.
diff --git a/player/touch/LineEdit.qml b/player/touch/LineEdit.qml
index 0ff17f1..9af7290 100644
--- a/player/touch/LineEdit.qml
+++ b/player/touch/LineEdit.qml
@@ -1,7 +1,7 @@
import QtQuick 1.0
/**
- * A LineEdit in Mana style
+ * A LineEdit in Gluon style
*/
FocusScope {
property alias text: textInput.text
diff --git a/player/touch/Login.qml b/player/touch/Login.qml
index dade277..e3e9584 100644
--- a/player/touch/Login.qml
+++ b/player/touch/Login.qml
@@ -5,6 +5,13 @@ Rectangle {
property alias username: usernameLineEdit.text;
property alias password: passwordLineEdit.text;
+ property variant tabTarget: KeyNavigation.right || KeyNavigation.down;
+ property variant backtabTarget: KeyNavigation.left || KeyNavigation.up
+
+ property bool providerInitialized: false;
+ Keys.onTabPressed: if (tabTarget) tabTarget.focus = true;
+ Keys.onBacktabPressed: if (backtabTarget) backtabTarget.focus = true;
+
x: 0
y: 0
@@ -14,13 +21,23 @@ Rectangle {
border.color: "black"
color: "darkGrey"
+ function providerSet() {
+ providerInitialized = true;
+ }
+
+ ErrorLabel {
+ id: errorLabel;
+ // anchors.horizontalCenter: usernameEdit.horizontalCenter;
+ }
+
Text {
id: usernameText
- text: "Username"
+ text: qsTr("Username")
color: "white"
font.pixelSize: 24
}
+
LineEdit {
id: usernameLineEdit
x: 15
@@ -30,7 +47,7 @@ Rectangle {
Text {
id: passwordText
- text: "Password"
+ text: qsTr("Password")
color: "white"
width: usernameText.width
font.pixelSize: usernameText.font.pixelSize
diff --git a/player/touch/Startup.qml b/player/touch/Startup.qml
index 8203d89..67e6e7b 100644
--- a/player/touch/Startup.qml
+++ b/player/touch/Startup.qml
@@ -1,93 +1,92 @@
import QtQuick 1.0
Rectangle {
- id: gluon_player
+
color: "black"
+ anchors.fill: parent
- width: 490
- height: 720
+ Image {
+ id: gluon_logo
+ source: "icons/hi256-app-gluon.png"
+ width: parent.width/2 * 4/5
+ height: parent.height * 3/5
+ fillMode: Image.PreserveAspectFit
+ anchors.horizontalCenter: parent.horizontalCenter
+ anchors.horizontalCenterOffset: -parent.width/4
+ anchors.verticalCenter: parent.verticalCenter
+ anchors.margins: 10
+ }
- SystemPalette {
- id: activePalette
+ Login {
+ id: lgn
+ objectName: "login"
+ width: parent.width / 2
+ height: parent.height * 2 / 5
+ anchors.left: gluon_logo.right
+ anchors.margins: 10
}
- Image {
- id: gluon_logo
- // anchors.fill: parent
- source: "icons/hi256-app-gluon.png"
- width: parent.width/2 * 4/5
- height: parent.height * 3/5
- fillMode: Image.PreserveAspectFit
- anchors.horizontalCenter: parent.horizontalCenter
- anchors.horizontalCenterOffset: -parent.width/4
- anchors.verticalCenter: parent.verticalCenter
- anchors.margins: 10
- }
-
- Login {
- id: lgn
- width: parent.width / 2
- height: parent.height * 2 / 5
- anchors.left: gluon_logo.right
- anchors.margins: 10
- }
-
- Button {
- id: new_user
- width: parent.width / 4
- height: parent.height * 1 / 5
- icon: "icons/user-group-new.png"
- text: "New User"
- onClicked: {
- mainview.statepoint = "registration"
- }
- anchors.top: lgn.bottom
- anchors.left: gluon_logo.right
- anchors.margins: 10
+ Button {
+ id: new_user
+ width: parent.width / 4 - 5
+ height: parent.height * 1 / 5
+ icon: "icons/list-add-user.png"
+ text: "New User"
+ onClicked: {
+ mainview.statepoint = "registration"
}
+ anchors.top: lgn.bottom
+ anchors.left: gluon_logo.right
+ anchors.margins: 10
+ }
- Button {
- id: log_on
- width: parent.width / 4
- height: parent.height * 1 / 5
- icon: "icons/im-user.png"
- text: "Log On"
- onClicked: {
+ Button {
+ id: log_on
+ width: parent.width / 4 - 5
+ height: parent.height * 1 / 5
+ icon: "icons/im-user.png"
+ text: "Log On"
+ onClicked: {
+ if (lgn.providerInitialized) {
+ console.log("Provider have been already initialized!")
authentication.login(lgn.username, lgn.password)
- state: LogOnState
+ mainview.statepoint = "home"
+ } else {
+ console.log("Provider is not initialized yet!")
}
- anchors.top: lgn.bottom
- anchors.left: new_user.right
- anchors.margins: 10
}
+ anchors.top: lgn.bottom
+ anchors.left: new_user.right
+ anchors.margins: 10
+ }
- Button {
- id: forgotten_details
- width: parent.width / 2
- height: parent.height * 1 / 5
- icon: "icons/help-hint.png"
- text: "Forgotten Your Details?"
- onClicked: {
- state: forgottenDetailsState
- }
- subtext: "Send new password to your email address"
- anchors.top: log_on.bottom
- anchors.left: gluon_logo.right
- anchors.margins: 10
+ Button {
+ id: forgotten_details
+ width: parent.width / 2
+ height: parent.height * 1 / 5
+ icon: "icons/help-hint.png"
+ text: "Forgotten Your Details?"
+ onClicked: {
+ mainview.statepoint = "forgottenDetails"
}
+ subtext: qsTr("Send new password to your email address")
+ anchors.top: log_on.bottom
+ anchors.left: gluon_logo.right
+ anchors.margins: 10
+ }
- Button {
- id: play
- width: parent.width / 2
- height: parent.height * 1 / 5
- icon: "icons/media-playback-start.png"
- text: "Play Without Logging On"
- onClicked: {
- state: playState
- }
- subtext: "3 games available"
- anchors.top: forgotten_details.bottom
- anchors.left: gluon_logo.right
- anchors.margins: 10
+ Button {
+ id: play
+ width: parent.width / 2
+ height: parent.height * 1 / 5
+ icon: "icons/media-playback-start.png"
+ text: "Play Without Logging On"
+ onClicked: {
+ mainview.statepoint = "home"
}
+ subtext: "3 games available"
+ anchors.top: forgotten_details.bottom
+ anchors.left: gluon_logo.right
+ anchors.margins: 10
+ }
}
diff --git a/player/touch/gluon_qmlplayer.qrc b/player/touch/gluon_qmlplayer.qrc
index cbdf087..657addb 100644
--- a/player/touch/gluon_qmlplayer.qrc
+++ b/player/touch/gluon_qmlplayer.qrc
@@ -6,12 +6,16 @@
<file>Details.qml</file>
<file>Comments.qml</file>
+ <file>Registration.qml</file>
+ <file>RegistrationModel.qml</file>
+
<file>Button.qml</file>
<file>LineEdit.qml</file>
<file>Login.qml</file>
<file>icons/dialog-ok.png</file>
<file>icons/help-hint.png</file>
+ <file>icons/get-hot-new-stuff.png</file>
<file>icons/lineedit.png</file>
<file>icons/list-add-user.png</file>
<file>icons/media-playback-start.png</file>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic