Warning, /education/gcompris/external/qml-box2d/examples/demolition/Building.qml is written in an unsupported language. File is not indexed.

0001 import QtQuick 2.0
0002 
0003 Repeater {
0004     id: building
0005 
0006     property int floors: 3
0007     property int stairways: 3
0008 
0009     property int blockWidth: 20
0010     property int blockHeight: 20
0011 
0012     width: stairways * blockWidth
0013     height: floors * blockHeight
0014 
0015     model: floors * stairways
0016 
0017     delegate: WoodenBox {
0018         x: building.x + index % stairways * width
0019         y: building.y + Math.floor(index / stairways) * height;
0020 
0021         width: blockWidth
0022         height: blockHeight
0023     }
0024 }