mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-06-12 07:42:04 +02:00
[ui] GraphEditor: add readOnly mode
* disable node/edge edition * make GraphEditor readOnly when graph is being computed
This commit is contained in:
parent
5e17b12df1
commit
d2c26c3c84
4 changed files with 12 additions and 3 deletions
|
@ -6,6 +6,7 @@ import QtGraphicalEffects 1.0
|
|||
Item {
|
||||
id: root
|
||||
property variant node: object
|
||||
property bool readOnly: false
|
||||
property color baseColor: "#607D8B"
|
||||
property color shadowColor: "black"
|
||||
|
||||
|
@ -30,6 +31,7 @@ Item {
|
|||
id: nodeMenu
|
||||
MenuItem {
|
||||
text: "Compute"
|
||||
enabled: !root.readOnly
|
||||
onTriggered: _reconstruction.execute(node)
|
||||
}
|
||||
MenuItem {
|
||||
|
@ -39,6 +41,7 @@ Item {
|
|||
MenuSeparator {}
|
||||
MenuItem {
|
||||
text: "Delete"
|
||||
enabled: !root.readOnly
|
||||
onTriggered: _reconstruction.removeNode(node)
|
||||
}
|
||||
}
|
||||
|
@ -133,6 +136,7 @@ Item {
|
|||
id: inPin
|
||||
nodeItem: root
|
||||
attribute: object
|
||||
readOnly: root.readOnly
|
||||
Component.onCompleted: attributePinCreated(attribute, inPin)
|
||||
onChildPinCreated: attributePinCreated(childAttribute, inPin)
|
||||
}
|
||||
|
@ -155,6 +159,7 @@ Item {
|
|||
id: outPin
|
||||
nodeItem: root
|
||||
attribute: object
|
||||
readOnly: root.readOnly
|
||||
Component.onCompleted: attributePinCreated(object, outPin)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue