Express qmlvideofx effect parameters declaratively

Each effect item now exposes a ListModel property which describes the
set of user-controllable parameters.  This model is used by the
ParameterPanel component to generate a ListView whose delegate displays
the parameter name and a slider.

Change-Id: Ib26877fe434d8b746ef621e0b4adbcbe1ed9aaa8
Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
This commit is contained in:
Gareth Stockwell
2011-12-20 13:51:34 +00:00
committed by Qt by Nokia
parent febe398400
commit 9092b1ae46
29 changed files with 225 additions and 222 deletions

View File

@@ -94,15 +94,12 @@ Rectangle {
ParameterPanel {
id: parameterPanel
enabled: numParameters >= 1
numParameters: content.effect ? content.effect.numParameters : 0
anchors {
top: content.bottom
left: parent.left
bottom: parent.bottom
right: effectSelectionPanel.left
margins: 20
}
width: content.width
onParam1ValueChanged: updateParameters()
}
EffectSelectionPanel {
@@ -117,7 +114,7 @@ Rectangle {
itemHeight: 40
onEffectSourceChanged: {
content.effectSource = effectSource
updateParameters()
parameterPanel.model = content.effect.parameters
}
}
@@ -160,11 +157,6 @@ Rectangle {
performanceLoader.item.qmlFramePainted()
}
function updateParameters() {
if (content.effect.numParameters >= 1)
content.effect.param1Value = parameterPanel.param1Value
}
function openImage() {
d.openFileType = "image"
showFileBrowser("../../images")