mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-05-18 03:26:30 +02:00
[ui] add string <--> file representation convertors
* convenient methods to conform strings to Qt file reprensentation using the "file:/" protocol prefix * use those methodes when manipulating files
This commit is contained in:
parent
62726b4663
commit
2cdc83f06f
7 changed files with 38 additions and 6 deletions
|
@ -2,12 +2,13 @@ import QtQuick 2.7
|
|||
import QtQuick.Controls 2.0
|
||||
import QtQuick.Layouts 1.3
|
||||
import MaterialIcons 2.2
|
||||
import Utils 1.0
|
||||
|
||||
FocusScope {
|
||||
id: root
|
||||
|
||||
clip: true
|
||||
property alias source: image.source
|
||||
property string source
|
||||
property var metadata
|
||||
|
||||
// slots
|
||||
|
@ -48,6 +49,7 @@ FocusScope {
|
|||
fillMode: Image.PreserveAspectFit
|
||||
autoTransform: true
|
||||
onWidthChanged: if(status==Image.Ready) fit()
|
||||
source: Filepath.stringToFile(root.source)
|
||||
onStatusChanged: {
|
||||
// update cache source when image is loaded
|
||||
if(status === Image.Ready)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue