mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-05-22 13:36:31 +02:00
[ui] specify keys for DropAreas
This commit is contained in:
parent
1e462d94de
commit
014c1fe25f
3 changed files with 5 additions and 1 deletions
|
@ -51,7 +51,7 @@ RowLayout {
|
||||||
property bool acceptableDrop: false
|
property bool acceptableDrop: false
|
||||||
|
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
keys: [dragTarget.objectName]
|
||||||
onEntered: {
|
onEntered: {
|
||||||
// Filter drops:
|
// Filter drops:
|
||||||
if( drag.source.objectName != dragTarget.objectName // not an edge connector
|
if( drag.source.objectName != dragTarget.objectName // not an edge connector
|
||||||
|
@ -81,6 +81,7 @@ RowLayout {
|
||||||
//anchors.verticalCenter: root.verticalCenter
|
//anchors.verticalCenter: root.verticalCenter
|
||||||
width: 2
|
width: 2
|
||||||
height: 2
|
height: 2
|
||||||
|
Drag.keys: [dragTarget.objectName]
|
||||||
Drag.active: connectMA.drag.active
|
Drag.active: connectMA.drag.active
|
||||||
Drag.hotSpot.x: width*0.5
|
Drag.hotSpot.x: width*0.5
|
||||||
Drag.hotSpot.y: height*0.5
|
Drag.hotSpot.y: height*0.5
|
||||||
|
|
|
@ -132,6 +132,7 @@ Panel {
|
||||||
id: dropArea
|
id: dropArea
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
enabled: !root.readOnly
|
enabled: !root.readOnly
|
||||||
|
keys: ["text/uri-list"]
|
||||||
// TODO: onEntered: call specific method to filter files based on extension
|
// TODO: onEntered: call specific method to filter files based on extension
|
||||||
onDropped: {
|
onDropped: {
|
||||||
var augmentSfm = augmentArea.hovered
|
var augmentSfm = augmentArea.hovered
|
||||||
|
|
|
@ -100,6 +100,7 @@ Item {
|
||||||
|
|
||||||
DropArea {
|
DropArea {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
keys: ["text/uri-list"]
|
||||||
onDropped: {
|
onDropped: {
|
||||||
viewer2D.source = drop.urls[0]
|
viewer2D.source = drop.urls[0]
|
||||||
viewer2D.metadata = {}
|
viewer2D.metadata = {}
|
||||||
|
@ -124,6 +125,7 @@ Item {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
DropArea {
|
DropArea {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
keys: ["text/uri-list"]
|
||||||
onDropped: load3DMedia(drop.urls[0])
|
onDropped: load3DMedia(drop.urls[0])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue