mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-07-11 22:07:21 +02:00
Merge a35adedb1c
into ee679fcf34
This commit is contained in:
commit
a4da9cf729
1 changed files with 383 additions and 361 deletions
|
@ -599,400 +599,422 @@ Page {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
header: RowLayout {
|
header: Rectangle {
|
||||||
spacing: 0
|
color: Qt.darker(activePalette.window, 1.15)
|
||||||
MaterialToolButton {
|
height: 26
|
||||||
id: homeButton
|
|
||||||
text: MaterialIcons.home
|
|
||||||
|
|
||||||
font.pointSize: 18
|
RowLayout {
|
||||||
|
anchors.fill: parent
|
||||||
|
spacing: 0
|
||||||
|
MaterialToolButton {
|
||||||
|
id: homeButton
|
||||||
|
text: MaterialIcons.home
|
||||||
|
|
||||||
background: Rectangle {
|
topPadding: 0
|
||||||
color: homeButton.hovered ? activePalette.highlight : Qt.darker(activePalette.window, 1.15)
|
bottomPadding: 0
|
||||||
border.color: Qt.darker(activePalette.window, 1.15)
|
|
||||||
}
|
|
||||||
|
|
||||||
onClicked: {
|
font.pointSize: 18
|
||||||
if (!ensureNotComputing())
|
palette.text: hovered ? Colors.sysPalette.highlight : Colors.sysPalette.text
|
||||||
return
|
background: Rectangle {
|
||||||
ensureSaved(function() {
|
color: Qt.darker(activePalette.window, 1.15)
|
||||||
_reconstruction.clear()
|
border.color: Qt.darker(activePalette.window, 1.15)
|
||||||
if (mainStack.depth == 1)
|
}
|
||||||
mainStack.replace("Homepage.qml")
|
|
||||||
else
|
onClicked: {
|
||||||
mainStack.pop()
|
if (!ensureNotComputing())
|
||||||
})
|
return
|
||||||
}
|
ensureSaved(function() {
|
||||||
}
|
_reconstruction.clear()
|
||||||
MenuBar {
|
if (mainStack.depth == 1)
|
||||||
palette.window: Qt.darker(activePalette.window, 1.15)
|
mainStack.replace("Homepage.qml")
|
||||||
Menu {
|
else
|
||||||
title: "File"
|
mainStack.pop()
|
||||||
Action {
|
|
||||||
id: newAction
|
|
||||||
text: "New"
|
|
||||||
shortcut: "Ctrl+N"
|
|
||||||
onTriggered: ensureSaved(function() {
|
|
||||||
_reconstruction.new()
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
Menu {
|
}
|
||||||
id: newPipelineMenu
|
Item {
|
||||||
title: "New Pipeline"
|
Layout.fillHeight: true
|
||||||
enabled: newPipelineMenuItems.model !== undefined && newPipelineMenuItems.model.length > 0
|
Layout.fillWidth: true
|
||||||
property int maxWidth: 1000
|
MenuBar {
|
||||||
property int fullWidth: {
|
Layout.fillHeight: true
|
||||||
var result = 0;
|
topPadding: 0
|
||||||
for (var i = 0; i < count; ++i) {
|
bottomPadding: 0
|
||||||
var item = itemAt(i)
|
|
||||||
result = Math.max(item.implicitWidth + item.padding * 2, result)
|
background: Rectangle {
|
||||||
}
|
color: Qt.darker(activePalette.window, 1.15)
|
||||||
return result;
|
|
||||||
}
|
}
|
||||||
implicitWidth: fullWidth
|
Menu {
|
||||||
Repeater {
|
title: "File"
|
||||||
id: newPipelineMenuItems
|
Action {
|
||||||
model: MeshroomApp.pipelineTemplateFiles
|
id: newAction
|
||||||
MenuItem {
|
text: "New"
|
||||||
|
shortcut: "Ctrl+N"
|
||||||
onTriggered: ensureSaved(function() {
|
onTriggered: ensureSaved(function() {
|
||||||
_reconstruction.new(modelData["key"])
|
_reconstruction.new()
|
||||||
})
|
})
|
||||||
|
|
||||||
text: fileTextMetrics.elidedText
|
|
||||||
TextMetrics {
|
|
||||||
id: fileTextMetrics
|
|
||||||
text: modelData["name"]
|
|
||||||
elide: Text.ElideLeft
|
|
||||||
elideWidth: newPipelineMenu.maxWidth
|
|
||||||
}
|
|
||||||
|
|
||||||
ToolTip {
|
|
||||||
id: toolTip
|
|
||||||
|
|
||||||
delay: 200
|
|
||||||
text: modelData["path"]
|
|
||||||
visible: hovered
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
Menu {
|
||||||
}
|
id: newPipelineMenu
|
||||||
Action {
|
title: "New Pipeline"
|
||||||
id: openActionItem
|
enabled: newPipelineMenuItems.model !== undefined && newPipelineMenuItems.model.length > 0
|
||||||
text: "Open"
|
property int maxWidth: 1000
|
||||||
shortcut: "Ctrl+O"
|
property int fullWidth: {
|
||||||
onTriggered: ensureSaved(function() {
|
var result = 0;
|
||||||
initFileDialogFolder(openFileDialog)
|
for (var i = 0; i < count; ++i) {
|
||||||
openFileDialog.open()
|
var item = itemAt(i)
|
||||||
})
|
result = Math.max(item.implicitWidth + item.padding * 2, result)
|
||||||
}
|
|
||||||
Menu {
|
|
||||||
id: openRecentMenu
|
|
||||||
title: "Open Recent"
|
|
||||||
enabled: recentFilesMenuItems.model !== undefined && recentFilesMenuItems.model.length > 0
|
|
||||||
property int maxWidth: 1000
|
|
||||||
property int fullWidth: {
|
|
||||||
var result = 0;
|
|
||||||
for (var i = 0; i < count; ++i) {
|
|
||||||
var item = itemAt(i)
|
|
||||||
result = Math.max(item.implicitWidth + item.padding * 2, result)
|
|
||||||
}
|
|
||||||
return result
|
|
||||||
}
|
|
||||||
implicitWidth: fullWidth
|
|
||||||
Repeater {
|
|
||||||
id: recentFilesMenuItems
|
|
||||||
model: MeshroomApp.recentProjectFiles
|
|
||||||
MenuItem {
|
|
||||||
onTriggered: ensureSaved(function() {
|
|
||||||
openRecentMenu.dismiss()
|
|
||||||
if (_reconstruction.load(modelData["path"])) {
|
|
||||||
MeshroomApp.addRecentProjectFile(modelData["path"])
|
|
||||||
} else {
|
|
||||||
MeshroomApp.removeRecentProjectFile(modelData["path"])
|
|
||||||
}
|
}
|
||||||
})
|
return result;
|
||||||
|
}
|
||||||
|
implicitWidth: fullWidth
|
||||||
|
Repeater {
|
||||||
|
id: newPipelineMenuItems
|
||||||
|
model: MeshroomApp.pipelineTemplateFiles
|
||||||
|
MenuItem {
|
||||||
|
onTriggered: ensureSaved(function() {
|
||||||
|
_reconstruction.new(modelData["key"])
|
||||||
|
})
|
||||||
|
|
||||||
text: fileTextMetrics.elidedText
|
text: fileTextMetrics.elidedText
|
||||||
TextMetrics {
|
TextMetrics {
|
||||||
id: fileTextMetrics
|
id: fileTextMetrics
|
||||||
text: modelData["path"]
|
text: modelData["name"]
|
||||||
elide: Text.ElideLeft
|
elide: Text.ElideLeft
|
||||||
elideWidth: openRecentMenu.maxWidth
|
elideWidth: newPipelineMenu.maxWidth
|
||||||
|
}
|
||||||
|
|
||||||
|
ToolTip {
|
||||||
|
id: toolTip
|
||||||
|
|
||||||
|
delay: 200
|
||||||
|
text: modelData["path"]
|
||||||
|
visible: hovered
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
Action {
|
||||||
}
|
id: openActionItem
|
||||||
MenuSeparator { }
|
text: "Open"
|
||||||
Action {
|
shortcut: "Ctrl+O"
|
||||||
id: saveAction
|
onTriggered: ensureSaved(function() {
|
||||||
text: "Save"
|
initFileDialogFolder(openFileDialog)
|
||||||
shortcut: "Ctrl+S"
|
openFileDialog.open()
|
||||||
enabled: _reconstruction ? (_reconstruction.graph && !_reconstruction.graph.filepath) || !_reconstruction.undoStack.clean : false
|
})
|
||||||
onTriggered: {
|
}
|
||||||
if (_reconstruction.graph.filepath) {
|
Menu {
|
||||||
// Get current time date
|
id: openRecentMenu
|
||||||
var date = _reconstruction.graph.getFileDateVersionFromPath(_reconstruction.graph.filepath)
|
title: "Open Recent"
|
||||||
|
enabled: recentFilesMenuItems.model !== undefined && recentFilesMenuItems.model.length > 0
|
||||||
|
property int maxWidth: 1000
|
||||||
|
property int fullWidth: {
|
||||||
|
var result = 0;
|
||||||
|
for (var i = 0; i < count; ++i) {
|
||||||
|
var item = itemAt(i)
|
||||||
|
result = Math.max(item.implicitWidth + item.padding * 2, result)
|
||||||
|
}
|
||||||
|
return result
|
||||||
|
}
|
||||||
|
implicitWidth: fullWidth
|
||||||
|
Repeater {
|
||||||
|
id: recentFilesMenuItems
|
||||||
|
model: MeshroomApp.recentProjectFiles
|
||||||
|
MenuItem {
|
||||||
|
onTriggered: ensureSaved(function() {
|
||||||
|
openRecentMenu.dismiss()
|
||||||
|
if (_reconstruction.load(modelData["path"])) {
|
||||||
|
MeshroomApp.addRecentProjectFile(modelData["path"])
|
||||||
|
} else {
|
||||||
|
MeshroomApp.removeRecentProjectFile(modelData["path"])
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
// Check if the file has been modified by another instance
|
text: fileTextMetrics.elidedText
|
||||||
if (_reconstruction.graph.fileDateVersion !== date) {
|
TextMetrics {
|
||||||
fileModifiedDialog.open()
|
id: fileTextMetrics
|
||||||
} else
|
text: modelData["path"]
|
||||||
_reconstruction.save()
|
elide: Text.ElideLeft
|
||||||
} else {
|
elideWidth: openRecentMenu.maxWidth
|
||||||
initFileDialogFolder(saveFileDialog)
|
}
|
||||||
saveFileDialog.open()
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
MenuSeparator { }
|
||||||
|
Action {
|
||||||
|
id: saveAction
|
||||||
|
text: "Save"
|
||||||
|
shortcut: "Ctrl+S"
|
||||||
|
enabled: _reconstruction ? (_reconstruction.graph && !_reconstruction.graph.filepath) || !_reconstruction.undoStack.clean : false
|
||||||
|
onTriggered: {
|
||||||
|
if (_reconstruction.graph.filepath) {
|
||||||
|
// Get current time date
|
||||||
|
var date = _reconstruction.graph.getFileDateVersionFromPath(_reconstruction.graph.filepath)
|
||||||
|
|
||||||
|
// Check if the file has been modified by another instance
|
||||||
|
if (_reconstruction.graph.fileDateVersion !== date) {
|
||||||
|
fileModifiedDialog.open()
|
||||||
|
} else
|
||||||
|
_reconstruction.save()
|
||||||
|
} else {
|
||||||
|
initFileDialogFolder(saveFileDialog)
|
||||||
|
saveFileDialog.open()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Action {
|
||||||
|
id: saveAsAction
|
||||||
|
text: "Save As..."
|
||||||
|
shortcut: "Ctrl+Shift+S"
|
||||||
|
onTriggered: {
|
||||||
|
initFileDialogFolder(saveFileDialog)
|
||||||
|
saveFileDialog.open()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
MenuSeparator { }
|
||||||
|
Action {
|
||||||
|
id: importImagesAction
|
||||||
|
text: "Import Images"
|
||||||
|
shortcut: "Ctrl+I"
|
||||||
|
onTriggered: {
|
||||||
|
initFileDialogFolder(importImagesDialog, true)
|
||||||
|
importImagesDialog.open()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
MenuItem {
|
||||||
|
action: removeAllImagesAction
|
||||||
|
ToolTip.visible: hovered
|
||||||
|
ToolTip.text: removeAllImagesAction.tooltip
|
||||||
|
}
|
||||||
|
|
||||||
|
MenuSeparator { }
|
||||||
|
Menu {
|
||||||
|
id: advancedMenu
|
||||||
|
title: "Advanced"
|
||||||
|
implicitWidth: 300
|
||||||
|
|
||||||
|
Action {
|
||||||
|
id: saveAsTemplateAction
|
||||||
|
text: "Save As Template..."
|
||||||
|
shortcut: Shortcut {
|
||||||
|
sequence: "Ctrl+Shift+T"
|
||||||
|
context: Qt.ApplicationShortcut
|
||||||
|
onActivated: saveAsTemplateAction.triggered()
|
||||||
|
}
|
||||||
|
onTriggered: {
|
||||||
|
initFileDialogFolder(saveTemplateDialog)
|
||||||
|
saveTemplateDialog.open()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
MenuItem {
|
||||||
|
action: loadTemplateAction
|
||||||
|
ToolTip.visible: hovered
|
||||||
|
ToolTip.text: loadTemplateAction.tooltip
|
||||||
|
}
|
||||||
|
|
||||||
|
Action {
|
||||||
|
id: importProjectAction
|
||||||
|
text: "Import Project"
|
||||||
|
shortcut: Shortcut {
|
||||||
|
sequence: "Ctrl+Shift+I"
|
||||||
|
context: Qt.ApplicationShortcut
|
||||||
|
onActivated: importProjectAction.triggered()
|
||||||
|
}
|
||||||
|
onTriggered: {
|
||||||
|
initFileDialogFolder(importProjectDialog)
|
||||||
|
importProjectDialog.open()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
MenuItem {
|
||||||
|
action: removeImagesFromAllGroupsAction
|
||||||
|
ToolTip.visible: hovered
|
||||||
|
ToolTip.text: removeImagesFromAllGroupsAction.tooltip
|
||||||
|
}
|
||||||
|
}
|
||||||
|
MenuSeparator { }
|
||||||
|
Action {
|
||||||
|
text: "Quit"
|
||||||
|
onTriggered: _window.close()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Menu {
|
||||||
|
title: "Edit"
|
||||||
|
MenuItem {
|
||||||
|
action: undoAction
|
||||||
|
ToolTip.visible: hovered
|
||||||
|
ToolTip.text: undoAction.tooltip
|
||||||
|
}
|
||||||
|
MenuItem {
|
||||||
|
action: redoAction
|
||||||
|
ToolTip.visible: hovered
|
||||||
|
ToolTip.text: redoAction.tooltip
|
||||||
|
}
|
||||||
|
MenuItem {
|
||||||
|
action: cutAction
|
||||||
|
ToolTip.visible: hovered
|
||||||
|
ToolTip.text: cutAction.tooltip
|
||||||
|
}
|
||||||
|
MenuItem {
|
||||||
|
action: copyAction
|
||||||
|
ToolTip.visible: hovered
|
||||||
|
ToolTip.text: copyAction.tooltip
|
||||||
|
}
|
||||||
|
MenuItem {
|
||||||
|
action: pasteAction
|
||||||
|
ToolTip.visible: hovered
|
||||||
|
ToolTip.text: pasteAction.tooltip
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Menu {
|
||||||
|
title: "View"
|
||||||
|
MenuItem {
|
||||||
|
id: graphEditorVisibilityCB
|
||||||
|
text: "Graph Editor"
|
||||||
|
checkable: true
|
||||||
|
checked: true
|
||||||
|
}
|
||||||
|
MenuItem {
|
||||||
|
id: liveSfMVisibilityCB
|
||||||
|
text: "Live Reconstruction"
|
||||||
|
checkable: true
|
||||||
|
checked: false
|
||||||
|
}
|
||||||
|
MenuItem {
|
||||||
|
id: imageViewerVisibilityCB
|
||||||
|
text: "Image Viewer"
|
||||||
|
checkable: true
|
||||||
|
checked: true
|
||||||
|
}
|
||||||
|
MenuItem {
|
||||||
|
id: viewer3DVisibilityCB
|
||||||
|
text: "3D Viewer"
|
||||||
|
checkable: true
|
||||||
|
checked: true
|
||||||
|
}
|
||||||
|
MenuItem {
|
||||||
|
id: imageGalleryVisibilityCB
|
||||||
|
text: "Image Gallery"
|
||||||
|
checkable: true
|
||||||
|
checked: true
|
||||||
|
}
|
||||||
|
MenuSeparator {}
|
||||||
|
Action {
|
||||||
|
text: "Fullscreen"
|
||||||
|
checkable: true
|
||||||
|
checked: _window.visibility == ApplicationWindow.FullScreen
|
||||||
|
shortcut: "Ctrl+F"
|
||||||
|
onTriggered: _window.visibility == ApplicationWindow.FullScreen ? _window.showNormal() : showFullScreen()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Menu {
|
||||||
|
title: "Process"
|
||||||
|
Action {
|
||||||
|
text: "Compute all nodes"
|
||||||
|
onTriggered: computeManager.compute(null)
|
||||||
|
enabled: _reconstruction ? !_reconstruction.computingLocally : false
|
||||||
|
}
|
||||||
|
Action {
|
||||||
|
text: "Submit all nodes"
|
||||||
|
onTriggered: computeManager.submit(null)
|
||||||
|
enabled: _reconstruction ? _reconstruction.canSubmit : false
|
||||||
|
}
|
||||||
|
MenuSeparator {}
|
||||||
|
Action {
|
||||||
|
text: "Stop computation"
|
||||||
|
onTriggered: _reconstruction.stopExecution()
|
||||||
|
enabled: _reconstruction ? _reconstruction.computingLocally : false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Menu {
|
||||||
|
title: "Help"
|
||||||
|
Action {
|
||||||
|
text: "Online Documentation"
|
||||||
|
onTriggered: Qt.openUrlExternally("https://meshroom-manual.readthedocs.io")
|
||||||
|
}
|
||||||
|
Action {
|
||||||
|
text: "About Meshroom"
|
||||||
|
onTriggered: aboutDialog.open()
|
||||||
|
// Should be StandardKey.HelpContents, but for some reason it's not stable
|
||||||
|
// (may cause crash, requires pressing F1 twice after closing the popup)
|
||||||
|
shortcut: "F1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Action {
|
}
|
||||||
id: saveAsAction
|
|
||||||
text: "Save As..."
|
|
||||||
shortcut: "Ctrl+Shift+S"
|
|
||||||
onTriggered: {
|
|
||||||
initFileDialogFolder(saveFileDialog)
|
|
||||||
saveFileDialog.open()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
MenuSeparator { }
|
|
||||||
Action {
|
|
||||||
id: importImagesAction
|
|
||||||
text: "Import Images"
|
|
||||||
shortcut: "Ctrl+I"
|
|
||||||
onTriggered: {
|
|
||||||
initFileDialogFolder(importImagesDialog, true)
|
|
||||||
importImagesDialog.open()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
MenuItem {
|
Row {
|
||||||
action: removeAllImagesAction
|
// Process buttons
|
||||||
|
MaterialToolButton {
|
||||||
|
id: processButton
|
||||||
|
|
||||||
|
font.pointSize: 18
|
||||||
|
|
||||||
|
topPadding: 0
|
||||||
|
bottomPadding: 0
|
||||||
|
palette.text: hovered ? Colors.sysPalette.highlight : Colors.sysPalette.text
|
||||||
|
|
||||||
|
text: !(_reconstruction.computingLocally) ? MaterialIcons.send : MaterialIcons.cancel_schedule_send
|
||||||
|
|
||||||
|
ToolTip.text: !(_reconstruction.computingLocally) ? "Compute" : "Stop Computing"
|
||||||
ToolTip.visible: hovered
|
ToolTip.visible: hovered
|
||||||
ToolTip.text: removeAllImagesAction.tooltip
|
|
||||||
|
background: Rectangle {
|
||||||
|
color: Qt.darker(activePalette.window, 1.15)
|
||||||
|
border.color: Qt.darker(activePalette.window, 1.15)
|
||||||
|
}
|
||||||
|
|
||||||
|
onClicked: !(_reconstruction.computingLocally) ? computeManager.compute(null) : _reconstruction.stopExecution()
|
||||||
}
|
}
|
||||||
|
|
||||||
MenuSeparator { }
|
MaterialToolButton {
|
||||||
Menu {
|
id: submitButton
|
||||||
id: advancedMenu
|
|
||||||
title: "Advanced"
|
|
||||||
implicitWidth: 300
|
|
||||||
|
|
||||||
Action {
|
font.pointSize: 18
|
||||||
id: saveAsTemplateAction
|
|
||||||
text: "Save As Template..."
|
topPadding: 0
|
||||||
shortcut: Shortcut {
|
bottomPadding: 0
|
||||||
sequence: "Ctrl+Shift+T"
|
palette.text: hovered ? Colors.sysPalette.highlight : Colors.sysPalette.text
|
||||||
context: Qt.ApplicationShortcut
|
|
||||||
onActivated: saveAsTemplateAction.triggered()
|
visible: _reconstruction ? _reconstruction.canSubmit : false
|
||||||
}
|
text: MaterialIcons.rocket_launch
|
||||||
onTriggered: {
|
|
||||||
initFileDialogFolder(saveTemplateDialog)
|
ToolTip.text: "Submit on Render Farm"
|
||||||
saveTemplateDialog.open()
|
ToolTip.visible: hovered
|
||||||
}
|
|
||||||
|
background: Rectangle {
|
||||||
|
color: Qt.darker(activePalette.window, 1.15)
|
||||||
|
border.color: Qt.darker(activePalette.window, 1.15)
|
||||||
}
|
}
|
||||||
|
|
||||||
MenuItem {
|
onClicked: computeManager.submit(null)
|
||||||
action: loadTemplateAction
|
|
||||||
ToolTip.visible: hovered
|
|
||||||
ToolTip.text: loadTemplateAction.tooltip
|
|
||||||
}
|
|
||||||
|
|
||||||
Action {
|
|
||||||
id: importProjectAction
|
|
||||||
text: "Import Project"
|
|
||||||
shortcut: Shortcut {
|
|
||||||
sequence: "Ctrl+Shift+I"
|
|
||||||
context: Qt.ApplicationShortcut
|
|
||||||
onActivated: importProjectAction.triggered()
|
|
||||||
}
|
|
||||||
onTriggered: {
|
|
||||||
initFileDialogFolder(importProjectDialog)
|
|
||||||
importProjectDialog.open()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
MenuItem {
|
|
||||||
action: removeImagesFromAllGroupsAction
|
|
||||||
ToolTip.visible: hovered
|
|
||||||
ToolTip.text: removeImagesFromAllGroupsAction.tooltip
|
|
||||||
}
|
|
||||||
}
|
|
||||||
MenuSeparator { }
|
|
||||||
Action {
|
|
||||||
text: "Quit"
|
|
||||||
onTriggered: _window.close()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Menu {
|
|
||||||
title: "Edit"
|
Item {
|
||||||
MenuItem {
|
Layout.fillWidth: true
|
||||||
action: undoAction
|
Layout.fillHeight: true
|
||||||
ToolTip.visible: hovered
|
|
||||||
ToolTip.text: undoAction.tooltip
|
|
||||||
}
|
|
||||||
MenuItem {
|
|
||||||
action: redoAction
|
|
||||||
ToolTip.visible: hovered
|
|
||||||
ToolTip.text: redoAction.tooltip
|
|
||||||
}
|
|
||||||
MenuItem {
|
|
||||||
action: cutAction
|
|
||||||
ToolTip.visible: hovered
|
|
||||||
ToolTip.text: cutAction.tooltip
|
|
||||||
}
|
|
||||||
MenuItem {
|
|
||||||
action: copyAction
|
|
||||||
ToolTip.visible: hovered
|
|
||||||
ToolTip.text: copyAction.tooltip
|
|
||||||
}
|
|
||||||
MenuItem {
|
|
||||||
action: pasteAction
|
|
||||||
ToolTip.visible: hovered
|
|
||||||
ToolTip.text: pasteAction.tooltip
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
Menu {
|
|
||||||
title: "View"
|
|
||||||
MenuItem {
|
|
||||||
id: graphEditorVisibilityCB
|
|
||||||
text: "Graph Editor"
|
|
||||||
checkable: true
|
|
||||||
checked: true
|
|
||||||
}
|
|
||||||
MenuItem {
|
|
||||||
id: liveSfMVisibilityCB
|
|
||||||
text: "Live Reconstruction"
|
|
||||||
checkable: true
|
|
||||||
checked: false
|
|
||||||
}
|
|
||||||
MenuItem {
|
|
||||||
id: imageViewerVisibilityCB
|
|
||||||
text: "Image Viewer"
|
|
||||||
checkable: true
|
|
||||||
checked: true
|
|
||||||
}
|
|
||||||
MenuItem {
|
|
||||||
id: viewer3DVisibilityCB
|
|
||||||
text: "3D Viewer"
|
|
||||||
checkable: true
|
|
||||||
checked: true
|
|
||||||
}
|
|
||||||
MenuItem {
|
|
||||||
id: imageGalleryVisibilityCB
|
|
||||||
text: "Image Gallery"
|
|
||||||
checkable: true
|
|
||||||
checked: true
|
|
||||||
}
|
|
||||||
MenuSeparator {}
|
|
||||||
Action {
|
|
||||||
text: "Fullscreen"
|
|
||||||
checkable: true
|
|
||||||
checked: _window.visibility == ApplicationWindow.FullScreen
|
|
||||||
shortcut: "Ctrl+F"
|
|
||||||
onTriggered: _window.visibility == ApplicationWindow.FullScreen ? _window.showNormal() : showFullScreen()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Menu {
|
|
||||||
title: "Process"
|
|
||||||
Action {
|
|
||||||
text: "Compute all nodes"
|
|
||||||
onTriggered: computeManager.compute(null)
|
|
||||||
enabled: _reconstruction ? !_reconstruction.computingLocally : false
|
|
||||||
}
|
|
||||||
Action {
|
|
||||||
text: "Submit all nodes"
|
|
||||||
onTriggered: computeManager.submit(null)
|
|
||||||
enabled: _reconstruction ? _reconstruction.canSubmit : false
|
|
||||||
}
|
|
||||||
MenuSeparator {}
|
|
||||||
Action {
|
|
||||||
text: "Stop computation"
|
|
||||||
onTriggered: _reconstruction.stopExecution()
|
|
||||||
enabled: _reconstruction ? _reconstruction.computingLocally : false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Menu {
|
|
||||||
title: "Help"
|
|
||||||
Action {
|
|
||||||
text: "Online Documentation"
|
|
||||||
onTriggered: Qt.openUrlExternally("https://meshroom-manual.readthedocs.io")
|
|
||||||
}
|
|
||||||
Action {
|
|
||||||
text: "About Meshroom"
|
|
||||||
onTriggered: aboutDialog.open()
|
|
||||||
// Should be StandardKey.HelpContents, but for some reason it's not stable
|
|
||||||
// (may cause crash, requires pressing F1 twice after closing the popup)
|
|
||||||
shortcut: "F1"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Rectangle {
|
// CompatibilityManager indicator
|
||||||
Layout.fillWidth: true
|
ToolButton {
|
||||||
Layout.fillHeight: true
|
id: compatibilityIssuesButton
|
||||||
color: Qt.darker(activePalette.window, 1.15)
|
visible: compatibilityManager.issueCount
|
||||||
}
|
text: MaterialIcons.warning
|
||||||
|
font.family: MaterialIcons.fontFamily
|
||||||
Row {
|
palette.buttonText: hovered ? Colors.sysPalette.highlight : "#FF9800"
|
||||||
// Process buttons
|
font.pointSize: 12
|
||||||
MaterialToolButton {
|
onClicked: compatibilityManager.open()
|
||||||
id: processButton
|
ToolTip.text: "Compatibility Issues"
|
||||||
|
|
||||||
font.pointSize: 18
|
|
||||||
|
|
||||||
text: !(_reconstruction.computingLocally) ? MaterialIcons.send : MaterialIcons.cancel_schedule_send
|
|
||||||
|
|
||||||
ToolTip.text: !(_reconstruction.computingLocally) ? "Compute" : "Stop Computing"
|
|
||||||
ToolTip.visible: hovered
|
ToolTip.visible: hovered
|
||||||
|
|
||||||
background: Rectangle {
|
Layout.fillHeight: true
|
||||||
color: processButton.hovered ? activePalette.highlight : Qt.darker(activePalette.window, 1.15)
|
|
||||||
border.color: Qt.darker(activePalette.window, 1.15)
|
|
||||||
}
|
|
||||||
|
|
||||||
onClicked: !(_reconstruction.computingLocally) ? computeManager.compute(null) : _reconstruction.stopExecution()
|
|
||||||
}
|
|
||||||
|
|
||||||
MaterialToolButton {
|
|
||||||
id: submitButton
|
|
||||||
|
|
||||||
font.pointSize: 18
|
|
||||||
|
|
||||||
visible: _reconstruction ? _reconstruction.canSubmit : false
|
|
||||||
text: MaterialIcons.rocket_launch
|
|
||||||
|
|
||||||
ToolTip.text: "Submit on Render Farm"
|
|
||||||
ToolTip.visible: hovered
|
|
||||||
|
|
||||||
background: Rectangle {
|
background: Rectangle {
|
||||||
color: submitButton.hovered ? activePalette.highlight : Qt.darker(activePalette.window, 1.15)
|
color: Qt.darker(activePalette.window, 1.15)
|
||||||
border.color: Qt.darker(activePalette.window, 1.15)
|
border.color: Qt.darker(activePalette.window, 1.15)
|
||||||
}
|
}
|
||||||
|
|
||||||
onClicked: computeManager.submit(null)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Rectangle {
|
|
||||||
Layout.fillWidth: true
|
|
||||||
Layout.fillHeight: true
|
|
||||||
color: Qt.darker(activePalette.window, 1.15)
|
|
||||||
}
|
|
||||||
|
|
||||||
// CompatibilityManager indicator
|
|
||||||
ToolButton {
|
|
||||||
id: compatibilityIssuesButton
|
|
||||||
visible: compatibilityManager.issueCount
|
|
||||||
text: MaterialIcons.warning
|
|
||||||
font.family: MaterialIcons.fontFamily
|
|
||||||
palette.buttonText: "#FF9800"
|
|
||||||
font.pointSize: 12
|
|
||||||
onClicked: compatibilityManager.open()
|
|
||||||
ToolTip.text: "Compatibility Issues"
|
|
||||||
ToolTip.visible: hovered
|
|
||||||
|
|
||||||
background: Rectangle {
|
|
||||||
color: compatibilityIssuesButton.hovered ? activePalette.highlight : Qt.darker(activePalette.window, 1.15)
|
|
||||||
border.color: Qt.darker(activePalette.window, 1.15)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue