9 changed files with 789 additions and 738 deletions
@ -0,0 +1,145 @@
@@ -0,0 +1,145 @@
|
||||
/**************************************************************************** |
||||
* |
||||
* (c) 2009-2020 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org> |
||||
* |
||||
* 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.Layouts 1.2 |
||||
import QtQuick.Controls 2.5 |
||||
|
||||
import QGroundControl.Controls 1.0 |
||||
import QGroundControl.ScreenTools 1.0 |
||||
import QGroundControl.Palette 1.0 |
||||
|
||||
Item { |
||||
id: root |
||||
height: value.y + value.height |
||||
|
||||
property var instrumentValue: null |
||||
property bool recalcOk: false |
||||
|
||||
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 |
||||
|
||||
// After fighting with using layout and/or anchors I gave up and just do a manual recalc to position items which ends up being much simpler |
||||
function recalcPositions() { |
||||
if (!recalcOk) { |
||||
return |
||||
} |
||||
var smallSpacing = 2 |
||||
if (instrumentValue.icon) { |
||||
if (instrumentValue.labelPosition === InstrumentValue.LabelAbove) { |
||||
valueIcon.x = (width - valueIcon.width) / 2 |
||||
valueIcon.y = 0 |
||||
value.x = (width - value.width) / 2 |
||||
value.y = valueIcon.height + smallSpacing |
||||
} else { |
||||
var iconPlusValueWidth = valueIcon.width + value.width + ScreenTools.defaultFontPixelWidth |
||||
valueIcon.x = (width - iconPlusValueWidth) / 2 |
||||
valueIcon.y = (value.height - valueIcon.height) / 2 |
||||
value.x = valueIcon.x + valueIcon.width + (ScreenTools.defaultFontPixelWidth / 2) |
||||
value.y = 0 |
||||
} |
||||
label.x = label.y = 0 |
||||
} else { |
||||
// label above value |
||||
if (instrumentValue.text) { |
||||
label.x = (width - label.width) / 2 |
||||
label.y = 0 |
||||
value.y = label.height + smallSpacing |
||||
} else { |
||||
value.y = 0 |
||||
} |
||||
value.x = (width - value.width) / 2 |
||||
valueIcon.x = valueIcon.y = 0 |
||||
} |
||||
} |
||||
|
||||
onRecalcOkChanged: recalcPositions() |
||||
onWidthChanged: recalcPositions() |
||||
|
||||
Connections { |
||||
target: instrumentValue |
||||
onIconChanged: recalcPositions() |
||||
onLabelPositionChanged: recalcPositions() |
||||
} |
||||
|
||||
QGCColoredImage { |
||||
id: valueIcon |
||||
height: _rgFontSizeTightHeights[instrumentValue.fontSize] |
||||
width: height |
||||
source: icon |
||||
sourceSize.height: height |
||||
fillMode: Image.PreserveAspectFit |
||||
mipmap: true |
||||
smooth: true |
||||
color: instrumentValue.isValidColor(instrumentValue.currentColor) ? instrumentValue.currentColor : qgcPal.text |
||||
opacity: instrumentValue.currentOpacity |
||||
visible: instrumentValue.icon |
||||
onWidthChanged: root.recalcPositions() |
||||
onHeightChanged: root.recalcPositions() |
||||
|
||||
property string icon |
||||
readonly property string iconPrefix: "/InstrumentValueIcons/" |
||||
|
||||
function updateIcon() { |
||||
if (instrumentValue.rangeType == InstrumentValue.IconSelectRange) { |
||||
icon = iconPrefix + instrumentValue.currentIcon |
||||
} else if (instrumentValue.icon) { |
||||
icon = iconPrefix + instrumentValue.icon |
||||
} else { |
||||
icon = "" |
||||
} |
||||
} |
||||
|
||||
Connections { |
||||
target: instrumentValue |
||||
onRangeTypeChanged: valueIcon.updateIcon() |
||||
onCurrentIconChanged: valueIcon.updateIcon() |
||||
onIconChanged: valueIcon.updateIcon() |
||||
} |
||||
Component.onCompleted: updateIcon(); |
||||
} |
||||
|
||||
QGCLabel { |
||||
id: blank |
||||
anchors.horizontalCenter: parent.horizontalCenter |
||||
height: _columnButtonsTotalHeight |
||||
font.pointSize: ScreenTools.smallFontPointSize |
||||
text: _settingsUnlocked ? qsTr("BLANK") : "" |
||||
horizontalAlignment: Text.AlignHCenter |
||||
verticalAlignment: Text.AlignVCenter |
||||
visible: !instrumentValue.fact |
||||
onWidthChanged: root.recalcPositions() |
||||
onHeightChanged: root.recalcPositions() |
||||
} |
||||
|
||||
QGCLabel { |
||||
id: label |
||||
height: _rgFontSizeTightHeights[InstrumentValue.SmallFontSize] |
||||
font.pointSize: ScreenTools.smallFontPointSize |
||||
text: instrumentValue.text.toUpperCase() |
||||
verticalAlignment: Text.AlignVCenter |
||||
visible: instrumentValue.fact && instrumentValue.text && !instrumentValue.icon |
||||
onWidthChanged: root.recalcPositions() |
||||
onHeightChanged: root.recalcPositions() |
||||
} |
||||
|
||||
QGCLabel { |
||||
id: value |
||||
font.pointSize: _rgFontSizes[instrumentValue.fontSize] |
||||
text: visible ? (instrumentValue.fact.enumOrValueString + (instrumentValue.showUnits ? instrumentValue.fact.units : "")) : "" |
||||
verticalAlignment: Text.AlignVCenter |
||||
visible: instrumentValue.fact |
||||
onWidthChanged: root.recalcPositions() |
||||
onHeightChanged: root.recalcPositions() |
||||
} |
||||
} |
@ -0,0 +1,548 @@
@@ -0,0 +1,548 @@
|
||||
/**************************************************************************** |
||||
* |
||||
* (c) 2009-2020 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org> |
||||
* |
||||
* 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.3 |
||||
import QtQuick.Layouts 1.2 |
||||
import QtQuick.Controls 2.5 |
||||
|
||||
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 |
||||
|
||||
QGCPopupDialog { |
||||
id: root |
||||
title: qsTr("Value Display") |
||||
buttons: StandardButton.Close |
||||
|
||||
property var instrumentValue: dialogProperties.instrumentValue |
||||
|
||||
GridLayout { |
||||
rowSpacing: _margins |
||||
columnSpacing: _margins |
||||
columns: 3 |
||||
|
||||
QGCCheckBox { |
||||
id: valueCheckBox |
||||
text: qsTr("Value") |
||||
checked: instrumentValue.fact |
||||
onClicked: { |
||||
if (checked) { |
||||
instrumentValue.setFact(instrumentValue.factGroupNames[0], instrumentValue.factValueNames[0]) |
||||
} else { |
||||
instrumentValue.clearFact() |
||||
} |
||||
} |
||||
} |
||||
|
||||
QGCComboBox { |
||||
model: instrumentValue.factGroupNames |
||||
sizeToContents: true |
||||
enabled: valueCheckBox.enabled |
||||
onModelChanged: currentIndex = find(instrumentValue.factGroupName) |
||||
Component.onCompleted: currentIndex = find(instrumentValue.factGroupName) |
||||
onActivated: { |
||||
instrumentValue.setFact(currentText, "") |
||||
instrumentValue.icon = "" |
||||
instrumentValue.text = instrumentValue.fact.shortDescription |
||||
} |
||||
} |
||||
|
||||
QGCComboBox { |
||||
model: instrumentValue.factValueNames |
||||
sizeToContents: true |
||||
enabled: valueCheckBox.enabled |
||||
onModelChanged: currentIndex = instrumentValue.fact ? find(instrumentValue.factName) : -1 |
||||
Component.onCompleted: currentIndex = instrumentValue.fact ? find(instrumentValue.factName) : -1 |
||||
onActivated: { |
||||
instrumentValue.setFact(instrumentValue.factGroupName, currentText) |
||||
instrumentValue.icon = "" |
||||
instrumentValue.text = instrumentValue.fact.shortDescription |
||||
} |
||||
} |
||||
|
||||
QGCRadioButton { |
||||
id: iconCheckBox |
||||
text: qsTr("Icon") |
||||
Component.onCompleted: checked = instrumentValue.icon != "" |
||||
onClicked: { |
||||
instrumentValue.text = "" |
||||
instrumentValue.icon = instrumentValue.iconNames[0] |
||||
var updateFunction = function(icon){ instrumentValue.icon = icon } |
||||
mainWindow.showPopupDialog(iconPickerDialog, { iconNames: instrumentValue.iconNames, icon: instrumentValue.icon, updateIconFunction: updateFunction }) |
||||
} |
||||
} |
||||
|
||||
QGCColoredImage { |
||||
Layout.alignment: Qt.AlignHCenter |
||||
height: labelPositionCombo.height |
||||
width: height |
||||
source: "/InstrumentValueIcons/" + (instrumentValue.icon ? instrumentValue.icon : instrumentValue.iconNames[0]) |
||||
sourceSize.height: height |
||||
fillMode: Image.PreserveAspectFit |
||||
mipmap: true |
||||
smooth: true |
||||
color: enabled ? qgcPal.text : qgcPalDisabled.text |
||||
enabled: iconCheckBox.checked |
||||
|
||||
MouseArea { |
||||
anchors.fill: parent |
||||
onClicked: { |
||||
var updateFunction = function(icon){ instrumentValue.icon = icon } |
||||
mainWindow.showPopupDialog(iconPickerDialog, { iconNames: instrumentValue.iconNames, icon: instrumentValue.icon, updateIconFunction: updateFunction }) |
||||
} |
||||
} |
||||
} |
||||
|
||||
QGCComboBox { |
||||
id: labelPositionCombo |
||||
model: instrumentValue.labelPositionNames |
||||
currentIndex: instrumentValue.labelPosition |
||||
sizeToContents: true |
||||
onActivated: instrumentValue.lanelPosition = index |
||||
enabled: iconCheckBox.checked |
||||
} |
||||
|
||||
QGCRadioButton { |
||||
id: labelCheckBox |
||||
text: qsTr("Text") |
||||
Component.onCompleted: checked = instrumentValue.text != "" |
||||
onClicked: { |
||||
instrumentValue.icon = "" |
||||
instrumentValue.text = instrumentValue.fact ? instrumentValue.fact.shortDescription : qsTr("Label") |
||||
} |
||||
} |
||||
|
||||
QGCTextField { |
||||
id: labelTextField |
||||
Layout.fillWidth: true |
||||
Layout.columnSpan: 2 |
||||
text: instrumentValue.text |
||||
enabled: labelCheckBox.checked |
||||
} |
||||
|
||||
QGCLabel { text: qsTr("Size") } |
||||
|
||||
QGCComboBox { |
||||
id: fontSizeCombo |
||||
model: instrumentValue.fontSizeNames |
||||
currentIndex: instrumentValue.fontSize |
||||
sizeToContents: true |
||||
onActivated: instrumentValue.fontSize = index |
||||
} |
||||
|
||||
QGCCheckBox { |
||||
text: qsTr("Show Units") |
||||
checked: instrumentValue.showUnits |
||||
onClicked: instrumentValue.showUnits = checked |
||||
} |
||||
|
||||
QGCLabel { text: qsTr("Range") } |
||||
|
||||
QGCComboBox { |
||||
id: rangeTypeCombo |
||||
Layout.columnSpan: 2 |
||||
model: instrumentValue.rangeTypeNames |
||||
currentIndex: instrumentValue.rangeType |
||||
sizeToContents: true |
||||
onActivated: instrumentValue.rangeType = index |
||||
} |
||||
|
||||
Loader { |
||||
id: rangeLoader |
||||
Layout.columnSpan: 3 |
||||
Layout.fillWidth: true |
||||
Layout.preferredWidth: item ? item.width : 0 |
||||
Layout.preferredHeight: item ? item.height : 0 |
||||
|
||||
property var instrumentValue: root.instrumentValue |
||||
|
||||
function updateSourceComponent() { |
||||
switch (instrumentValue.rangeType) { |
||||
case InstrumentValue.NoRangeInfo: |
||||
sourceComponent = undefined |
||||
break |
||||
case InstrumentValue.ColorRange: |
||||
sourceComponent = colorRangeDialog |
||||
break |
||||
case InstrumentValue.OpacityRange: |
||||
sourceComponent = opacityRangeDialog |
||||
break |
||||
case InstrumentValue.IconSelectRange: |
||||
sourceComponent = iconRangeDialog |
||||
break |
||||
} |
||||
} |
||||
|
||||
Component.onCompleted: updateSourceComponent() |
||||
|
||||
Connections { |
||||
target: instrumentValue |
||||
onRangeTypeChanged: rangeLoader.updateSourceComponent() |
||||
} |
||||
|
||||
} |
||||
} |
||||
|
||||
Component { |
||||
id: colorRangeDialog |
||||
|
||||
Item { |
||||
width: childrenRect.width |
||||
height: childrenRect.height |
||||
|
||||
function updateRangeValue(index, text) { |
||||
var newValues = instrumentValue.rangeValues |
||||
newValues[index] = parseFloat(text) |
||||
instrumentValue.rangeValues = newValues |
||||
} |
||||
|
||||
function updateColorValue(index, color) { |
||||
var newColors = instrumentValue.rangeColors |
||||
newColors[index] = color |
||||
instrumentValue.rangeColors = newColors |
||||
} |
||||
|
||||
ColorDialog { |
||||
id: colorPickerDialog |
||||
modality: Qt.ApplicationModal |
||||
currentColor: instrumentValue.rangeColors.length ? instrumentValue.rangeColors[colorIndex] : "white" |
||||
onAccepted: updateColorValue(colorIndex, color) |
||||
|
||||
property int colorIndex: 0 |
||||
} |
||||
|
||||
Column { |
||||
id: mainColumn |
||||
spacing: ScreenTools.defaultFontPixelHeight / 2 |
||||
|
||||
QGCLabel { |
||||
width: rowLayout.width |
||||
text: qsTr("Specify the color you want to apply based on value ranges. The color will be applied to the icon if available, otherwise to the value itself.") |
||||
wrapMode: Text.WordWrap |
||||
} |
||||
|
||||
Row { |
||||
id: rowLayout |
||||
spacing: _margins |
||||
|
||||
Column { |
||||
anchors.verticalCenter: parent.verticalCenter |
||||
spacing: _margins |
||||
|
||||
Repeater { |
||||
model: instrumentValue.rangeValues.length |
||||
|
||||
QGCButton { |
||||
width: ScreenTools.implicitTextFieldHeight |
||||
height: width |
||||
text: qsTr("-") |
||||
onClicked: instrumentValue.removeRangeValue(index) |
||||
} |
||||
} |
||||
} |
||||
|
||||
Column { |
||||
anchors.verticalCenter: parent.verticalCenter |
||||
spacing: _margins |
||||
|
||||
Repeater { |
||||
model: instrumentValue.rangeValues.length |
||||
|
||||
QGCTextField { |
||||
text: instrumentValue.rangeValues[index] |
||||
onEditingFinished: updateRangeValue(index, text) |
||||
} |
||||
} |
||||
} |
||||
|
||||
Column { |
||||
spacing: _margins |
||||
Repeater { |
||||
model: instrumentValue.rangeColors |
||||
|
||||
QGCCheckBox { |
||||
height: ScreenTools.implicitTextFieldHeight |
||||
checked: instrumentValue.isValidColor(instrumentValue.rangeColors[index]) |
||||
onClicked: updateColorValue(index, checked ? "green" : instrumentValue.invalidColor()) |
||||
} |
||||
} |
||||
} |
||||
|
||||
Column { |
||||
spacing: _margins |
||||
Repeater { |
||||
model: instrumentValue.rangeColors |
||||
|
||||
Rectangle { |
||||
width: ScreenTools.implicitTextFieldHeight |
||||
height: width |
||||
border.color: qgcPal.text |
||||
color: instrumentValue.isValidColor(modelData) ? modelData : qgcPal.text |
||||
|
||||
MouseArea { |
||||
anchors.fill: parent |
||||
onClicked: { |
||||
colorPickerDialog.colorIndex = index |
||||
colorPickerDialog.open() |
||||
} |
||||
} |
||||
} |
||||
} |
||||
} |
||||
} |
||||
|
||||
QGCButton { |
||||
text: qsTr("Add Row") |
||||
onClicked: instrumentValue.addRangeValue() |
||||
} |
||||
} |
||||
} |
||||
} |
||||
|
||||
Component { |
||||
id: iconRangeDialog |
||||
|
||||
Item { |
||||
width: childrenRect.width |
||||
height: childrenRect.height |
||||
|
||||
function updateRangeValue(index, text) { |
||||
var newValues = instrumentValue.rangeValues |
||||
newValues[index] = parseFloat(text) |
||||
instrumentValue.rangeValues = newValues |
||||
} |
||||
|
||||
function updateIconValue(index, icon) { |
||||
var newIcons = instrumentValue.rangeIcons |
||||
newIcons[index] = icon |
||||
instrumentValue.rangeIcons = newIcons |
||||
} |
||||
|
||||
Column { |
||||
id: mainColumn |
||||
spacing: ScreenTools.defaultFontPixelHeight / 2 |
||||
|
||||
QGCLabel { |
||||
width: rowLayout.width |
||||
text: qsTr("Specify the icon you want to display based on value ranges.") |
||||
wrapMode: Text.WordWrap |
||||
} |
||||
|
||||
Row { |
||||
id: rowLayout |
||||
spacing: _margins |
||||
|
||||
Column { |
||||
anchors.verticalCenter: parent.verticalCenter |
||||
spacing: _margins |
||||
|
||||
Repeater { |
||||
model: instrumentValue.rangeValues.length |
||||
|
||||
QGCButton { |
||||
width: ScreenTools.implicitTextFieldHeight |
||||
height: width |
||||
text: qsTr("-") |
||||
onClicked: instrumentValue.removeRangeValue(index) |
||||
} |
||||
} |
||||
} |
||||
|
||||
Column { |
||||
anchors.verticalCenter: parent.verticalCenter |
||||
spacing: _margins |
||||
|
||||
Repeater { |
||||
model: instrumentValue.rangeValues.length |
||||
|
||||
QGCTextField { |
||||
text: instrumentValue.rangeValues[index] |
||||
onEditingFinished: updateRangeValue(index, text) |
||||
} |
||||
} |
||||
} |
||||
|
||||
Column { |
||||
spacing: _margins |
||||
|
||||
Repeater { |
||||
model: instrumentValue.rangeIcons |
||||
|
||||
QGCColoredImage { |
||||
height: ScreenTools.implicitTextFieldHeight |
||||
width: height |
||||
source: "/InstrumentValueIcons/" + modelData |
||||
sourceSize.height: height |
||||
fillMode: Image.PreserveAspectFit |
||||
mipmap: true |
||||
smooth: true |
||||
color: qgcPal.text |
||||
|
||||
MouseArea { |
||||
anchors.fill: parent |
||||
onClicked: { |
||||
var updateFunction = function(icon){ updateIconValue(index, icon) } |
||||
mainWindow.showPopupDialog(iconPickerDialog, { iconNames: instrumentValue.iconNames, icon: modelData, updateIconFunction: updateFunction }) |
||||
} |
||||
} |
||||
} |
||||
} |
||||
} |
||||
} |
||||
|
||||
QGCButton { |
||||
text: qsTr("Add Row") |
||||
onClicked: instrumentValue.addRangeValue() |
||||
} |
||||
} |
||||
} |
||||
} |
||||
|
||||
Component { |
||||
id: opacityRangeDialog |
||||
|
||||
Item { |
||||
width: childrenRect.width |
||||
height: childrenRect.height |
||||
|
||||
function updateRangeValue(index, text) { |
||||
var newValues = instrumentValue.rangeValues |
||||
newValues[index] = parseFloat(text) |
||||
instrumentValue.rangeValues = newValues |
||||
} |
||||
|
||||
function updateOpacityValue(index, opacity) { |
||||
var newOpacities = instrumentValue.rangeOpacities |
||||
newOpacities[index] = opacity |
||||
instrumentValue.rangeOpacities = newOpacities |
||||
} |
||||
|
||||
Column { |
||||
id: mainColumn |
||||
spacing: ScreenTools.defaultFontPixelHeight / 2 |
||||
|
||||
QGCLabel { |
||||
width: rowLayout.width |
||||
text: qsTr("Specify the icon opacity you want based on value ranges.") |
||||
wrapMode: Text.WordWrap |
||||
} |
||||
|
||||
Row { |
||||
id: rowLayout |
||||
spacing: _margins |
||||
|
||||
Column { |
||||
anchors.verticalCenter: parent.verticalCenter |
||||
spacing: _margins |
||||
|
||||
Repeater { |
||||
model: instrumentValue.rangeValues.length |
||||
|
||||
QGCButton { |
||||
width: ScreenTools.implicitTextFieldHeight |
||||
height: width |
||||
text: qsTr("-") |
||||
onClicked: instrumentValue.removeRangeValue(index) |
||||
} |
||||
} |
||||
} |
||||
|
||||
Column { |
||||
anchors.verticalCenter: parent.verticalCenter |
||||
spacing: _margins |
||||
|
||||
Repeater { |
||||
model: instrumentValue.rangeValues |
||||
|
||||
QGCTextField { |
||||
text: modelData |
||||
onEditingFinished: updateRangeValue(index, text) |
||||
} |
||||
} |
||||
} |
||||
|
||||
Column { |
||||
spacing: _margins |
||||
|
||||
Repeater { |
||||
model: instrumentValue.rangeOpacities |
||||
|
||||
QGCTextField { |
||||
text: modelData |
||||
onEditingFinished: updateOpacityValue(index, text) |
||||
} |
||||
} |
||||
} |
||||
} |
||||
|
||||
QGCButton { |
||||
text: qsTr("Add Row") |
||||
onClicked: instrumentValue.addRangeValue() |
||||
} |
||||
} |
||||
} |
||||
} |
||||
|
||||
Component { |
||||
id: iconPickerDialog |
||||
|
||||
QGCPopupDialog { |
||||
property var iconNames: dialogProperties.iconNames |
||||
property string icon: dialogProperties.icon |
||||
property var updateIconFunction: dialogProperties.updateIconFunction |
||||
|
||||
title: qsTr("Select Icon") |
||||
buttons: StandardButton.Close |
||||
|
||||
GridLayout { |
||||
columns: 10 |
||||
columnSpacing: 0 |
||||
rowSpacing: 0 |
||||
|
||||
Repeater { |
||||
model: iconNames |
||||
|
||||
Rectangle { |
||||
height: ScreenTools.minTouchPixels |
||||
width: height |
||||
color: currentSelection ? qgcPal.text : qgcPal.window |
||||
|
||||
property bool currentSelection: icon == modelData |
||||
|
||||
QGCColoredImage { |
||||
anchors.centerIn: parent |
||||
height: parent.height * 0.75 |
||||
width: height |
||||
source: "/InstrumentValueIcons/" + modelData |
||||
sourceSize.height: height |
||||
fillMode: Image.PreserveAspectFit |
||||
mipmap: true |
||||
smooth: true |
||||
color: currentSelection ? qgcPal.window : qgcPal.text |
||||
|
||||
MouseArea { |
||||
anchors.fill: parent |
||||
onClicked: { |
||||
icon = modelData |
||||
updateIconFunction(modelData) |
||||
hideDialog() |
||||
} |
||||
} |
||||
} |
||||
} |
||||
} |
||||
} |
||||
} |
||||
} |
||||
} |
||||
|
Loading…
Reference in new issue