mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-05-31 09:56:32 +02:00
[ui] add 3D viewer to ImageGallery
TODO: change Component's name
This commit is contained in:
parent
851ebf60ee
commit
4ca43028d8
1 changed files with 26 additions and 3 deletions
|
@ -45,12 +45,13 @@ Item {
|
||||||
fillMode: Image.PreserveAspectFit
|
fillMode: Image.PreserveAspectFit
|
||||||
}
|
}
|
||||||
Rectangle {
|
Rectangle {
|
||||||
color: palette.midlight
|
color: Qt.darker(palette.base, 1.15)
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
anchors.margins: 3
|
anchors.margins: 4
|
||||||
border.color: palette.highlight
|
border.color: palette.highlight
|
||||||
border.width: imageMA.containsMouse || grid.currentIndex == index ? 2 : 0
|
border.width: imageMA.containsMouse || grid.currentIndex == index ? 2 : 0
|
||||||
z: -1
|
z: -1
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
id: imageMA
|
id: imageMA
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
@ -77,8 +78,30 @@ Item {
|
||||||
Layout.minimumWidth: 40
|
Layout.minimumWidth: 40
|
||||||
Viewer2D {
|
Viewer2D {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
anchors.margins: 10
|
anchors.margins: 4
|
||||||
source: grid.currentItem.source
|
source: grid.currentItem.source
|
||||||
|
Rectangle {
|
||||||
|
z: -1
|
||||||
|
anchors.fill: parent
|
||||||
|
color: Qt.darker(palette.base, 1.1)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Item {
|
||||||
|
implicitWidth: Math.round(parent.width * 0.3)
|
||||||
|
Layout.minimumWidth: 20
|
||||||
|
Platform.FileDialog {
|
||||||
|
id: modelDialog
|
||||||
|
nameFilters: ["3D Models (*.obj)"]
|
||||||
|
onAccepted: viewer3D.loadModel(file)
|
||||||
|
}
|
||||||
|
Viewer3D {
|
||||||
|
id: viewer3D
|
||||||
|
anchors.fill: parent
|
||||||
|
Button {
|
||||||
|
text: "Load Model"
|
||||||
|
onClicked: modelDialog.open()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue