Version 0.004
This commit is contained in:
parent
10dccdcdbb
commit
438f8a4e4d
64 changed files with 2736 additions and 636 deletions
|
@ -24,6 +24,7 @@ TabView{
|
|||
signal newsSignal(var news)
|
||||
signal friendsSignal(var username)
|
||||
signal contactdetailsSignal(var contact)
|
||||
signal eventSignal(var contact)
|
||||
//currentIndex: (login=="")? 3:0
|
||||
|
||||
property var news:[]
|
||||
|
@ -32,13 +33,13 @@ TabView{
|
|||
property string contactLoadType: ""
|
||||
|
||||
onLoginChanged:{
|
||||
if(login==""){root.currentIndex=3}
|
||||
if(login==""){root.currentIndex=4}
|
||||
else{
|
||||
newstab.newstabstatus=login.newsViewType;
|
||||
Newsjs.getCurrentContacts(login,db,function(contacts){
|
||||
contactlist=contacts})}
|
||||
}
|
||||
onNewContactsChanged:{
|
||||
onNewContactsChanged:{//print(JSON.stringify(newContacts));
|
||||
if(newContacts.length>0){// download first contact image and update db
|
||||
Service.updateContactInDB(login,db,newContacts[currentContact].isFriend,newContacts[currentContact])}
|
||||
else if (contactLoadType!=""){
|
||||
|
@ -49,6 +50,7 @@ TabView{
|
|||
}
|
||||
|
||||
onCurrentContactChanged:{// download next contact image after photoplaceholder is finished saving and update db
|
||||
|
||||
if(currentContact<newContacts.length){
|
||||
Service.updateContactInDB(login,db,newContacts[currentContact].isFriend,newContacts[currentContact])}
|
||||
else if (contactLoadType!=""){
|
||||
|
@ -96,10 +98,12 @@ TabView{
|
|||
if(login.newsViewType=="Timeline"){Newsjs.newsfromdb(db,login.username,function(dbnews){
|
||||
newsSignal(dbnews)
|
||||
})}
|
||||
else{Newsjs.chatsfromdb(db,login.username,function(dbnews){
|
||||
else{
|
||||
Newsjs.chatsfromdb(db,login.username,function(dbnews){
|
||||
newsSignal(dbnews)
|
||||
})}
|
||||
}
|
||||
else if (newstab.conversation.length>0){newstab.conversation=[]}
|
||||
else{Service.cleanNews(root.db,function(){Qt.quit()})}
|
||||
}
|
||||
else if (currentIndex==2){fotoSignal("backButton")}
|
||||
|
@ -113,8 +117,8 @@ TabView{
|
|||
tab: Rectangle {
|
||||
color: styleData.selected?"sky blue":"light blue"
|
||||
border.color: "light grey"
|
||||
implicitWidth: root.width/4-2*mm
|
||||
implicitHeight: 4*mm
|
||||
implicitWidth: root.width/5-2*mm
|
||||
implicitHeight: 5*mm
|
||||
Text { id: text
|
||||
anchors.centerIn: parent
|
||||
text: styleData.title
|
||||
|
@ -145,9 +149,17 @@ TabView{
|
|||
property string phototabstatus:"Images"
|
||||
source: (root.currentIndex==2)?"qrc:/qml/photoqml/PhotoTab.qml":""
|
||||
}
|
||||
Tab{
|
||||
title: "\uf073"
|
||||
id: calendartab
|
||||
property string calendartabstatus:"Events"
|
||||
source: (root.currentIndex==3)?"qrc:/qml/calendarqml/CalendarTab.qml":""
|
||||
}
|
||||
|
||||
|
||||
Tab{
|
||||
title:"\uf085"
|
||||
id: configtab
|
||||
source: (root.currentIndex==3)?"qrc:/qml/configqml/ConfigTab.qml":""
|
||||
source: (root.currentIndex==4)?"qrc:/qml/configqml/ConfigTab.qml":""
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue