Index: sources/gui/qml/pages/settings/SettingsExportLogs.qml =================================================================== diff -u -rfe3f53cba411ccc253f7b86ac0f9f899d2cb0630 -r36aa156f680e6017cbe80b1e52df85617ed1e44b --- sources/gui/qml/pages/settings/SettingsExportLogs.qml (.../SettingsExportLogs.qml) (revision fe3f53cba411ccc253f7b86ac0f9f899d2cb0630) +++ sources/gui/qml/pages/settings/SettingsExportLogs.qml (.../SettingsExportLogs.qml) (revision 36aa156f680e6017cbe80b1e52df85617ed1e44b) @@ -135,6 +135,21 @@ isUpdatePanels = false } + // Function selectAllLogEntries() + // Adds all the listed files in the listView to the selected list for export + function selectAllLogEntries() + { + // Clear the currently selected list before select-all to avoid duplicates + _GuiView.doExportListRemove() + + // traverse through the list view and "select" all files + for(var index = 0; index < _sdcFolderView.count; index++) + { + var fileInList = _sdcFolderView.itemAtIndex(index); + _GuiView.doExportListInsert( index , fileInList.delegateFileName) + } + } + Connections { target: _GuiView function onSdIsReadyChanged ( vValue ) { _root.updatePanels() } function onDidExportStat ( vIndex, vFileName, vPercent ) { _sdcFolderView.positionViewAtIndex(vIndex, ListView.Center) } @@ -298,10 +313,25 @@ height : Variables.touchRectHeight radius : Variables.touchRectRadius border.width : Variables.borderWidth - enabled : true + enabled : _GuiView.exportCount != 0 isCancelShown : _GuiView.usbIsReady && _GuiView.exportRunning && ! isUpdatePanels onClicked : isCancelShown ? _GuiView.doCancelLogExport() : doExport() } + + TouchRect { id : _selectAllButton + readonly property bool isSelectingAll : (_GuiView.exportCount == _sdcFolderView.count) + width : parent.width + height : Variables.touchRectHeight + radius : Variables.touchRectRadius + border.width : Variables.borderWidth + enabled : !_GuiView.exportRunning && ! isUpdatePanels + anchors.margins : 35 + text { + text : isSelectingAll ? qsTr("Deselect All") : qsTr("Select All") + font.pixelSize : Fonts.fontPixelButton + } + onClicked : isSelectingAll ? _GuiView.doExportListRemove() : selectAllLogEntries() + } } Column { id : _sdcFolderColumn property string currentTypeFolderApplication : _root.typeFolderApplicationSrc @@ -379,6 +409,8 @@ property bool isShownInList : !_GuiView.isPathSymLink(_sdcFolderColumn.currentTypeFolderApplication.replace(typePathPrefix, "") + "/" + fileName) Component.onCompleted: if ( isShownInList ) _sdcFolderView.visibleFileCounter++ + property string delegateFileName: fileName + //DEBUG: onInExportListChanged: console.debug(" * ", index, inExportList) function exportListUpdate() { if (_GuiView.doExportListSelect( index ) ) {