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:
committed by
Qt by Nokia
parent
febe398400
commit
9092b1ae46
@@ -42,15 +42,16 @@
|
||||
import QtQuick 2.0
|
||||
|
||||
Effect {
|
||||
// Constant properties which must be supported by every effect
|
||||
property int numParameters: 1
|
||||
property bool supportsDivider: true
|
||||
parameters: ListModel {
|
||||
ListElement {
|
||||
name: "threshold"
|
||||
value: 0.5
|
||||
}
|
||||
}
|
||||
|
||||
property real param1Value: 0.5
|
||||
property real dividerValue: 0.5
|
||||
|
||||
property real threshold: param1Value
|
||||
property real targetSize: 250 - (200 * param1Value) // TODO: fix ...
|
||||
// Transform slider values, and bind result to shader uniforms
|
||||
property real threshold: parameters.get(0).value
|
||||
property real targetSize: 250 - (200 * threshold) // TODO: fix ...
|
||||
property real resS: targetSize
|
||||
property real resT: targetSize
|
||||
|
||||
|
||||
Reference in New Issue
Block a user