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