From 8fb3acd0997f7d6e46ded7feae2eb459a6b5250a Mon Sep 17 00:00:00 2001 From: DonLakeFlyer Date: Mon, 6 Mar 2017 16:30:53 -0800 Subject: [PATCH] Page not loading correctly - Fix imports to support 5.7 - Move properties to correct location --- src/AutoPilotPlugins/PX4/PowerComponent.qml | 27 ++++++++++----------- src/QmlControls/QGCGroupBox.qml | 6 ++--- 2 files changed, 16 insertions(+), 17 deletions(-) diff --git a/src/AutoPilotPlugins/PX4/PowerComponent.qml b/src/AutoPilotPlugins/PX4/PowerComponent.qml index 7b7bc5c41..06db44fc4 100644 --- a/src/AutoPilotPlugins/PX4/PowerComponent.qml +++ b/src/AutoPilotPlugins/PX4/PowerComponent.qml @@ -29,25 +29,24 @@ SetupPage { width: Math.max(availableWidth, innerColumn.width) height: innerColumn.height + property int textEditWidth: ScreenTools.defaultFontPixelWidth * 8 + + property Fact battNumCells: controller.getParameterFact(-1, "BAT_N_CELLS") + property Fact battHighVolt: controller.getParameterFact(-1, "BAT_V_CHARGED") + property Fact battLowVolt: controller.getParameterFact(-1, "BAT_V_EMPTY") + property Fact battVoltLoadDrop: controller.getParameterFact(-1, "BAT_V_LOAD_DROP") + property Fact battVoltageDivider: controller.getParameterFact(-1, "BAT_V_DIV") + property Fact battAmpsPerVolt: controller.getParameterFact(-1, "BAT_A_PER_V") + property Fact uavcanEnable: controller.getParameterFact(-1, "UAVCAN_ENABLE", false) + + readonly property string highlightPrefix: "" + readonly property string highlightSuffix: "" + ColumnLayout { id: innerColumn anchors.horizontalCenter: parent.horizontalCenter spacing: ScreenTools.defaultFontPixelHeight - property int textEditWidth: ScreenTools.defaultFontPixelWidth * 8 - - property Fact battNumCells: controller.getParameterFact(-1, "BAT_N_CELLS") - property Fact battHighVolt: controller.getParameterFact(-1, "BAT_V_CHARGED") - property Fact battLowVolt: controller.getParameterFact(-1, "BAT_V_EMPTY") - property Fact battVoltLoadDrop: controller.getParameterFact(-1, "BAT_V_LOAD_DROP") - property Fact battVoltageDivider: controller.getParameterFact(-1, "BAT_V_DIV") - property Fact battAmpsPerVolt: controller.getParameterFact(-1, "BAT_A_PER_V") - property Fact uavcanEnable: controller.getParameterFact(-1, "UAVCAN_ENABLE", false) - - readonly property string highlightPrefix: "" - readonly property string highlightSuffix: "" - - function getBatteryImage() { switch(battNumCells.value) { diff --git a/src/QmlControls/QGCGroupBox.qml b/src/QmlControls/QGCGroupBox.qml index 196ef1807..01f88c352 100644 --- a/src/QmlControls/QGCGroupBox.qml +++ b/src/QmlControls/QGCGroupBox.qml @@ -7,11 +7,11 @@ * ****************************************************************************/ -import QtQuick 2.3 -import QtQuick.Controls 1.2 +import QtQuick 2.3 +import QtQuick.Controls 2.0 import QGroundControl.Palette 1.0 -import QGroundControl.ScreenTools 1.0 +import QGroundControl.ScreenTools 1.0 GroupBox { id: control -- 2.22.0