~loic.molinari/+junk/qtdeclarative-shadereffectsource-changes

« back to all changes in this revision

Viewing changes to tests/auto/quick/qquickpositioners/data/attachedproperties-column.qml

  • Committer: Loïc Molinari
  • Date: 2012-04-21 17:59:51 UTC
  • Revision ID: loic.molinari@canonical.com-20120421175951-bqx68caaf5zrp76l
Initial import

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
import QtQuick 2.0
 
2
 
 
3
Rectangle {
 
4
  width: 100
 
5
  height: 200
 
6
 
 
7
  Column {
 
8
 
 
9
    Rectangle {
 
10
      width: 100
 
11
      height: 100
 
12
      color: 'red'
 
13
      visible: false
 
14
    }
 
15
 
 
16
    Rectangle {
 
17
      objectName: "greenRect"
 
18
      width: 100
 
19
      height: 100
 
20
      color: 'green'
 
21
      property int posIndex: Positioner.index
 
22
      property bool isFirstItem: Positioner.isFirstItem
 
23
      property bool isLastItem: Positioner.isLastItem
 
24
    }
 
25
 
 
26
    Rectangle {
 
27
      width: 100
 
28
      height: 100
 
29
      color: 'blue'
 
30
      visible: false
 
31
    }
 
32
 
 
33
    Rectangle {
 
34
      objectName: "yellowRect"
 
35
      width: 100
 
36
      height: 100
 
37
      color: 'yellow'
 
38
 
 
39
      property int posIndex: -1
 
40
      property bool isFirstItem: false
 
41
      property bool isLastItem: false
 
42
 
 
43
      function onDemandPositioner() {
 
44
        posIndex = Positioner.index;
 
45
        isFirstItem = Positioner.isFirstItem
 
46
        isLastItem = Positioner.isLastItem
 
47
      }
 
48
    }
 
49
  }
 
50
}