Kirigami-addons

DatePathView.qml
1// SPDX-FileCopyrightText: 2021 Claudio Cambra <claudio.cambra@gmail.com>
2// SPDX-FileCopyrightText: 2023 Carl Schwan <carl@carlschwan.eu>
3// SPDX-License-Identifier: LGPL-2.1-or-later
4
5import QtQuick
6import QtQuick.Controls as QQC2
7import QtQuick.Layouts
8import org.kde.kirigami as Kirigami
9
10PathView {
11 id: root
12
13 required property QQC2.SwipeView mainView
14 property int startIndex: 0
15
16 implicitHeight: Kirigami.Units.gridUnit * 16
17 flickDeceleration: 200
18 highlightRangeMode: PathView.StrictlyEnforceRange
19 preferredHighlightBegin: 0.5
20 preferredHighlightEnd: 0.5
21 snapMode: PathView.SnapToItem
22 focus: true
23
24 clip: true
25
26 path: Path {
27 startX: root.width / 2
28 startY: -root.height * root.count / 2 + root.height / 2
29 PathLine {
30 x: root.width / 2
31 y: root.height * root.count / 2 + root.height / 2
32 }
33 }
34
35 // Center index
36 Component.onCompleted: {
37 startIndex = count / 2;
38 currentIndex = startIndex;
39 }
40}
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Dec 20 2024 11:49:32 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.