This commit is contained in:
LubuWest 2019-06-25 20:59:10 +02:00
commit d48847d183
135 changed files with 8879 additions and 3693 deletions

View file

@ -30,7 +30,7 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>.
import QtQuick 2.5
import QtQuick.Controls 1.4
import QtQuick.Controls 2.4
import "qrc:/js/helper.js" as Helperjs
import "qrc:/js/image.js" as Imagejs
import "qrc:/qml/genericqml"
@ -132,9 +132,11 @@ function updateImage(){
// }
// }
BlueButton{
Button{
id:closeButton
height: 8*mm
text: "\uf057"
font.pixelSize: 3*mm
onClicked:{photoStack.pop();
//imageDialog.destroy()
}
@ -236,7 +238,7 @@ function updateImage(){
source:"qrc:/images/addImage.png"
MouseArea{
anchors.fill: parent
onClicked:{print(imagePicking)
onClicked:{
imagePicking=true;
var imagePicker = Qt.createQmlObject('import QtQuick 2.0; import "qrc:/qml/genericqml";'+
osSettings.imagePickQml+'{multiple : false;onReady: {attachImageURLs.push(imageUrl);'+
@ -264,10 +266,12 @@ function updateImage(){
ListModel{id:albumModel}
BlueButton{
Button{
id:uploadButton
height: 8*mm
x:4*mm; y:root.width/2+18*mm //40*mm
text: imageId==""?qsTr("Upload"):qsTr("Change")
font.pixelSize: 3*mm
onClicked:{
if(album.currentText==""){Helperjs.showMessage(qsTr("Error"),qsTr(" No album name given"), imageDialog)}
else if (imageId!=""){uploadBusy.running=true; updateImage()}

View file

@ -30,7 +30,7 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>.
import QtQuick 2.5
import QtQuick.Controls 1.4
import QtQuick.Controls 2.4
import QtQml.Models 2.1
import "qrc:/js/image.js" as Imagejs
import "qrc:/js/helper.js" as Helperjs
@ -40,12 +40,13 @@ import "qrc:/qml/genericqml"
StackView{
id: photoStack
anchors.fill:parent
//anchors.fill:parent
initialItem:Rectangle {
id:fotorectangle
y:1
width:root.width-mm
height:root.height-5*mm
anchors.fill:parent
// y:1
// width:root.width-mm
// height:root.height-5*mm
color: '#fff'
property var newimages:[]
property int currentimageno: 0
@ -141,14 +142,14 @@ StackView{
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}
})
photoStack.push(
"qrc:/qml/photoqml/ImageUploadDialog.qml",{"attachImageURLs":[url[0].location+url[0].filename],"imageId":id,"currentAlbum":url[0].album}
)
},"id",id)}
}
function uploadUrls(urls){
photoStack.push({item:"qrc:/qml/photoqml/ImageUploadDialog.qml",properties:{attachImageURLs:urls}})
photoStack.push("qrc:/qml/photoqml/ImageUploadDialog.qml",{"attachImageURLs":urls})
}
ProgressBar{
@ -162,35 +163,43 @@ StackView{
value: fotorectangle.currentimageno/fotorectangle.newimages.length
}
BlueButton{
MButton{
id: uploadPhoto
anchors.top: parent.top
anchors.topMargin: 0.5*mm
anchors.right:updatePhotolist.left
anchors.rightMargin:mm
height: 6*mm
width: 8*mm
text:"\uf0ee"
onClicked: {print(root.imagePicking)
photoStack.push({item:"qrc:/qml/photoqml/ImageUploadDialog.qml",properties:{}});
onClicked: {
photoStack.push("qrc:/qml/photoqml/ImageUploadDialog.qml");
// var component = Qt.createComponent("qrc:/qml/photoqml/ImageUploadDialog.qml");
// var imageUpload = component.createObject(fotorectangle);
}}
BlueButton{
MButton{
id: updatePhotolist
anchors.top: parent.top
anchors.topMargin: 0.5*mm
anchors.right:phototabstatusButton.left
anchors.rightMargin:mm
height: 6*mm
width: 8*mm
text:"\uf0ed"
Menu {
id:photoupdatemenu
width:40*mm
MenuItem {
text: qsTr("All Images")
font.pixelSize: 3*mm
onTriggered: {
Imagejs.requestList(root.login,root.db, false, fotostab,function(obj){fotorectangle.newimages=obj})}
}
MenuItem {
text: qsTr("Only new")
font.pixelSize: 3*mm
onTriggered: {
Imagejs.requestList(root.login,root.db, true,fotostab,function(obj){fotorectangle.newimages=obj})}
}
@ -198,17 +207,21 @@ StackView{
onClicked: {photoupdatemenu.popup()}
}
BlueButton{
MButton{
id: phototabstatusButton
anchors.top: parent.top
anchors.topMargin: 0.5*mm
anchors.right: parent.right
anchors.rightMargin:2*mm
height: 6*mm
width: Math.max(10*mm,implicitWidth)
text: fotostab.phototabstatus=="Images"?qsTr("Own Images"):fotostab.phototabstatus
Menu {
id:phototabmenu
width: 40*mm
MenuItem {
text: qsTr("Own Images")
font.pixelSize: 3*mm
onTriggered: {
fotostab.phototabstatus="Images";
// phototabstatusButton.text=qsTr("Own images");
@ -267,8 +280,10 @@ StackView{
ListView { width: parent.width; height:parent.height; model: visualphotoModel.parts.browser; interactive: false }
BlueButton {
MButton {
id: backButton
height: 6*mm
width: 8*mm
text: "\uf057"
x: parent.width - backButton.width - 3*mm
y: -backButton.height - 4*mm