| 1 |
import QtQuick 2.2 |
| 2 |
import QtQuick.Controls 1.1 |
| 3 |
import "UI" 1.0 |
| 4 |
|
| 5 |
// This page is unix-only as Windows has an outdated driver model which is not compatible |
| 6 |
|
| 7 |
Column { |
| 8 |
id: toolsColumn |
| 9 |
anchors {top: parent.top; topMargin: 20; left: parent.left; leftMargin: 20 } |
| 10 |
width: parent.width - 40; |
| 11 |
spacing: 15 |
| 12 |
Text { |
| 13 |
text: qsTr("Boot Communication") + translator.lang |
| 14 |
font.pointSize: 14 |
| 15 |
font.bold: true |
| 16 |
} |
| 17 |
Row { |
| 18 |
spacing: 20 |
| 19 |
Button { |
| 20 |
text: qsTr("Info") + translator.lang |
| 21 |
onClicked: b.setCommandMode(1, postReboot.checked); |
| 22 |
} |
| 23 |
Button { |
| 24 |
text: qsTr("RimBoot") + translator.lang |
| 25 |
onClicked: b.setCommandMode(2, postReboot.checked); |
| 26 |
} |
| 27 |
Button { |
| 28 |
text: qsTr("Nuke") + translator.lang |
| 29 |
onClicked: b.setCommandMode(3, postReboot.checked); |
| 30 |
} |
| 31 |
Button { |
| 32 |
text: qsTr("Debug Mode") + translator.lang |
| 33 |
onClicked: b.setCommandMode(4, postReboot.checked); |
| 34 |
} |
| 35 |
} |
| 36 |
CheckBox { |
| 37 |
id: postReboot |
| 38 |
text: qsTr("Reboot after") + translator.lang |
| 39 |
} |
| 40 |
|
| 41 |
Row { |
| 42 |
visible: b.connecting |
| 43 |
spacing: 15 |
| 44 |
Text { |
| 45 |
text: qsTr("Connecting to bootrom") + translator.lang |
| 46 |
} |
| 47 |
BusyIndicator { |
| 48 |
height: parent.implicitHeight |
| 49 |
width: height |
| 50 |
} |
| 51 |
Button { |
| 52 |
text: qsTr("Cancel") + translator.lang |
| 53 |
onClicked: b.disconnect(); |
| 54 |
} |
| 55 |
} |
| 56 |
GroupBox { |
| 57 |
title: qsTr("Detected devices:") + translator.lang |
| 58 |
ScrollView { |
| 59 |
frameVisible: true |
| 60 |
ListView { |
| 61 |
width: parent.width |
| 62 |
height: 50 |
| 63 |
model: b.devices |
| 64 |
spacing: 3 |
| 65 |
|
| 66 |
delegate: Label { |
| 67 |
text: switch (modelData) { |
| 68 |
case "1": |
| 69 |
return "BlackBerry Bootloader"; |
| 70 |
case "8013": |
| 71 |
return "BlackBerry USB (Unix)"; |
| 72 |
case "8017": |
| 73 |
return "BlackBerry USB (Autodetect)"; |
| 74 |
default: |
| 75 |
return "BlackBerry USB (Windows)"; |
| 76 |
} |
| 77 |
font.pointSize: 12 |
| 78 |
} |
| 79 |
} |
| 80 |
} |
| 81 |
} |
| 82 |
} |