Index: sources/gui/GuiGlobals.h =================================================================== diff -u -r2624ed8acc30847fb38816fb4ae6073518b091f9 -r7360f85ae13ee2a460ddfb11bc455203d6edf3ff --- sources/gui/GuiGlobals.h (.../GuiGlobals.h) (revision 2624ed8acc30847fb38816fb4ae6073518b091f9) +++ sources/gui/GuiGlobals.h (.../GuiGlobals.h) (revision 7360f85ae13ee2a460ddfb11bc455203d6edf3ff) @@ -172,7 +172,7 @@ // Pre-Treatment Consumables Installation Confirm ID_AdjustConsumablesConfirmReq = 0x6800, // 104 // there is no specific response message for this request and changing of the state in Pre_Treatment_States is used as the response // Pre-Treatment SelfTest NoCartridge Progress Data - ID_SelfTestNoCartridgeData = 0x6100, // 97 // there is no specific response message for this request and changing of the state in Pre_Treatment_States is used as the response + ID_SelfTestNoCartridgeData = 0x610F, // 97 // there is no specific response message for this request and changing of the state in Pre_Treatment_States is used as the response // Pre-Treatment Disposables Installation Confirm ID_AdjustDisposablesConfirmReq = 0x9200, // 146 // there is no specific response message for this request and changing of the state in Pre_Treatment_States is used as the response ID_AdjustDisposablesConfirmRsp = 0x9300, // 147 // there is no specific response message for this request and changing of the state in Pre_Treatment_States is used as the response @@ -211,7 +211,7 @@ ID_DDHeatersData = 0x2800, // 40 //// ----- @LEAHIZED ID_DDLevelData = 0x2900, // 41 //// ----- @LEAHIZED ID_DDGenDialysateData = 0x2F00, // 47 //// ----- @LEAHIZED - ID_DDBloodLeakData = 0x6000, // 96 //// ----- TODO: Payload subject to change given FW implementation + ID_DDBloodLeakData = 0x6100, // 96 //// ----- @LEAHIZED // FP Data Messages ID_FPValvesStatesData = 0x310F, // 49 //// ----- @OBSOLETE. REMOVE? Index: sources/gui/qml/components/TitleText.qml =================================================================== diff -u -ra5760947d3ed0d2748ba023a1c25e3c6aa0b1de1 -r7360f85ae13ee2a460ddfb11bc455203d6edf3ff --- sources/gui/qml/components/TitleText.qml (.../TitleText.qml) (revision a5760947d3ed0d2748ba023a1c25e3c6aa0b1de1) +++ sources/gui/qml/components/TitleText.qml (.../TitleText.qml) (revision 7360f85ae13ee2a460ddfb11bc455203d6edf3ff) @@ -30,4 +30,5 @@ verticalAlignment : Text.AlignVCenter color: Colors.textMain font.pixelSize: Fonts.fontPixelTitle + wrapMode: Text.WordWrap } Index: sources/gui/qml/components/TouchRect.qml =================================================================== diff -u -r39a514158384c0ad4bfcfb90bafbaa4ca8dc5a26 -r7360f85ae13ee2a460ddfb11bc455203d6edf3ff --- sources/gui/qml/components/TouchRect.qml (.../TouchRect.qml) (revision 39a514158384c0ad4bfcfb90bafbaa4ca8dc5a26) +++ sources/gui/qml/components/TouchRect.qml (.../TouchRect.qml) (revision 7360f85ae13ee2a460ddfb11bc455203d6edf3ff) @@ -95,7 +95,7 @@ Rectangle { id: _rectAnim visible : _root.fading - radius : width + radius : _root.radius color : Colors.transparent anchors.fill: parent SequentialAnimation { id: _clickAnimation Index: sources/gui/qml/dialogs/ConfirmDialog.qml =================================================================== diff -u -r1286d74bd015276aab604808be2766136091c125 -r7360f85ae13ee2a460ddfb11bc455203d6edf3ff --- sources/gui/qml/dialogs/ConfirmDialog.qml (.../ConfirmDialog.qml) (revision 1286d74bd015276aab604808be2766136091c125) +++ sources/gui/qml/dialogs/ConfirmDialog.qml (.../ConfirmDialog.qml) (revision 7360f85ae13ee2a460ddfb11bc455203d6edf3ff) @@ -29,6 +29,7 @@ property string idText : "" property alias titleText : _titleText.text property alias messageText : _messageText.text + property alias messageTextPixel: _messageText.font.pixelSize property alias confirmText : _confirmTouch.textString property alias confirmVisible : _confirmTouch.visible property bool isConfirmDefault : true Index: sources/gui/qml/main.qml =================================================================== diff -u -r2624ed8acc30847fb38816fb4ae6073518b091f9 -r7360f85ae13ee2a460ddfb11bc455203d6edf3ff --- sources/gui/qml/main.qml (.../main.qml) (revision 2624ed8acc30847fb38816fb4ae6073518b091f9) +++ sources/gui/qml/main.qml (.../main.qml) (revision 7360f85ae13ee2a460ddfb11bc455203d6edf3ff) @@ -436,7 +436,7 @@ AlarmItem { id: _alarmItem ; z: 996 } PowerItem { id: _powerItem ; z: 997 } ConfirmDialog { id: _confirmDialog ; z: 998 } - DryDemoDialog { id: _dryDemoDialog; z: 999 } + DryDemoDialog { id: _dryDemoDialog ; z: 999 } DiagnosticsDialog { id: _diagnosticsDialog; z: 999 } // Note: NotificationBar has to be anchored to the main menu and if it is moved into the AlarmItem Index: sources/gui/qml/pages/settings/SettingsExportLogs.qml =================================================================== diff -u -rdc8969f6c7bbdb46d2de22622e58e457ceb37df4 -r7360f85ae13ee2a460ddfb11bc455203d6edf3ff --- sources/gui/qml/pages/settings/SettingsExportLogs.qml (.../SettingsExportLogs.qml) (revision dc8969f6c7bbdb46d2de22622e58e457ceb37df4) +++ sources/gui/qml/pages/settings/SettingsExportLogs.qml (.../SettingsExportLogs.qml) (revision 7360f85ae13ee2a460ddfb11bc455203d6edf3ff) @@ -147,7 +147,6 @@ } Connections { target: _logTypeCombo - function onCurrentIndexChanged() { vLocalization.notification = "" } @@ -165,163 +164,139 @@ qsTr("log export to USB is complete") } } + BaseComboBox { id: _logTypeCombo + anchors.top : _root.top + anchors.topMargin : Variables.headerButtonsMargin + anchors.horizontalCenter : parent.horizontalCenter + height : Variables.contentHeight + currentIndex : 0 + model : [ + _root.typeLabelApplication , + _root.typeLabelService , + _root.typeLabelTreatment + ] + + onActivated: updatePanels( _logTypeCombo.currentIndex ) + } + USBButton { id: _usbEjectButton - width : 120 + width : 150 height : 50 anchors.right : _root.right anchors.top : _root.top anchors.margins : Variables.headerButtonsMargin enabled : _GuiView.usbIsReady && !_GuiView.exportRunning && ! isUpdatePanels } - contentItem: Row { id : _contentRect - spacing : Variables.minVGap + contentItem: Item { id : _contentRect readonly property int columnWidthProgress : 375 - readonly property int columnWidthFolder : _root.horizontalLayout ? 840 : 725 + readonly property int columnWidthFolder : parent.width / 2.3 readonly property int columnWidthFileName : _root.horizontalLayout ? 685 : 575 // best combination - readonly property int columnWidthFileSize : _root.horizontalLayout ? 105 : 105 // best combination + readonly property int columnWidthFileSize : 120 + readonly property int columnCellHeight : 60 - Column { id : _progressColumn - property int progressWidth : 170 - property int progressHeight : height - _logTypeCombo.height - _logTypeExportButton.height + anchors.fill: parent - spacing : 10 - width : _contentRect.columnWidthProgress - height : parent.height + component Header: Rectangle { id: _Header + width : parent.width + height : _contentRect.columnCellHeight + color : Colors.panelBackgroundColor + radius : 9 - Row { id : _logTypeRow - anchors.left : parent.left - width : parent.width - height : _root.headetRowHight - spacing : _logTypeCombo.width - _logTypeExportButton.width + border { + width: 1 + color: Colors.panelBorderColor + } - BaseComboBox { id: _logTypeCombo - width : parent.width - height : parent.height - currentIndex : 0 - model : [ - _root.typeLabelApplication , - _root.typeLabelService , - _root.typeLabelTreatment - ] + Item { + width : parent.width + height : _contentRect.columnCellHeight - onActivated: updatePanels( _logTypeCombo.currentIndex ) - } - } - Column { - width : _progressColumn.progressWidth - height : _progressColumn.progressHeight - 2 * _progressColumn.spacing - Item { id : _SDC_item - width : _progressColumn.progressWidth - height : parent.height / 2 + Row { id : _HeaderRow + anchors.fill : parent + height : parent.height + leftPadding : Variables.defaultMargin * 2 + rightPadding : Variables.defaultMargin * 2 - SDCProgressItem { id: _SDC_progressItem - thickness : 10 - displayInformation : false - anchors.fill : parent + Text { id : _HeaderNameText + width : _contentRect.columnWidthFileName + height : parent.height + text : qsTr("Log Name:") + color : Colors.textMain + font.pixelSize : Fonts.fontPixelTextRectExtra + verticalAlignment : Text.AlignVCenter } - Label { - anchors.left : _SDC_progressItem.right - anchors.leftMargin : _progressColumn.spacing - anchors.verticalCenter : parent.verticalCenter - text : _root.sdcLabel + _root.devUnitLabel + ("Free : %1\nTotal: %2").arg( Variables.sizeConverted( _GuiView.sdAvail, 1000, 3) ).arg( Variables.sizeConverted( _GuiView.sdTotal, 1000, 3) ) - } - Label { - anchors.fill : parent - verticalAlignment : Text.AlignVCenter - horizontalAlignment : Text.AlignHCenter - text : _SDC_progressItem.percent - } - } - Item { id : _USB_item - width : _progressColumn.progressWidth - height : parent.height / 2 - USBProgressItem { id: _USB_progressItem - thickness : 10 - displayInformation : false - anchors.fill : parent + Text { id : _HeaderSizeText + width : _contentRect.columnWidthFileSize + height : parent.height + text : qsTr("Size:") + color : Colors.textMain + font.pixelSize : Fonts.fontPixelTextRectExtra + verticalAlignment : Text.AlignVCenter } - Label { - anchors.left : _USB_progressItem.right - anchors.leftMargin : _progressColumn.spacing - anchors.verticalCenter : parent.verticalCenter - text : _root.usbLabel + _root.devUnitLabel + ("Free : %1\nTotal: %2").arg( Variables.sizeConverted( _GuiView.usbAvail, 1000, 3) ).arg( Variables.sizeConverted( _GuiView.usbTotal, 1000, 3) ) - } - Label { - anchors.fill : parent - verticalAlignment : Text.AlignVCenter - horizontalAlignment : Text.AlignHCenter - text : _USB_progressItem.percent - } } } - ExportButton { id : _logTypeExportButton - width : parent.width - height : Variables.touchRectHeight - radius : Variables.touchRectRadius - border.width : Variables.borderWidth - enabled : _GuiView.usbIsReady && !_GuiView.exportRunning && ! isUpdatePanels - onClicked : doExport() - } } - Grid { - columns : _root.horizontalLayout ? 1 : 2 - spacing : 5 + + Column { id : _sdcFolderColumn + property string currentTypeFolderApplication : _root.typeFolderApplicationSrc + + anchors.left : parent.left width : _contentRect.columnWidthFolder - height : parent.height - Column { id : _sdcFolderColumn - property string currentTypeFolderApplication : _root.typeFolderApplicationSrc + height : parent.height - ( Variables.notificationHeight + Variables.defaultMargin ) - // FIXME: there has to be a View for this, and the timer should be removed and an event driven signal should be implemented there. - function updateModel() { - _sdcFolderModel.folder = currentTypeFolderApplication // FIXME: there has to be a View for this which also get changed by log type. - _sdcFolderModel.nameFilters = _root.typeFilterAll - } - function clearModel() { - _sdcFolderModel.folder = _root.typePathClr - _sdcFolderModel.nameFilters = _root.typeFilterClr - } + // FIXME: there has to be a View for this, and the timer should be removed and an event driven signal should be implemented there. + function updateModel() { + _sdcFolderModel.folder = currentTypeFolderApplication // FIXME: there has to be a View for this which also get changed by log type. + _sdcFolderModel.nameFilters = _root.typeFilterAll + } - spacing : 5 - width : _contentRect.columnWidthFolder - height : _root.horizontalLayout ? parent.height / 2 : parent.height - Label { id : _sdcLabel - text : _root.sdcLabel + ": %1 files"/*, %2 %3"*/.arg(_sdcFolderModel.count) + (_GuiView.exportCount ? " [Selected: %1]".arg(_GuiView.exportCount ) : "") //.arg("__").arg(_root.dvcUnit) - width : parent.width - height : _root.headetRowHight - verticalAlignment : Text.AlignVCenter + function clearModel() { + _sdcFolderModel.folder = _root.typePathClr + _sdcFolderModel.nameFilters = _root.typeFilterClr + } + + Label { id : _sdcLabel + text : _root.sdcLabel + ": %1 files"/*, %2 %3"*/.arg(_sdcFolderModel.count) + (_GuiView.exportCount ? " [Selected: %1]".arg(_GuiView.exportCount ) : "") //.arg("__").arg(_root.dvcUnit) + width : parent.width + height : _root.headetRowHight + verticalAlignment : Text.AlignVCenter + } + + Rectangle { id : _sdcFolderRectangle + color : Colors.panelBackgroundColor + radius : Variables.dialogRadius + anchors.left : parent.left + width : parent.width + height : parent.height + border { + width : 1 + color : Colors.panelBorderColor } - Rectangle { id : _sdcFolderRectangle - color : Colors.transparent - border.color : Colors.borderButton - radius : Variables.dialogRadius - anchors.left : parent.left - width : parent.width - height : parent.height - _sdcLabel.height - ScrollBar { - anchors.fill : _sdcFolderView - flickable : _sdcFolderView - handleWidth : Variables.settingsExportLogsScrollBarWidth - } + Column { id: _networkColumn + anchors.fill: parent - ListView { id : _sdcFolderView - enabled : !_GuiView.exportRunning && ! isUpdatePanels - clip : true - anchors.fill : parent - anchors.margins : 10 - anchors.leftMargin : 5 - anchors.rightMargin : 5 - spacing : 3 - FolderListModel { id : _sdcFolderModel - showDirs : false - sortField : FolderListModel.Time - folder : _sdcFolderColumn.currentTypeFolderApplication // FIXME: there has to be a View for this which also get changed by log type. - } + Header { id: _sdcHeader } - Component { id : _sdcFileDelegate - ProgressBar { id : _sdcItemBackground + Item { id: _sdcListItem + width : parent.width + height : parent.height - _sdcHeader.height + + ListView { id : _sdcFolderView + enabled : ! _GuiView.exportRunning && ! isUpdatePanels + clip : true + width : parent.width + height : parent.height + + model: FolderListModel { id : _sdcFolderModel + showDirs : false + sortField : FolderListModel.Time + folder : _sdcFolderColumn.currentTypeFolderApplication // FIXME: there has to be a View for this which also get changed by log type. + } + + delegate: ProgressBar { id : _sdcItemBackground // *** IMPORTANT *** // QML kills the items when they get out of the view port in regards to the cacheBuffer, // and the next time it gets in the view port will be created with all the properties in their defaults. @@ -358,59 +333,100 @@ // Setting height and width to 0 when the file is not shown in the list because // it is a symlink or other conditions - width : isShownInList ? _sdcFolderView.width : 0 - height : isShownInList ? 40 : 0 + width : isShownInList ? _sdcFolderView.width : 0 + height : isShownInList ? _contentRect.columnCellHeight : 0 + progress.anchors.bottomMargin : 5 + progress.anchors.topMargin : 5 + progress.anchors.leftMargin : Variables.defaultMargin + progress.width : width - progress.anchors.leftMargin * 2 + bgColor : Colors.transparent - color : inExportList ? Colors.borderButtonSelected : Colors.transparent + color : inExportList ? Colors.borderButton : Colors.transparent radius : 5 - Row { id : _sdcFileRow - // Setting height and width to 0 when the file is not shown in the list because - // it is a symlink or other conditions - width : isShownInList ? parent.width : 0 - height : isShownInList ? 40 : 0 - leftPadding : 5 - Text { id : _sdcFileNameText - x : 2 - clip : true - width : isShownInList ? (_contentRect.columnWidthFileName - 2) : 0 - text : fileName - color : Colors.textMain - font.pixelSize : Fonts.fontPixelTextRectExtra - verticalAlignment : Text.AlignVCenter - horizontalAlignment : Text.AlignLeft + Item { + width : isShownInList ? parent.width : 0 + height : isShownInList ? _contentRect.columnCellHeight : 0 + + Row { id : _sdcFileRow + // Setting height and width to 0 when the file is not shown in the list because + // it is a symlink or other conditions + anchors.fill : parent + height : parent.height + leftPadding : Variables.defaultMargin * 2 + rightPadding : Variables.defaultMargin * 2 + + Text { id : _sdcFileNameText + clip : true + width : isShownInList ? (_contentRect.columnWidthFileName - 2) : 0 + height : parent.height + text : fileName + color : Colors.textMain + font.pixelSize : Fonts.fontPixelTextRectExtra + verticalAlignment : Text.AlignVCenter + } + + Text { id : _sdcFileSizeText + clip : true + width : isShownInList ? _contentRect.columnWidthFileSize : 0 + height : parent.height + text : Variables.sizeConverted( fileSize, 1000, 3) + color : Colors.textMain + font.pixelSize : Fonts.fontPixelTextRectExtra + verticalAlignment : Text.AlignVCenter + } } - Rectangle { id : _sdcColumnVerticalLine - color : Colors.borderButtonUnselected - width : isShownInList ? 1 : 0 - height : parent.height + _usbFolderColumn.spacing + + Line { id: _sdcDivider + color : Colors.panelBorderColor + visible : index !== _sdcFolderView.count - 1 + anchors { + bottom : parent.bottom + left : parent.left + leftMargin : Variables.defaultMargin * 2 + right : parent.right + rightMargin : Variables.defaultMargin * 2 + } } - Text { id : _sdcFileSizeText - clip : true - width : isShownInList ? _contentRect.columnWidthFileSize : 0 - text : Variables.sizeConverted( fileSize, 1000, 3) - color : Colors.textMain - font.pixelSize : Fonts.fontPixelTextRectExtra - verticalAlignment : Text.AlignVCenter - horizontalAlignment : Text.AlignRight - } } } } - model : _sdcFolderModel - delegate : _sdcFileDelegate + + ScrollBar { + anchors.fill : _sdcFolderView + flickable : _sdcFolderView + handleWidth : Variables.settingsExportLogsScrollBarWidth + scrollColor : Colors.scrollBarColor + } } } } - Column { id : _usbFolderColumn + } + + ExportButton { id : _logTypeExportButton + anchors.centerIn: parent + width : 100 + height : Variables.touchRectHeight + radius : Variables.touchRectRadius + border.width : Variables.borderWidth + enabled : _GuiView.usbIsReady && !_GuiView.exportRunning && ! isUpdatePanels + onClicked : doExport() + } + + Column { id : _usbFolderColumn property string currentTypeFolderApplication : _root.typeFolderApplicationDst + anchors.right : parent.right + width : _contentRect.columnWidthFolder + height : parent.height - ( Variables.notificationHeight + Variables.defaultMargin ) + // FIXME: there has to be a View for this, and the timer should be removed and an event driven signal should be implemented there. function updateModel() { _usbFolderModel.folder = currentTypeFolderApplication // FIXME: there has to be a View for this which also get changed by log type. _usbFolderModel.nameFilters = _root.typeFilterAll } + function clearModel() { _usbFolderModel.folder = _root.typePathClr _usbFolderModel.nameFilters = _root.typeFilterClr @@ -436,78 +452,145 @@ } } - spacing : 5 - width : _contentRect.columnWidthFolder - height : _root.horizontalLayout ? parent.height / 2 : parent.height - Label { id : _usbLabel + Label { id : _usbLabel text : _root.usbLabel + ": %1 files"/*", %2 %3"*/.arg(_usbFolderModel.count)//.arg("__").arg(_root.dvcUnit) width : parent.width height : _root.headetRowHight verticalAlignment : Text.AlignVCenter } Rectangle { id : _usbFolderRectangle - color : Colors.transparent - border.color : Colors.borderButton + color : Colors.panelBackgroundColor radius : Variables.dialogRadius anchors.left : parent.left width : parent.width - height : parent.height - _sdcLabel.height + height : parent.height + border { + width : 1 + color : Colors.panelBorderColor + } ScrollBar { anchors.fill : _usbFolderView flickable : _usbFolderView handleWidth : Variables.settingsExportLogsScrollBarWidth + scrollColor : Colors.scrollBarColor } ListView { id : _usbFolderView clip : true anchors.fill : parent - anchors.margins : 10 - spacing : 3 - anchors.leftMargin : 5 - anchors.rightMargin : 5 - - FolderListModel { id : _usbFolderModel // FIXME: I don't like this model, it's too lazy and I don't have control over it. There has to be a Model for this. + model: FolderListModel { id : _usbFolderModel // FIXME: I don't like this model, it's too lazy and I don't have control over it. There has to be a Model for this. showDirs : false sortField : FolderListModel.Time folder : _usbFolderColumn.currentTypeFolderApplication } - Component { id : _usbFileDelegate - Row { id : _usbFileRow - width : _usbFolderView.width - height : 40 - Text { id : _usbFileNameText + + delegate :Item { id: _usbDelegateItem + width : _usbFolderView.width + height : _contentRect.columnCellHeight + + Row { id : _usbFileRow + anchors.fill : parent + height : parent.height + leftPadding : Variables.defaultMargin * 2 + rightPadding : Variables.defaultMargin * 2 + + Text { id : _usbFileNameText clip : true width : _contentRect.columnWidthFileName + height : parent.height text : fileName color : Colors.textMain font.pixelSize : Fonts.fontPixelTextRectExtra verticalAlignment : Text.AlignVCenter - horizontalAlignment : Text.AlignLeft } - Rectangle { - color: Colors.borderButtonUnselected - width: 1 - height: parent.height + _usbFolderColumn.spacing - } - Text { id : _usbFileSizeText + + Text { id : _usbFileSizeText clip : true width : _contentRect.columnWidthFileSize + height : parent.height text : Variables.sizeConverted( fileSize, 1000, 3) color : Colors.textMain font.pixelSize : Fonts.fontPixelTextRectExtra verticalAlignment : Text.AlignVCenter - horizontalAlignment : Text.AlignRight } } + + Line { id: _usbDivider + color : Colors.panelBorderColor + visible : index !== _usbFolderView.count - 1 + anchors { + bottom : parent.bottom + left : parent.left + leftMargin : Variables.defaultMargin * 2 + right : parent.right + rightMargin : Variables.defaultMargin * 2 + } + } } - model : _usbFolderModel - delegate : _usbFileDelegate } } } + + Column { id : _progressColumn + property int progressWidth : 170 + property int progressHeight : height - _logTypeCombo.height - _logTypeExportButton.height + + spacing : 10 + width : _contentRect.columnWidthProgress + height : parent.height + + Column { + width : _progressColumn.progressWidth + height : _progressColumn.progressHeight - 2 * _progressColumn.spacing + Item { id : _SDC_item + width : _progressColumn.progressWidth + height : parent.height / 2 + + SDCProgressItem { id: _SDC_progressItem + thickness : 10 + displayInformation : false + anchors.fill : parent + } + Label { + anchors.left : _SDC_progressItem.right + anchors.leftMargin : _progressColumn.spacing + anchors.verticalCenter : parent.verticalCenter + text : _root.sdcLabel + _root.devUnitLabel + ("Free : %1\nTotal: %2").arg( Variables.sizeConverted( _GuiView.sdAvail, 1000, 3) ).arg( Variables.sizeConverted( _GuiView.sdTotal, 1000, 3) ) + } + Label { + anchors.fill : parent + verticalAlignment : Text.AlignVCenter + horizontalAlignment : Text.AlignHCenter + text : _SDC_progressItem.percent + } + } + + Item { id : _USB_item + width : _progressColumn.progressWidth + height : parent.height / 2 + + USBProgressItem { id: _USB_progressItem + thickness : 10 + displayInformation : false + anchors.fill : parent + } + Label { + anchors.left : _USB_progressItem.right + anchors.leftMargin : _progressColumn.spacing + anchors.verticalCenter : parent.verticalCenter + text : _root.usbLabel + _root.devUnitLabel + ("Free : %1\nTotal: %2").arg( Variables.sizeConverted( _GuiView.usbAvail, 1000, 3) ).arg( Variables.sizeConverted( _GuiView.usbTotal, 1000, 3) ) + } + Label { + anchors.fill : parent + verticalAlignment : Text.AlignVCenter + horizontalAlignment : Text.AlignHCenter + text : _USB_progressItem.percent + } + } + } } } } Index: sources/gui/qml/pages/settings/SettingsWiFi.qml =================================================================== diff -u -reef9123ceaee66f3388871b4eebd23d7e6e905e7 -r7360f85ae13ee2a460ddfb11bc455203d6edf3ff --- sources/gui/qml/pages/settings/SettingsWiFi.qml (.../SettingsWiFi.qml) (revision eef9123ceaee66f3388871b4eebd23d7e6e905e7) +++ sources/gui/qml/pages/settings/SettingsWiFi.qml (.../SettingsWiFi.qml) (revision 7360f85ae13ee2a460ddfb11bc455203d6edf3ff) @@ -23,6 +23,7 @@ import "qrc:/compounds" import "qrc:/components" import "qrc:/pages" +import "qrc:/dialogs" /*! * \brief SettingsWiFi @@ -245,11 +246,9 @@ onClicked : { if( wifiSupported ) { - _userConfirmation.isPassword = ! wifiConnected - _userConfirmation.ssid = wifiSsid - _userConfirmation.macAddress = wifiMacAddress - push( _userConfirmation ) - _userConfirmation.setFocus() + _wifiConfirmDialog.isPassword = ! wifiConnected + _wifiConfirmDialog.ssid = wifiSsid + _wifiConfirmDialog.open() } } } @@ -267,23 +266,52 @@ } } - UserConfirmation { id : _userConfirmation - property string ssid : "" - property string macAddress : "" - property string separator : "\n" + ConfirmDialog { id: _wifiConfirmDialog + property bool isPassword : false + property string ssid : "" + property string separator : "\n" readonly property string spaceSeparator : " " - notificationText : vDevice.status - message : qsTr("Do you want to disconnect from `%1`?").arg(ssid) - title : isPassword ? qsTr("Join") + separator + ssid + spaceSeparator + qsTr("Password") : qsTr("Disconnect") + separator + ssid - onConfirmClicked : { + height : Variables.completeDialogHeight - 130 // need to make room for keyboard + width : Variables.completeDialogWidth + y : 0 + titleText : isPassword ? qsTr("Join") + separator + ssid : + qsTr("Disconnect") + separator + ssid + messageText : isPassword ? qsTr("Password") : qsTr("Do you want to disconnect from `%1`?").arg(ssid) + messageTextPixel : Fonts.fontPixelTextRectExtra + notificationText : vDevice.status + + Item { id: _passwordItem + readonly property string passwordCurrent : _passwordEntry.textInput.text + visible : _wifiConfirmDialog.isPassword + anchors.centerIn: parent + + TextEntry { id: _passwordEntry + clip : true + textInput .width : 450 + textInput.inputMethodHints : Qt.ImhNone + textInput.echoMode : TextInput.Password + anchors.horizontalCenter : parent.horizontalCenter + label.text : "" + label.width : 0 + lengthMax : 30 + + onTextChanged: { + // Replace non-ASCII characters as they are typed in + var filtered = text.replace(/[^\x00-\x7F]/g, "") + if (text !== filtered) { text = filtered } // revert invalid characters + } + } + + onVisibleChanged: if ( visible ) _passwordEntry.textInput.forceActiveFocus() + } + + onAccepted : { if ( isPassword ) { - if( passwordCurrent.length > 0 ) { - vDevice.doWifiConnect( true, ssid, passwordCurrent ) - pop() + if( _passwordItem.passwordCurrent.length > 0 ) { + vDevice.doWifiConnect( true, ssid, _passwordItem.passwordCurrent ) } } else { vDevice.doWifiConnect( false, ssid, "" ) - pop() } } }