summaryrefslogtreecommitdiff
path: root/examples/multimedia/video/qmlvideofx
diff options
context:
space:
mode:
Diffstat (limited to 'examples/multimedia/video/qmlvideofx')
-rw-r--r--examples/multimedia/video/qmlvideofx/main.cpp3
-rw-r--r--examples/multimedia/video/qmlvideofx/qml/qmlvideofx/Button.qml3
-rw-r--r--examples/multimedia/video/qmlvideofx/qml/qmlvideofx/FileOpen.qml76
-rw-r--r--examples/multimedia/video/qmlvideofx/qml/qmlvideofx/Main.qml36
4 files changed, 72 insertions, 46 deletions
diff --git a/examples/multimedia/video/qmlvideofx/main.cpp b/examples/multimedia/video/qmlvideofx/main.cpp
index f221c954a..1b09f7aa4 100644
--- a/examples/multimedia/video/qmlvideofx/main.cpp
+++ b/examples/multimedia/video/qmlvideofx/main.cpp
@@ -122,7 +122,8 @@ int main(int argc, char *argv[])
viewer.setTitle("qmlvideofx");
viewer.setFlags(Qt::Window | Qt::WindowSystemMenuHint | Qt::WindowTitleHint |
Qt::WindowMinMaxButtonsHint | Qt::WindowCloseButtonHint);
- viewer.setMinimumSize(QSize(640, 360));
+ viewer.setMinimumSize(QSize(1280, 720));
+ viewer.setResizeMode(QQuickView::SizeRootObjectToView);
viewer.show();
diff --git a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/Button.qml b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/Button.qml
index dd7cca602..203352832 100644
--- a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/Button.qml
+++ b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/Button.qml
@@ -60,7 +60,6 @@ Rectangle {
Rectangle {
anchors { fill: parent; margins: 1 }
color: mouseArea.pressed ? bgColorSelected : bgColor
- radius: 0.1 * height
Text {
id: text
@@ -68,7 +67,7 @@ Rectangle {
text: root.text
anchors { fill: parent; margins: scaledMargin }
font.pixelSize: fontSize
- color: mouseArea.pressed ? bgColor : textColor
+ color: textColor
horizontalAlignment: Text.AlignLeft
verticalAlignment: Text.AlignVCenter
}
diff --git a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/FileOpen.qml b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/FileOpen.qml
index b0542cb80..a4de2cbb9 100644
--- a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/FileOpen.qml
+++ b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/FileOpen.qml
@@ -49,28 +49,40 @@ Rectangle {
signal openVideo
signal close
- Column {
- anchors.fill: parent
- spacing: 10
- Rectangle {
- height: itemHeight
- width: itemHeight
- color: "transparent"
- anchors.right: parent.right
- Image {
- id: menu
- source: "qrc:///images/icon_Menu.png"
- anchors {
- right: parent.right
- top: parent.top
- margins: scaledMargin
- }
- }
- MouseArea {
- anchors.fill: parent
- onClicked: fileOpen.state == "expanded" ? fileOpen.state = "collapsed" : fileOpen.state = "expanded"
+
+ Rectangle {
+ id: menuField
+ height: itemHeight
+ width: itemHeight
+ color: "transparent"
+ anchors.right: parent.right
+ Image {
+ id: menu
+ source: "qrc:///images/icon_Menu.png"
+ anchors {
+ right: parent.right
+ top: parent.top
+ margins: scaledMargin
}
}
+ MouseArea {
+ anchors.fill: parent
+ onClicked: fileOpen.state == "expanded" ? fileOpen.state = "collapsed" : fileOpen.state = "expanded"
+ }
+ }
+
+ Column {
+ anchors {
+ top: menuField.bottom
+ right: parent.right
+ left: parent.left
+ bottom: parent.bottom
+ topMargin: 10
+ }
+
+ spacing: 10
+ visible: fileOpen.state == "expanded"
+
Rectangle {
width: 0.9 * parent.width
height: 1
@@ -81,8 +93,10 @@ Rectangle {
text: "Start camera"
height: itemHeight
width: parent.width
- onClicked: root.openCamera()
- active: fileOpen.state == "expanded"
+ onClicked: {
+ fileOpen.state = "collapsed"
+ root.openCamera()
+ }
}
Rectangle {
width: 0.9 * parent.width
@@ -94,8 +108,10 @@ Rectangle {
text: "Open image"
height: itemHeight
width: parent.width
- onClicked: root.openImage()
- active: fileOpen.state == "expanded"
+ onClicked: {
+ fileOpen.state = "collapsed"
+ root.openImage()
+ }
}
Rectangle {
width: 0.9 * parent.width
@@ -107,8 +123,10 @@ Rectangle {
text: "Open video"
height: itemHeight
width: parent.width
- onClicked: root.openVideo()
- active: fileOpen.state == "expanded"
+ onClicked: {
+ fileOpen.state = "collapsed"
+ root.openVideo()
+ }
}
Rectangle {
width: 0.9 * parent.width
@@ -120,8 +138,10 @@ Rectangle {
text: "Reset"
height: itemHeight
width: parent.width
- onClicked: root.close()
- active: fileOpen.state == "expanded"
+ onClicked: {
+ fileOpen.state = "collapsed"
+ root.close()
+ }
}
Rectangle {
width: 0.9 * parent.width
diff --git a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/Main.qml b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/Main.qml
index 5ec13750f..e39eeafd7 100644
--- a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/Main.qml
+++ b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/Main.qml
@@ -80,7 +80,7 @@ Rectangle {
id: parameterPanel
anchors {
left: parent.left
- right: listview.left
+ right: effectName.left
bottom: parent.bottom
margins: scaledMargin
leftMargin: scaledMargin + itemHeight
@@ -88,46 +88,50 @@ Rectangle {
gripSize: d.gripSize
height: root.itemHeight * 2.5
width: root.itemWidth * 3
-
}
-
Button {
id: effectName
anchors {
right: parent.right
bottom: perfHolder.top
- top: content.bottom
margins: scaledMargin
}
text: "No effect"
width: itemWidth * 2
+ height: itemHeight
onClicked: {
effectName.visible = false
listview.visible = true
+ lvbg.visible = true
}
color: "#303030"
}
+ Rectangle {
+ id: lvbg
+ width: itemWidth * 2
+ color: "black"
+ opacity: 0.8
+ visible: false
+
+ anchors {
+ right: parent.right
+ bottom: perfHolder.top
+ top: parent.top
+ margins: scaledMargin
+ }
ListView {
id: listview
width: itemWidth * 2
- anchors {
- right: parent.right
- bottom: perfHolder.top
- top: parent.top
- margins: scaledMargin
- }
+ anchors.fill: parent
visible: false
model: EffectSelectionList {}
delegate: effectDelegate
- highlight: Rectangle { color: "#14aaff"; radius: 5 }
- highlightFollowsCurrentItem: true
- highlightRangeMode: ListView.StrictlyEnforceRange
clip: true
focus: true
@@ -139,6 +143,7 @@ Rectangle {
onClicked: {
content.effectSource = source
listview.visible = false
+ lvbg.visible = false
effectName.text = name
effectName.visible = true
parameterPanel.model = content.effect.parameters
@@ -146,6 +151,7 @@ Rectangle {
}
}
}
+ }
}
Rectangle {
@@ -213,8 +219,8 @@ Rectangle {
transitions: [
Transition {
- NumberAnimation { target: fileOpen; property: "width"; duration: 400 }
- NumberAnimation { target: fileOpen; property: "opacity"; duration: 400 }
+ NumberAnimation { target: fileOpen; property: "width"; duration: 100 }
+ NumberAnimation { target: fileOpen; property: "opacity"; duration: 100 }
}
]
}