Friendiqa/v0.002/Release/source-android/qml/photoqml/PhotoPlaceholder.qml

22 lines
726 B
QML

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("Source: "+source+"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
}
S }});
}}}