forked from wang-bin/QtAV
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
examples/QMLPlayer: add video effects
- Loading branch information
Showing
9 changed files
with
237 additions
and
42 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,12 +19,12 @@ Page { | |
font.pixelSize: Utils.scaled(15) | ||
onContentHeightChanged: parent.contentHeight = contentHeight + 2*anchors.margins | ||
onLinkActivated: Qt.openUrlExternally(link) | ||
text: "<img src='qrc:/QtAV.svg'><h3>QMLPlayer for " + Qt.platform.os + " " + qsTr("based on") + " QtAV 1.10.0</h3>" | ||
text: "<img src='qrc:/QtAV.svg'><h3>QMLPlayer for " + Qt.platform.os + " " + qsTr("based on") + " QtAV 1.11.0</h3>" | ||
+ "<p>" + qsTr("QtAV is a cross platform, high performance multimedia framework") + "</p>" | ||
+ "<p>Distributed under the terms of LGPLv2.1 or later.</p>" | ||
+ "<p>Copyright (C) 2012-2016 Wang Bin (aka. Lucas Wang) <a href='mailto:[email protected]'>[email protected]</a></p><p>" | ||
+ qsTr("Home page") + ": <a href='http://qtav.org'>http://qtav.org</a></p>" | ||
+ "<p><a href='http://qtav.org/install.html'>"+qsTr("Install QtAV for Windows desktop/store, OSX, Linux and Android")+"</a></p>" | ||
+ "<p><a href='http://qtav.org/install.html'>"+qsTr("Install QtAV for Windows desktop/store, macOS, Linux and Android")+"</a></p>" | ||
+ "\n<p>" + qsTr("Double click") + ": " + qsTr("show/hide control bar") + "</p><p>" | ||
+ qsTr("Click right area") + ": " + qsTr("show config panel") + "</p><p>" | ||
+ qsTr("Open") + " " + qsTr("a subtitle") + ": " + qsTr("press open button to select a subtitle, or a video + a subtitle") + "</p>" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,129 @@ | ||
import QtQuick 2.0 | ||
import "utils.js" as Utils | ||
|
||
Page { | ||
id: root | ||
title: qsTr("Effect") | ||
property alias brightness : brightnessControl.value | ||
property alias contrast : contrastControl.value | ||
property alias hue: hueControl.value | ||
property alias saturation: saturationControl.value | ||
height: Math.min(maxHeight, scroll.contentHeight) | ||
Flickable { | ||
id: scroll | ||
anchors.fill: content | ||
contentHeight: titleHeight + brightnessControl.height + brightnessControl.height | ||
+ hueControl.height + saturationControl.height | ||
+ Utils.kItemHeight | ||
+ Utils.kSpacing*6 | ||
Column { | ||
anchors.fill: parent | ||
spacing: Utils.kSpacing | ||
Item { | ||
width: parent.width | ||
height: Utils.scaled(40) | ||
Text { | ||
color: "white" | ||
text: qsTr("Brightness") | ||
font.pixelSize: Utils.kFontSize | ||
anchors.left: parent.left | ||
height: parent.height | ||
verticalAlignment: Text.AlignVCenter | ||
} | ||
Slider { | ||
id: brightnessControl | ||
lineColor: "gray" | ||
anchors.right: parent.right | ||
width: parent.width*3/4 | ||
height: parent.height | ||
value: 0 | ||
min: -1 | ||
max: 1 | ||
orientation: Qt.Horizontal | ||
} | ||
} | ||
Item { | ||
width: parent.width | ||
height: Utils.scaled(40) | ||
Text { | ||
color: "white" | ||
text: qsTr("Contrast") | ||
font.pixelSize: Utils.kFontSize | ||
anchors.left: parent.left | ||
height: parent.height | ||
verticalAlignment: Text.AlignVCenter | ||
} | ||
Slider { | ||
id: contrastControl | ||
lineColor: "#ccddeeff" | ||
anchors.right: parent.right | ||
width: parent.width*3/4 | ||
height: parent.height | ||
value: 0 | ||
min: -1 | ||
max: 1 | ||
orientation: Qt.Horizontal | ||
} | ||
} | ||
Item { | ||
width: parent.width | ||
height: Utils.scaled(40) | ||
Text { | ||
color: "white" | ||
text: qsTr("Hue") | ||
font.pixelSize: Utils.kFontSize | ||
anchors.left: parent.left | ||
height: parent.height | ||
verticalAlignment: Text.AlignVCenter | ||
} | ||
Slider { | ||
id: hueControl | ||
lineColor: "#eebb8899" | ||
anchors.right: parent.right | ||
width: parent.width*3/4 | ||
height: parent.height | ||
value: 0 | ||
min: -1 | ||
max: 1 | ||
orientation: Qt.Horizontal | ||
} | ||
} | ||
Item { | ||
width: parent.width | ||
height: Utils.scaled(40) | ||
Text { | ||
color: "white" | ||
text: qsTr("Saturation") | ||
font.pixelSize: Utils.kFontSize | ||
anchors.left: parent.left | ||
height: parent.height | ||
verticalAlignment: Text.AlignVCenter | ||
} | ||
Slider { | ||
id: saturationControl | ||
lineColor: "#ee88ccaa" | ||
anchors.right: parent.right | ||
width: parent.width*3/4 | ||
height: parent.height | ||
value: 0 | ||
min: -1 | ||
max: 1 | ||
orientation: Qt.Horizontal | ||
} | ||
} | ||
|
||
Button { | ||
text: qsTr("Reset") | ||
bgColor: "#990000ff" | ||
width: parent.width/4 | ||
height: Utils.kItemHeight | ||
onClicked: { | ||
brightness = 0 | ||
contrast = 0 | ||
hue = 0 | ||
saturation = 0 | ||
} | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.