Index: leahi.qrc =================================================================== diff -u -rabb959f145f8af64bab3b8f24314bf0ba8f3bb0e -rccea9f498ece7b6f75e97d85c9312e67b736f98a --- leahi.qrc (.../leahi.qrc) (revision abb959f145f8af64bab3b8f24314bf0ba8f3bb0e) +++ leahi.qrc (.../leahi.qrc) (revision ccea9f498ece7b6f75e97d85c9312e67b736f98a) @@ -141,6 +141,7 @@ resources/images/refresh.png resources/images/export.png resources/images/refresh_disabled.png + resources/images/export_disabled.png sources/gui/qml/components/MainMenu.qml @@ -231,6 +232,7 @@ sources/gui/qml/compounds/AutoStepController.qml sources/gui/qml/compounds/InteractiveImage.qml sources/gui/qml/compounds/ProcessStatusView.qml + sources/gui/qml/compounds/ExportLogsHeaderData.qml qtquickcontrols2.conf Index: sources/gui/qml/SDCProgressItem.qml =================================================================== diff -u -rfe27956b26aabc3a40ece13a3f8f1723223f737f -rccea9f498ece7b6f75e97d85c9312e67b736f98a --- sources/gui/qml/SDCProgressItem.qml (.../SDCProgressItem.qml) (revision fe27956b26aabc3a40ece13a3f8f1723223f737f) +++ sources/gui/qml/SDCProgressItem.qml (.../SDCProgressItem.qml) (revision ccea9f498ece7b6f75e97d85c9312e67b736f98a) @@ -72,6 +72,7 @@ maximum : _GuiView.sdTotal / sizePowers // convert to MB since the value in byte is too big for ProgressCircle. value : _GuiView.sdAvail / sizePowers // convert to MB since the value in byte is too big for ProgressCircle. color : ! _GuiView.sdIsReady ? "red" : _GuiView.sdIsReadOnly ? "gray" : _GuiView.sdIsLow ? Colors.red : "green" + circleShadowColor: Colors.panelBorderColor } Text { id: _totalText visible : _GuiView.sdIsReady && displayInformation Index: sources/gui/qml/USBProgressItem.qml =================================================================== diff -u -ra5760947d3ed0d2748ba023a1c25e3c6aa0b1de1 -rccea9f498ece7b6f75e97d85c9312e67b736f98a --- sources/gui/qml/USBProgressItem.qml (.../USBProgressItem.qml) (revision a5760947d3ed0d2748ba023a1c25e3c6aa0b1de1) +++ sources/gui/qml/USBProgressItem.qml (.../USBProgressItem.qml) (revision ccea9f498ece7b6f75e97d85c9312e67b736f98a) @@ -70,6 +70,7 @@ maximum : _GuiView.usbTotal / sizePowers // convert to MB since the value in byte is too big for ProgressCircle. value : _GuiView.usbAvail / sizePowers // convert to MB since the value in byte is too big for ProgressCircle. color : ! _GuiView.usbIsReady ? "red" : "green" + circleShadowColor: Colors.panelBorderColor } Text { id: _totalText visible : _GuiView.usbIsReady && displayInformation Index: sources/gui/qml/compounds/ExportLogsHeaderData.qml =================================================================== diff -u --- sources/gui/qml/compounds/ExportLogsHeaderData.qml (revision 0) +++ sources/gui/qml/compounds/ExportLogsHeaderData.qml (revision ccea9f498ece7b6f75e97d85c9312e67b736f98a) @@ -0,0 +1,80 @@ +// Qt +import QtQuick 2.15 + +// Qml imports +import "qrc:/globals" +import "qrc:/components" + +Item { id: _root + property alias title : _title.text + property alias fileCount : _fileCount.text + property string freeValue : "" + property string totalValue : "" + property Item contentItem : null + property alias contentArea : _contentArea + + height : 75 + width : parent.width + + Text { id: _title + anchors { + left : parent.left + top : parent.top + } + + color : Colors.offWhite + font.weight : Font.DemiBold + font.pixelSize : Fonts.fontPixelTextRectExtra + } + + Text { id: _fileCount + anchors { + left : parent.left + top : _title.bottom + topMargin : 5 + } + + color : Colors.offWhite + font.pixelSize : Fonts.fontUnit + } + + Item { id : _progressContainer + anchors { + right : parent.right + verticalCenter : parent.verticalCenter + } + width : Math.max(_freeText.contentWidth, _totalText.contentWidth) + height : parent.height + + Text { id: _freeText + anchors.right : parent.right + anchors.verticalCenter : parent.verticalCenter + anchors.verticalCenterOffset: Variables.defaultMargin/2 * -1 + text : qsTr("Free: %1 %2").arg(_root.freeValue).arg(Variables.unitStorage) + color : Colors.offWhite + width : parent.width + horizontalAlignment : Text.AlignRight + } + + Text { id: _totalText + anchors.right : parent.right + anchors.top : _freeText.bottom + text : qsTr("Total: %1 %2").arg(_root.totalValue).arg(Variables.unitStorage) + color : Colors.offWhite + width : parent.width + horizontalAlignment : Text.AlignRight + } + } + + ContentArea { id : _contentArea + anchors { + top : _root.top + right : _progressContainer.left + rightMargin : 10 + bottom : _root.bottom + bottomMargin: 10 + } + width : parent.height + contentItem : _root.contentItem + } +} Index: sources/gui/qml/globals/Variables.qml =================================================================== diff -u -rb0ad6789ac542b1c24db1d89af3d4e1411a4d4f1 -rccea9f498ece7b6f75e97d85c9312e67b736f98a --- sources/gui/qml/globals/Variables.qml (.../Variables.qml) (revision b0ad6789ac542b1c24db1d89af3d4e1411a4d4f1) +++ sources/gui/qml/globals/Variables.qml (.../Variables.qml) (revision ccea9f498ece7b6f75e97d85c9312e67b736f98a) @@ -160,7 +160,6 @@ readonly property int settingsSpacing : 20 readonly property int settingsInputWidth : 225 - readonly property int settingsNotificationMargin : 10 readonly property int settingsContentBottomMargin : mainMenuHeight + // Alarm Bar height minVGap // Min Gap to give content the min border @@ -344,4 +343,6 @@ readonly property string unitTextHeparinConcentration : qsTr("IU/mL") // - hepatitis readonly property string unitHepatitis : qsTr("HbsAg") + // - hepatitis + readonly property string unitStorage : qsTr("MB") } Index: sources/gui/qml/pages/settings/SettingsBase.qml =================================================================== diff -u -r1286d74bd015276aab604808be2766136091c125 -rccea9f498ece7b6f75e97d85c9312e67b736f98a --- sources/gui/qml/pages/settings/SettingsBase.qml (.../SettingsBase.qml) (revision 1286d74bd015276aab604808be2766136091c125) +++ sources/gui/qml/pages/settings/SettingsBase.qml (.../SettingsBase.qml) (revision ccea9f498ece7b6f75e97d85c9312e67b736f98a) @@ -39,7 +39,8 @@ property alias title : _titleText.text property alias notificationText : _information.text - property int notificationMargin : Variables.notificationHeight + Variables.minVGap + property alias notificationFontSize: _information.textfontSize + property int notificationMargin : 0 property alias backVisible : _backButton .visible property alias backEnabled : _backButton .enabled @@ -114,11 +115,11 @@ imageSource : "" text : "" anchors { - bottom : undefined - bottomMargin : _root.notificationMargin - verticalCenter : _backButton.verticalCenter - left : _backButton.right - right : _confirmButton.left + bottom : undefined + verticalCenterOffset: _root.notificationMargin + verticalCenter : _backButton.verticalCenter + left : _backButton.right + right : _confirmButton.left } } Index: sources/gui/qml/pages/settings/SettingsExportLogs.qml =================================================================== diff -u -rcbe04ec89eb7261a6950871dc89a3eb7f18ce9fc -rccea9f498ece7b6f75e97d85c9312e67b736f98a --- sources/gui/qml/pages/settings/SettingsExportLogs.qml (.../SettingsExportLogs.qml) (revision cbe04ec89eb7261a6950871dc89a3eb7f18ce9fc) +++ sources/gui/qml/pages/settings/SettingsExportLogs.qml (.../SettingsExportLogs.qml) (revision ccea9f498ece7b6f75e97d85c9312e67b736f98a) @@ -33,6 +33,7 @@ import "qrc:/" import "qrc:/globals" import "qrc:/components" +import "qrc:/compounds" /*! * \brief SettingsExportLogs is used to Export logs, and display the SD-Card and USB device informaiton and list of files. @@ -51,7 +52,6 @@ readonly property string devUnit : "MB" // no translation readonly property string devUnitLabel : " (" + devUnit + ")\n" // no translation readonly property string usbLabel : qsTr("USB Drive") - readonly property int headetRowHight : 50 readonly property int typeIndexApplication : 0 readonly property int typeIndexService : 1 @@ -84,7 +84,8 @@ readonly property bool horizontalLayout : _GuiView.useLogLongName confirmVisible : false - notificationMargin : Variables.notificationHeight + notificationMargin : Variables.defaultMargin * 2 + notificationFontSize : Fonts.fontPixelStepNormal function refreshModels() { _usbFolderColumn.clearModel() @@ -185,7 +186,7 @@ anchors.right : _root.right anchors.top : _root.top anchors.margins : Variables.headerButtonsMargin - enabled : _GuiView.usbIsReady && !_GuiView.exportRunning && ! isUpdatePanels + enabled : _GuiView.usbIsReady && !_GuiView.exportRunning && ! _root.isUpdatePanels } contentItem: Item { id : _contentRect @@ -197,7 +198,7 @@ anchors.fill: parent - component Header: Rectangle { id: _Header + component Header: Rectangle { id: _header width : parent.width height : _contentRect.columnCellHeight color : Colors.panelBackgroundColor @@ -257,11 +258,17 @@ _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 + ExportLogsHeaderData { id: _sdcContainer + title : ("%1 (%2)").arg(_root.sdcLabel).arg(Variables.unitStorage) + fileCount : _root.sdcLabel + ": %1 files".arg(_sdcFolderModel.count) + (_GuiView.exportCount ? " [Selected: %1]".arg(_GuiView.exportCount ) : "") + freeValue : Variables.sizeConverted( _GuiView.sdAvail, 1000, 3) + totalValue : Variables.sizeConverted( _GuiView.sdTotal, 1000, 3) + + contentItem: SDCProgressItem{ id: _SDC_progress + thickness : 5 +// displayInformation : false +// text : _SDC_progress.percent + } } Rectangle { id : _sdcFolderRectangle @@ -275,7 +282,7 @@ color : Colors.panelBorderColor } - Column { id: _networkColumn + Column { id: _sdcColumn anchors.fill: parent Header { id: _sdcHeader } @@ -285,7 +292,7 @@ height : parent.height - _sdcHeader.height ListView { id : _sdcFolderView - enabled : ! _GuiView.exportRunning && ! isUpdatePanels + enabled : ! _GuiView.exportRunning && ! _root.isUpdatePanels clip : true width : parent.width height : parent.height @@ -406,13 +413,14 @@ IconButton { id: _exportButton anchors.centerIn: parent - iconImageSource : "qrc:/images/iExport" - enabled : _GuiView.usbIsReady && !_GuiView.exportRunning && ! isUpdatePanels + iconImageSource : enabled ? "qrc:/images/iExport" : "qrc:/images/iExportDisabled" + enabled : _GuiView.usbIsReady && !_GuiView.exportRunning && ! _root.isUpdatePanels isDefault : true - onPressed : doExport() + border.color : enabled ? Colors.borderButton : Colors.borderDisableButton + extraSpace : Variables.defaultMargin * 2 + onClicked : doExport() } - Column { id : _usbFolderColumn property string currentTypeFolderApplication : _root.typeFolderApplicationDst @@ -451,11 +459,17 @@ } } - 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 + ExportLogsHeaderData { id: _usbContainer + title : ("%1 (%2)").arg(_root.usbLabel).arg(Variables.unitStorage) + fileCount : _root.usbLabel + ": %1 files".arg(_usbFolderModel.count) + freeValue : Variables.sizeConverted( _GuiView.usbAvail, 1000, 3) + totalValue : Variables.sizeConverted( _GuiView.usbTotal, 1000, 3) + + contentItem: USBProgressItem { id: _USB_progress + thickness : 5 +// displayInformation : false +// text : _USB_progress.percent + } } Rectangle { id : _usbFolderRectangle @@ -469,126 +483,78 @@ color : Colors.panelBorderColor } - ScrollBar { - anchors.fill : _usbFolderView - flickable : _usbFolderView - handleWidth : Variables.settingsExportLogsScrollBarWidth - scrollColor : Colors.scrollBarColor - } + Column { id: _usbColumn + anchors.fill: parent - ListView { id : _usbFolderView - clip : true - anchors.fill : parent + Header { id: _usbHeader } - 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 - } + Item { id: _usbListItem + width : parent.width + height : parent.height - _usbHeader.height - delegate :Item { id: _usbDelegateItem - width : _usbFolderView.width - height : _contentRect.columnCellHeight + ListView { id : _usbFolderView + clip : true + anchors.fill : parent - 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 + 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 } - 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 - } - } + delegate :Item { id: _usbDelegateItem + width : _usbFolderView.width + height : _contentRect.columnCellHeight - 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 - } - } - } - } - } - } + Row { id : _usbFileRow + anchors.fill : parent + height : parent.height + leftPadding : Variables.defaultMargin * 2 + rightPadding : Variables.defaultMargin * 2 - Column { id : _progressColumn - property int progressWidth : 170 - property int progressHeight : height - _logTypeCombo.height //- _logTypeExportButton.height + Text { id : _usbFileNameText + clip : true + width : _contentRect.columnWidthFileName + height : parent.height + text : fileName + color : Colors.textMain + font.pixelSize : Fonts.fontPixelTextRectExtra + verticalAlignment : Text.AlignVCenter + } - spacing : 10 - width : _contentRect.columnWidthProgress - height : parent.height + 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 + } + } - Column { - width : _progressColumn.progressWidth - height : _progressColumn.progressHeight - 2 * _progressColumn.spacing - Item { id : _SDC_item - width : _progressColumn.progressWidth - height : parent.height / 2 + 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 + } + } + } + } - SDCProgressItem { id: _SDC_progressItem - thickness : 10 - displayInformation : false - anchors.fill : parent + ScrollBar { + anchors.fill : _usbFolderView + flickable : _usbFolderView + handleWidth : Variables.settingsExportLogsScrollBarWidth + scrollColor : Colors.scrollBarColor + } } - 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 - } - } } } }