~nick-dedekind/unity8/indicators.hint-interval

« back to all changes in this revision

Viewing changes to tests/plugins/Ubuntu/Gestures/tst_DirectionalDragArea.qml

  • Committer: Nick Dedekind
  • Date: 2014-03-07 15:54:57 UTC
  • mfrom: (638.1.118 unity8)
  • Revision ID: nicholas.dedekind@gmail.com-20140307155457-f0s1zu5ll2czt3rq
merged with trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
import Ubuntu.Components 0.1
19
19
 
20
20
Rectangle {
21
 
    width: units.gu(40)
22
 
    height: units.gu(71)
 
21
    width: units.gu(60)
 
22
    height: units.gu(60)
23
23
    color: "white"
24
24
 
25
25
    MouseArea {
33
33
        }
34
34
    }
35
35
 
36
 
    // NB: Do not anchor it as we will move it programmatically from the test
37
 
    RightwardsLauncher {
38
 
        id: hpLauncher;
 
36
    Item {
 
37
        id: baseItem
 
38
        objectName: "baseItem"
39
39
        width: parent.width
40
40
        height: parent.height
41
 
    }
42
 
 
43
 
    LeftwardsLauncher { id: hnLauncher; anchors.fill: parent }
44
 
    DownwardsLauncher { id: vpLauncher; anchors.fill: parent }
45
 
    UpwardsLauncher { id: vnLauncher; anchors.fill: parent }
 
41
 
 
42
        // NB: Do not anchor it as we will move it programmatically from the test
 
43
        RightwardsLauncher {
 
44
            id: hpLauncher;
 
45
            width: parent.width
 
46
            height: parent.height
 
47
        }
 
48
 
 
49
        LeftwardsLauncher { id: hnLauncher; anchors.fill: parent }
 
50
        DownwardsLauncher { id: vpLauncher; anchors.fill: parent }
 
51
        UpwardsLauncher { id: vnLauncher; anchors.fill: parent }
 
52
    }
 
53
 
 
54
    Button {
 
55
        anchors.bottom: parent.bottom
 
56
        anchors.left: parent.left
 
57
        anchors.margins: units.gu(1)
 
58
 
 
59
        text: "rotation: " + baseItem.rotation
 
60
        onClicked: {
 
61
            if (baseItem.rotation === 0.0) {
 
62
                baseItem.rotation = 90.0
 
63
            } else {
 
64
                baseItem.rotation = 0.0
 
65
            }
 
66
        }
 
67
    }
46
68
}