mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-06-12 15:52:07 +02:00
[ui] Viewer2D: display image source path
* display selectable-by-mouse source filepath * add radius property to FloatingPane to control border radius from outside * use FloatingPane in ImageMetadataView
This commit is contained in:
parent
b81cf89ffe
commit
cfaa0bc012
3 changed files with 27 additions and 13 deletions
|
@ -10,8 +10,9 @@ Pane {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
property bool opaque: false
|
property bool opaque: false
|
||||||
|
property int radius: 1
|
||||||
|
|
||||||
padding: 6
|
padding: 6
|
||||||
anchors.margins: 2
|
anchors.margins: 2
|
||||||
background: Rectangle { color: root.palette.base; opacity: opaque ? 1.0 : 0.7; radius: 1 }
|
background: Rectangle { color: root.palette.base; opacity: opaque ? 1.0 : 0.7; radius: root.radius }
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,7 +11,7 @@ import Utils 1.0
|
||||||
/**
|
/**
|
||||||
* ImageMetadataView displays a JSON model representing an image"s metadata as a ListView.
|
* ImageMetadataView displays a JSON model representing an image"s metadata as a ListView.
|
||||||
*/
|
*/
|
||||||
Pane {
|
FloatingPane {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
property alias metadata: metadataModel.metadata
|
property alias metadata: metadataModel.metadata
|
||||||
|
@ -22,8 +22,6 @@ Pane {
|
||||||
|
|
||||||
SystemPalette { id: palette }
|
SystemPalette { id: palette }
|
||||||
|
|
||||||
background: Rectangle { color: palette.window; opacity: 0.9 }
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Convert GPS metadata to degree coordinates.
|
* Convert GPS metadata to degree coordinates.
|
||||||
*
|
*
|
||||||
|
|
|
@ -2,7 +2,8 @@ import QtQuick 2.7
|
||||||
import QtQuick.Controls 2.0
|
import QtQuick.Controls 2.0
|
||||||
import QtQuick.Layouts 1.3
|
import QtQuick.Layouts 1.3
|
||||||
import MaterialIcons 2.2
|
import MaterialIcons 2.2
|
||||||
import Utils 1.0
|
|
||||||
|
import Controls 1.0
|
||||||
|
|
||||||
FocusScope {
|
FocusScope {
|
||||||
id: root
|
id: root
|
||||||
|
@ -115,14 +116,30 @@ FocusScope {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
FloatingPane {
|
||||||
|
id: topToolbar
|
||||||
|
width: parent.width
|
||||||
|
radius: 0
|
||||||
|
padding: 4
|
||||||
|
// selectable filepath to source image
|
||||||
|
TextField {
|
||||||
|
width: parent.width
|
||||||
|
padding: 0
|
||||||
|
background: Item {}
|
||||||
|
font.pointSize: 8
|
||||||
|
readOnly: true
|
||||||
|
selectByMouse: true
|
||||||
|
text: Filepath.urlToString(source)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Image Metadata overlay Pane
|
// Image Metadata overlay Pane
|
||||||
ImageMetadataView {
|
ImageMetadataView {
|
||||||
width: 350
|
width: 350
|
||||||
anchors {
|
anchors {
|
||||||
top: parent.top
|
top: topToolbar.bottom
|
||||||
right: parent.right
|
right: parent.right
|
||||||
bottom: bottomToolbar.top
|
bottom: bottomToolbar.top
|
||||||
margins: 2
|
|
||||||
}
|
}
|
||||||
|
|
||||||
visible: metadataCB.checked
|
visible: metadataCB.checked
|
||||||
|
@ -130,15 +147,13 @@ FocusScope {
|
||||||
metadata: visible ? root.metadata : {}
|
metadata: visible ? root.metadata : {}
|
||||||
}
|
}
|
||||||
|
|
||||||
Pane {
|
FloatingPane {
|
||||||
id: bottomToolbar
|
id: bottomToolbar
|
||||||
anchors.bottom: parent.bottom
|
anchors.bottom: parent.bottom
|
||||||
|
anchors.margins: 0
|
||||||
width: parent.width
|
width: parent.width
|
||||||
padding: 2
|
topPadding: 2
|
||||||
leftPadding: 4
|
bottomPadding: topPadding
|
||||||
rightPadding: leftPadding
|
|
||||||
|
|
||||||
background: Rectangle { color: palette.base; opacity: 0.6 }
|
|
||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue