mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-06-11 07:11:52 +02:00
[ui] InputNode behavior for menu and display
This commit is contained in:
parent
82dc3fb294
commit
671b3ff128
4 changed files with 24 additions and 6 deletions
|
@ -448,6 +448,8 @@ Item {
|
||||||
|
|
||||||
MenuItem {
|
MenuItem {
|
||||||
text: "Compute"
|
text: "Compute"
|
||||||
|
visible: nodeMenu.currentNode ? nodeMenu.currentNode.isComputable : false
|
||||||
|
height: visible ? implicitHeight : 0
|
||||||
enabled: nodeMenu.canComputeNode && (nodeMenu.canSubmitOrCompute%2 == 1) //canSubmit if canSubmitOrCompute == 1(can compute) or 3(can compute & submit)
|
enabled: nodeMenu.canComputeNode && (nodeMenu.canSubmitOrCompute%2 == 1) //canSubmit if canSubmitOrCompute == 1(can compute) or 3(can compute & submit)
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
computeRequest(nodeMenu.currentNode)
|
computeRequest(nodeMenu.currentNode)
|
||||||
|
@ -456,7 +458,7 @@ Item {
|
||||||
MenuItem {
|
MenuItem {
|
||||||
text: "Submit"
|
text: "Submit"
|
||||||
enabled: nodeMenu.canComputeNode && nodeMenu.canSubmitOrCompute > 1
|
enabled: nodeMenu.canComputeNode && nodeMenu.canSubmitOrCompute > 1
|
||||||
visible: uigraph ? uigraph.canSubmit : false
|
visible: nodeMenu.currentNode ? nodeMenu.currentNode.isComputable : uigraph ? uigraph.canSubmit : false
|
||||||
height: visible ? implicitHeight : 0
|
height: visible ? implicitHeight : 0
|
||||||
onTriggered: submitRequest(nodeMenu.currentNode)
|
onTriggered: submitRequest(nodeMenu.currentNode)
|
||||||
}
|
}
|
||||||
|
@ -476,9 +478,13 @@ Item {
|
||||||
}
|
}
|
||||||
MenuItem {
|
MenuItem {
|
||||||
text: "Open Folder"
|
text: "Open Folder"
|
||||||
|
visible: nodeMenu.currentNode ? nodeMenu.currentNode.isComputable : false
|
||||||
|
height: visible ? implicitHeight : 0
|
||||||
onTriggered: Qt.openUrlExternally(Filepath.stringToUrl(nodeMenu.currentNode.internalFolder))
|
onTriggered: Qt.openUrlExternally(Filepath.stringToUrl(nodeMenu.currentNode.internalFolder))
|
||||||
}
|
}
|
||||||
MenuSeparator {}
|
MenuSeparator {
|
||||||
|
visible: nodeMenu.currentNode ? nodeMenu.currentNode.isComputable : false
|
||||||
|
}
|
||||||
MenuItem {
|
MenuItem {
|
||||||
text: "Cut Node(s)"
|
text: "Cut Node(s)"
|
||||||
enabled: true
|
enabled: true
|
||||||
|
@ -542,9 +548,13 @@ Item {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
MenuSeparator {}
|
MenuSeparator {
|
||||||
|
visible: nodeMenu.currentNode ? nodeMenu.currentNode.isComputable : false
|
||||||
|
}
|
||||||
MenuItem {
|
MenuItem {
|
||||||
text: "Delete Data" + (deleteFollowingButton.hovered ? " From Here" : "" ) + "..."
|
text: "Delete Data" + (deleteFollowingButton.hovered ? " From Here" : "" ) + "..."
|
||||||
|
visible: nodeMenu.currentNode ? nodeMenu.currentNode.isComputable : false
|
||||||
|
height: visible ? implicitHeight : 0
|
||||||
enabled: {
|
enabled: {
|
||||||
if (!nodeMenu.currentNode)
|
if (!nodeMenu.currentNode)
|
||||||
return false
|
return false
|
||||||
|
|
|
@ -28,7 +28,7 @@ Item {
|
||||||
property point position: Qt.point(x, y)
|
property point position: Qt.point(x, y)
|
||||||
/// Styling
|
/// Styling
|
||||||
property color shadowColor: "#cc000000"
|
property color shadowColor: "#cc000000"
|
||||||
readonly property color defaultColor: isCompatibilityNode ? "#444" : activePalette.base
|
readonly property color defaultColor: isCompatibilityNode ? "#444" : !node.isComputable ? "#BA3D69" : activePalette.base
|
||||||
property color baseColor: defaultColor
|
property color baseColor: defaultColor
|
||||||
|
|
||||||
property point mousePosition: Qt.point(mouseArea.mouseX, mouseArea.mouseY)
|
property point mousePosition: Qt.point(mouseArea.mouseX, mouseArea.mouseY)
|
||||||
|
@ -328,7 +328,7 @@ Item {
|
||||||
MaterialLabel {
|
MaterialLabel {
|
||||||
id: nodeImageOutput
|
id: nodeImageOutput
|
||||||
visible: (node.hasImageOutput || node.has3DOutput)
|
visible: (node.hasImageOutput || node.has3DOutput)
|
||||||
&& ["SUCCESS"].includes(node.globalStatus) && node.chunks.count > 0
|
&& ((["SUCCESS"].includes(node.globalStatus) && node.chunks.count > 0) || !node.isComputable)
|
||||||
text: MaterialIcons.visibility
|
text: MaterialIcons.visibility
|
||||||
padding: 2
|
padding: 2
|
||||||
font.pointSize: 7
|
font.pointSize: 7
|
||||||
|
@ -367,6 +367,7 @@ Item {
|
||||||
|
|
||||||
// Node Chunks
|
// Node Chunks
|
||||||
NodeChunks {
|
NodeChunks {
|
||||||
|
visible: node.isComputable
|
||||||
defaultColor: Colors.sysPalette.mid
|
defaultColor: Colors.sysPalette.mid
|
||||||
implicitHeight: 3
|
implicitHeight: 3
|
||||||
width: parent.width
|
width: parent.width
|
||||||
|
|
|
@ -335,6 +335,7 @@ Panel {
|
||||||
|
|
||||||
TabBar {
|
TabBar {
|
||||||
id: tabBar
|
id: tabBar
|
||||||
|
visible: root.node !== null
|
||||||
|
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
width: childrenRect.width
|
width: childrenRect.width
|
||||||
|
@ -347,16 +348,22 @@ Panel {
|
||||||
rightPadding: leftPadding
|
rightPadding: leftPadding
|
||||||
}
|
}
|
||||||
TabButton {
|
TabButton {
|
||||||
|
visible: node != null && node.isComputable
|
||||||
|
width: !visible ? 0 : tabBar.width / tabBar.count
|
||||||
text: "Log"
|
text: "Log"
|
||||||
leftPadding: 8
|
leftPadding: 8
|
||||||
rightPadding: leftPadding
|
rightPadding: leftPadding
|
||||||
}
|
}
|
||||||
TabButton {
|
TabButton {
|
||||||
|
visible: node != null && node.isComputable
|
||||||
|
width: !visible ? 0 : tabBar.width / tabBar.count
|
||||||
text: "Statistics"
|
text: "Statistics"
|
||||||
leftPadding: 8
|
leftPadding: 8
|
||||||
rightPadding: leftPadding
|
rightPadding: leftPadding
|
||||||
}
|
}
|
||||||
TabButton {
|
TabButton {
|
||||||
|
visible: node != null && node.isComputable
|
||||||
|
width: !visible ? 0 : tabBar.width / tabBar.count
|
||||||
text: "Status"
|
text: "Status"
|
||||||
leftPadding: 8
|
leftPadding: 8
|
||||||
rightPadding: leftPadding
|
rightPadding: leftPadding
|
||||||
|
|
|
@ -175,7 +175,7 @@ FocusScope {
|
||||||
}
|
}
|
||||||
|
|
||||||
// node must be computed or at least running
|
// node must be computed or at least running
|
||||||
if (!node.isPartiallyFinished()) {
|
if (node.isComputable && !node.isPartiallyFinished()) {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue