Commit b79e5511 authored by Leander Schulten's avatar Leander Schulten
Browse files

Add Tooltip for the ComboBox in the DimmerControlItem Popup with a description

parent cb196342
Pipeline #148866 passed with stage
in 1 minute and 19 seconds
import QtQuick 2.7
import QtQuick.Controls 2.0
import QtQuick.Layouts 1.0
import QtQuick 2.12
import QtQuick.Controls 2.12
import QtQuick.Layouts 1.12
import QtGraphicalEffects 1.0
import custom.licht 1.0
import QtQml 2.11
import QtQml 2.12
import ".."
import "../components"
......@@ -183,6 +183,28 @@ ControlItem{
hoverEnabled: true
id: valueComboBox
onHoveredChanged: hovered ? showInfoPopup.visible = hovered : hideTooltipTimer.start()
id: hideTooltipTimer
interval: 500
onTriggered: showInfoPopup.visible = false;
repeat: false;
id: showInfoPopup
text: "The value of a DMX channel, e.g. the brightness of a lamp, can be determined in two ways. Either a default value is set, then programs run and then the result gets mapped to a different range. Alternatively, the value can simply be set to a specific value that overwrites alternative 1. 'Use value as default' describes alternative 1, 'Override with value' alternative 2."
delay: 1000
Component.onCompleted: contentItem.wrapMode = Label.Wrap
Component.onCompleted: {
valueComboBox.popup.onOpenedChanged.connect( () => {
showInfoPopup.visible = valueComboBox.popup.opened;
enabled: UserManagment.currentUser.havePermission(Permission.CHANGE_MIN_MAX_MAPPING);
model: ["Use value as default","Override with value"]
currentIndex: controlData?controlData.override:0
Supports Markdown
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