aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qmlcppcodegen/data/Variable.qml
blob: f5af97757f18c8362c30d4a641d82a68744ad5f5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
pragma Strict
import QtQml

QtObject {
    id: variable
    property int value: 0
    property int mark: 0
    property BaseConstraint determinedBy: null
    property list<BaseConstraint> constraints: [
        BaseConstraint {
            satisfaction: variable.value == 0 ? Satisfaction.NONE : Satisfaction.FORWARD
        }
    ]

    function length(): int {
        return constraints.length
    }

    function constraint(i: int) : BaseConstraint {
        return constraints[i];
    }
}