MauiKit Controls

Arrow.qml
1import QtQuick 2.15
2import QtQuick.Controls 2.15
3import org.mauikit.controls 1.0 as Maui
4import QtQuick.Shapes 1.12
5
6Shape
7{
8 id: _shape
9
10 /**
11 * arrowWidth : int
12 */
13 property int arrowWidth : 8
14
15 /**
16 * color : color
17 */
18 property color color : Maui.Theme.backgroundColor
19
20 /**
21 * borderColor : color
22 */
23 property color borderColor: "transparent"
24
25 /**
26 * borderWidth : int
27 */
28 property int borderWidth: -1
29
30 layer.enabled: smooth
31 layer.samples: 16
32
33 smooth: true
34 asynchronous: true
35 containsMode: Shape.FillContains
36
37 ShapePath
38 {
39 id: _path
40 joinStyle: ShapePath.RoundJoin
41 capStyle: ShapePath.RoundCap
42 strokeWidth: _shape.borderWidth
43 strokeColor: _shape.borderColor
44 fillColor: _shape.color
45
46 startX: 0; startY: 0
47 PathLine { x: _shape.width - _shape.arrowWidth; y: _path.startY }
48 PathLine { x: _shape.width; y: Math.floor(_shape.height / 2) }
49 PathLine { x: _shape.width - _shape.arrowWidth; y: _shape.height}
50 PathLine { x: _path.startX; y: _shape.height}
51 PathLine { x: _shape.arrowWidth; y: Math.floor(_shape.height / 2)}
52 PathLine { x: _path.startX; y: _path.startY }
53 }
54}
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri May 17 2024 11:56:16 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.