Each script can use a specific parameters pannel, written in Qml language, to set up options and form a valid command line.
Open "View sources pannel" ![]()
Button "Pannel source"
display current
pannel parameters file Scripts.qml.
ListElement {
icon: "../../icons/hello.png"
description: "Ten hellos"
command: "./hello.sh"
params: "Hello.qml"
tty: true
help: "Run script \"hello.sh\"."
}
This will run hello.sh from current directory with optional parameters build from Hello.qml.
import QtQuick 2.4
import QtQuick.Controls 1.3
import QtQuick.Layouts 1.1
import Qt.labs.settings 1.0
Item {
id: page
property int requiredWidth: 150
anchors.fill: parent
anchors.margins: 3
ColumnLayout {
width: parent.width-10
anchors.horizontalCenter: parent.horizontalCenter
spacing: 5
Text {
height: 20
text: "Iterations"
font.bold: true
horizontalAlignment: Qt.AlignHCenter
}
TextField {
id: hellocount
Layout.fillWidth: true
height: 25
text: "10"
validator: IntValidator { bottom: 0; top: 20; }
horizontalAlignment: Qt.AlignHCenter
onTextChanged: sx_scriptargs = text;
}
}
}
Property requiredWidth is mandatory to set the parameters pannel's width. Settings {
property alias hellocount: hellocount.text
}
Settings are stored in file : ~/.config/BeRoot/Scriptomatix.conf.