Commit 223cdc40 authored by Jacob Walser's avatar Jacob Walser

Rework FirmwareUpgrade.qml to be a child of SetupPage

parent f11f006b
......@@ -12,6 +12,7 @@ import QtQuick 2.3
import QtQuick.Controls 1.2
import QtQuick.Controls.Styles 1.4
import QtQuick.Dialogs 1.2
import QtQuick.Layouts 1.3
import QGroundControl 1.0
import QGroundControl.Controls 1.0
......@@ -22,15 +23,24 @@ import QGroundControl.Controllers 1.0
import QGroundControl.ScreenTools 1.0
SetupPage {
id: qgcView
viewPanel: panel
id: firmwarePage
pageComponent: firmwarePageComponent
pageName: "Firmware" // For building setup page title: 'Firmware Setup'
Component {
id: firmwarePageComponent
ColumnLayout {
width: availableWidth
height: availableHeight
spacing: ScreenTools.defaultFontPixelHeight
// Those user visible strings are hard to translate because we can't send the
// HTML strings to translation as this can create a security risk. we need to find
// a better way to hightlight them, or use less hightlights.
// a better way to hightlight them, or use less highlights.
// User visible strings
pageName: "Firmware"
readonly property string title: "Firmware Setup" // Popup dialog title
readonly property string highlightPrefix: "<font color=\"" + qgcPal.warningText + "\">"
readonly property string highlightSuffix: "</font>"
......@@ -118,7 +128,7 @@ SetupPage {
}
}
onCompleted: {
Component.onCompleted: {
if (controllerCompleted) {
// We can only start the board search when the Qml and Controller are completely done loading
controller.startBoardSearch()
......@@ -387,29 +397,15 @@ SetupPage {
}
}
QGCViewPanel {
id: panel
anchors.fill: parent
QGCLabel {
id: titleLabel
text: title
font.pointSize: ScreenTools.mediumFontPointSize
}
ProgressBar {
id: progressBar
anchors.topMargin: ScreenTools.defaultFontPixelHeight
anchors.top: titleLabel.bottom
width: parent.width
Layout.preferredWidth: parent.width
}
TextArea {
id: statusTextArea
anchors.topMargin: ScreenTools.defaultFontPixelHeight
anchors.top: progressBar.bottom
anchors.bottom: parent.bottom
width: parent.width
Layout.preferredWidth: parent.width
Layout.fillHeight: true
readOnly: true
frameVisible: false
font.pointSize: ScreenTools.defaultFontPointSize
......@@ -421,5 +417,6 @@ SetupPage {
backgroundColor: qgcPal.windowShade
}
}
} // QGCViewPabel
} // QGCView
} // ColumnLayout
} // Component
} // SetupPage
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment