/**************************************************************************** * * (c) 2009-2020 QGROUNDCONTROL PROJECT * * QGroundControl is licensed according to the terms in the file * COPYING.md in the root of the source code directory. * ****************************************************************************/ import QtQuick 2.12 import QtQuick.Dialogs 1.2 import QtQuick.Layouts 1.2 import QtQuick.Controls 2.5 import QtQml 2.12 import QGroundControl.Controls 1.0 import QGroundControl.ScreenTools 1.0 import QGroundControl.FactSystem 1.0 import QGroundControl.FactControls 1.0 import QGroundControl.Controllers 1.0 import QGroundControl.Palette 1.0 import QGroundControl 1.0 /// Value page for InstrumentPanel PageView Column { id: _root width: pageWidth spacing: ScreenTools.defaultFontPixelHeight / 2 property bool showSettingsIcon: true property bool showLockIcon: true property var _activeVehicle: QGroundControl.multiVehicleManager.activeVehicle ? QGroundControl.multiVehicleManager.activeVehicle : QGroundControl.multiVehicleManager.offlineEditingVehicle property real _margins: ScreenTools.defaultFontPixelWidth / 2 property int _colMax: 4 property bool _settingsUnlocked: false property var _valueDialogInstrumentValue: null property var _rgFontSizes: [ ScreenTools.defaultFontPointSize, ScreenTools.smallFontPointSize, ScreenTools.mediumFontPointSize, ScreenTools.largeFontPointSize ] property var _rgFontSizeRatios: [ 1, ScreenTools.smallFontPointRatio, ScreenTools.mediumFontPointRatio, ScreenTools.largeFontPointRatio ] property real _doubleDescent: ScreenTools.defaultFontDescent * 2 property real _tightDefaultFontHeight: ScreenTools.defaultFontPixelHeight - _doubleDescent property var _rgFontSizeTightHeights: [ _tightDefaultFontHeight * _rgFontSizeRatios[0] + 2, _tightDefaultFontHeight * _rgFontSizeRatios[1] + 2, _tightDefaultFontHeight * _rgFontSizeRatios[2] + 2, _tightDefaultFontHeight * _rgFontSizeRatios[3] + 2 ] property real _blankEntryHeight: ScreenTools.defaultFontPixelHeight * 2 property real _columnButtonWidth: ScreenTools.minTouchPixels / 2 property real _columnButtonHeight: ScreenTools.minTouchPixels property real _columnButtonSpacing: 2 property real _columnButtonsTotalHeight: (_columnButtonHeight * 2) + _columnButtonSpacing QGCPalette { id:qgcPal; colorGroupEnabled: true } QGCPalette { id:qgcPalDisabled; colorGroupEnabled: false } ValuesWidgetController { id: controller } function showSettings(settingsUnlocked) { _settingsUnlocked = settingsUnlocked } function listContains(list, value) { for (var i=0; i