Index: sources/gui/qml/pages/settings/SettingsExportLogs.qml =================================================================== diff -u -r265600079f9f3b741cd3e67c229f39ec66571419 -r0b6611793edf5c79eec8505c1d7682703a0f9ff7 --- sources/gui/qml/pages/settings/SettingsExportLogs.qml (.../SettingsExportLogs.qml) (revision 265600079f9f3b741cd3e67c229f39ec66571419) +++ sources/gui/qml/pages/settings/SettingsExportLogs.qml (.../SettingsExportLogs.qml) (revision 0b6611793edf5c79eec8505c1d7682703a0f9ff7) @@ -62,8 +62,9 @@ property bool isDevice : true //false // it has to be true to make it work on the devices. readonly property string typePathClr : "" - readonly property string typePathSrc : isDevice ? "file:///media/sd-card" : "file:///home/denali/Desktop/sd-card" - readonly property string typePathDst : isDevice ? "file:///media/usb" : "file:///home/denali/Desktop/usb-disk" + readonly property string typePathPrefix : "file://" + readonly property string typePathSrc : typePathPrefix + (isDevice ? "/media/sd-card" : "/home/denali/Desktop/sd-card" ) + readonly property string typePathDst : typePathPrefix + (isDevice ? "/media/usb" : "/home/denali/Desktop/usb-disk") readonly property string typeFolderApplication : "/log" readonly property string typeFolderService : "/service" readonly property string typeFolderTreatment : "/treatment" @@ -319,7 +320,7 @@ height : parent.height anchors.verticalCenter : parent.verticalCenter Label { id : _sdcLabel - text : _root.sdcLabel + ": %1 files"/*, %2 %3"*/.arg(_sdcFolderModel.count) + (_GuiView.exportCount ? " [Selected: %1]".arg(_GuiView.exportCount ) : "") //.arg("__").arg(_root.dvcUnit) + text : _root.sdcLabel + ": %1 files"/*, %2 %3"*/.arg(_sdcFolderView.visibleFileCounter) + (_GuiView.exportCount ? " [Selected: %1]".arg(_GuiView.exportCount ) : "") //.arg("__").arg(_root.dvcUnit) width : parent.width height : _root.headetRowHight verticalAlignment : Text.AlignVCenter @@ -339,6 +340,7 @@ } ListView { id : _sdcFolderView + property int visibleFileCounter : 0 enabled : !_GuiView.exportRunning && ! isUpdatePanels clip : true anchors.fill : parent @@ -347,6 +349,14 @@ anchors.rightMargin : 5 spacing : 3 FolderListModel { id : _sdcFolderModel + onStatusChanged: { + // onFolderChanged does not get emitted when switching folders, but status change does. + // Reset the displayed file counter when the state of the model is null + if (_sdcFolderModel.status == FolderListModel.Null) + { + _sdcFolderView.visibleFileCounter = 0 + } + } showDirs : false sortField : FolderListModel.Time folder : _sdcFolderColumn.currentTypeFolderApplication // FIXME: there has to be a View for this which also get changed by log type. @@ -364,6 +374,10 @@ ? _GuiView.exportPercent : 0 onExportPercentChanged : console.log( "%", exportPercent) + + property bool isShownInList : !_GuiView.isPathSymLink(_sdcFolderColumn.currentTypeFolderApplication.replace(typePathPrefix, "") + "/" + fileName) + Component.onCompleted: if ( isShownInList ) _sdcFolderView.visibleFileCounter++ + //DEBUG: onInExportListChanged: console.debug(" * ", index, inExportList) function exportListUpdate() { if (_GuiView.doExportListSelect( index ) ) { @@ -384,19 +398,26 @@ marker.visible : false maximum : 100 // percent value : maximum - exportPercent - width : _sdcFolderView.width - height : 40 + + // 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 + bgColor : Colors.transparent color : inExportList ? Colors.borderButtonSelected : Colors.transparent radius : 5 Row { id : _sdcFileRow - width : parent.width - height : 40 + // 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 : _contentRect.columnWidthFileName - 2 + width : isShownInList ? (_contentRect.columnWidthFileName - 2) : 0 text : fileName color : Colors.textMain font.pixelSize : Fonts.fontPixelTextRectExtra @@ -405,12 +426,12 @@ } Rectangle { id : _sdcColumnVerticalLine color : Colors.borderButtonUnselected - width : 1 + width : isShownInList ? 1 : 0 height : parent.height + _usbFolderColumn.spacing } Text { id : _sdcFileSizeText clip : true - width : _contentRect.columnWidthFileSize + width : isShownInList ? _contentRect.columnWidthFileSize : 0 text : Variables.sizeConverted( fileSize, 1000, 3) color : Colors.textMain font.pixelSize : Fonts.fontPixelTextRectExtra