2 import Sailfish.Silica 1.0
3 import harbour.file.browser.FileInfo 1.0
8 allowedOrientations: Orientation.All
9 property string title: ""
10 property string command: ""
11 property variant arguments // this must be set to a string list, e.g. [ "arg1", "arg2" ]
12 property string initialText: qsTr("Installing...")
13 property string successText: qsTr("Successful")
14 property string infoText: ""
15 property color consoleColor: Theme.secondaryColor
17 // execute command when page activates
19 if (status === PageStatus.Activating) {
20 fileInfo.executeCommand(page.command, page.arguments);
27 // called when command exits
29 busyIndicator.running = false;
31 statusLabel.text = page.successText;
32 infoLabel.text = page.infoText;
34 statusLabel.text = qsTr("Failed! Error code: %1").arg(exitCode);
42 contentHeight: column.height
43 VerticalScrollDecorator { flickable: flickable }
49 PageHeader { title: page.title }
53 anchors.horizontalCenter: parent.horizontalCenter
55 size: BusyIndicatorSize.Small
59 anchors.horizontalCenter: parent.horizontalCenter
60 text: page.initialText
61 color: Theme.highlightColor
67 anchors.left: parent.left
68 anchors.right: parent.right
69 anchors.leftMargin: Theme.paddingLarge
70 anchors.rightMargin: Theme.paddingLarge
72 font.pixelSize: Theme.fontSizeTiny
73 horizontalAlignment: Text.AlignHCenter
74 color: Theme.secondaryColor
82 text: "$ "+page.command+" "+page.arguments.join(" ")
83 wrapMode: Text.WrapAnywhere
84 font.pixelSize: Theme.fontSizeTiny
85 font.family: "Monospace"
86 color: Theme.secondaryColor
92 text: fileInfo.processOutput
93 wrapMode: Text.WrapAnywhere
94 font.pixelSize: Theme.fontSizeTiny
95 font.family: "Monospace"
96 color: page.consoleColor