version v0.6

This commit is contained in:
LubuWest 2021-05-12 21:41:34 +02:00
commit 8482bde3ed
86 changed files with 7064 additions and 3208 deletions

View file

@ -37,6 +37,8 @@ import "qrc:/qml/genericqml"
Item {
id: groupComponent
height: 5*root.fontFactor*osSettings.bigFontSize//8*mm
width: groupComponent.ListView.view.width
property var groupmembers:[]
//property bool newGroup: false
function groupModelAppend(groupcontacts,callback){
@ -47,67 +49,62 @@ Item {
Rectangle {
id: wrapper
width: 16*mm
height: 15*mm
x:0.5*mm
y:0.5*mm
width:parent.width-mm
height: parent.height-mm
radius: 0.5*mm
border.color: "grey"
color:"white"
Image {
id: photoImage
x:1
y:1
width: 10*mm
height:10*mm
source:"qrc:/images/defaultcontact.jpg"
}
// Image {
// id: photoImage
// x:1
// y:1
// width: 10*mm
// height:10*mm
// source:"qrc:/images/defaultcontact.jpg"
// }
Rectangle{
id:namelabelRect
x: 1
y: 1
width: wrapper.width-2
height: 3.5*mm
anchors.top: photoImage.bottom
border.color: "light grey"
height: 3*root.fontFactor*osSettings.bigFontSize
//border.color: "light grey"
TextInput {
id: namelabel
anchors.fill: parent
readOnly: true
text: group.new?"":group.groupname
color: "#303030"
font.pixelSize: 3*mm
font.pointSize: osSettings.bigFontSize
}
}
MButton{
id: closeButton
visible: false
width: 8*mm
height: 6*mm
anchors.left: infobutton.right
anchors.right: parent.right
anchors.margins: mm
anchors.top: parent.top
text: "\uf057"
font.pixelSize: 3*mm
onClicked:{groupComponent.state="";
if (group.new){groupsModel.remove(index)}
}
font.pointSize: osSettings.bigFontSize
onClicked:{groupComponent.state="";
if (group.new){groupsModel.remove(index)}
}
}
MButton{
id:infobutton
width: 4*mm
height: 6*mm
//color:"transparent"
text:"?"
font.pixelSize: 3*mm
anchors.left: photoImage.right
anchors.leftMargin: mm
font.pointSize: osSettings.bigFontSize
anchors.right: parent.right
anchors.rightMargin: mm
anchors.topMargin: mm
anchors.top: parent.top
onClicked:{
groupComponent.state="large";
//if(group.new){
Helperjs.readField("members",root.db,"groups",root.login.username,function(groups){
try {groupModel.clear()}catch (e){print(e)}
@ -124,15 +121,31 @@ Item {
} //catch(e){}
},"groupname",group.groupname);
//}
groupComponent.state="large"
}
}
Rectangle{
id: detailsrectangle
anchors.top: namelabelRect.bottom
anchors.topMargin: mm
opacity: 0
//anchors.topMargin: mm
x:mm
width: parent.width-2*mm
height:parent.height -(3*root.fontFactor*osSettings.bigFontSize+mm)
visible: false
ListView{
id: groupListView
anchors.fill: parent
anchors.margins: mm
clip: true
spacing: 2
model: groupModel
delegate: ContactComponent { }// groupMember
function processContactSelection(contactobject){showContactdetails(contactobject)}
}
ListModel{id: groupModel}
// Component {
// id:groupMember
@ -182,27 +195,13 @@ Item {
// }
// }
ListView{
id: groupListView
x:1
//anchors.top: parent.top
width: root.width-10*mm
height:groupsView.height - 24*mm
clip: true
spacing: 2
model: groupModel
delegate: ContactComponent { }// groupMember
function processContactSelection(contactobject){showContactdetails(contactobject)}
}
ListModel{id: groupModel}
Row{
anchors.top: groupListView.bottom
anchors.topMargin: mm
spacing: mm
}
// Row{
// anchors.top: groupListView.bottom
// anchors.topMargin: mm
// spacing: mm
// }
// BlueButton{
// id: addMembers
@ -258,14 +257,15 @@ Item {
states: [
State {
name: "large"
PropertyChanges { target: namelabel; font.pixelSize: 4*mm; width:groupsView.width; readOnly:false}
PropertyChanges { target: namelabelRect; height: 4.5*mm}
PropertyChanges { target: groupComponent; height: groupsView.height - 6*root.fontFactor*osSettings.bigFontSize }
PropertyChanges { target: namelabel; font.pointSize: 1.2*osSettings.bigFontSize; readOnly:false}
//PropertyChanges { target: namelabelRect; height: 2*osSettings.bigFontSize}
PropertyChanges { target: closeButton; visible: true}
PropertyChanges { target: groupComponent; z: 2 }
PropertyChanges { target: wrapper; width:groupsView.width;height:groupsView.height -2*mm-1}
PropertyChanges { target: photoImage; width:15*mm;height:15*mm }
PropertyChanges { target:groupComponent.GridView.view ;contentY:groupComponent.y;contentX:groupComponent.x;interactive:false}
PropertyChanges { target: detailsrectangle; opacity:1 }
//PropertyChanges { target: groupComponent; z: 2 }
//PropertyChanges { target: wrapper; width:groupsView.width-2*mm;height:groupsView.height -2*mm-1}
//PropertyChanges { target: photoImage; width:15*mm;height:15*mm }
//PropertyChanges { target:groupComponent.GridView.view ;contentY:groupComponent.y;contentX:groupComponent.x;interactive:false}
PropertyChanges { target: detailsrectangle; visible:true }
PropertyChanges { target: infobutton; visible: false}
}
]