Index: sources/gui/qml/pages/SettingsDateTimeSet.qml =================================================================== diff -u -r632f698e13711e6544a28c7a72d276d2bf5f000e -r917f7b344c2c8121c2d5241326b0e9b7b2aa1396 --- sources/gui/qml/pages/SettingsDateTimeSet.qml (.../SettingsDateTimeSet.qml) (revision 632f698e13711e6544a28c7a72d276d2bf5f000e) +++ sources/gui/qml/pages/SettingsDateTimeSet.qml (.../SettingsDateTimeSet.qml) (revision 917f7b344c2c8121c2d5241326b0e9b7b2aa1396) @@ -60,39 +60,154 @@ bottomMargin: 2*Variables.mainMenuHeight } - TextEntry { id: _time - textInput.width: Variables.settingsDateTimeSetInputWidth - line.width: Variables.settingsDateTimeSetInputWidth - label.width: Variables.settingsDateTimeSetInputWidth + // time + Text { id: _timeLabel anchors { + right: _hours.left + rightMargin: Variables.settingsDateTimeSetMargin + verticalCenter: _hours.verticalCenter + } + text: qsTr("Time (HH:MM) ") + color: Colors.textMain + font.pixelSize: Fonts.fontPixelTextRectExtra + } + + TextEntry { id: _hours + anchors { top: parent.top topMargin: Variables.settingsDateTimeSetMargin - horizontalCenter: parent.horizontalCenter + right: parent.horizontalCenter + rightMargin: Variables.settingsDateTimeSetSpacing } - labelText: qsTr("Time (HH:MM) ") + label.visible: false + width: Variables.textInputLineWidth + validator: IntValidator{ + bottom: 0 + top: 24 + } textInput.text: "HH" onEnterPressed: { _keyboard.setVisible(false) } } - TextEntry { id: _date - textInput.width: Variables.settingsDateTimeSetInputWidth - line.width: Variables.settingsDateTimeSetInputWidth - label.width: Variables.settingsDateTimeSetInputWidth + Text { id: _colon anchors { - top: _time.bottom + horizontalCenter: parent.horizontalCenter + verticalCenter: _hours.verticalCenter + } + text: qsTr(":") + color: Colors.textMain + font.pixelSize: Fonts.fontPixelTextRectExtra + } + + TextEntry { id: _minutes + anchors { + top: parent.top topMargin: Variables.settingsDateTimeSetMargin - horizontalCenter: parent.horizontalCenter + left: parent.horizontalCenter + leftMargin: Variables.settingsDateTimeSetSpacing } - labelText: qsTr("Date (MM/DD/YYYY) ") + label.visible: false + validator: IntValidator{ + bottom: 0 + top: 60 + } textInput.text: "MM" onEnterPressed: { _keyboard.setVisible(false) } } + // date + Text { id: _dateLabel + anchors { + right: _hours.left + rightMargin: Variables.settingsDateTimeSetMargin + top: _timeLabel.bottom + topMargin: Variables.settingsDateTimeSetMargin + } + text: qsTr("Date (MM/DD/YYYY)") + color: Colors.textMain + font.pixelSize: Fonts.fontPixelTextRectExtra + } + + TextEntry { id: _month + anchors { + top: _dateLabel.top + right: parent.horizontalCenter + rightMargin: Variables.settingsDateTimeSetSpacing + } + label.visible: false + width: Variables.textInputLineWidth + validator: IntValidator{ + bottom: 1 + top: 12 + } + textInput.text: "MM" + onEnterPressed: { + _keyboard.setVisible(false) + } + } + + Text { id: _slashMonthDay + anchors { + horizontalCenter: parent.horizontalCenter + verticalCenter: _month.verticalCenter + } + text: qsTr("/") + color: Colors.textMain + font.pixelSize: Fonts.fontPixelTextRectExtra + } + + TextEntry { id: _day + anchors { + top: _dateLabel.top + left: parent.horizontalCenter + leftMargin: Variables.settingsDateTimeSetSpacing + } + label.visible: false + width: Variables.textInputLineWidth + validator: IntValidator{ + bottom: 1 + top: 31 + } + textInput.text: "DD" + onEnterPressed: { + _keyboard.setVisible(false) + } + } + + Text { id: _slashDayYear + anchors { + left: _day.right + leftMargin: Variables.settingsDateTimeSetSpacing + verticalCenter: _month.verticalCenter + } + text: qsTr("/") + color: Colors.textMain + font.pixelSize: Fonts.fontPixelTextRectExtra + } + + TextEntry { id: _year + anchors { + top: _dateLabel.top + left: _slashDayYear.right + leftMargin: Variables.settingsDateTimeSetSpacing + verticalCenter: _month.verticalCenter + } + label.visible: false + validator: IntValidator { + bottom: 1970 + top: 2200 + } + textInput.text: "YYYY" + onEnterPressed: { + _keyboard.setVisible(false) + } + } + TouchRect { id: _save anchors { bottom: parent.bottom @@ -104,5 +219,4 @@ onClicked: console.debug("Clicked Save Date and Time") } } - }