mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-08-07 22:02:32 -04:00
QML activity interacts with backend.
Test QML activity changed for a simplified version of drbob's rsqml-models. It requests JSON documents from the libresapilocalserver and shows them raw. Updated Android documentation. Moved Android qmake section to the end of libretroshare.pro and openpgpsdk.pro to avoid static linking errors.
This commit is contained in:
parent
47944b30e6
commit
50fe3dd711
29 changed files with 886 additions and 128 deletions
160
retroshare-qml-app/src/qml/main.qml
Normal file
160
retroshare-qml-app/src/qml/main.qml
Normal file
|
@ -0,0 +1,160 @@
|
|||
//import QtQuick 2.7 //2.2
|
||||
//import QtQuick.Layouts 1.0 //1.1
|
||||
//import QtQuick.Controls 2.0 //1.1
|
||||
import "."
|
||||
|
||||
import QtQuick 2.2
|
||||
import QtQuick.Layouts 1.1
|
||||
import QtQuick.Controls 1.1 // millor fer servir 2.0 o més
|
||||
import LibresapiLocalClientQml 1.0
|
||||
|
||||
ApplicationWindow {
|
||||
visible: true
|
||||
width: 640
|
||||
height: 480
|
||||
title: qsTr("RSChat")
|
||||
|
||||
|
||||
/*
|
||||
LibresapiLocalClientComm{
|
||||
id: llc
|
||||
onGoodResponseReceived: gxss.title = msg
|
||||
|
||||
}*/
|
||||
onSceneGraphInitialized: llc.openConnection()
|
||||
|
||||
Rectangle {
|
||||
id: page
|
||||
width: 600; height: 400
|
||||
color: "#336699" // "#FFFFFF"
|
||||
|
||||
Rectangle {
|
||||
id: header
|
||||
width: parent.width
|
||||
anchors.top: parent.top
|
||||
anchors.left: parent.left
|
||||
height: 50
|
||||
|
||||
ApplicationBar {
|
||||
id: status
|
||||
|
||||
AppButton {
|
||||
icon: "icons/contacts-128.png"
|
||||
onButtonClicked : {
|
||||
tabView.currentIndex = 0
|
||||
}
|
||||
}
|
||||
|
||||
AppButton {
|
||||
icon: "icons/settings-4-128.png"
|
||||
onButtonClicked : {
|
||||
tabView.currentIndex = 1
|
||||
}
|
||||
}
|
||||
|
||||
AppButton {
|
||||
icon: "icons/email-128.png"
|
||||
onButtonClicked : {
|
||||
tabView.currentIndex = 2
|
||||
}
|
||||
}
|
||||
|
||||
AppButton {
|
||||
icon: "icons/star-2-128.png"
|
||||
onButtonClicked : {
|
||||
tabView.currentIndex = 3
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
TabView {
|
||||
id: tabView
|
||||
width: parent.width
|
||||
anchors.top: header.bottom
|
||||
anchors.left: parent.left
|
||||
anchors.bottom: parent.bottom
|
||||
tabsVisible: false
|
||||
|
||||
Tab {
|
||||
id: gxsIds
|
||||
//onActiveChanged: llc.request("/identity/", "")
|
||||
|
||||
onVisibleChanged: llc.request("/identity/", "")
|
||||
|
||||
GxsService {
|
||||
id: gxss
|
||||
title: "Friends"
|
||||
// Button {
|
||||
// text: "buto"
|
||||
// anchors.left: gxss.right
|
||||
// onClicked: {
|
||||
// // gxss.title = "provaboba"
|
||||
// // gxss.title = llc.request("/identity/", "")
|
||||
// //llc.request("/identity/", "") // canviar per onVisibleChanged de Tab potser
|
||||
// }
|
||||
|
||||
// }
|
||||
Connections {
|
||||
target: llc
|
||||
onGoodResponseReceived: gxss.title = msg //console.log("Image has changed!")
|
||||
}
|
||||
//groupDelegate: GxsIdDelegate {}
|
||||
//groupModel: gxsIdModel
|
||||
}
|
||||
}
|
||||
|
||||
Tab {
|
||||
id: forum
|
||||
|
||||
GxsService {
|
||||
id: gxssforum
|
||||
title: "Forums"
|
||||
onVisibleChanged: llc.request("/control/locations/", "")
|
||||
Connections {
|
||||
target: llc
|
||||
onGoodResponseReceived: gxssforum.title = msg //console.log("Image has changed!")
|
||||
}
|
||||
// This one uses the default GxsGroupDelegate.
|
||||
// groupModel: forumGroupModel
|
||||
|
||||
// msgDelegate: ForumMsgDelegate {}
|
||||
// msgModel: forumMsgModel
|
||||
}
|
||||
}
|
||||
|
||||
Tab {
|
||||
id: channelLinks
|
||||
GxsService {
|
||||
title: "Channels"
|
||||
|
||||
// custom GroupDelegate.
|
||||
// groupDelegate: ChannelGroupDelegate {}
|
||||
// groupModel: channelGroupModel
|
||||
|
||||
// msgDelegate: ChannelMsgDelegate {}
|
||||
// msgModel: channelMsgModel
|
||||
}
|
||||
}
|
||||
|
||||
Tab {
|
||||
id: postedLinks
|
||||
|
||||
GxsService {
|
||||
title: "Posted"
|
||||
|
||||
// This one uses the default GxsGroupDelegate.
|
||||
// groupModel: postedGroupModel
|
||||
|
||||
// msgDelegate: PostedMsgDelegate {}
|
||||
// msgModel: postedMsgModel
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue