1import QtQuick 2.4 2import QtQuick.Controls 1.1 3 4import "videoitem" 5 6ApplicationWindow { 7 visible: true 8 9 minimumWidth: videowall.cellWidth * Math.sqrt(videowall.model.length) + videowall.leftMargin 10 minimumHeight: videowall.cellHeight * Math.sqrt(videowall.model.length) + 32 11 maximumWidth: minimumWidth 12 maximumHeight: minimumHeight 13 14 GridView { 15 id: videowall 16 leftMargin: 10 17 model: patterns 18 anchors.fill: parent 19 cellWidth: 500 20 cellHeight: 500 21 delegate: Rectangle { 22 border.color: "darkgray" 23 width: videowall.cellWidth - 10 24 height: videowall.cellHeight - 10 25 radius: 3 26 Label { 27 anchors.centerIn: parent 28 text: "No signal" 29 } 30 Loader { 31 active: playing.checked 32 anchors.fill: parent 33 anchors.margins: 1 34 sourceComponent: VideoItem { 35 id: player 36 source: playing.checked ? modelData : "" 37 } 38 } 39 Row { 40 anchors.margins: 1 41 id: controls 42 height: 32 43 spacing: 10 44 Button { 45 id: playing 46 checkable: true 47 checked: true 48 width: height 49 height: controls.height 50 text: index 51 } 52 Label { 53 verticalAlignment: Qt.AlignVCenter 54 height: controls.height 55 text: modelData 56 } 57 } 58 } 59 } 60} 61