mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-06-10 23:01:59 +02:00
[ui] Replacement of Controls1 SplitView to Controls2 SplitView
This commit is contained in:
parent
34e3847cea
commit
ccd88c4646
8 changed files with 190 additions and 196 deletions
|
@ -1,6 +1,5 @@
|
||||||
import QtQuick 2.15
|
import QtQuick 2.15
|
||||||
import QtQuick.Controls 2.15
|
import QtQuick.Controls 2.15
|
||||||
import QtQuick.Controls 1.4 as Controls1 // For SplitView
|
|
||||||
import QtQuick.Layouts 1.11
|
import QtQuick.Layouts 1.11
|
||||||
import QtQuick.Window 2.15
|
import QtQuick.Window 2.15
|
||||||
import QtQml.Models 2.15
|
import QtQml.Models 2.15
|
||||||
|
@ -976,33 +975,32 @@ Page {
|
||||||
function onError() { createDialog(dialogsFactory.error, arguments[0]) }
|
function onError() { createDialog(dialogsFactory.error, arguments[0]) }
|
||||||
}
|
}
|
||||||
|
|
||||||
Controls1.SplitView {
|
|
||||||
anchors.fill: parent
|
|
||||||
orientation: Qt.Vertical
|
|
||||||
|
|
||||||
// Setup global tooltip style
|
|
||||||
ToolTip.toolTip.background: Rectangle { color: activePalette.base; border.color: activePalette.mid }
|
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
Layout.fillWidth: true
|
anchors.fill: parent
|
||||||
Layout.fillHeight: true
|
|
||||||
implicitHeight: Math.round(parent.height * 0.7)
|
|
||||||
spacing: 4
|
spacing: 4
|
||||||
|
|
||||||
// "ProgressBar" reflecting status of all the chunks in the graph, in their process order
|
// "ProgressBar" reflecting status of all the chunks in the graph, in their process order
|
||||||
NodeChunks {
|
NodeChunks {
|
||||||
id: chunksListView
|
id: chunksListView
|
||||||
Layout.fillWidth: true
|
|
||||||
height: 6
|
height: 6
|
||||||
|
width: parent.width
|
||||||
model: _reconstruction ? _reconstruction.sortedDFSChunks : null
|
model: _reconstruction ? _reconstruction.sortedDFSChunks : null
|
||||||
highlightChunks: false
|
highlightChunks: false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SplitView {
|
||||||
|
Layout.fillHeight: true
|
||||||
|
width: parent.width
|
||||||
|
|
||||||
|
orientation: Qt.Vertical
|
||||||
|
|
||||||
|
// Setup global tooltip style
|
||||||
|
ToolTip.toolTip.background: Rectangle { color: activePalette.base; border.color: activePalette.mid }
|
||||||
|
|
||||||
WorkspaceView {
|
WorkspaceView {
|
||||||
id: workspaceView
|
id: workspaceView
|
||||||
Layout.fillWidth: true
|
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
Layout.minimumHeight: 50
|
SplitView.preferredHeight: 0.7 * parent.height
|
||||||
reconstruction: _reconstruction
|
reconstruction: _reconstruction
|
||||||
readOnly: _reconstruction ? _reconstruction.computing : false
|
readOnly: _reconstruction ? _reconstruction.computing : false
|
||||||
|
|
||||||
|
@ -1033,18 +1031,18 @@ Page {
|
||||||
return loaded
|
return loaded
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
Controls1.SplitView {
|
SplitView {
|
||||||
|
id: bottomContainer
|
||||||
orientation: Qt.Horizontal
|
orientation: Qt.Horizontal
|
||||||
width: parent.width
|
|
||||||
property bool isOnlyGraphEditorVisible: settingsUILayout.showGraphEditor && !settingsUILayout.showImageViewer && !settingsUILayout.showViewer3D && !settingsUILayout.showImageGallery
|
|
||||||
height: isOnlyGraphEditorVisible ? parent.height : Math.round(parent.height * 0.3)
|
|
||||||
visible: settingsUILayout.showGraphEditor
|
visible: settingsUILayout.showGraphEditor
|
||||||
|
SplitView.preferredHeight: 0.3 * parent.height
|
||||||
|
|
||||||
TabPanel {
|
TabPanel {
|
||||||
id: graphEditorPanel
|
id: graphEditorPanel
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
SplitView.preferredWidth: 0.7 * parent.width
|
||||||
|
|
||||||
padding: 4
|
padding: 4
|
||||||
tabs: ["Graph Editor", "Task Manager", "Script Editor"]
|
tabs: ["Graph Editor", "Task Manager", "Script Editor"]
|
||||||
|
|
||||||
|
@ -1148,10 +1146,10 @@ Page {
|
||||||
|
|
||||||
GraphEditor {
|
GraphEditor {
|
||||||
id: graphEditor
|
id: graphEditor
|
||||||
|
anchors.fill: parent
|
||||||
|
|
||||||
visible: graphEditorPanel.currentTab === 0
|
visible: graphEditorPanel.currentTab === 0
|
||||||
|
|
||||||
anchors.fill: parent
|
|
||||||
uigraph: _reconstruction
|
uigraph: _reconstruction
|
||||||
nodeTypesModel: _nodeTypes
|
nodeTypesModel: _nodeTypes
|
||||||
|
|
||||||
|
@ -1183,26 +1181,24 @@ Page {
|
||||||
|
|
||||||
TaskManager {
|
TaskManager {
|
||||||
id: taskManager
|
id: taskManager
|
||||||
|
anchors.fill: parent
|
||||||
|
|
||||||
visible: graphEditorPanel.currentTab === 1
|
visible: graphEditorPanel.currentTab === 1
|
||||||
|
|
||||||
uigraph: _reconstruction
|
uigraph: _reconstruction
|
||||||
taskManager: _reconstruction ? _reconstruction.taskManager : null
|
taskManager: _reconstruction ? _reconstruction.taskManager : null
|
||||||
|
|
||||||
anchors.fill: parent
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ScriptEditor {
|
ScriptEditor {
|
||||||
id: scriptEditor
|
id: scriptEditor
|
||||||
|
anchors.fill: parent
|
||||||
|
|
||||||
visible: graphEditorPanel.currentTab === 2
|
visible: graphEditorPanel.currentTab === 2
|
||||||
anchors.fill: parent
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
NodeEditor {
|
NodeEditor {
|
||||||
id: nodeEditor
|
id: nodeEditor
|
||||||
width: Math.round(parent.width * 0.3)
|
|
||||||
node: _reconstruction ? _reconstruction.selectedNode : null
|
node: _reconstruction ? _reconstruction.selectedNode : null
|
||||||
property bool computing: _reconstruction ? _reconstruction.computing : false
|
property bool computing: _reconstruction ? _reconstruction.computing : false
|
||||||
// Make NodeEditor readOnly when computing
|
// Make NodeEditor readOnly when computing
|
||||||
|
@ -1215,4 +1211,5 @@ Page {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -1,6 +1,5 @@
|
||||||
import QtQuick 2.15
|
import QtQuick 2.15
|
||||||
import QtQuick.Controls 2.15
|
import QtQuick.Controls 2.15
|
||||||
import QtQuick.Controls 1.4 as Controls1 // SplitView
|
|
||||||
import QtQuick.Layouts 1.11
|
import QtQuick.Layouts 1.11
|
||||||
import MaterialIcons 2.2
|
import MaterialIcons 2.2
|
||||||
import Controls 1.0
|
import Controls 1.0
|
||||||
|
|
|
@ -20,7 +20,7 @@ ListView {
|
||||||
}
|
}
|
||||||
|
|
||||||
orientation: ListView.Horizontal
|
orientation: ListView.Horizontal
|
||||||
implicitWidth: 100
|
|
||||||
// If we have enough space, add one pixel margin between chunks
|
// If we have enough space, add one pixel margin between chunks
|
||||||
spacing: modelIsBig ? 0 : 1
|
spacing: modelIsBig ? 0 : 1
|
||||||
delegate: Rectangle {
|
delegate: Rectangle {
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
import QtQuick 2.15
|
import QtQuick 2.15
|
||||||
import QtQuick.Controls 2.15
|
import QtQuick.Controls 2.15
|
||||||
import QtQuick.Controls 1.4 as Controls1 // SplitView
|
|
||||||
import QtQuick.Layouts 1.11
|
import QtQuick.Layouts 1.11
|
||||||
import MaterialIcons 2.2
|
import MaterialIcons 2.2
|
||||||
import Controls 1.0
|
import Controls 1.0
|
||||||
|
@ -254,7 +253,7 @@ Panel {
|
||||||
Component {
|
Component {
|
||||||
id: editor_component
|
id: editor_component
|
||||||
|
|
||||||
Controls1.SplitView {
|
SplitView {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
|
||||||
// The list of chunks
|
// The list of chunks
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
import QtQuick 2.15
|
import QtQuick 2.15
|
||||||
import QtQuick.Controls 2.15
|
import QtQuick.Controls 2.15
|
||||||
import QtQuick.Controls 1.4 as Controls1 // SplitView
|
|
||||||
import QtQuick.Layouts 1.11
|
import QtQuick.Layouts 1.11
|
||||||
import MaterialIcons 2.2
|
import MaterialIcons 2.2
|
||||||
import Controls 1.0
|
import Controls 1.0
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
import QtQuick 2.15
|
import QtQuick 2.15
|
||||||
import QtQuick.Controls 2.15
|
import QtQuick.Controls 2.15
|
||||||
import QtQuick.Controls 1.4 as Controls1 // For SplitView
|
|
||||||
import QtQuick.Layouts 1.11
|
import QtQuick.Layouts 1.11
|
||||||
import Utils 1.0
|
import Utils 1.0
|
||||||
import MaterialIcons 2.2
|
import MaterialIcons 2.2
|
||||||
|
@ -16,7 +15,7 @@ Page {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Controls1.SplitView {
|
SplitView {
|
||||||
id: splitView
|
id: splitView
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
|
||||||
|
@ -25,8 +24,8 @@ Page {
|
||||||
id: leftColumn
|
id: leftColumn
|
||||||
height: parent.height
|
height: parent.height
|
||||||
|
|
||||||
Layout.minimumWidth: 200
|
SplitView.minimumWidth: 200
|
||||||
Layout.maximumWidth: 300
|
SplitView.maximumWidth: 300
|
||||||
|
|
||||||
AnimatedImage {
|
AnimatedImage {
|
||||||
id: logo
|
id: logo
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
import QtQuick 2.15
|
import QtQuick 2.15
|
||||||
import QtQuick.Controls 2.15
|
import QtQuick.Controls 2.15
|
||||||
import QtQuick.Controls 1.4 as Controls1
|
|
||||||
import QtQuick.Layouts 1.11
|
import QtQuick.Layouts 1.11
|
||||||
import QtQml.Models 2.15
|
import QtQml.Models 2.15
|
||||||
import QtQuick.Scene3D 2.15
|
import QtQuick.Scene3D 2.15
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
import QtQuick 2.15
|
import QtQuick 2.15
|
||||||
import QtQuick.Controls 2.15
|
import QtQuick.Controls 2.15
|
||||||
import QtQuick.Controls 1.4 as Controls1 // For SplitView
|
|
||||||
import QtQuick.Layouts 1.11
|
import QtQuick.Layouts 1.11
|
||||||
import Qt.labs.platform 1.0 as Platform
|
import Qt.labs.platform 1.0 as Platform
|
||||||
import ImageGallery 1.0
|
import ImageGallery 1.0
|
||||||
|
@ -26,11 +25,9 @@ Item {
|
||||||
readonly property Viewer2D viewer2D: viewer2D
|
readonly property Viewer2D viewer2D: viewer2D
|
||||||
readonly property alias imageGallery: imageGallery
|
readonly property alias imageGallery: imageGallery
|
||||||
|
|
||||||
implicitWidth: 300
|
// Use settings instead of visible property as property changes are not propagated
|
||||||
implicitHeight: 400
|
|
||||||
visible: settingsUILayout.showImageGallery || settingsUILayout.showImageViewer || settingsUILayout.showViewer3D || settingsUILayout.showLiveReconstruction
|
visible: settingsUILayout.showImageGallery || settingsUILayout.showImageViewer || settingsUILayout.showViewer3D || settingsUILayout.showLiveReconstruction
|
||||||
|
|
||||||
|
|
||||||
// Load a 3D media file in the 3D viewer
|
// Load a 3D media file in the 3D viewer
|
||||||
function load3DMedia(filepath, label = undefined) {
|
function load3DMedia(filepath, label = undefined) {
|
||||||
if (panel3dViewerLoader.active) {
|
if (panel3dViewerLoader.active) {
|
||||||
|
@ -62,10 +59,12 @@ Item {
|
||||||
|
|
||||||
SystemPalette { id: activePalette }
|
SystemPalette { id: activePalette }
|
||||||
|
|
||||||
Controls1.SplitView {
|
SplitView {
|
||||||
|
id: mainSplitView
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
|
||||||
Controls1.SplitView {
|
SplitView {
|
||||||
|
id: leftSplitView
|
||||||
visible: settingsUILayout.showImageGallery || settingsUILayout.showLiveReconstruction
|
visible: settingsUILayout.showImageGallery || settingsUILayout.showLiveReconstruction
|
||||||
orientation: Qt.Vertical
|
orientation: Qt.Vertical
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
|
@ -96,6 +95,7 @@ Item {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
LiveSfmView {
|
LiveSfmView {
|
||||||
|
id: liveSfmView
|
||||||
visible: settingsUILayout.showLiveReconstruction
|
visible: settingsUILayout.showLiveReconstruction
|
||||||
reconstruction: root.reconstruction
|
reconstruction: root.reconstruction
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
@ -104,6 +104,7 @@ Item {
|
||||||
}
|
}
|
||||||
|
|
||||||
Panel {
|
Panel {
|
||||||
|
id: imageViewer
|
||||||
title: "Image Viewer"
|
title: "Image Viewer"
|
||||||
visible: settingsUILayout.showImageViewer
|
visible: settingsUILayout.showImageViewer
|
||||||
implicitWidth: Math.round(parent.width * 0.35)
|
implicitWidth: Math.round(parent.width * 0.35)
|
||||||
|
@ -190,6 +191,7 @@ Item {
|
||||||
}
|
}
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
|
id: viewer3DContainer
|
||||||
visible: settingsUILayout.showViewer3D
|
visible: settingsUILayout.showViewer3D
|
||||||
Layout.minimumWidth: 20
|
Layout.minimumWidth: 20
|
||||||
Layout.minimumHeight: 80
|
Layout.minimumHeight: 80
|
||||||
|
@ -213,15 +215,15 @@ Item {
|
||||||
|
|
||||||
property alias viewer3D: c_viewer3D
|
property alias viewer3D: c_viewer3D
|
||||||
|
|
||||||
Controls1.SplitView {
|
SplitView {
|
||||||
id: c_viewer3DSplitView
|
id: c_viewer3DSplitView
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
Viewer3D {
|
Viewer3D {
|
||||||
id: c_viewer3D
|
id: c_viewer3D
|
||||||
|
|
||||||
Layout.fillWidth: true
|
SplitView.fillWidth: true
|
||||||
Layout.fillHeight: true
|
SplitView.fillHeight: true
|
||||||
Layout.minimumWidth: 20
|
SplitView.minimumWidth: 20
|
||||||
|
|
||||||
DropArea {
|
DropArea {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue