mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-06-06 21:01:59 +02:00
[Panorama Viewer] add Panorama Viewer toolbar
Add two icons in material icons Update icon of viewer Add downscale value as spinbox Add 3 buttons for options in viewer
This commit is contained in:
parent
5aa54abd96
commit
e7941ef75e
4 changed files with 122 additions and 1 deletions
|
@ -660,6 +660,8 @@ QtObject {
|
||||||
readonly property string panorama_fish_eye: "\ue40c"
|
readonly property string panorama_fish_eye: "\ue40c"
|
||||||
readonly property string panorama_horizontal: "\ue40d"
|
readonly property string panorama_horizontal: "\ue40d"
|
||||||
readonly property string panorama_vertical: "\ue40e"
|
readonly property string panorama_vertical: "\ue40e"
|
||||||
|
readonly property string panorama_sphere: "\ue9c9"
|
||||||
|
readonly property string panorama_sphere_filled: "\ue9ca"
|
||||||
readonly property string panorama_wide_angle: "\ue40f"
|
readonly property string panorama_wide_angle: "\ue40f"
|
||||||
readonly property string party_mode: "\ue7fa"
|
readonly property string party_mode: "\ue7fa"
|
||||||
readonly property string pause: "\ue034"
|
readonly property string pause: "\ue034"
|
||||||
|
|
105
meshroom/ui/qml/Viewer/PanoramaToolbar.qml
Normal file
105
meshroom/ui/qml/Viewer/PanoramaToolbar.qml
Normal file
|
@ -0,0 +1,105 @@
|
||||||
|
import QtQuick 2.11
|
||||||
|
import QtQuick.Controls 2.0
|
||||||
|
import QtQuick.Layouts 1.3
|
||||||
|
import MaterialIcons 2.2
|
||||||
|
import Controls 1.0
|
||||||
|
import Utils 1.0
|
||||||
|
|
||||||
|
FloatingPane {
|
||||||
|
id: root
|
||||||
|
anchors.margins: 0
|
||||||
|
padding: 5
|
||||||
|
radius: 0
|
||||||
|
|
||||||
|
property bool enableEdit: enablePanoramaEdit.checked
|
||||||
|
property bool enableHover: enableHover.checked
|
||||||
|
|
||||||
|
property int downscaleDefaultValue: 2
|
||||||
|
|
||||||
|
background: Rectangle { color: root.palette.window }
|
||||||
|
|
||||||
|
DoubleValidator {
|
||||||
|
id: doubleValidator
|
||||||
|
locale: 'C' // use '.' decimal separator disregarding of the system locale
|
||||||
|
}
|
||||||
|
|
||||||
|
RowLayout {
|
||||||
|
id: toolLayout
|
||||||
|
anchors.fill: parent
|
||||||
|
|
||||||
|
MaterialToolButton {
|
||||||
|
id: enablePanoramaEdit
|
||||||
|
ToolTip.text: "Enable Panorama edition"
|
||||||
|
text: MaterialIcons.open_with
|
||||||
|
font.pointSize: 14
|
||||||
|
padding: 5
|
||||||
|
Layout.minimumWidth: 0
|
||||||
|
checkable: true
|
||||||
|
checked: true
|
||||||
|
}
|
||||||
|
MaterialToolButton {
|
||||||
|
id: enableHover
|
||||||
|
ToolTip.text: "Enable hovering highlight"
|
||||||
|
text: MaterialIcons.highlight
|
||||||
|
font.pointSize: 14
|
||||||
|
padding: 5
|
||||||
|
Layout.minimumWidth: 0
|
||||||
|
checkable: true
|
||||||
|
checked: true
|
||||||
|
}
|
||||||
|
MaterialToolButton {
|
||||||
|
id: displayGrid
|
||||||
|
ToolTip.text: "Display grid"
|
||||||
|
text: MaterialIcons.grid_on
|
||||||
|
font.pointSize: 14
|
||||||
|
padding: 5
|
||||||
|
Layout.minimumWidth: 0
|
||||||
|
checkable: true
|
||||||
|
checked: true
|
||||||
|
}
|
||||||
|
//Fill rectangle to have a better UI
|
||||||
|
Rectangle {
|
||||||
|
color: root.palette.window
|
||||||
|
Layout.fillWidth: true
|
||||||
|
}
|
||||||
|
RowLayout{
|
||||||
|
ToolButton {
|
||||||
|
text: "Downscale"
|
||||||
|
|
||||||
|
ToolTip.visible: ToolTip.text && hovered
|
||||||
|
ToolTip.delay: 100
|
||||||
|
ToolTip.text: "Reset the downscale"
|
||||||
|
|
||||||
|
onClicked: {
|
||||||
|
downscaleSpinBox.value = downscaleDefaultValue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
SpinBox {
|
||||||
|
id: downscaleSpinBox
|
||||||
|
from: 0
|
||||||
|
value: 2
|
||||||
|
to: 3
|
||||||
|
stepSize: 1
|
||||||
|
Layout.fillWidth: false
|
||||||
|
|
||||||
|
|
||||||
|
validator: DoubleValidator {
|
||||||
|
bottom: Math.min(downscaleSpinBox.from, downscaleSpinBox.to)
|
||||||
|
top: Math.max(downscaleSpinBox.from, downscaleSpinBox.to)
|
||||||
|
}
|
||||||
|
|
||||||
|
textFromValue: function(value, locale) {
|
||||||
|
if(value === 0){
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
return "1/" + Math.pow(2,value).toString()
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -186,6 +186,13 @@ FocusScope {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
PanoramaToolbar {
|
||||||
|
id: panoramaViewerToolbar
|
||||||
|
anchors.margins: 0
|
||||||
|
visible: displayPanoramaToolBarAction.checked && displayPanoramaToolBarAction.enabled
|
||||||
|
Layout.fillWidth: true
|
||||||
|
}
|
||||||
|
|
||||||
// Image
|
// Image
|
||||||
Item {
|
Item {
|
||||||
id: imgLayout
|
id: imgLayout
|
||||||
|
@ -700,7 +707,7 @@ FocusScope {
|
||||||
property bool isComputed: activeNode && activeNode.isComputed
|
property bool isComputed: activeNode && activeNode.isComputed
|
||||||
|
|
||||||
ToolTip.text: "Panorama Viewer"
|
ToolTip.text: "Panorama Viewer"
|
||||||
text: MaterialIcons.panorama_wide_angle
|
text: MaterialIcons.panorama_sphere
|
||||||
font.pointSize: 16
|
font.pointSize: 16
|
||||||
padding: 0
|
padding: 0
|
||||||
Layout.minimumWidth: 0
|
Layout.minimumWidth: 0
|
||||||
|
|
|
@ -112,6 +112,13 @@ Item {
|
||||||
checked: true
|
checked: true
|
||||||
enabled: viewer2D.useLensDistortionViewer
|
enabled: viewer2D.useLensDistortionViewer
|
||||||
}
|
}
|
||||||
|
Action {
|
||||||
|
id: displayPanoramaToolBarAction
|
||||||
|
text: "Display Panorama Toolbar"
|
||||||
|
checkable: true
|
||||||
|
checked: true
|
||||||
|
enabled: viewer2D.usePanoramaViewer
|
||||||
|
}
|
||||||
Action {
|
Action {
|
||||||
id: displayImagePathAction
|
id: displayImagePathAction
|
||||||
text: "Display Image Path"
|
text: "Display Image Path"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue