MauiKit Calendar

TimeComboBox.qml
1import QtQuick
2import QtQuick.Layouts
3import QtQuick.Controls
4
5import org.mauikit.controls as Maui
6import org.mauikit.calendar as Kalendar
7
8/**
9 * @inherit QtQuick.Controls.ComboBox
10 * @brief A combobox designed for picking a time using a hour and minute format.
11 *
12 * @image html timecombobox.png
13 *
14 * @code
15 * MC.TimeComboBox
16 * {
17 * id: _view
18 * anchors.centerIn: parent
19 * onTimePicked: (time) => console.log("Time Picked, ", time)
20 * }
21 * @endcode
22 */
23ComboBox
24{
25 id: control
26
27 enabled: true
28
29 /**
30 * @brief
31 */
32 property alias selectedHour : _picker.selectedHour
33
34 /**
35 * @brief
36 */
37 property alias selectedMinute: _picker.selectedMinute
38
39 /**
40 * @brief
41 */
42 property alias timeZoneOffset : _picker.timeZoneOffset
43
44 /**
45 * @brief
46 */
47 property alias selectedTime : _picker.selectedTime
48
49 /**
50 * @brief
51 * @param time
52 */
53 signal timePicked(var time)
54
55 displayText: _picker.selectedTime
56
57 font.bold: true
58 font.weight: Font.Bold
59 font.family: "Monospace"
60
61 icon.source: "clock"
62
63 popupContent: Kalendar.TimePicker
64 {
65 id: _picker
66 onAccepted:
67 {
68 control.timePicked(time)
69 control.accepted()
70 control.popup.close()
71 }
72 }
73}
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:15:37 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.