Remove all the signal propagation for the tooltip and allow only Cura.qml to handle them

Contributes to CURA-5941.
This commit is contained in:
Diego Prado Gesto 2018-12-02 20:32:55 +01:00
parent adabb833e0
commit 7dc3320b06
11 changed files with 28 additions and 54 deletions

View file

@ -9,17 +9,13 @@ import Cura 1.0 as Cura
Cura.ExpandableComponent
{
id: base
id: printSetupSelector
property bool hideSettings: PrintInformation.preSliced
property string enabledText: catalog.i18nc("@label:Should be short", "On")
property string disabledText: catalog.i18nc("@label:Should be short", "Off")
// This widget doesn't show tooltips by itself. Instead it emits signals so others can do something with it.
signal showTooltip(Item item, point location, string text)
signal hideTooltip()
iconSource: UM.Theme.getIcon("pencil")
popupPadding: UM.Theme.getSize("default_lining").width
popupSpacingY: UM.Theme.getSize("narrow_margin").width
@ -32,17 +28,6 @@ Cura.ExpandableComponent
name: "cura"
}
Timer
{
id: tooltipDelayTimer
interval: 500
repeat: false
property var item
property string text
onTriggered: base.showTooltip(base, {x: 0, y: item.y}, text)
}
headerItem: PrintSetupSelectorHeader
{
anchors.fill: parent