| 1 |
import QtQuick 2.9 |
| 2 |
import QtQuick.Shapes 1.0 |
| 3 |
|
| 4 |
Item { |
| 5 |
width: 320 |
| 6 |
height: 480 |
| 7 |
|
| 8 |
Column { |
| 9 |
Item { |
| 10 |
width: 200 |
| 11 |
height: 100 |
| 12 |
|
| 13 |
Repeater { |
| 14 |
model: 2 |
| 15 |
Shape { |
| 16 |
anchors.fill: parent |
| 17 |
vendorExtensionsEnabled: false |
| 18 |
|
| 19 |
ShapePath { |
| 20 |
fillColor: "transparent" |
| 21 |
strokeColor: model.index === 0 ? "red" : "blue" |
| 22 |
strokeStyle: ShapePath.DashLine |
| 23 |
strokeWidth: 4 |
| 24 |
|
| 25 |
startX: 4; startY: 4 |
| 26 |
PathArc { |
| 27 |
id: arc |
| 28 |
x: 96; y: 96 |
| 29 |
radiusX: 100; radiusY: 100 |
| 30 |
direction: model.index === 0 ? PathArc.Clockwise : PathArc.Counterclockwise |
| 31 |
} |
| 32 |
} |
| 33 |
} |
| 34 |
} |
| 35 |
} |
| 36 |
|
| 37 |
Item { |
| 38 |
width: 200 |
| 39 |
height: 100 |
| 40 |
|
| 41 |
Repeater { |
| 42 |
model: 2 |
| 43 |
Shape { |
| 44 |
anchors.fill: parent |
| 45 |
vendorExtensionsEnabled: false |
| 46 |
|
| 47 |
ShapePath { |
| 48 |
fillColor: "transparent" |
| 49 |
strokeColor: model.index === 0 ? "red" : "blue" |
| 50 |
strokeStyle: ShapePath.DashLine |
| 51 |
strokeWidth: 4 |
| 52 |
|
| 53 |
startX: 50; startY: 100 |
| 54 |
PathArc { |
| 55 |
x: 100; y: 150 |
| 56 |
radiusX: 50; radiusY: 50 |
| 57 |
useLargeArc: model.index === 1 |
| 58 |
} |
| 59 |
} |
| 60 |
} |
| 61 |
} |
| 62 |
} |
| 63 |
|
| 64 |
Item { |
| 65 |
width: 200 |
| 66 |
height: 100 |
| 67 |
|
| 68 |
Repeater { |
| 69 |
model: 2 |
| 70 |
Shape { |
| 71 |
anchors.fill: parent |
| 72 |
vendorExtensionsEnabled: false |
| 73 |
|
| 74 |
ShapePath { |
| 75 |
fillColor: "transparent" |
| 76 |
strokeColor: model.index === 0 ? "red" : "blue" |
| 77 |
strokeStyle: ShapePath.DashLine |
| 78 |
strokeWidth: 4 |
| 79 |
|
| 80 |
startX: 50; startY: 150 |
| 81 |
PathArc { |
| 82 |
x: 150; y: 150 |
| 83 |
radiusX: 50; radiusY: 20 |
| 84 |
xAxisRotation: model.index === 0 ? 0 : 45 |
| 85 |
} |
| 86 |
} |
| 87 |
} |
| 88 |
} |
| 89 |
|
| 90 |
Repeater { |
| 91 |
model: 2 |
| 92 |
Shape { |
| 93 |
anchors.fill: parent |
| 94 |
vendorExtensionsEnabled: false |
| 95 |
|
| 96 |
ShapePath { |
| 97 |
fillColor: "transparent" |
| 98 |
strokeColor: model.index === 0 ? "red" : "blue" |
| 99 |
|
| 100 |
startX: 50; startY: 150 |
| 101 |
PathArc { |
| 102 |
x: 150; y: 150 |
| 103 |
radiusX: 50; radiusY: 20 |
| 104 |
xAxisRotation: model.index === 0 ? 0 : 45 |
| 105 |
direction: PathArc.Counterclockwise |
| 106 |
} |
| 107 |
} |
| 108 |
} |
| 109 |
} |
| 110 |
} |
| 111 |
} |
| 112 |
} |