version v0.6
This commit is contained in:
parent
bdc28e632e
commit
8482bde3ed
86 changed files with 7064 additions and 3208 deletions
|
@ -63,7 +63,7 @@ Rectangle{
|
|||
}
|
||||
|
||||
|
||||
function updateImage(){
|
||||
function updateImage(){
|
||||
xhr.url= login.server + "/api/friendica/photo/update.json";
|
||||
xhr.setLogin(login.username+":"+Qt.atob(login.password));
|
||||
xhr.clearParams();
|
||||
|
@ -119,7 +119,7 @@ function updateImage(){
|
|||
anchors.rightMargin: 1*mm
|
||||
spacing:5*mm
|
||||
Text{
|
||||
font.pixelSize: 3.5*mm
|
||||
font.pointSize: osSettings.bigFontSize
|
||||
font.bold: true
|
||||
text:qsTr("Upload to album")
|
||||
}
|
||||
|
@ -132,17 +132,46 @@ function updateImage(){
|
|||
// }
|
||||
// }
|
||||
|
||||
Button{
|
||||
MButton{
|
||||
id:closeButton
|
||||
height: 8*mm
|
||||
text: "\uf057"
|
||||
font.pixelSize: 3*mm
|
||||
onClicked:{photoStack.pop();
|
||||
//imageDialog.destroy()
|
||||
width: 2.5*root.fontFactor*osSettings.bigFontSize
|
||||
font.pointSize: osSettings.bigFontSize
|
||||
onClicked:{photoStack.pop()}
|
||||
}
|
||||
}
|
||||
|
||||
ComboBox{
|
||||
id: album
|
||||
x: 3*mm
|
||||
y: 3*root.fontFactor*osSettings.bigFontSize
|
||||
width: root.width/2;
|
||||
height: 2.5*root.fontFactor*osSettings.bigFontSize//5*mm;
|
||||
font.pointSize: osSettings.bigFontSize
|
||||
editable:true
|
||||
model: albumModel
|
||||
|
||||
// delegate: ItemDelegate {
|
||||
// width: album.width
|
||||
// contentItem: Text {
|
||||
// //text: modelData
|
||||
// color: "white"
|
||||
// font: album.font
|
||||
// font.pixelSize: album.font.pixelSize
|
||||
// elide: Text.ElideRight
|
||||
// verticalAlignment: Text.AlignVCenter
|
||||
// }
|
||||
// //highlighted: album.highlightedIndex === index
|
||||
// }
|
||||
onAccepted: {
|
||||
if (find(currentText) === -1) {
|
||||
albumModel.append({text: editText})
|
||||
currentIndex = find(editText)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ListModel{id:albumModel}
|
||||
// Text {
|
||||
// text: qsTr("Album")
|
||||
// x: 4*mm; y: 10*mm
|
||||
|
@ -161,16 +190,28 @@ function updateImage(){
|
|||
ListView{
|
||||
id: imageUploadView
|
||||
x:3*mm //23*mm
|
||||
y:17*mm
|
||||
y: 11*mm + album.height
|
||||
width: imageDialog.width-5*mm //25*mm
|
||||
height: root.width/2 //25*mm
|
||||
height: parent.height -(9*root.fontFactor*osSettings.bigFontSize)//root.width/2 //25*mm
|
||||
model: imageUploadModel
|
||||
delegate: imageDelegate
|
||||
footer: imageId==""?imageFooter:null
|
||||
clip:true
|
||||
orientation: ListView.Horizontal
|
||||
spacing: mm
|
||||
DropArea{
|
||||
anchors.fill: parent
|
||||
onDropped: {
|
||||
if (drop.keys.includes('text/uri-list')){
|
||||
var urllist=drop.text.split('\n');
|
||||
for(var i=0;i< urllist.length;i++){
|
||||
attachImage(urllist[i])
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
BusyIndicator{
|
||||
id: uploadBusy
|
||||
running: false
|
||||
|
@ -180,6 +221,7 @@ function updateImage(){
|
|||
width:10*mm
|
||||
height: 10*mm
|
||||
}
|
||||
|
||||
ListModel{
|
||||
id: imageUploadModel
|
||||
}
|
||||
|
@ -192,7 +234,7 @@ function updateImage(){
|
|||
Image{
|
||||
id: uploadImage
|
||||
width: root.width/2-mm //20*mm
|
||||
height: imageUploadView.height-6*mm//height: 14*mm
|
||||
height: imageUploadView.height-(3*root.fontFactor*osSettings.bigFontSize+2*mm)
|
||||
fillMode: Image.PreserveAspectFit
|
||||
source:imageUrl
|
||||
onVisibleChanged: descriptionInput.focus=true;
|
||||
|
@ -207,18 +249,19 @@ function updateImage(){
|
|||
}
|
||||
|
||||
Rectangle{
|
||||
color: "light grey"
|
||||
//color: "light grey"
|
||||
border.color: "grey"
|
||||
anchors.top: uploadImage.bottom
|
||||
anchors.topMargin: mm
|
||||
//x: mm; y: 15*mm;
|
||||
width: root.width/2-mm //Math.max(root.width/2-mm, descriptionInput.contentWidth);
|
||||
height: 5*mm;
|
||||
height: 2.5*root.fontFactor*osSettings.bigFontSize +2*mm //5*mm;
|
||||
TextField{
|
||||
//TextInput {
|
||||
id: descriptionInput
|
||||
anchors.fill: parent
|
||||
font.pixelSize: 3*mm
|
||||
anchors.margins: mm
|
||||
font.pointSize: osSettings.systemFontSize
|
||||
selectByMouse: true
|
||||
placeholderText: qsTr("Description")
|
||||
text:description!=""?description:""
|
||||
|
@ -248,44 +291,17 @@ function updateImage(){
|
|||
}
|
||||
}
|
||||
}
|
||||
ComboBox{
|
||||
id: album
|
||||
x: 3*mm
|
||||
y: 10*mm
|
||||
width: root.width/2;
|
||||
height: 5*mm;
|
||||
font.pixelSize: 3*mm
|
||||
editable:true
|
||||
model: albumModel
|
||||
|
||||
// delegate: ItemDelegate {
|
||||
// width: album.width
|
||||
// contentItem: Text {
|
||||
// //text: modelData
|
||||
// color: "white"
|
||||
// font: album.font
|
||||
// font.pixelSize: album.font.pixelSize
|
||||
// elide: Text.ElideRight
|
||||
// verticalAlignment: Text.AlignVCenter
|
||||
// }
|
||||
// //highlighted: album.highlightedIndex === index
|
||||
// }
|
||||
onAccepted: {
|
||||
if (find(currentText) === -1) {
|
||||
albumModel.append({text: editText})
|
||||
currentIndex = find(editText)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ListModel{id:albumModel}
|
||||
|
||||
Button{
|
||||
id:uploadButton
|
||||
height: 8*mm
|
||||
x:4*mm; y:root.width/2+18*mm //40*mm
|
||||
height: 2*root.fontFactor*osSettings.bigFontSize
|
||||
x:4*mm;
|
||||
anchors.top:imageUploadView.bottom
|
||||
anchors.topMargin: mm
|
||||
//y:root.width/2+18*mm //40*mm
|
||||
text: imageId==""?qsTr("Upload"):qsTr("Change")
|
||||
font.pixelSize: 3*mm
|
||||
font.pointSize: osSettings.bigFontSize
|
||||
onClicked:{
|
||||
if(album.currentText==""){Helperjs.showMessage(qsTr("Error"),qsTr(" No album name given"), imageDialog)}
|
||||
else if (imageId!=""){uploadBusy.running=true; updateImage()}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue