mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-08-04 01:08:26 +02:00
[ui] ImageGallery: add menu + advanced option to show view IDs
This commit is contained in:
parent
9805ec4861
commit
d2d8090b5b
2 changed files with 41 additions and 0 deletions
|
@ -15,6 +15,7 @@ Item {
|
|||
property alias source: _viewpoint.source
|
||||
property alias metadata: _viewpoint.metadata
|
||||
property bool readOnly: false
|
||||
property bool displayViewId: false
|
||||
|
||||
signal pressed(var mouse)
|
||||
signal removeRequest()
|
||||
|
@ -25,6 +26,7 @@ Item {
|
|||
QtObject {
|
||||
id: _viewpoint
|
||||
property url source: viewpoint ? Filepath.stringToUrl(viewpoint.get("path").value) : ''
|
||||
property int viewId: viewpoint ? viewpoint.get("viewId").value : -1
|
||||
property string metadataStr: viewpoint ? viewpoint.get("metadata").value : ''
|
||||
property var metadata: metadataStr ? JSON.parse(viewpoint.get("metadata").value) : {}
|
||||
}
|
||||
|
@ -91,6 +93,23 @@ Item {
|
|||
color: root.isCurrentItem ? parent.palette.highlight : "transparent"
|
||||
}
|
||||
}
|
||||
|
||||
// Image viewId
|
||||
Loader {
|
||||
active: displayViewId
|
||||
Layout.fillWidth: true
|
||||
visible: active
|
||||
sourceComponent: Label {
|
||||
padding: imageLabel.padding
|
||||
font.pointSize: imageLabel.font.pointSize
|
||||
elide: imageLabel.elide
|
||||
horizontalAlignment: imageLabel.horizontalAlignment
|
||||
text: _viewpoint.viewId
|
||||
background: Rectangle {
|
||||
color: imageLabel.background.color
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -30,6 +30,27 @@ Panel {
|
|||
title: "Images"
|
||||
implicitWidth: (root.defaultCellSize + 2) * 2
|
||||
|
||||
headerBar: RowLayout {
|
||||
MaterialToolButton {
|
||||
text: MaterialIcons.more_vert
|
||||
font.pointSize: 11
|
||||
padding: 2
|
||||
onClicked: graphEditorMenu.open()
|
||||
Menu {
|
||||
id: graphEditorMenu
|
||||
y: parent.height
|
||||
x: -width + parent.width
|
||||
Menu {
|
||||
title: "Advanced"
|
||||
Action {
|
||||
id: displayViewIdsAction
|
||||
text: "Display View IDs"
|
||||
checkable: true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
ColumnLayout {
|
||||
anchors.fill: parent
|
||||
spacing: 4
|
||||
|
@ -86,6 +107,7 @@ Panel {
|
|||
width: grid.cellWidth
|
||||
height: grid.cellHeight
|
||||
readOnly: root.readOnly
|
||||
displayViewId: displayViewIdsAction.checked
|
||||
|
||||
isCurrentItem: GridView.isCurrentItem
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue