Create TaskManager with a task overview

Create a seperate class to handle the logic of computing nodes
+ An UI overview with all submitted nodes
This commit is contained in:
Lee Geertsen 2019-08-12 18:34:48 +02:00 committed by Yann Lanthony
parent bc1eb83d92
commit 51d6c18840
No known key found for this signature in database
GPG key ID: 519FAE6DF7A70642
11 changed files with 579 additions and 76 deletions

View file

@ -540,11 +540,11 @@ ApplicationWindow {
height: Math.round(parent.height * 0.3)
visible: settings_UILayout.showGraphEditor
Panel {
TabPanel {
id: graphEditorPanel
Layout.fillWidth: true
padding: 4
title: "Graph Editor"
tabs: ["Graph Editor", "Task Manager"]
headerBar: RowLayout {
MaterialToolButton {
@ -583,31 +583,63 @@ ApplicationWindow {
}
}
GraphEditor {
id: graphEditor
Loader {
id: mainTabLoader
clip: true
anchors.fill: parent
uigraph: _reconstruction
nodeTypesModel: _nodeTypes
readOnly: graphLocked
property var components: [graphEditorComponent, taskManagerComponent]
sourceComponent: components[graphEditorPanel.currentTab]
}
onNodeDoubleClicked: {
_reconstruction.setActiveNodeOfType(node);
Component {
id: graphEditorComponent
GraphEditor {
id: graphEditor
for(var i=0; i < node.attributes.count; ++i)
{
var attr = node.attributes.at(i)
if(attr.isOutput
&& workspaceView.viewIn3D(attr, mouse))
anchors.fill: parent
uigraph: _reconstruction
nodeTypesModel: _nodeTypes
readOnly: graphLocked
onNodeDoubleClicked: {
if(node.nodeType === "StructureFromMotion")
{
break;
_reconstruction.sfm = node;
}
else if(node.nodeType === "FeatureExtraction")
{
_reconstruction.featureExtraction = node;
}
else if(node.nodeType === "CameraInit")
{
_reconstruction.cameraInit = node;
}
for(var i=0; i < node.attributes.count; ++i)
{
var attr = node.attributes.at(i)
if(attr.isOutput
&& workspaceView.viewIn3D(attr, mouse))
{
break;
}
}
}
onComputeRequest: computeManager.compute(node)
onSubmitRequest: computeManager.submit(node)
}
onComputeRequest: computeManager.compute(node)
onSubmitRequest: computeManager.submit(node)
}
Component {
id: taskManagerComponent
TaskManager {
id: taskManager
uigraph: _reconstruction
taskManager: _reconstruction.taskManager
anchors.fill: parent
}
}
}
NodeEditor {