Friendiqa v0.3.2

This commit is contained in:
LubuWest 2018-08-25 16:17:09 +02:00
commit 99ae53f624
54 changed files with 2771 additions and 437 deletions

View file

@ -29,8 +29,8 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
import QtQuick 2.0
import QtQuick.Controls 1.2
import QtQuick 2.5
import QtQuick.Controls 1.4
import QtQml.Models 2.1
import "qrc:/js/image.js" as Imagejs
import "qrc:/js/helper.js" as Helperjs
@ -51,6 +51,7 @@ StackView{
property int currentimageno: 0
property bool remoteContact: false
onNewimagesChanged:{
if(fotorectangle.newimages.length>0){
//print("newimages "+JSON.stringify(newimages));
@ -104,6 +105,7 @@ StackView{
function showFotos(login,friend){
if(friend=="backButton"){
if (photoStack.depth>1){photoStack.pop()}
if(!albumgridview.currentItem){root.currentIndex=0}
if(albumgridview.currentItem.state=='fullscreen'){
albumgridview.currentItem.state = 'inGrid'}
@ -132,9 +134,17 @@ StackView{
}
}
function deletepics(type,url ,imageId){
Imagejs.deleteImage(db,login,type, url,filesystem,root,function(){//showFotos("")
})
function deletepics(method, type,id){
if(method=="delete"){Imagejs.deleteImage(db,login,type, id,filesystem,root,function(){//showFotos("")
})}
}
function updatepic(method,type,id){
if(method=="update"){
Helperjs.readData(db,"imageData",login.username,function(url){
photoStack.push({
item:"qrc:/qml/photoqml/ImageUploadDialog.qml",properties:{attachImageURLs:[url[0].location+url[0].filename],imageId:id,currentAlbum:url[0].album}
})
},"id",id)}
}
function uploadUrls(urls){
@ -159,7 +169,7 @@ StackView{
anchors.right:updatePhotolist.left
anchors.rightMargin:mm
text:"\uf0ee"
onClicked: {
onClicked: {print(root.imagePicking)
photoStack.push({item:"qrc:/qml/photoqml/ImageUploadDialog.qml",properties:{}});
// var component = Qt.createComponent("qrc:/qml/photoqml/ImageUploadDialog.qml");
// var imageUpload = component.createObject(fotorectangle);
@ -272,6 +282,8 @@ StackView{
Component.onCompleted: {
root.fotoSignal.connect(showFotos);
root.uploadSignal.connect(uploadUrls);
root.changeimage.connect(deletepics);
root.changeimage.connect(updatepic);
if (fotostab.phototabstatus=="Images"){showFotos(root.login,"")}
}
}