Warning, /frameworks/purpose/src/widgets/JobDialog.qml is written in an unsupported language. File is not indexed.
0001 /* 0002 SPDX-FileCopyrightText: 2015 Aleix Pol Gonzalez <aleixpol@blue-systems.com> 0003 0004 SPDX-License-Identifier: LGPL-2.1-or-later 0005 */ 0006 0007 import QtQuick 2.4 0008 import QtQuick.Controls 2.2 0009 import QtQuick.Layouts 1.1 0010 import org.kde.purpose 1.0 0011 0012 ApplicationWindow 0013 { 0014 id: window 0015 0016 flags: Qt.Dialog 0017 0018 title: i18n("Send File") 0019 0020 width: Math.max(screen.width/6, 200) 0021 height: Math.max(screen.height/4, 300) 0022 0023 property QtObject q 0024 property alias model: jobView.model 0025 property alias index: jobView.index 0026 0027 function start() { 0028 jobView.start() 0029 } 0030 0031 JobView { 0032 id: jobView 0033 anchors.fill: parent 0034 0035 onStateChanged: { 0036 if (state === PurposeJobController.Finished || state === PurposeJobController.Error) { 0037 console.log(jobView.job.errorString) 0038 window.q.finished(jobView.job.output, jobView.job.error, jobView.job.errorString); 0039 window.close() 0040 } else if (state === PurposeJobController.Cancelled) { 0041 window.q.finished(null, 1 /* KIO::ERR_USER_CANCELED */, i18nd("libpurpose6_widgets", "Configuration cancelled")); 0042 window.close() 0043 } 0044 } 0045 } 0046 }