mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-08-19 03:18:15 -04:00
Update to Qt 5.8.0
Simplified android buinding and updated documentation Removed a bunch of unused qml files
This commit is contained in:
parent
2630ed4573
commit
5a219b4d10
19 changed files with 81 additions and 665 deletions
|
@ -4,6 +4,6 @@
|
|||
# as it contains information specific to your local configuration.
|
||||
|
||||
androidBuildToolsVersion=24.0.1
|
||||
androidCompileSdkVersion=18
|
||||
androidCompileSdkVersion=23
|
||||
buildDir=.build
|
||||
qt5AndroidDir=/opt/Qt5.7.0/5.7/android_armv7/src/android/java
|
||||
qt5AndroidDir=/opt/Qt5.8.0/5.8/android_armv7/src/android/java
|
||||
|
|
|
@ -5,16 +5,6 @@
|
|||
<file>qml/icons/settings-4-128.png</file>
|
||||
<file>qml/icons/email-128.png</file>
|
||||
<file>qml/icons/contacts-128.png</file>
|
||||
<file>qml/PostedMsgDelegate.qml</file>
|
||||
<file>qml/GxsService.qml</file>
|
||||
<file>qml/GxsIdDelegate.qml</file>
|
||||
<file>qml/GxsGroupDelegate.qml</file>
|
||||
<file>qml/ForumMsgDelegate.qml</file>
|
||||
<file>qml/ContactBox.qml</file>
|
||||
<file>qml/ChannelMsgDelegate.qml</file>
|
||||
<file>qml/ChannelGroupDelegate.qml</file>
|
||||
<file>qml/ApplicationBar.qml</file>
|
||||
<file>qml/AppButton.qml</file>
|
||||
<file>qml/Locations.qml</file>
|
||||
<file>qml/jsonpath.js</file>
|
||||
<file>qml/JSONListModel.qml</file>
|
||||
|
|
|
@ -1,30 +0,0 @@
|
|||
import QtQuick 2.2
|
||||
import QtQuick.Layouts 1.1
|
||||
import "."
|
||||
|
||||
Rectangle {
|
||||
id: appButton
|
||||
property alias icon: appIcon.source
|
||||
|
||||
signal buttonClicked
|
||||
|
||||
width: parent.height
|
||||
height: parent.height
|
||||
color: "#00000000"
|
||||
|
||||
Image {
|
||||
id: appIcon
|
||||
anchors.centerIn: parent
|
||||
width: 25
|
||||
height: 25
|
||||
}
|
||||
MouseArea {
|
||||
hoverEnabled: false
|
||||
anchors.fill: parent
|
||||
onClicked: {
|
||||
appButton.buttonClicked()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1,37 +0,0 @@
|
|||
import QtQuick 2.2
|
||||
import QtQuick.Layouts 1.1
|
||||
import "."
|
||||
|
||||
Rectangle {
|
||||
id: status
|
||||
anchors.fill: parent
|
||||
color: "#336699" //"#FF7733"
|
||||
height: 50
|
||||
|
||||
default property alias contents: placeholder.children
|
||||
|
||||
RowLayout {
|
||||
id: placeholder
|
||||
spacing: 0
|
||||
width: 200
|
||||
height: parent.height
|
||||
anchors.top: parent.top
|
||||
anchors.left: parent.left
|
||||
|
||||
}
|
||||
|
||||
ContactBox {
|
||||
|
||||
width: 200
|
||||
height: parent.height
|
||||
anchors.top: parent.top
|
||||
anchors.right: parent.right
|
||||
|
||||
icon: "icons/contacts-128.png"
|
||||
name: "Vade Retro"
|
||||
status: "Away"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -1,33 +0,0 @@
|
|||
import QtQuick 2.2
|
||||
import "."
|
||||
|
||||
Item {
|
||||
id: item
|
||||
width: parent.width
|
||||
height: 50
|
||||
|
||||
Column {
|
||||
Text { text: '<b>' + model.GroupName + '</b>' }
|
||||
Text { text: GroupId }
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
hoverEnabled: false
|
||||
anchors.fill: parent
|
||||
onClicked: {
|
||||
item.ListView.view.currentIndex = index
|
||||
channelMsgModel.updateEntries(model.GroupId)
|
||||
console.log("Clicked on Channel GroupId: " + model.GroupId)
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
width: parent.width
|
||||
height: 1
|
||||
color: "#AAAAAA"
|
||||
anchors.left: parent.left
|
||||
anchors.top: parent.bottom
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1,42 +0,0 @@
|
|||
import QtQuick 2.2
|
||||
import "."
|
||||
|
||||
Item {
|
||||
id: msgDelegate
|
||||
|
||||
width: parent.width
|
||||
height: 150
|
||||
|
||||
Column {
|
||||
Text { text: '<b>MsgId:</b> ' + AuthorId }
|
||||
Text { text: '<b>AuthorId:</b> ' + AuthorId }
|
||||
Row {
|
||||
Text { text: '<b>Name:</b> ' + MsgName }
|
||||
Text { text: ' <b>PublishTs:</b> ' + PublishTs }
|
||||
}
|
||||
Text { text: '<b>Msg:</b> ' + Msg }
|
||||
Row {
|
||||
Text { text: '<b>NumberFiles:</b> ' + NumberFiles }
|
||||
Text { text: ' <b>TotalFileSize:</b> ' + TotalFileSize }
|
||||
}
|
||||
|
||||
Text { text: '<b>FileNames:</b> ' + FileNames }
|
||||
Text { text: '<b>FileSizes:</b> ' + FileSizes }
|
||||
Text { text: '<b>FileHashes:</b> ' + FileHashes }
|
||||
Row {
|
||||
Text { text: '<b>HaveVoted:</b> ' + HaveVoted }
|
||||
Text { text: ' <b>UpVotes:</b> ' + UpVotes }
|
||||
Text { text: ' <b>DownVotes:</b> ' + DownVotes }
|
||||
Text { text: ' <b>Comments:</b> ' + Comments }
|
||||
}
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
hoverEnabled: false
|
||||
anchors.fill: parent
|
||||
onClicked: {
|
||||
item.ListView.view.currentIndex = index
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -7,7 +7,11 @@ Item
|
|||
id: chatView
|
||||
property string chatId
|
||||
|
||||
function refreshData() { rsApi.request("/chat/messages/"+ chatId, "", function(par) { chatModel.json = par.response }) }
|
||||
function refreshData()
|
||||
{
|
||||
rsApi.request( "/chat/messages/"+ chatId, "",
|
||||
function(par) { chatModel.json = par.response } )
|
||||
}
|
||||
|
||||
onFocusChanged: focus && refreshData()
|
||||
|
||||
|
@ -66,7 +70,8 @@ Item
|
|||
onClicked:
|
||||
{
|
||||
var jsonData = {"chat_id":chatView.chatId, "msg":msgComposer.text}
|
||||
rsApi.request("/chat/send_message", JSON.stringify(jsonData), function(par) { msgComposer.text = ""; console.log(msg) })
|
||||
rsApi.request( "/chat/send_message", JSON.stringify(jsonData),
|
||||
function(par) { msgComposer.text = ""; } )
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,61 +0,0 @@
|
|||
import QtQuick 2.2
|
||||
import "."
|
||||
|
||||
Item {
|
||||
|
||||
property alias icon: contactIcon.source
|
||||
property alias name: contactName.text
|
||||
property alias status: contactStatus.text
|
||||
|
||||
Rectangle {
|
||||
|
||||
anchors.fill: parent
|
||||
color: "#00000000"
|
||||
|
||||
Image {
|
||||
id: contactIcon
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.left: parent.left
|
||||
width: 40
|
||||
height: 40
|
||||
source: "icons/contacts-128.png"
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
height: contactIcon.height
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.left: contactIcon.right
|
||||
color: parent.color
|
||||
|
||||
Text {
|
||||
id: contactName
|
||||
text: "Username"
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: 10
|
||||
anchors.bottom: contactStatus.top
|
||||
anchors.bottomMargin: 2
|
||||
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
font.pointSize: 14
|
||||
font.bold: false
|
||||
color: "#FFFFFF"
|
||||
}
|
||||
|
||||
Text {
|
||||
id: contactStatus
|
||||
text: "Hello world!"
|
||||
anchors.left: parent.right
|
||||
anchors.leftMargin: 10
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.bottomMargin: 1
|
||||
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
font.pointSize: 10
|
||||
font.bold: false
|
||||
color: "#FFFFFF"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1,41 +0,0 @@
|
|||
import QtQuick 2.2
|
||||
import "."
|
||||
|
||||
Item {
|
||||
id: msgDelegate
|
||||
|
||||
width: parent.width
|
||||
height: col.height
|
||||
|
||||
Column {
|
||||
id: col
|
||||
Text { text: '<b>MsgId:</b> ' + AuthorId }
|
||||
Text { text: '<b>AuthorId:</b> ' + AuthorId }
|
||||
Row {
|
||||
Text { text: '<b>Name:</b> ' + MsgName }
|
||||
Text { text: ' <b>PublishTs:</b> ' + PublishTs }
|
||||
}
|
||||
Text {
|
||||
wrapMode: Text.Wrap
|
||||
text: '<b>Msg:</b> ' + Msg
|
||||
}
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
hoverEnabled: false
|
||||
anchors.fill: parent
|
||||
onClicked: {
|
||||
item.ListView.view.currentIndex = index
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
width: parent.width
|
||||
height: 2
|
||||
color: "#AAAAAA"
|
||||
anchors.left: parent.left
|
||||
anchors.top: parent.bottom
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,26 +0,0 @@
|
|||
import QtQuick 2.2
|
||||
import "."
|
||||
|
||||
Item {
|
||||
id: item
|
||||
property var msgModel: {}
|
||||
|
||||
width: parent.width
|
||||
height: 50
|
||||
|
||||
Column {
|
||||
Text { text: '<b>Name:</b> ' + model.GroupName }
|
||||
Text { text: '<b>Number:</b> ' + GroupId }
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
hoverEnabled: false
|
||||
anchors.fill: parent
|
||||
onClicked: {
|
||||
item.ListView.view.currentIndex = index
|
||||
item.msgModel.updateEntries(model.GroupId)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1,33 +0,0 @@
|
|||
import QtQuick 2.2
|
||||
import "."
|
||||
|
||||
Item {
|
||||
id: item
|
||||
width: parent.width
|
||||
height: 50
|
||||
|
||||
Column {
|
||||
Text { text: '<b>' + model.GroupName + '</b>' }
|
||||
Text { text: GroupId }
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
hoverEnabled: false
|
||||
anchors.fill: parent
|
||||
onClicked: {
|
||||
item.ListView.view.currentIndex = index
|
||||
//channelMsgModel.updateEntries(model.GroupId)
|
||||
//console.log("Clicked on Channel GroupId: " + model.GroupId)
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
width: parent.width
|
||||
height: 1
|
||||
color: "#AAAAAA"
|
||||
anchors.left: parent.left
|
||||
anchors.top: parent.bottom
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1,119 +0,0 @@
|
|||
import QtQuick 2.2
|
||||
import QtQuick.Layouts 1.1
|
||||
import QtQuick.Controls 1.1
|
||||
import "."
|
||||
|
||||
|
||||
Item {
|
||||
id: gxsService
|
||||
|
||||
property alias icon: sideIcon.source
|
||||
property alias title: sideTitle.text
|
||||
|
||||
property alias groupDelegate: sideList.delegate
|
||||
property alias groupModel: sideList.model
|
||||
|
||||
property alias msgDelegate: mainList.delegate
|
||||
property alias msgModel: mainList.model
|
||||
|
||||
RowLayout {
|
||||
spacing: 0
|
||||
anchors.fill: parent
|
||||
|
||||
Rectangle {
|
||||
id: sideBar
|
||||
width: 200
|
||||
Layout.fillHeight: true
|
||||
|
||||
Rectangle {
|
||||
id: sideHeader
|
||||
width: parent.width
|
||||
height: 30
|
||||
|
||||
Text {
|
||||
id: sideTitle
|
||||
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: 10
|
||||
width: 20
|
||||
height: 20
|
||||
text: "Service"
|
||||
color: "#333333"
|
||||
}
|
||||
|
||||
Image {
|
||||
id: sideIcon
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: 10
|
||||
width: 20
|
||||
height: 20
|
||||
source: "icons/contacts-128.png"
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
id: sideListBox
|
||||
width: parent.width
|
||||
|
||||
anchors.top: sideHeader.bottom
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.bottom: parent.bottom
|
||||
|
||||
ListView {
|
||||
id: sideList
|
||||
anchors.fill: parent
|
||||
|
||||
delegate: GxsGroupDelegate {
|
||||
msgModel: mainList.model
|
||||
}
|
||||
|
||||
// section.
|
||||
section.property: "SubscribeStatus"
|
||||
section.criteria: ViewSection.FullString
|
||||
section.delegate: Rectangle {
|
||||
width: sideListBox.width
|
||||
height: childrenRect.height
|
||||
color: "blue"
|
||||
|
||||
Text {
|
||||
text: section
|
||||
font.bold: true
|
||||
font.pixelSize: 20
|
||||
}
|
||||
}
|
||||
|
||||
clip: true
|
||||
highlight: Rectangle { color: "lightsteelblue"; radius: 5 }
|
||||
focus: true
|
||||
|
||||
onCurrentItemChanged: {
|
||||
console.log("SideBar Item Changed on " + gxsService.title)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
Layout.fillWidth: true
|
||||
Layout.fillHeight: true
|
||||
|
||||
ListView {
|
||||
id: mainList
|
||||
anchors.fill: parent
|
||||
|
||||
clip: true
|
||||
highlight: Rectangle { color: "lightsteelblue"; radius: 5 }
|
||||
focus: true
|
||||
onCurrentItemChanged: {
|
||||
console.log("item changed")
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -69,7 +69,8 @@ Item
|
|||
{
|
||||
locationView.password = password
|
||||
console.log("locationView.sslid: ", locationView.sslid)
|
||||
rsApi.request("/control/login/", JSON.stringify({id: locationView.sslid}))
|
||||
rsApi.request( "/control/login/",
|
||||
JSON.stringify({id: locationView.sslid}) )
|
||||
locationView.attemptLogin = true
|
||||
busyIndicator.running = true
|
||||
attemptTimer.start()
|
||||
|
@ -111,7 +112,8 @@ Item
|
|||
{
|
||||
// if Server requested password
|
||||
var jsonPass = { password: locationView.password }
|
||||
rsApi.request("/control/password/", JSON.stringify(jsonPass))
|
||||
rsApi.request( "/control/password/",
|
||||
JSON.stringify(jsonPass) )
|
||||
locationView.attemptLogin = false
|
||||
console.debug("RS core asked for password")
|
||||
}
|
||||
|
|
|
@ -1,40 +0,0 @@
|
|||
import QtQuick 2.2
|
||||
import "."
|
||||
|
||||
Item {
|
||||
id: msgDelegate
|
||||
|
||||
width: parent.width
|
||||
height: 150
|
||||
|
||||
Column {
|
||||
Text { text: '<b>MsgId:</b> ' + AuthorId }
|
||||
Text { text: '<b>AuthorId:</b> ' + AuthorId }
|
||||
Row {
|
||||
Text { text: '<b>Name:</b> ' + MsgName }
|
||||
Text { text: ' <b>PublishTs:</b> ' + PublishTs }
|
||||
}
|
||||
Text { text: '<b>Link:</b> ' + Link }
|
||||
Text { text: '<b>Notes:</b> ' + Notes }
|
||||
Row {
|
||||
Text { text: '<b>Hot:</b> ' + HotScore }
|
||||
Text { text: ' <b>Top:</b> ' + HotScore }
|
||||
Text { text: ' <b>New:</b> ' + HotScore }
|
||||
}
|
||||
Row {
|
||||
Text { text: '<b>HaveVoted:</b> ' + HaveVoted }
|
||||
Text { text: ' <b>UpVotes:</b> ' + UpVotes }
|
||||
Text { text: ' <b>DownVotes:</b> ' + DownVotes }
|
||||
Text { text: ' <b>Comments:</b> ' + Comments }
|
||||
}
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
hoverEnabled: false
|
||||
anchors.fill: parent
|
||||
onClicked: {
|
||||
item.ListView.view.currentIndex = index
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -114,140 +114,4 @@ ApplicationWindow
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
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