import QtQuick 2.11 import QtQuick.Controls 2.4 import QtQuick.Layouts 1.11 import QtQuick.Dialogs 1.3 ApplicationWindow { id: appwindow width: 1000 height: 600 minimumHeight: 400 minimumWidth: 1000 title: "ComService Backup Konfiguration" visible: true Component.onCompleted: HP.start(appwindow); onClosing:{ HP.save() } BusyIndicator { id: busyIndicator running: false anchors.horizontalCenter: parent.horizontalCenter anchors.verticalCenter: parent.verticalCenter z: 1 anchors.fill: parent } Pane { id: pane anchors.fill: parent focus: true GroupBox { id: targetBox1 height: 80 anchors.right: parent.right anchors.left: parent.left anchors.top: parent.top title: qsTr("Ziel") ComboBox { id: driveBox width: 250 textRole: "name" anchors.verticalCenter: parent.verticalCenter model: Drives anchors.left: parent.left anchors.leftMargin: 0 } ComboBox { id: targettingBox1 model: ["ID", "Name", "Buchstabe"] anchors.verticalCenter: parent.verticalCenter anchors.left: driveBox.right anchors.leftMargin: 12 } TextField { id: textField text: qsTr("") placeholderText: "Unterpfad" anchors.right: parent.right anchors.rightMargin: 0 anchors.left: targettingBox1.right anchors.leftMargin: 12 anchors.verticalCenter: parent.verticalCenter } } GroupBox { id: fileBox anchors.top: targetBox1.bottom anchors.right: parent.right anchors.bottom: parent.bottom anchors.left: parent.left anchors.topMargin: 12 contentHeight: 3 title: qsTr("Dateistruktur Backup") ListView { id: pathlistView x: -24 y: -43 ScrollBar.vertical: ScrollBar { policy: pathlistView.contentHeight > pathlistView.height ? ScrollBar.AlwaysOn : ScrollBar.AlwaysOff } anchors.bottomMargin: 50 anchors.fill: parent focus: true clip: true delegate: Component { MouseArea { height: 26 Text { text: display font.pixelSize: 12 anchors.verticalCenter: parent.verticalCenter anchors.leftMargin: 8 anchors.left: parent.left } anchors.right: parent.right anchors.left: parent.left onClicked: pathlistView.currentIndex = index; } } model: Paths interactive: pathlistView.contentHeight > pathlistView.height highlight: Rectangle { radius: 5 border.color: "#e91e63" border.width: 3 } } RowLayout { id: column spacing: 12 anchors.top: pathlistView.bottom anchors.right: parent.right anchors.bottom: parent.bottom anchors.left: parent.left anchors.topMargin: 0 Button { id: addpathbutton Layout.fillHeight:true Layout.fillWidth: true text: qsTr("Hinzufügen") onPressed: { addpathdialog.open() } FileDialog { id: addpathdialog title: "Quellverzeichnisbaum auswählen..." selectFolder: true onAccepted: { HP.addpath(fileUrl) } onRejected: { HP.log("Adding Con Path Dialog Cancelled") } } visible: true } Button { id: editpathbutton Layout.fillHeight:true Layout.fillWidth: true text: qsTr("Editieren") enabled: pathlistView.currentItem != null onPressed: { editdialog.title = "Pfad "+Paths.data(Paths.index(pathlistView.index, 0))+" editieren."; editdialog.open(); } Dialog { id: editdialog height: 400 title: "Pfad editieren." width: 800 onAccepted: console.log("Ok clicked") } } DelayButton { delay: 3000 id: removepathbutton Layout.fillHeight:true Layout.fillWidth: true text: qsTr("Entfernen") ToolTip.visible: hovered ToolTip.text: qsTr("Gedrückt halten zum entfernen.") onActivated: { progress=0; HP.removepath(pathlistView.currentIndex); } } } } } } /*##^## Designer { D{i:1;invisible:true} } ##^##*/