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 - } - } } } }