forked from lubuwest/Friendiqa
Version 0.001
This commit is contained in:
parent
1986e59b58
commit
2bc729d02c
77 changed files with 6020 additions and 819 deletions
26
v0.001/source-android/qml/PhotoPlaceholder.qml
Normal file
26
v0.001/source-android/qml/PhotoPlaceholder.qml
Normal file
|
@ -0,0 +1,26 @@
|
|||
import QtQuick 2.0
|
||||
import "qrc:/js/helper.js" as Helperjs
|
||||
|
||||
Image {
|
||||
id:photoPlaceholder
|
||||
property string imageName:"x.jpg"
|
||||
property string downloadtype:""
|
||||
fillMode: Image.PreserveAspectFit
|
||||
onStatusChanged: {
|
||||
if (photoPlaceholder.status == Image.Ready) {
|
||||
//print("Photo width"+width+" height"+height+" Ratio "+ fillMode);
|
||||
var saveprocess=photoPlaceholder.grabToImage(function(result){
|
||||
var saveresult=result.saveToFile(imageName.toString());
|
||||
if (saveresult){
|
||||
if ((downloadtype=="picture")&&(newImages.length>0)){
|
||||
photoPlaceholder.destroy();
|
||||
currentImageNo=currentImageNo+1
|
||||
}
|
||||
else if ((downloadtype=="contact")&&(root.newContacts.length>0))
|
||||
{
|
||||
photoPlaceholder.destroy(100);
|
||||
root.currentContact=root.currentContact+1
|
||||
}
|
||||
}});
|
||||
}}}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue