ParameterPanel.qml Example File
multimedia/video/qmlvideofx/qml/qmlvideofx/ParameterPanel.qml
import QtQuick 2.0
Rectangle {
id: root
color: "transparent"
height: view.model.count * sliderHeight
property color lineColor: "black"
property real gripSize: 25
property real spacing: 20
property real sliderHeight: 60
property ListModel model: ListModel { }
anchors.topMargin: 10
Component {
id: editDelegate
Rectangle {
id: delegate
width: parent.width
height: root.sliderHeight
color: "transparent"
Text {
id: text
text: name
color: "white"
anchors {
top: parent.top
bottom: parent.bottom
left: parent.left
}
font.pixelSize: fontSize
horizontalAlignment: Text.AlignRight
verticalAlignment: Text.AlignVCenter
width: 8 * fontSize
}
Slider {
anchors {
top: parent.top
bottom: parent.bottom
left: text.right
leftMargin: 20
right: parent.right
rightMargin: 20
}
gripSize: root.gripSize
value: model.value
onValueChanged: view.model.setProperty(index, "value", value)
}
}
}
ListView {
id: view
anchors.fill: parent
model: root.model
delegate: editDelegate
interactive: false
}
}