diff --git a/src/quick/PurposeWizard.qml b/src/quick/PurposeWizard.qml index 460b658..7e57454 100644 --- a/src/quick/PurposeWizard.qml +++ b/src/quick/PurposeWizard.qml @@ -1,59 +1,59 @@ /* Copyright 2014 Aleix Pol Gonzalez This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library. If not, see . */ import QtQuick 2.2 import QtQuick.Layouts 1.0 Loader { id: loader property QtObject configuration signal accepted() function cancel() { configuration.destroy(); } - Layout.minimumHeight: item ? item.Layout.minimumHeight : height + Layout.minimumHeight: item ? Math.max(item.Layout.minimumHeight, height) : height Layout.preferredHeight: item ? item.Layout.preferredHeight : width Component.onCompleted: { setSource(configuration.configSourceCode, configuration.data) } onItemChanged: { for(var i in configuration.neededArguments) { var arg = configuration.neededArguments[i] if (arg in loader.item) { item[arg+"Changed"].connect(dataHasChanged); } else console.warn("property not found", arg); } } function dataHasChanged() { var jobData = configuration.data; for(var i in configuration.neededArguments) { var arg = configuration.neededArguments[i] if (arg in loader.item) { jobData[arg] = loader.item[arg]; } else console.warn("property not found", arg); } configuration.data = jobData; } }