diff options
Diffstat (limited to 'examples/video/qmlvideofx/qml/qmlvideofx')
4 files changed, 25 insertions, 11 deletions
diff --git a/examples/video/qmlvideofx/qml/qmlvideofx/FileBrowser.qml b/examples/video/qmlvideofx/qml/qmlvideofx/FileBrowser.qml index 6467ba085..abaa3b4ed 100644 --- a/examples/video/qmlvideofx/qml/qmlvideofx/FileBrowser.qml +++ b/examples/video/qmlvideofx/qml/qmlvideofx/FileBrowser.qml @@ -47,6 +47,7 @@ Rectangle { color: "transparent" property string folder + property bool shown: loader.sourceComponent signal fileSelected(string file) diff --git a/examples/video/qmlvideofx/qml/qmlvideofx/FileOpen.qml b/examples/video/qmlvideofx/qml/qmlvideofx/FileOpen.qml index 7347f7da3..39f18ff23 100644 --- a/examples/video/qmlvideofx/qml/qmlvideofx/FileOpen.qml +++ b/examples/video/qmlvideofx/qml/qmlvideofx/FileOpen.qml @@ -45,6 +45,7 @@ Rectangle { id: root color: "white" property int buttonHeight: 35 + property int topMargin: 0 signal openImage signal openVideo @@ -53,9 +54,8 @@ Rectangle { Rectangle { anchors { - topMargin: 10 - bottomMargin: 10 top: parent.top; + topMargin: root.topMargin bottom: parent.bottom; horizontalCenter: parent.horizontalCenter } diff --git a/examples/video/qmlvideofx/qml/qmlvideofx/main-largescreen.qml b/examples/video/qmlvideofx/qml/qmlvideofx/main-largescreen.qml index d7e1b12f1..246616db2 100644 --- a/examples/video/qmlvideofx/qml/qmlvideofx/main-largescreen.qml +++ b/examples/video/qmlvideofx/qml/qmlvideofx/main-largescreen.qml @@ -79,8 +79,6 @@ Rectangle { item.anchors.top = content.top item.anchors.left = content.left item.anchors.right = content.right - item.height = 100 - item.anchors.margins = 5 item.logging = root.perfMonitorsLogging item.displayed = root.perfMonitorsVisible item.init() @@ -123,6 +121,7 @@ Rectangle { margins: 5 } buttonHeight: 32 + topMargin: 10 } } diff --git a/examples/video/qmlvideofx/qml/qmlvideofx/main-smallscreen.qml b/examples/video/qmlvideofx/qml/qmlvideofx/main-smallscreen.qml index e9cf44678..91bdefe73 100644 --- a/examples/video/qmlvideofx/qml/qmlvideofx/main-smallscreen.qml +++ b/examples/video/qmlvideofx/qml/qmlvideofx/main-smallscreen.qml @@ -51,6 +51,14 @@ Rectangle { property bool perfMonitorsLogging: false property bool perfMonitorsVisible: false + QtObject { + id: d + property bool dialogShown: (fileOpenContainer.state == "shown" || + effectSelectionPanel.state == "shown" || + videoFileBrowser.shown || + imageFileBrowser.shown) + } + // Create ScreenSaver element via Loader, so this app will still run if the // SystemInfo module is not available Loader { @@ -59,18 +67,25 @@ Rectangle { Loader { id: performanceLoader + + Connections { + target: d + onDialogShownChanged: + if (performanceLoader.item) + performanceLoader.item.enabled = !d.dialogShown + ignoreUnknownSignals: true + } + function init() { console.log("[qmlvideofx] performanceLoader.init logging " + root.perfMonitorsLogging + " visible " + root.perfMonitorsVisible) var enabled = root.perfMonitorsLogging || root.perfMonitorsVisible source = enabled ? "../performancemonitor/PerformanceItem.qml" : "" } + onLoaded: { item.parent = root item.anchors.top = root.top - item.anchors.topMargin = 100 item.anchors.left = root.left - item.anchors.right = root.right - item.anchors.bottom = root.verticalCenter item.logging = root.perfMonitorsLogging item.displayed = root.perfMonitorsVisible item.init() @@ -121,8 +136,7 @@ Rectangle { } ] - enabled: false - state: enabled ? "shown" : "baseState" + state: (enabled && !d.dialogShown) ? "shown" : "baseState" } EffectSelectionPanel { @@ -295,7 +309,7 @@ Rectangle { splashScreen.state = "hidden" fileOpenContainer.state = "shown" } - enabled: (fileOpenContainer.state != "shown" && effectSelectionPanel.state != "shown") + enabled: !d.dialogShown } HintedMouseArea { @@ -313,7 +327,7 @@ Rectangle { splashScreen.state = "hidden" effectSelectionPanel.state = "shown" } - enabled: (fileOpenContainer.state != "shown" && effectSelectionPanel.state != "shown") + enabled: !d.dialogShown } Image { |