From ae854feab0a5a734f7536c6649d70f266aad716c Mon Sep 17 00:00:00 2001 From: APTX Date: Tue, 30 Nov 2010 13:01:22 +0100 Subject: [PATCH] Init --- .gitignore | 75 +++++++++ main.cpp | 17 ++ qml/LoginScreen.qml | 0 qml/tim-game/Components/Button.qml | 49 ++++++ qml/tim-game/Components/ChatView.qml | 66 ++++++++ qml/tim-game/Components/HighScoreForm.qml | 81 +++++++++ qml/tim-game/Components/Input.qml | 26 +++ qml/tim-game/Components/LoginForm.qml | 92 ++++++++++ qml/tim-game/Components/RegistrationForm.qml | 101 +++++++++++ qml/tim-game/Components/ToolBar.qml | 32 ++++ qml/tim-game/Components/images/gloss.png | Bin 0 -> 1236 bytes qml/tim-game/Components/images/lineedit.png | Bin 0 -> 1415 bytes qml/tim-game/Components/images/lineedit.sci | 5 + qml/tim-game/Components/images/loading.png | Bin 0 -> 813 bytes qml/tim-game/Components/images/quit.png | Bin 0 -> 2369 bytes qml/tim-game/Components/images/stripes.png | Bin 0 -> 257 bytes qml/tim-game/Components/images/titlebar.png | Bin 0 -> 1436 bytes qml/tim-game/Components/images/titlebar.sci | 5 + qml/tim-game/Components/images/toolbutton.png | Bin 0 -> 2550 bytes qml/tim-game/Components/images/toolbutton.sci | 5 + qml/tim-game/main.qml | 151 +++++++++++++++++ qmlapplicationviewer/qmlapplicationviewer.cpp | 157 ++++++++++++++++++ qmlapplicationviewer/qmlapplicationviewer.h | 39 +++++ qmlapplicationviewer/qmlapplicationviewer.pri | 154 +++++++++++++++++ tim-game.desktop | 11 ++ tim-game.png | Bin 0 -> 3400 bytes tim-game.pro | 41 +++++ tim-game.svg | 93 +++++++++++ 28 files changed, 1200 insertions(+) create mode 100644 .gitignore create mode 100644 main.cpp create mode 100644 qml/LoginScreen.qml create mode 100644 qml/tim-game/Components/Button.qml create mode 100644 qml/tim-game/Components/ChatView.qml create mode 100644 qml/tim-game/Components/HighScoreForm.qml create mode 100644 qml/tim-game/Components/Input.qml create mode 100644 qml/tim-game/Components/LoginForm.qml create mode 100644 qml/tim-game/Components/RegistrationForm.qml create mode 100644 qml/tim-game/Components/ToolBar.qml create mode 100644 qml/tim-game/Components/images/gloss.png create mode 100644 qml/tim-game/Components/images/lineedit.png create mode 100644 qml/tim-game/Components/images/lineedit.sci create mode 100644 qml/tim-game/Components/images/loading.png create mode 100644 qml/tim-game/Components/images/quit.png create mode 100644 qml/tim-game/Components/images/stripes.png create mode 100644 qml/tim-game/Components/images/titlebar.png create mode 100644 qml/tim-game/Components/images/titlebar.sci create mode 100644 qml/tim-game/Components/images/toolbutton.png create mode 100644 qml/tim-game/Components/images/toolbutton.sci create mode 100644 qml/tim-game/main.qml create mode 100644 qmlapplicationviewer/qmlapplicationviewer.cpp create mode 100644 qmlapplicationviewer/qmlapplicationviewer.h create mode 100644 qmlapplicationviewer/qmlapplicationviewer.pri create mode 100644 tim-game.desktop create mode 100644 tim-game.png create mode 100644 tim-game.pro create mode 100644 tim-game.svg diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..2f8834d --- /dev/null +++ b/.gitignore @@ -0,0 +1,75 @@ +# This file is used to ignore files which are generated +# ---------------------------------------------------------------------------- + +*~ +*.a +*.core +*.moc +*.o +*.obj +*.orig +*.rej +*.so +*_pch.h.cpp +*_resource.rc +*.qm +.#* +*.*# +core +.qmake.cache +tags +.DS_Store +*.debug +Makefile* +*.prl +*.app +moc_*.cpp +ui_*.h +qrc_*.cpp + +# qtcreator generated files +*.pro.user +*.pro.user.* + +# xemacs temporary files +*.flc + +# Vim temporary files +.*.swp + +# Visual Studio generated files +*.ib_pdb_index +*.idb +*.ilk +*.pdb +*.sln +*.suo +*.vcproj +*vcproj.*.*.user +*.ncb +*.exp + +# MinGW generated files +*.Debug +*.Release + +# Directories to ignore +# --------------------- + +debug +release +lib/qtsingleapplication/lib +lib/qtsingleapplication/examples +lib/qtsingleapplication/doc +.tmp +qtc-gdbmacros + +# Binaries +# -------- +build/aniplayer +build/*.dll +build/*.lib +build/*.exe +build/*.so* + + diff --git a/main.cpp b/main.cpp new file mode 100644 index 0000000..2438285 --- /dev/null +++ b/main.cpp @@ -0,0 +1,17 @@ +#include +//#include + +#include "qmlapplicationviewer.h" + +int main(int argc, char *argv[]) +{ + QApplication app(argc, argv); + + QmlApplicationViewer viewer; + viewer.setOrientation(QmlApplicationViewer::ScreenOrientationAuto); + viewer.setMainQmlFile(QLatin1String("qml/tim-game/main.qml")); +// viewer.setViewport(new QGLWidget()); + viewer.show(); + + return app.exec(); +} diff --git a/qml/LoginScreen.qml b/qml/LoginScreen.qml new file mode 100644 index 0000000..e69de29 diff --git a/qml/tim-game/Components/Button.qml b/qml/tim-game/Components/Button.qml new file mode 100644 index 0000000..a77f786 --- /dev/null +++ b/qml/tim-game/Components/Button.qml @@ -0,0 +1,49 @@ +import Qt 4.7 + +Item { + id: container + + signal clicked + + property string text + property bool keyUsing: false + + BorderImage { + id: buttonImage + source: "images/toolbutton.sci" + width: container.width; height: container.height + } + BorderImage { + id: pressed + opacity: 0 + source: "images/toolbutton.sci" + width: container.width; height: container.height + } + MouseArea { + id: mouseRegion + anchors.fill: buttonImage + onClicked: { container.clicked(); } + } + Text { + id: btnText + color: if(container.keyUsing){"#D0D0D0";} else {"#FFFFFF";} + anchors.centerIn: buttonImage; font.bold: true + text: container.text; style: Text.Raised; styleColor: "black" + font.pixelSize: 24 + } + states: [ + State { + name: "Pressed" + when: mouseRegion.pressed == true + PropertyChanges { target: pressed; opacity: 1 } + }, + State { + name: "Focused" + when: container.activeFocus == true + PropertyChanges { target: btnText; color: "#FFFFFF" } + } + ] + transitions: Transition { + ColorAnimation { target: btnText; } + } +} diff --git a/qml/tim-game/Components/ChatView.qml b/qml/tim-game/Components/ChatView.qml new file mode 100644 index 0000000..e8f54ff --- /dev/null +++ b/qml/tim-game/Components/ChatView.qml @@ -0,0 +1,66 @@ +import Qt 4.7 + +FocusScope { + id: wrapper + + ListView { + id: chatView + x: 0; y: 0 + height: parent.height - 80 + anchors.right: parent.right + anchors.left: parent.left + anchors.top: parent.top + anchors.topMargin: 0 + anchors.rightMargin: 0 + anchors.leftMargin: 0 + } + + Input { + id: inputLine + focus: true + anchors.top: chatView.bottom + anchors.topMargin: 0 + + anchors.right: sendButton.left + anchors.rightMargin: 0 + anchors.bottom: parent.bottom + anchors.bottomMargin: 0 + anchors.left: parent.left + anchors.leftMargin: 0 + + Keys.onReturnPressed: inputLine.sendMessage(); + Keys.onEnterPressed: inputLine.sendMessage(); + + function sendMessage() { + var message = inputLine.text; + inputLine.text = ""; + + if (message == "/quit") { + exitChatView() + return; + } + } + + function exitChatView() { + screen.focus = true; + screen.state = "" + } + } + Button { + width: 80 + id: sendButton + text: ">" + anchors.bottom: parent.bottom + anchors.bottomMargin: 0 + anchors.top: chatView.bottom + anchors.topMargin: 0 + anchors.right: parent.right + anchors.rightMargin: 0 + + Keys.onReturnPressed: inputLine.sendMessage(); + Keys.onEnterPressed: inputLine.sendMessage(); + Keys.onSelectPressed: inputLine.sendMessage(); + Keys.onSpacePressed: inputLine.sendMessage(); + onClicked: inputLine.sendMessage(); + } +} diff --git a/qml/tim-game/Components/HighScoreForm.qml b/qml/tim-game/Components/HighScoreForm.qml new file mode 100644 index 0000000..c0fa2f4 --- /dev/null +++ b/qml/tim-game/Components/HighScoreForm.qml @@ -0,0 +1,81 @@ +import Qt 4.7 + +FocusScope { + id: wrapper + Column { + anchors.centerIn: parent + spacing: 20 + Column{ + spacing: 4 + Text { + text: "High Score:" + font.pixelSize: 16; font.bold: true; color: "white"; style: Text.Raised; styleColor: "black" + horizontalAlignment: Qt.AlignRight + } + Input{ + id: highScore + KeyNavigation.backtab: backButton + KeyNavigation.tab: submitButton + onAccepted: submitButton.submitScore(); + focus: true + validator: IntValidator{ bottom: 0} + } + } + Row { + spacing: 4 + Button { + width: 120 + height: 64 + id: submitButton + keyUsing: true; + opacity: 1 + text: "Submit" + KeyNavigation.backtab: highScore + KeyNavigation.tab: backButton + Keys.onReturnPressed: submitButton.submitScore(); + Keys.onEnterPressed: submitButton.submitScore(); + Keys.onSelectPressed: submitButton.submitScore(); + Keys.onSpacePressed: submitButton.submitScore(); + onClicked: submitButton.submitScore(); + + function submitScore() { + if (wrapper.state=="invalidinput") + return; + screen.focus = true; + screen.state = ""; + } + } + + Button { + width: 120 + height: 64 + id: backButton + keyUsing: true; + opacity: 1 + text: "Go Back" + KeyNavigation.backtab: submitButton + KeyNavigation.tab: highScore + Keys.onReturnPressed: backButton.goBack(); + Keys.onEnterPressed: backButton.goBack(); + Keys.onSelectPressed: backButton.goBack(); + Keys.onSpacePressed: backButton.goBack(); + onClicked: backButton.goBack(); + + function goBack() { + screen.focus = true; + screen.state = "" + } + } + } + } + states: + State { + name: "invalidinput" + when: highScore.text=="" + PropertyChanges { target: submitButton ; opacity: 0.6 ; } + } + transitions: + Transition { + NumberAnimation { target: submitButton; property: "opacity"; duration: 200 } + } +} diff --git a/qml/tim-game/Components/Input.qml b/qml/tim-game/Components/Input.qml new file mode 100644 index 0000000..bae3dec --- /dev/null +++ b/qml/tim-game/Components/Input.qml @@ -0,0 +1,26 @@ +import Qt 4.7 + +FocusScope { + id:container + width: 240 + height: 52 + BorderImage { source: "images/lineedit.sci"; anchors.fill: parent } + signal accepted + property alias text: input.text + property alias item: input + property alias echoMode: input.echoMode + property alias validator: input.validator + TextInput{ + id: input + width: parent.width - 12 + anchors.centerIn: parent + maximumLength:21 + font.pixelSize: 24; + font.bold: true + color: "#151515"; selectionColor: "mediumseagreen" + focus: true + onAccepted:{container.accepted()} + text: "" + selectByMouse: true + } +} diff --git a/qml/tim-game/Components/LoginForm.qml b/qml/tim-game/Components/LoginForm.qml new file mode 100644 index 0000000..e023c9c --- /dev/null +++ b/qml/tim-game/Components/LoginForm.qml @@ -0,0 +1,92 @@ +import Qt 4.7 + +FocusScope { + id: wrapper + Column { + anchors.centerIn: parent + spacing: 20 + Column{ + spacing: 4 + Text { + text: "User:" + font.pixelSize: 16; font.bold: true; color: "white"; style: Text.Raised; styleColor: "black" + horizontalAlignment: Qt.AlignRight + } + Input{ + id: user + KeyNavigation.backtab: loginButton + KeyNavigation.tab:pass + onAccepted: submitButton.submitScore(); + focus: true + } + Text { + text: "Pass:" + font.pixelSize: 16; font.bold: true; color: "white"; style: Text.Raised; styleColor: "black" + horizontalAlignment: Qt.AlignRight + } + Input{ + id: pass + KeyNavigation.backtab: user + KeyNavigation.tab: loginButton + echoMode: TextInput.PasswordEchoOnEdit + } + } + Row { + spacing: 4 + Button { + width: 120 + height: 64 + id: loginButton + keyUsing: true; + opacity: 1 + text: "Log In" + KeyNavigation.backtab: pass + KeyNavigation.tab: backButton + Keys.onReturnPressed: loginButton.doLogin(); + Keys.onEnterPressed: loginButton.doLogin(); + Keys.onSelectPressed: loginButton.doLogin(); + Keys.onSpacePressed: loginButton.doLogin(); + onClicked: loginButton.doLogin(); + + function doLogin() { + if (wrapper.state=="invalidinput") + return; + screen.focus = true; + screen.state = ""; + screen.logIn(); + } + } + + Button { + width: 120 + height: 64 + id: backButton + keyUsing: true; + opacity: 1 + text: "Go Back" + KeyNavigation.backtab: loginButton + KeyNavigation.tab: user + Keys.onReturnPressed: backButton.goBack(); + Keys.onEnterPressed: backButton.goBack(); + Keys.onSelectPressed: backButton.goBack(); + Keys.onSpacePressed: backButton.goBack(); + onClicked: backButton.goBack(); + + function goBack() { + screen.focus = true; + screen.state = "" + } + } + } + } + states: + State { + name: "invalidinput" + when: user.text=="" || pass.text=="" + PropertyChanges { target: loginButton ; opacity: 0.6 ; } + } + transitions: + Transition { + NumberAnimation { target: loginButton; property: "opacity"; duration: 200 } + } +} diff --git a/qml/tim-game/Components/RegistrationForm.qml b/qml/tim-game/Components/RegistrationForm.qml new file mode 100644 index 0000000..b9bd13e --- /dev/null +++ b/qml/tim-game/Components/RegistrationForm.qml @@ -0,0 +1,101 @@ +import Qt 4.7 + +FocusScope { + id: wrapper + Column { + anchors.centerIn: parent + spacing: 20 + Column{ + spacing: 4 + Text { + text: "User:" + font.pixelSize: 16; font.bold: true; color: "white"; style: Text.Raised; styleColor: "black" + horizontalAlignment: Qt.AlignRight + } + Input{ + id: user + KeyNavigation.backtab: registerButton + KeyNavigation.tab:pass + onAccepted: submitButton.submitScore(); + focus: true + } + Text { + text: "Password:" + font.pixelSize: 16; font.bold: true; color: "white"; style: Text.Raised; styleColor: "black" + horizontalAlignment: Qt.AlignRight + } + Input{ + id: pass + KeyNavigation.backtab: user + KeyNavigation.tab: passRetyped + echoMode: TextInput.PasswordEchoOnEdit + } + Text { + text: "Re-type Password:" + font.pixelSize: 16; font.bold: true; color: "white"; style: Text.Raised; styleColor: "black" + horizontalAlignment: Qt.AlignRight + } + Input{ + id: passRetyped + KeyNavigation.backtab: pass + KeyNavigation.tab: registerButton + echoMode: TextInput.PasswordEchoOnEdit + } + } + Row { + spacing: 4 + Button { + width: 120 + height: 64 + id: registerButton + keyUsing: true; + opacity: 1 + text: "Register" + KeyNavigation.backtab: passRetyped + KeyNavigation.tab: user + Keys.onReturnPressed: registerButton.doRegister(); + Keys.onEnterPressed: registerButton.doRegister(); + Keys.onSelectPressed: registerButton.doRegister(); + Keys.onSpacePressed: registerButton.doRegister(); + onClicked: registerButton.doRegister(); + + function doRegister() { + if (wrapper.state=="invalidinput") + return; + screen.focus = true; + screen.state = "" + } + } + Button { + width: 120 + height: 64 + id: backButton + keyUsing: true; + opacity: 1 + text: "Go Back" + KeyNavigation.backtab: registerButton + KeyNavigation.tab: user + Keys.onReturnPressed: backButton.goBack(); + Keys.onEnterPressed: backButton.goBack(); + Keys.onSelectPressed: backButton.goBack(); + Keys.onSpacePressed: backButton.goBack(); + onClicked: backButton.goBack(); + + function goBack() { + screen.focus = true; + screen.state = "" + } + } + } + } + states: + State { + name: "invalidinput" + when: user.text == "" || pass.text == "" || pass.text != passRetyped.text + PropertyChanges { target: registerButton ; opacity: 0.6 ; } + } + transitions: + Transition { + NumberAnimation { target: registerButton; property: "opacity"; duration: 200 } + } +} diff --git a/qml/tim-game/Components/ToolBar.qml b/qml/tim-game/Components/ToolBar.qml new file mode 100644 index 0000000..2eeda5f --- /dev/null +++ b/qml/tim-game/Components/ToolBar.qml @@ -0,0 +1,32 @@ +import Qt 4.7 + +Item { + id: toolbar + + property bool show3rdButton: false + property alias button1Label: button1.text + property alias button2Label: button2.text + property alias button3Label: button3.text + signal button1Clicked + signal button2Clicked + signal button3Clicked + focus:true + BorderImage { source: "images/titlebar.sci"; width: parent.width; height: parent.height + 14; y: -7 } + Button { + id: button1 + anchors.left: parent.left; anchors.leftMargin: 5; y: 3; width: 160; height: 64 + onClicked: toolbar.button1Clicked() + focus:true + } + Button { + id: button2 + anchors.right: parent.right; anchors.rightMargin: 5; y: 3; width: 140; height: 64 + onClicked: toolbar.button2Clicked() + } + Button { + id: button3 + y: show3rdButton ? 3 : toolbar.height * 1.5 + anchors.horizontalCenter: parent.horizontalCenter; anchors.rightMargin: 5; width: 160; height: 64 + onClicked: toolbar.button3Clicked() + } +} diff --git a/qml/tim-game/Components/images/gloss.png b/qml/tim-game/Components/images/gloss.png new file mode 100644 index 0000000000000000000000000000000000000000..5d370cd93d62ed8c17f43a5d5dc7ed20b4edb5a1 GIT binary patch literal 1236 zcmV;_1S|WAP)Px#24YJ`L;(K){{a7>y{D4^000SaNLh0L01ejw01ejxLMWSf00007bV*G`2iXV} z1RN8~lD~8S00dM?L_t(|+U;D~QX4T4Y^|4I%x&WY2)X$GFUv=G^5Ah$39VMg=va`d zC|s_Uy=qPO^vntr5k28JNc(~Dd+K$Gc~DBB#W4cV?@SptZ+lM}i&GQx%xh!kfrzL@ z07n4B%%VsG*ail9fPugbdiNd?H5ZBF1TYj4iBs382}&wQ#5p&F7|Gfo>XGL|IoG0; z1uP$``hsYsb4?IO?WU#{5*!)YwFid`gn;j)_=(b`K|DnsEHq1Al=0ai^Fno!0I1TD zXlC0`VV|R1%Dh+^C>Dukw$*P~l5(k3MGBpBMdRqutrW_s0#uy?Kf71-G085oJGaoo zl<|!K!#7DyZiqCUb=rnTi_b!b8Qm%w!H}l2En!IPdd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--- /dev/null +++ b/qml/tim-game/Components/images/lineedit.sci @@ -0,0 +1,5 @@ +border.left: 10 +border.top: 10 +border.bottom: 10 +border.right: 10 +source: lineedit.png diff --git a/qml/tim-game/Components/images/loading.png b/qml/tim-game/Components/images/loading.png new file mode 100644 index 0000000000000000000000000000000000000000..47a1589c5d42b913859b4e2e061455cb60689d56 GIT binary patch literal 813 zcmV+|1JeA7P)5wzp}e};K9B-v-g}gb7$_o zGBY}Xq#@umFa?x>5nvdo0&Bo;U7R#Bpm~;0~Y`R+Z{ZAfO+7nnQgW5 zUuZ!*4BP;&MpNB+Cl~@IfKf@`frVx(k}E*cao|2M-X*a|7JU>Y&6-)YtpG`rz(e2& zVShc=fzQBF{9Pl&LkTz$Nj-|dl%$3&*(X3!8F&=Q{a4QduYmbxaU%&rfSv)4y5Rya zA!*Lcc6R?$cP42Bm;ol)TlQ-F%BN=bA(yoYB#jYHOpW~kx(@ubNSv;~ZNf22zkC&V zY-T^YAqOzCMM)LlEaCLjF+y0KUl8|8(kO7#`Pe!rc_N}hh!=kXN|Lf&0l=N8EX9*v z$P*D8z??IS5SV1~ykBz@KAPFvUda;?t3bt>4@n{eE&+$#;ER5dCs=gv0ty*$#SN?y zj$FU70qi(iAp=f1<9q8gLv?}Z(r?3128=pm&wEY2LWcb z47_xcMu2<0h>%nQ&e2#WR_ax9I`AC$;wF}X2a=`_Kt2Xc(^zM05t^7VFU>n~uV&aQ zN~`SEa-ZnFDD@4?29RHrCQf`=?wzdAzAX3R>*Nh(d2Vagq%rCCNd>F{xs6HF-mpb$ r){THopk-_J-<#960umtuY0v)xw2egPx#24YJ`L;(K){{a7>y{D4^000SaNLh0L01FcU01FcV0GgZ_00007bV*G`2igQ1 z1TP_CX>@2HM@dakSAh-}000P_NklFL*uH1CJrwk1E-B6u%Z2w7N>!@``FU=ke2KVZxrvgh1F zVsZ{SIN(5XGUSre9`+I=EU&CUVpy%D(TwM*d9|jyr@N=SDu*78?Zwu^tK<+|(2STz z)rVjG>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0 z3QZ=HpHNEwdh_PZ5YO}IcDo>WHHuz@{C+>;$prTIcCov+S2=7QF2`f>e^qPMLNpqM zBuOwW3m^pG2ngq;3Ii}0n8@X_;5bgS?US)@gvMgAA8{P_Xl-px;CUXsUJr~h5W>O7 zz066!-;a1Aj^h44cK7xw&1Q2AK(pKHZpY*C;)`mf5RFD5N)jx~`cC!sO1Np7$YjzW zWMYKX-iUn@RGOTe+`M$@vXD-v(P{TU+3~&eW!VV?1Bk_A9&&fD(r7f+05p#$>2x~V ziCCgodGVqUiAEucB8I~uIF1820v|UqN&^PVvaq-~58JlIe!u@q%d-9mU~n4LRw9Z$ zFb1FSQz1yQ1j{r>J}<}oem`brW^izDfSqr@t<)R!*O0GbG?9XMp;)}{C4MY*PZG*r=Mj{IO{XU*Qe-6iS?o}$4-+mW);$b>E zI@$;eg4*qN*CknkEX#0R7g6t@5BTPrZz{D~?L_49Xm{G%i9}+zQmGWCr>BW1if|kk ziXubPG(3O)9K)e~uUszw{!PeJ%hS=3x*>!GwcG8i%d(6_B7yz={c|D5*mnD$ilS^* ztJT8H^h_W+9fhhMjgZ58<#Oq*$TJmu^+??i1VQa|I_s8YVP|KjQmt0cg*+a;UT;Sf zgpGQ=R+yOZ2X}XOF&qx>l}ZOEBF}Zp%49NMD2mbs5c|H9Wzy-7XJ%&9TrT(dyWWXU nySqj%a6ak3fqXyy@5X-sx(=UtGtDhU00000NkvXXu0mjfre}bX literal 0 HcmV?d00001 diff --git a/qml/tim-game/Components/images/stripes.png b/qml/tim-game/Components/images/stripes.png new file mode 100644 index 0000000000000000000000000000000000000000..9f36727ea424cd0da94bd5a7cee4082447275eeb GIT binary patch literal 257 zcmeAS@N?(olHy`uVBq!ia0vp^93afW1|*O0@9PFqjKx9jP7LeL$-D$|*pj^6T^Rm@ z;DWu&Cj&(|3p^r=85p>QL70(Y)*K0-AbW|YuPgga4pBxq@gGdLS%5-~o-U3d5|`(m z-N<{$K*aT;^vADLPxXoJET5>DG2xP-Q1*siVN6aag0$kQzm$|0%E+I; z#Y!4I)=g1)z4*}Q$iB}`v_QR literal 0 HcmV?d00001 diff --git a/qml/tim-game/Components/images/titlebar.png b/qml/tim-game/Components/images/titlebar.png new file mode 100644 index 0000000000000000000000000000000000000000..51c90082d052a94af34488ca9a13842122f7d7a4 GIT binary patch literal 1436 zcmV;N1!MY&P)00001b5ch_0Itp) z=>Px#24YJ`L;(K){{a7>y{D4^000SaNLh0L01FcU01FcV0GgZ_00007bV*G`2iXW1 z0xv7!9LBW(000?uMObu0Z*6U5Zgc=ca%Ew3Wn>_CX>@2HM@dakSAh-}000E{NklLiq!w7*fp`1oo9~;MC5Hkm0Ga8f)%S;LHn|^l4>W+QI@MK<0LU%? zTCN^g=1tdNq`Dpph=PESv9&Y_yal)K%ETFKXCtR`vY67D3wB9@+&cbGgIArTN6+wSAX zkGy^RmUr*o{T4#Fkk#tskC!ih`Tfb0Cxj5Vy1F8SK-YDE!#OZB%*L~eNSa)23&d?U zSw1i0>gRr9IT1mtHP62Lmb0@nE-o&3^XAQ;^5Vq{d;a`6A3l8G`uZB@98Hs4A;w4} zZZ8P$T;_Us-Wa3LiY3JoBbsA{322^IDj+WNr!^z_J?9)<*YWV-LmoYP#Ov3u@#p8~ zTwPspd3nidwF01RTNaB2BC@r4CKHDcwm?9#oSA`>USgwAW7e}#gkM0Yvk41^nr1^7 z&N;5HuQ@q6;px+-_|@_O@8ADLBaYYwR2A=iy0?Jz0cyTE=eGiSB!O3eXvr9oHkkl) zJria&VhTXjdXO$lOS6-T2wfXkEEZf|Uh??yV|9$6 z$kf}E2}3pUBO*h1vm}>TF;RnPvP?}ajZsZ(s`c^F`G#o9X1&4r25)A>7;$dUeu#sd zH0nr`HO-^wWQOLC8t2no3_(Fez${xkBmh=yunfEn^?XuQ?3Ij+Zzn(@H!pav#Pqq_?!|nMq-S~Ct{2l-QZ~b zHR{$P`zF6tD!u{4zWIxhQbJa`7!wn!ntVca%bFsRXx#Sb;tV@Ca^rcTGS~=!F~4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3{N*E&u=k literal 0 HcmV?d00001 diff --git a/qml/tim-game/Components/images/toolbutton.sci b/qml/tim-game/Components/images/toolbutton.sci new file mode 100644 index 0000000..9e4f965 --- /dev/null +++ b/qml/tim-game/Components/images/toolbutton.sci @@ -0,0 +1,5 @@ +border.left: 15 +border.top: 4 +border.bottom: 4 +border.right: 15 +source: toolbutton.png diff --git a/qml/tim-game/main.qml b/qml/tim-game/main.qml new file mode 100644 index 0000000..792faca --- /dev/null +++ b/qml/tim-game/main.qml @@ -0,0 +1,151 @@ +import Qt 4.7 +import "Components" 1.0 as Components + +Item { + id: screen; width: 520; height: 480 + + property bool loggedIn: false + property variant sessionId: "" + + function logOut() { + loggedIn = false; sessionId = ""; + screen.state = ""; + } + function logIn(sessionId) { loggedIn = true; sessionId = sessionId;} + + Timer { + id: loggingOutTimer + interval: 500 + onTriggered: { logOut() } + } + + Rectangle { + id: background + anchors.fill: parent; color: "#343434"; + + state:"searchquery" + Image { source: "Components/images/stripes.png"; fillMode: Image.Tile; anchors.fill: parent; opacity: 0.3 } + + ListView { + id: highScoreTable;// model: rssModel.model; delegate: fatDelegate; + width: parent.width; height: parent.height; x: 0; cacheBuffer: 100; + } + + Components.LoginForm + { + id: loginForm + anchors.verticalCenter: parent.verticalCenter + width: parent.width; height: parent.height-60; + x: -(screen.width * 1.5) + } + + Components.RegistrationForm + { + id: registrationForm + anchors.verticalCenter: parent.verticalCenter + width: parent.width; height: parent.height-60; + x: -(screen.width * 1.5) + } + + Components.HighScoreForm + { + id: highScoreForm + anchors.verticalCenter: parent.verticalCenter + width: parent.width; height: parent.height-60; + x: -(screen.width * 1.5) + } + + Components.ChatView { + id: chatView; + anchors.verticalCenter: parent.verticalCenter + width: parent.width; height: parent.height; + x: -(screen.width * 1.5); + } + + Components.ToolBar { + id: toolBar; height: 72; + y: screen.height - toolBar.height + width: parent.width; opacity: 0.9 + button1Label: "Log In" + button2Label: "Register" + button3Label: "" + onButton1Clicked: + { + screen.state="showLoginForm" + } + onButton2Clicked: + { + screen.state="showRegistrationForm" + } + onButton3Clicked: + { + + } + states: [ + State { + name: "loggedIn" + when: screen.loggedIn + PropertyChanges { + target: toolBar + + show3rdButton: true + + button1Label: "Upload Score" + button2Label: "Log Out" + button3Label: "Chat" + onButton1Clicked: + { + screen.state="showHighScoreForm" + } + onButton2Clicked: + { + screen.state = "loggingOutState" + loggingOutTimer.start(); + } + onButton3Clicked: + { + screen.state="showChatView" + } + } + } + ] + } + } + states: [ + State { + name: "showLoginForm"; + PropertyChanges { target: loginForm; x: 0; focus:true} + PropertyChanges { target: highScoreTable; x: -(parent.width * 1.5) } + //PropertyChanges { target: titleBar; y: -80 } + PropertyChanges { target: toolBar; y: screen.height } + //PropertyChanges { target: toolBar } + //PropertyChanges { target: title; opacity:1} + }, + State { + name: "showRegistrationForm"; + PropertyChanges { target: highScoreTable; x: -(parent.width * 1.5) } + PropertyChanges { target: registrationForm; x: 0; focus:true} + PropertyChanges { target: toolBar; y: screen.height } + }, + State { + name: "showHighScoreForm"; + PropertyChanges { target: highScoreTable; x: -(parent.width * 1.5) } + PropertyChanges { target: highScoreForm; x: 0; focus:true} + PropertyChanges { target: toolBar; y: screen.height } + }, + State { + name: "showChatView"; + PropertyChanges { target: highScoreTable; x: -(parent.width * 1.5) } + PropertyChanges { target: chatView; x: 0; focus:true} + PropertyChanges { target: toolBar; y: screen.height } + }, + State { + name: "loggingOutState" + PropertyChanges { target: toolBar; y: screen.height } + } + + ] + transitions: [ + Transition { NumberAnimation { properties: "x,y,opacity"; duration: 500; easing.type: Easing.InOutQuad } } + ] +} diff --git a/qmlapplicationviewer/qmlapplicationviewer.cpp b/qmlapplicationviewer/qmlapplicationviewer.cpp new file mode 100644 index 0000000..11bedd1 --- /dev/null +++ b/qmlapplicationviewer/qmlapplicationviewer.cpp @@ -0,0 +1,157 @@ +// checksum 0x28c7 version 0x2000a +/* + This file was generated by the Qt Quick Application wizard of Qt Creator. + QmlApplicationViewer is a convenience class containing mobile device specific + code such as screen orientation handling. Also QML paths and debugging are + handled here. + It is recommended not to modify this file, since newer versions of Qt Creator + may offer an updated version of it. +*/ + +#include "qmlapplicationviewer.h" + +#include +#include +#include +#include +#include +#include + +#if defined(QMLJSDEBUGGER) +#include +#endif + +#if defined(QMLJSDEBUGGER) && !defined(NO_JSDEBUGGER) +#include +#endif +#if defined(QMLJSDEBUGGER) && !defined(NO_QMLOBSERVER) +#include +#endif + +#if defined(Q_OS_SYMBIAN) && defined(ORIENTATIONLOCK) +#include +#include +#include +#include +#endif // Q_OS_SYMBIAN && ORIENTATIONLOCK + +#if defined(QMLJSDEBUGGER) + +// Enable debugging before any QDeclarativeEngine is created +struct QmlJsDebuggingEnabler +{ + QmlJsDebuggingEnabler() + { + QDeclarativeDebugHelper::enableDebugging(); + } +}; + +// Execute code in constructor before first QDeclarativeEngine is instantiated +static QmlJsDebuggingEnabler enableDebuggingHelper; + +#endif // QMLJSDEBUGGER + +class QmlApplicationViewerPrivate +{ + QString mainQmlFile; + friend class QmlApplicationViewer; + static QString adjustPath(const QString &path); +}; + +QString QmlApplicationViewerPrivate::adjustPath(const QString &path) +{ +#ifdef Q_OS_UNIX +#ifdef Q_OS_MAC + if (!QDir::isAbsolutePath(path)) + return QCoreApplication::applicationDirPath() + + QLatin1String("/../Resources/") + path; +#else + const QString pathInShareDir = QCoreApplication::applicationDirPath() + + QLatin1String("/../share/") + + QFileInfo(QCoreApplication::applicationFilePath()).fileName() + + QLatin1Char('/') + path; + if (QFileInfo(pathInShareDir).exists()) + return pathInShareDir; +#endif +#endif + return path; +} + +QmlApplicationViewer::QmlApplicationViewer(QWidget *parent) : + QDeclarativeView(parent), + m_d(new QmlApplicationViewerPrivate) +{ + connect(engine(), SIGNAL(quit()), SLOT(close())); + setResizeMode(QDeclarativeView::SizeRootObjectToView); +#if defined(QMLJSDEBUGGER) && !defined(NO_JSDEBUGGER) + new QmlJSDebugger::JSDebuggerAgent(engine()); +#endif +#if defined(QMLJSDEBUGGER) && !defined(NO_QMLOBSERVER) + new QmlJSDebugger::QDeclarativeViewObserver(this, parent); +#endif +} + +QmlApplicationViewer::~QmlApplicationViewer() +{ + delete m_d; +} + +void QmlApplicationViewer::setMainQmlFile(const QString &file) +{ + m_d->mainQmlFile = QmlApplicationViewerPrivate::adjustPath(file); + setSource(QUrl::fromLocalFile(m_d->mainQmlFile)); +} + +void QmlApplicationViewer::addImportPath(const QString &path) +{ + engine()->addImportPath(QmlApplicationViewerPrivate::adjustPath(path)); +} + +void QmlApplicationViewer::setOrientation(ScreenOrientation orientation) +{ +#ifdef Q_OS_SYMBIAN + if (orientation != ScreenOrientationAuto) { +#if defined(ORIENTATIONLOCK) + const CAknAppUiBase::TAppUiOrientation uiOrientation = + (orientation == ScreenOrientationLockPortrait) ? CAknAppUi::EAppUiOrientationPortrait + : CAknAppUi::EAppUiOrientationLandscape; + CAknAppUi* appUi = dynamic_cast (CEikonEnv::Static()->AppUi()); + TRAPD(error, + if (appUi) + appUi->SetOrientationL(uiOrientation); + ); + Q_UNUSED(error) +#else // ORIENTATIONLOCK + qWarning("'ORIENTATIONLOCK' needs to be defined on Symbian when locking the orientation."); +#endif // ORIENTATIONLOCK + } +#elif defined(Q_WS_MAEMO_5) + Qt::WidgetAttribute attribute; + switch (orientation) { + case ScreenOrientationLockPortrait: + attribute = Qt::WA_Maemo5PortraitOrientation; + break; + case ScreenOrientationLockLandscape: + attribute = Qt::WA_Maemo5LandscapeOrientation; + break; + case ScreenOrientationAuto: + default: + attribute = Qt::WA_Maemo5AutoOrientation; + break; + } + setAttribute(attribute, true); +#else // Q_OS_SYMBIAN + Q_UNUSED(orientation); +#endif // Q_OS_SYMBIAN +} + +void QmlApplicationViewer::showExpanded() +{ +#ifdef Q_OS_SYMBIAN + showFullScreen(); +#elif defined(Q_WS_MAEMO_5) || defined(Q_WS_MAEMO_6) + showMaximized(); +#else + show(); +#endif +} diff --git a/qmlapplicationviewer/qmlapplicationviewer.h b/qmlapplicationviewer/qmlapplicationviewer.h new file mode 100644 index 0000000..143c17b --- /dev/null +++ b/qmlapplicationviewer/qmlapplicationviewer.h @@ -0,0 +1,39 @@ +// checksum 0x5a59 version 0x2000a +/* + This file was generated by the Qt Quick Application wizard of Qt Creator. + QmlApplicationViewer is a convenience class containing mobile device specific + code such as screen orientation handling. Also QML paths and debugging are + handled here. + It is recommended not to modify this file, since newer versions of Qt Creator + may offer an updated version of it. +*/ + +#ifndef QMLAPPLICATIONVIEWER_H +#define QMLAPPLICATIONVIEWER_H + +#include + +class QmlApplicationViewer : public QDeclarativeView +{ + Q_OBJECT + +public: + enum ScreenOrientation { + ScreenOrientationLockPortrait, + ScreenOrientationLockLandscape, + ScreenOrientationAuto + }; + + explicit QmlApplicationViewer(QWidget *parent = 0); + virtual ~QmlApplicationViewer(); + + void setMainQmlFile(const QString &file); + void addImportPath(const QString &path); + void setOrientation(ScreenOrientation orientation); + void showExpanded(); + +private: + class QmlApplicationViewerPrivate *m_d; +}; + +#endif // QMLAPPLICATIONVIEWER_H diff --git a/qmlapplicationviewer/qmlapplicationviewer.pri b/qmlapplicationviewer/qmlapplicationviewer.pri new file mode 100644 index 0000000..1c0c7ed --- /dev/null +++ b/qmlapplicationviewer/qmlapplicationviewer.pri @@ -0,0 +1,154 @@ +# checksum 0x3dc8 version 0x2000a +# This file was generated by the Qt Quick Application wizard of Qt Creator. +# The code below adds the QmlApplicationViewer to the project and handles the +# activation of QML debugging. +# It is recommended not to modify this file, since newer versions of Qt Creator +# may offer an updated version of it. + +QT += declarative + +SOURCES += $$PWD/qmlapplicationviewer.cpp +HEADERS += $$PWD/qmlapplicationviewer.h +INCLUDEPATH += $$PWD + +defineTest(minQtVersion) { + maj = $$1 + min = $$2 + patch = $$3 + isEqual(QT_MAJOR_VERSION, $$maj) { + isEqual(QT_MINOR_VERSION, $$min) { + isEqual(QT_PATCH_VERSION, $$patch) { + return(true) + } + greaterThan(QT_PATCH_VERSION, $$patch) { + return(true) + } + } + greaterThan(QT_MINOR_VERSION, $$min) { + return(true) + } + } + return(false) +} + +contains(DEFINES, QMLJSDEBUGGER) { + CONFIG(debug, debug|release) { + !minQtVersion(4, 7, 1) { + warning() + warning("Disabling QML debugging:") + warning() + warning("Debugging QML requires the qmljsdebugger library that ships with Qt Creator.") + warning("This library requires Qt 4.7.1 or newer.") + warning() + DEFINES -= QMLJSDEBUGGER + } else:isEmpty(QMLJSDEBUGGER_PATH) { + warning() + warning("Disabling QML debugging:") + warning() + warning("Debugging QML requires the qmljsdebugger library that ships with Qt Creator.") + warning("Please specify its location on the qmake command line, eg") + warning(" qmake -r QMLJSDEBUGGER_PATH=$CREATORDIR/share/qtcreator/qmljsdebugger") + warning() + DEFINES -= QMLJSDEBUGGER + } else { + include($$QMLJSDEBUGGER_PATH/qmljsdebugger-lib.pri) + } + } else { + DEFINES -= QMLJSDEBUGGER + } +} +# This file was generated by an application wizard of Qt Creator. +# The code below handles deployment to Symbian and Maemo, aswell as copying +# of the application data to shadow build directories on desktop. +# It is recommended not to modify this file, since newer versions of Qt Creator +# may offer an updated version of it. + +defineTest(qtcAddDeployment) { +for(deploymentfolder, DEPLOYMENTFOLDERS) { + item = item$${deploymentfolder} + itemsources = $${item}.sources + $$itemsources = $$eval($${deploymentfolder}.source) + itempath = $${item}.path + $$itempath= $$eval($${deploymentfolder}.target) + export($$itemsources) + export($$itempath) + DEPLOYMENT += $$item +} + +MAINPROFILEPWD = $$PWD + +symbian { + ICON = $${TARGET}.svg + TARGET.EPOCHEAPSIZE = 0x20000 0x2000000 + contains(DEFINES, ORIENTATIONLOCK):LIBS += -lavkon -leikcore -lcone + contains(DEFINES, NETWORKACCESS):TARGET.CAPABILITY += NetworkServices +} else:win32 { + !isEqual(PWD,$$OUT_PWD) { + copyCommand = @echo Copying application data... + for(deploymentfolder, DEPLOYMENTFOLDERS) { + source = $$eval($${deploymentfolder}.source) + pathSegments = $$split(source, /) + sourceAndTarget = $$MAINPROFILEPWD/$$source $$OUT_PWD/$$eval($${deploymentfolder}.target)/$$last(pathSegments) + copyCommand += && $(COPY_DIR) $$replace(sourceAndTarget, /, \\) + } + copydeploymentfolders.commands = $$copyCommand + first.depends = $(first) copydeploymentfolders + export(first.depends) + export(copydeploymentfolders.commands) + QMAKE_EXTRA_TARGETS += first copydeploymentfolders + } +} else:unix { + maemo5 { + installPrefix = /opt/usr + desktopfile.path = /usr/share/applications/hildon + } else { + installPrefix = /usr/local + desktopfile.path = /usr/share/applications + !isEqual(PWD,$$OUT_PWD) { + copyCommand = @echo Copying application data... + for(deploymentfolder, DEPLOYMENTFOLDERS) { + macx { + target = $$OUT_PWD/$${TARGET}.app/Contents/Resources/$$eval($${deploymentfolder}.target) + } else { + target = $$OUT_PWD/$$eval($${deploymentfolder}.target) + } + copyCommand += && $(MKDIR) $$target + copyCommand += && $(COPY_DIR) $$MAINPROFILEPWD/$$eval($${deploymentfolder}.source) $$target + } + copydeploymentfolders.commands = $$copyCommand + first.depends = $(first) copydeploymentfolders + export(first.depends) + export(copydeploymentfolders.commands) + QMAKE_EXTRA_TARGETS += first copydeploymentfolders + } + } + for(deploymentfolder, DEPLOYMENTFOLDERS) { + item = item$${deploymentfolder} + itemfiles = $${item}.files + $$itemfiles = $$eval($${deploymentfolder}.source) + itempath = $${item}.path + $$itempath = $${installPrefix}/share/$${TARGET}/$$eval($${deploymentfolder}.target) + export($$itemfiles) + export($$itempath) + INSTALLS += $$item + } + icon.files = $${TARGET}.png + icon.path = /usr/share/icons/hicolor/64x64/apps + desktopfile.files = $${TARGET}.desktop + target.path = $${installPrefix}/bin + export(icon.files) + export(icon.path) + export(desktopfile.files) + export(desktopfile.path) + export(target.path) + INSTALLS += desktopfile icon target +} + +export (ICON) +export (INSTALLS) +export (DEPLOYMENT) +export (TARGET.EPOCHEAPSIZE) +export (TARGET.CAPABILITY) +export (LIBS) +export (QMAKE_EXTRA_TARGETS) +} diff --git a/tim-game.desktop b/tim-game.desktop new file mode 100644 index 0000000..c841d84 --- /dev/null +++ b/tim-game.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Encoding=UTF-8 +Version=1.0 +Type=Application +Terminal=false +Name=tim-game +Exec=/opt/usr/bin/tim-game +Icon=tim-game +X-Window-Icon= +X-HildonDesk-ShowInToolbar=true +X-Osso-Type=application/x-executable diff --git a/tim-game.png b/tim-game.png new file mode 100644 index 0000000000000000000000000000000000000000..707d5c4e85d82959740b243a8a36d5071c277299 GIT binary patch literal 3400 zcmV-O4Y%@%P)ht(u000b3 zNkl+r+m%F_C;*wliAId+l;Bw~NnREVgX6DSfv+(~Ms$%J>UH~1TiKG?i==6q;ABhC^ z?Fa;PP1zvRpk{yshy{xNzW=_}wlshM$8bMz0ywE)|E?{*$bARG!R}74&+E~=fBGSCH_q~3rZLE`kFZF`Zg5p_(F9S`V+!f^EBN1AfbVO>l zV*?2wmM7*K$N;DTgsUiqL8d@0kV=|_n&`jpzizedO9)tWdFTh8K`^#$^77P!9khgW zY!Rx>mStcADTf#t1$7O$0t|o*0XKn3gatG^hba2{-neB1+ztE?*sLjd^k^HO+7rUI z#U<*@0G0o{w7eb^h!lqynFTclTrU#CporX1FqyNMH+0Ern&N9m&#V&xj_U(F2mB2J zt<46%_t{NEnvD|IFZF~~d&Uw1T_g&S##v*=ONjw)029C*A{l`GV{0SE$m`(;jw}{N znskEx<>q}Q<12YZEl*LE3Ih306gaq~kqj^oOalLlQhy0dt;u@8$p7^Lt&4>oL!oPx z#8s8=%aut5!dB!t3TKe~K&L~H1lMXjK+#OKRHI5GD|IzkUH?i3OO@}-LaMj9G8lz# z%l5CTmMR6d2)5Xi&TXYMH@9`QFE#2K3&XXz*HoZoHYmE}} z2gzCqV(C$)Qa4CsW6qOGtI%%!WV`fQi$l5ySZr*mjmtm*mMy$LnBc~UpU3Zbir>EL z5q7k1!|(B;ltK`4R+^dg2p6W_d^>jD_u(zaPCr^^8@hrk3G%j4n9z3e5I$h zHt*%PdcQ(f^FBoE0!itt&AS&D@SD9H-ToBEcllZB+s zk=+N-HEn5kb?LNr0_tj96^ef~kie^2ICbnK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