1// import related modules 2import QtQuick 2.15 3import QtQuick.Controls 2.15 4import QtQuick.Layouts 1.15 5import QtQuick.Window 2.15 6 7// import the VTK module 8import VTK @VTK_MAJOR_VERSION@.@VTK_MINOR_VERSION@ 9 10// window containing the application 11ApplicationWindow { 12 // title of the application 13 title: qsTr("VTK QtQuick App") 14 width: 800 15 height: 600 16 color: palette.window 17 18 SystemPalette { 19 id: palette 20 colorGroup: SystemPalette.Active 21 } 22 23 // menubar with two menus 24 menuBar: MenuBar { 25 Menu { 26 title: qsTr("File") 27 MenuItem { 28 text: qsTr("&Quit") 29 onTriggered: Qt.quit() 30 } 31 } 32 Menu { 33 title: qsTr("Edit") 34 } 35 } 36 37 // Content area 38 // Create a VTK render window to represent the opengl context for all vtk items in this app 39 VTKRenderWindow { 40 id: vtkwindow 41 anchors.fill: parent 42 } 43 44 SplitView { 45 anchors.fill: parent 46 orientation: Qt.Horizontal 47 48 VTKRenderItem { 49 objectName: "VolumeView" 50 SplitView.fillHeight: true 51 SplitView.fillWidth: true 52 SplitView.minimumHeight: 100 53 SplitView.minimumWidth: 100 54 SplitView.preferredHeight: 200 55 SplitView.preferredWidth: 200 56 renderWindow: vtkwindow 57 } 58 59 ColumnLayout { 60 SplitView.fillHeight: true 61 SplitView.fillWidth: true 62 SplitView.minimumWidth: 200 63 SplitView.preferredWidth: 200 64 VTKRenderItem { 65 objectName: "GlyphView" 66 renderWindow: vtkwindow 67 focus: true 68 Layout.fillHeight: true 69 Layout.fillWidth: true 70 } 71 VTKRenderItem { 72 objectName: "GeomView" 73 renderWindow: vtkwindow 74 Layout.fillHeight: true 75 Layout.fillWidth: true 76 } 77 } 78 } 79} 80