EffectsListView.qml 709 Bytes
Newer Older
luyikei's avatar
luyikei committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
import QtQuick 2.0
import QtQuick.Controls 1.4

Rectangle {
    anchors.fill: parent
    color: "#999999"

    ListModel {
        id: effects
    }

    Component.onCompleted: {
        var effectsInfo = view.effects();
        for ( var i = 0; i < effectsInfo.length; ++i ) {
            effects.append( effectsInfo[i] );
        }
    }

    ScrollView {
        id: sView
        height: parent.height
        width: parent.width

        ListView {
            width: sView.viewport.width
            model: effects
            delegate: Effect {
                identifier: model.identifier
                name: model.name
                description: model.description
            }
        }
    }
}