mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-07-29 06:27:35 +02:00
Merge pull request #2382 from alicevision/dev/pushButtonAttribute
[core/ui] Add support for PushButton attribute
This commit is contained in:
commit
d9b4b26a69
4 changed files with 71 additions and 3 deletions
|
@ -78,7 +78,7 @@ RowLayout {
|
|||
var tooltip = ""
|
||||
if (!object.validValue && object.desc.errorMessage !== "")
|
||||
tooltip += "<i><b>Error: </b>" + Format.plainToHtml(object.desc.errorMessage) + "</i><br><br>"
|
||||
tooltip += "<b>" + object.desc.name + "</b><br>" + Format.plainToHtml(object.desc.description)
|
||||
tooltip += "<b>" + object.desc.name + "</b><br>" + Format.plainToHtml(object.description)
|
||||
return tooltip
|
||||
}
|
||||
visible: parameterMA.containsMouse
|
||||
|
@ -179,6 +179,8 @@ RowLayout {
|
|||
|
||||
sourceComponent: {
|
||||
switch (attribute.type) {
|
||||
case "PushButtonParam":
|
||||
return pushButton_component
|
||||
case "ChoiceParam":
|
||||
return attribute.desc.exclusive ? comboBox_component : multiChoice_component
|
||||
case "IntParam": return slider_component
|
||||
|
@ -203,6 +205,17 @@ RowLayout {
|
|||
}
|
||||
}
|
||||
|
||||
Component {
|
||||
id: pushButton_component
|
||||
Button {
|
||||
text: attribute.label
|
||||
enabled: root.editable
|
||||
onClicked: {
|
||||
attribute.clicked()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Component {
|
||||
id: textField_component
|
||||
TextField {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue