35
35
property var dragHandle
37
37
property bool stretch: false
38
38
property real hintDisplacement: 0
41
onDragHandleRecognizedGesture: { root.dragHandle = dragHandle }
43
hintDisplacement: root.hintDisplacement
47
onDragHandleRecognizedGesture: { root.dragHandle = dragHandle }
49
hintDisplacement: root.hintDisplacement
52
// Visually mark drag threshold
58
visible: dragHandle !== undefined && Direction.isHorizontal(dragHandle.direction)
62
if (dragHandle.direction === Direction.Rightwards) {
63
dragHandle.edgeDragEvaluator.dragThreshold;
42
objectName: "baseItem"
46
onDragHandleRecognizedGesture: { root.dragHandle = dragHandle }
48
hintDisplacement: root.hintDisplacement
52
onDragHandleRecognizedGesture: { root.dragHandle = dragHandle }
54
hintDisplacement: root.hintDisplacement
57
// Visually mark drag threshold
63
visible: dragHandle !== undefined && Direction.isHorizontal(dragHandle.direction)
67
if (dragHandle.direction === Direction.Rightwards) {
68
dragHandle.edgeDragEvaluator.dragThreshold;
70
parent.width - dragHandle.edgeDragEvaluator.dragThreshold;
65
parent.width - dragHandle.edgeDragEvaluator.dragThreshold;
77
visible: dragHandle !== undefined && Direction.isVertical(dragHandle.direction)
81
if (dragHandle.direction === Direction.Downwards) {
82
dragHandle.edgeDragEvaluator.dragThreshold;
82
visible: dragHandle !== undefined && Direction.isVertical(dragHandle.direction)
86
if (dragHandle.direction === Direction.Downwards) {
87
dragHandle.edgeDragEvaluator.dragThreshold;
89
parent.height - dragHandle.edgeDragEvaluator.dragThreshold;
84
parent.height - dragHandle.edgeDragEvaluator.dragThreshold;
124
129
anchors.bottom: parent.bottom
125
130
anchors.left: parent.left
126
131
anchors.margins: units.gu(1)
128
text: root.stretch ? "stretch" : "move"
129
onClicked: { root.stretch = !root.stretch; }
133
anchors.bottom: parent.bottom
134
anchors.left: stretchButton.right
135
anchors.margins: units.gu(1)
137
text: root.hintDisplacement > 0 ? "hint" : "no hint"
139
if (root.hintDisplacement > 0) {
140
root.hintDisplacement = 0;
142
root.hintDisplacement = units.gu(6);
136
text: root.stretch ? "stretch" : "move"
137
onClicked: { root.stretch = !root.stretch; }
141
text: root.hintDisplacement > 0 ? "hint" : "no hint"
143
if (root.hintDisplacement > 0) {
144
root.hintDisplacement = 0;
146
root.hintDisplacement = units.gu(6);
152
text: "rotation: " + baseItem.rotation
154
if (baseItem.rotation === 0.0) {
155
baseItem.rotation = 90.0
157
baseItem.rotation = 0.0