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,14 +42,15 @@
|
||||
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: "granularity"
|
||||
value: 0.5
|
||||
}
|
||||
}
|
||||
|
||||
property real param1Value: 0.5
|
||||
property real dividerValue: 0.5
|
||||
|
||||
property real granularity: param1Value * 20
|
||||
// Transform slider values, and bind result to shader uniforms
|
||||
property real granularity: parameters.get(0).value * 20
|
||||
|
||||
fragmentShaderFilename: "shaders/pixelate.fsh"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user