C++ Backend Charts Demo App
import QtQuick 2.1
Item {
id: root
anchors.fill: parent
property int itemWidth: dp(60)
property int itemHeight: dp(36)
property int scaledMargin: dp(4)
property int fontSize: sp(12)
readonly property real gripSize: dp(20)
property VideoFXEffect targetEffect
readonly property real parameterPanelHeight: parameterPanel.height + 2 * scaledMargin
signal effectLoaded(string name, string source)
Rectangle {
color: "black"
width: parent.width
anchors.bottom: parent.bottom
height: parameterPanelHeight
}
ParameterPanel {
id: parameterPanel
anchors {
left: parent.left
right: effectName.left
bottom: parent.bottom
margins: scaledMargin
}
gripSize: root.gripSize
}
Button {
id: effectName
anchors {
right: parent.right
bottom: parent.bottom
margins: scaledMargin
}
text: "No effect"
width: itemWidth * 2
height: itemHeight
onClicked: {
effectName.visible = false
listview.visible = true
lvbg.visible = true
}
color: "#303030"
}
Rectangle {
id: lvbg
width: itemWidth * 2
height: Math.min(parent.height, listview.contentHeight)
color: "black"
opacity: 0.8
visible: false
anchors {
right: parent.right
bottom: parent.bottom
margins: scaledMargin
}
ListView {
id: listview
width: itemWidth * 2
height: parent.height
anchors.bottom: parent.bottom
visible: false
model: EffectSelectionList {}
delegate: effectDelegate
clip: true
focus: true
Component {
id: effectDelegate
Button {
text: name
width: itemWidth * 2
onClicked: loadEffect(name, source)
}
}
}
}
function loadEffect(name, source) {
targetEffect.effectSource = source
listview.visible = false
lvbg.visible = false
effectName.text = name
effectName.visible = true
parameterPanel.model = targetEffect.effect.parameters