You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
56 lines
1.4 KiB
56 lines
1.4 KiB
import QtQuick 2.7
|
|
import QtQuick.Controls 2.0
|
|
import QtQuick.Layouts 1.3
|
|
|
|
|
|
RowLayout {
|
|
signal timeChanged(int hour, int minute, int second)
|
|
|
|
HourComboBox {
|
|
id: hourBox
|
|
Layout.preferredWidth: 60
|
|
onActivated: {
|
|
parent.timeChanged(hourBox.currentIndex,
|
|
minuteBox.currentIndex,
|
|
secondBox.currentIndex)
|
|
}
|
|
}
|
|
MyText {
|
|
text: "h"
|
|
}
|
|
|
|
MinuteSecondComboBox {
|
|
id: minuteBox
|
|
Layout.preferredWidth: 60
|
|
onActivated: {
|
|
parent.timeChanged(hourBox.currentIndex,
|
|
minuteBox.currentIndex,
|
|
secondBox.currentIndex)
|
|
}
|
|
}
|
|
MyText {
|
|
text: "m"
|
|
}
|
|
|
|
MinuteSecondComboBox {
|
|
id: secondBox
|
|
Layout.preferredWidth: 60
|
|
onActivated: {
|
|
parent.timeChanged(hourBox.currentIndex,
|
|
minuteBox.currentIndex,
|
|
secondBox.currentIndex)
|
|
}
|
|
}
|
|
MyText {
|
|
text: "s"
|
|
}
|
|
function changeTimer(hour, minute, second) {
|
|
hourBox.currentIndex = hour
|
|
minuteBox.currentIndex = minute
|
|
secondBox.currentIndex = second
|
|
hourBox.displayText = hour
|
|
minuteBox.displayText = minute
|
|
secondBox.displayText = second
|
|
}
|
|
}
|