Warning, /maui/mauikit-calendar/src/controls.6/TimeComboBox.qml is written in an unsupported language. File is not indexed.
0001 import QtQuick
0002 import QtQuick.Layouts
0003 import QtQuick.Controls
0004
0005 import org.mauikit.controls 1.3 as Maui
0006 import org.mauikit.calendar 1.0 as Kalendar
0007
0008 /**
0009 * @inherit QtQuick.Controls.ComboBox
0010 * @brief A combobox designed for picking a time using a hour and minute format.
0011 *
0012 * @image html timecombobox.png
0013 *
0014 * @code
0015 * MC.TimeComboBox
0016 * {
0017 * id: _view
0018 * anchors.centerIn: parent
0019 * onTimePicked: (time) => console.log("Time Picked, ", time)
0020 * }
0021 * @endcode
0022 */
0023 ComboBox
0024 {
0025 id: control
0026
0027 enabled: true
0028
0029 /**
0030 * @brief
0031 */
0032 property alias selectedHour : _picker.selectedHour
0033
0034 /**
0035 * @brief
0036 */
0037 property alias selectedMinute: _picker.selectedMinute
0038
0039 /**
0040 * @brief
0041 */
0042 property alias timeZoneOffset : _picker.timeZoneOffset
0043
0044 /**
0045 * @brief
0046 */
0047 property alias selectedTime : _picker.selectedTime
0048
0049 /**
0050 * @brief
0051 * @param time
0052 */
0053 signal timePicked(var time)
0054
0055 displayText: _picker.selectedTime
0056
0057 font.bold: true
0058 font.weight: Font.Bold
0059 font.family: "Monospace"
0060
0061 icon.source: "clock"
0062
0063 popupContent: Kalendar.TimePicker
0064 {
0065 id: _picker
0066 onAccepted:
0067 {
0068 control.timePicked(time)
0069 control.accepted()
0070 control.popup.close()
0071 }
0072 }
0073 }