mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-06-01 10:21:59 +02:00
[ui] Viewer: Add ViewTimeWindow overlay
ViewTimeWindowOverlay displays view information provided by the MFeatures object (within MFeatures time window).
This commit is contained in:
parent
c71c483710
commit
c75d27f996
2 changed files with 144 additions and 0 deletions
116
meshroom/ui/qml/Viewer/ViewTimeWindowOverlay.qml
Normal file
116
meshroom/ui/qml/Viewer/ViewTimeWindowOverlay.qml
Normal file
|
@ -0,0 +1,116 @@
|
|||
import QtQuick 2.9
|
||||
import QtQuick.Controls 2.3
|
||||
import QtQuick.Layouts 1.3
|
||||
import MaterialIcons 2.2
|
||||
|
||||
import Utils 1.0
|
||||
import Controls 1.0
|
||||
|
||||
/**
|
||||
* ViewTimeWindowOverlay is an overlay that displays view information provided by the MFeatures object.
|
||||
*/
|
||||
FloatingPane {
|
||||
id: root
|
||||
|
||||
property var mfeatures: null
|
||||
|
||||
clip: true
|
||||
padding: 4
|
||||
anchors.rightMargin: 0
|
||||
|
||||
ListModel {
|
||||
id: viewModel
|
||||
property var featuresInfo: root.mfeatures.featuresInfo
|
||||
|
||||
onFeaturesInfoChanged: {
|
||||
viewModel.clear()
|
||||
var entries = []
|
||||
|
||||
// prepare data to populate the model from the input featuresInfo object
|
||||
for(var describerType in featuresInfo)
|
||||
{
|
||||
for(var viewId in featuresInfo[describerType])
|
||||
{
|
||||
var entry = featuresInfo[describerType][viewId]; // see QtAliceVision for featuresInfo list of attributes
|
||||
entry["key"] = viewId;
|
||||
entries.push(entry)
|
||||
}
|
||||
}
|
||||
viewModel.append(entries)
|
||||
}
|
||||
}
|
||||
|
||||
// background WheelEvent grabber
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
acceptedButtons: Qt.MiddleButton
|
||||
onWheel: wheel.accepted = true
|
||||
}
|
||||
|
||||
// main Layout
|
||||
ColumnLayout {
|
||||
anchors.fill: parent
|
||||
|
||||
// listView
|
||||
ListView {
|
||||
id: listView
|
||||
Layout.fillWidth: true
|
||||
Layout.fillHeight: true
|
||||
spacing: 3
|
||||
clip: true
|
||||
|
||||
model: viewModel
|
||||
delegate: RowLayout {
|
||||
width: parent.width
|
||||
Label {
|
||||
text: key
|
||||
leftPadding: 6
|
||||
rightPadding: 4
|
||||
Layout.preferredWidth: sizeHandle.x
|
||||
elide: Text.ElideRight
|
||||
}
|
||||
ColumnLayout{
|
||||
RowLayout {
|
||||
Label {text: 'frameId: '}
|
||||
Label {text: frameId }
|
||||
}
|
||||
RowLayout {
|
||||
Label {text: 'nbFeatures: '}
|
||||
Label {text: nbFeatures }
|
||||
}
|
||||
RowLayout {
|
||||
Label {text: 'nbTracks: '}
|
||||
Label {text: nbTracks }
|
||||
}
|
||||
RowLayout {
|
||||
Label {text: 'nbLandmarks: '}
|
||||
Label {text: nbLandmarks }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// resize handle
|
||||
Rectangle {
|
||||
id: sizeHandle
|
||||
height: parent.contentHeight
|
||||
width: 1
|
||||
color: root.palette.mid
|
||||
x: parent.width * 0.4
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
anchors.margins: -4
|
||||
cursorShape: Qt.SizeHorCursor
|
||||
drag {
|
||||
target: parent
|
||||
axis: Drag.XAxis
|
||||
threshold: 0
|
||||
minimumX: listView.width * 0.2
|
||||
maximumX: listView.width * 0.8
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ScrollBar.vertical: ScrollBar{}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -625,6 +625,25 @@ FocusScope {
|
|||
mfeatures: mfeaturesLoader.item
|
||||
}
|
||||
}
|
||||
Loader {
|
||||
id: viewTimeWindowOverlay
|
||||
Layout.fillWidth: true
|
||||
Layout.fillHeight: true
|
||||
width: 200
|
||||
|
||||
anchors {
|
||||
top: parent.top
|
||||
right: parent.right
|
||||
bottom: parent.bottom
|
||||
margins: 0
|
||||
}
|
||||
|
||||
active: root.aliceVisionPluginAvailable && displayViewTimeWindow.checked
|
||||
|
||||
sourceComponent: ViewTimeWindowOverlay {
|
||||
mfeatures: mfeaturesLoader.item
|
||||
}
|
||||
}
|
||||
|
||||
Loader {
|
||||
id: ldrHdrCalibrationGraph
|
||||
|
@ -704,6 +723,15 @@ FocusScope {
|
|||
checked: false
|
||||
enabled: root.aliceVisionPluginAvailable
|
||||
}
|
||||
MaterialToolButton {
|
||||
id: displayViewTimeWindow
|
||||
ToolTip.text: "Display View Time Window"
|
||||
text: MaterialIcons.collections
|
||||
font.pointSize: 11
|
||||
Layout.minimumWidth: 0
|
||||
checkable: true
|
||||
checked: false
|
||||
}
|
||||
MaterialToolButton {
|
||||
id: displayFisheyeCircleLoader
|
||||
property var activeNode: _reconstruction.activeNodes.get('PanoramaInit').node
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue