Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGhostkeeper <rubend@tutanota.com>2022-06-14 16:39:28 +0300
committerGhostkeeper <rubend@tutanota.com>2022-06-14 17:00:13 +0300
commitbd131257fec7ea80e2edd9cdc41da2e06f69c50a (patch)
treefb2219383a3971df26a90e6bd4b037aec7abe9d6 /resources/qml
parent40d473c243297dcdd0d7de7c7fb03c83c3b951cb (diff)
Implement sending a signal when changing intent changes quality level
For now it does nothing. But I'm adding a function that should cause the combobox to pulse. That'll be a new feature so I'm implementing it in a separate commit. Contributes to issue CURA-8849.
Diffstat (limited to 'resources/qml')
-rw-r--r--resources/qml/PrintSetupSelector/Recommended/RecommendedResolutionSelector.qml15
-rw-r--r--resources/qml/Widgets/ComboBox.qml5
2 files changed, 20 insertions, 0 deletions
diff --git a/resources/qml/PrintSetupSelector/Recommended/RecommendedResolutionSelector.qml b/resources/qml/PrintSetupSelector/Recommended/RecommendedResolutionSelector.qml
index ef64d7d6d4..62cdf94185 100644
--- a/resources/qml/PrintSetupSelector/Recommended/RecommendedResolutionSelector.qml
+++ b/resources/qml/PrintSetupSelector/Recommended/RecommendedResolutionSelector.qml
@@ -8,9 +8,11 @@ import Cura 1.7 as Cura
Item
{
+ id: recommendedResolutionSelector
height: childrenRect.height
property real labelColumnWidth: Math.round(width / 3)
+ property string _previousResolution: Cura.MachineManager.activeQualityType //Internal variable to detect changes.
Cura.IconWithText
{
@@ -62,5 +64,18 @@ Item
var selected_item = model.getItem(currentIndex)
Cura.IntentManager.selectIntent(selected_item.intent_category, selected_item.quality_type)
}
+
+ Connections
+ {
+ target: Cura.IntentManager
+ function onIntentCategoryChanged()
+ {
+ if(recommendedResolutionSelector._previousResolution !== Cura.MachineManager.activeQualityType)
+ {
+ visibilityPreset.pulse();
+ }
+ recommendedResolutionSelector._previousResolution = Cura.MachineManager.activeQualityType;
+ }
+ }
}
} \ No newline at end of file
diff --git a/resources/qml/Widgets/ComboBox.qml b/resources/qml/Widgets/ComboBox.qml
index f85c5d060b..0e98cdb25a 100644
--- a/resources/qml/Widgets/ComboBox.qml
+++ b/resources/qml/Widgets/ComboBox.qml
@@ -164,4 +164,9 @@ ComboBox
text: delegateLabel.truncated ? delegateItem.text : ""
}
}
+
+ function pulse()
+ {
+ //TODO: Initiate a pulse of colour.
+ }
}