<commit_before>import QtQuick 2.2
import QtQuick.Controls 1.2
import QtQuick.Layouts 1.1
import QtQuick.Dialogs 1.2
import QtQuick.Window 2.0
import Machinekit.Application 1.0

Dialog {
    property var core: null
    property var status: core === null ? {"synced": false} : core.status
    property var command: core === null ? {"ready": false} : core.command
    property var file: core === null ? {"localPath":"", "remotePath":"", "localFilePath":"", "ready":false} : core.file
    property var fileDialog: null

    property bool _ready: status.synced && file.ready && (file.transferState === ApplicationFile.NoTransfer)

    function _openFile(row) {
        if (row < 0)
            return

        if (status.task.taskMode !== ApplicationStatus.TaskModeAuto)
            command.setTaskMode('execute', ApplicationCommand.TaskModeAuto)
        if (status.task.file !== "") {
            command.resetProgram('execute')
        }
        var fileName = tableView.model.getName(row)
        var newPath = file.remotePath + '/' + fileName
        command.openProgram('execute', newPath)
        dialog.close()
    }

    function _removeFile(row) {
        if (row < 0)
            return

        var fileName = tableView.model.getName(row)
        file.removeFile(fileName)
    }

    function _uploadFileDialog() {
        dialog.close()
        fileDialog.open()
    }

    function _uploadFile(url) {
        file.localFilePath = url
        file.startUpload()
    }

    SystemPalette { id: systemPalette }

    id: dialog
    title: qsTr("Remote files")

    contentItem: Rectangle {
        color: systemPalette.window

    ColumnLayout {
        anchors.fill: parent
        anchors.margins: Screen.pixelDensity

        TableView {
            id: tableView
            Layout.fillHeight: true
            Layout.fillWidth: true<commit_msg>ApplicationRemoteFileDialog: add width and height<commit_after>import QtQuick 2.2
import QtQuick.Controls 1.2
import QtQuick.Layouts 1.1
import QtQuick.Dialogs 1.2
import QtQuick.Window 2.0
import Machinekit.Application 1.0

Dialog {
    property var core: null
    property var status: core === null ? {"synced": false} : core.status
    property var command: core === null ? {"ready": false} : core.command
    property var file: core === null ? {"localPath":"", "remotePath":"", "localFilePath":"", "ready":false} : core.file
    property var fileDialog: null
    property alias width: root.implicitWidth
    property alias height: root.implicitHeight

    property bool _ready: status.synced && file.ready && (file.transferState === ApplicationFile.NoTransfer)

    function _openFile(row) {
        if (row < 0)
            return

        if (status.task.taskMode !== ApplicationStatus.TaskModeAuto)
            command.setTaskMode('execute', ApplicationCommand.TaskModeAuto)
        if (status.task.file !== "") {
            command.resetProgram('execute')
        }
        var fileName = tableView.model.getName(row)
        var newPath = file.remotePath + '/' + fileName
        command.openProgram('execute', newPath)
        dialog.close()
    }

    function _removeFile(row) {
        if (row < 0)
            return

        var fileName = tableView.model.getName(row)
        file.removeFile(fileName)
    }

    function _uploadFileDialog() {
        dialog.close()
        fileDialog.open()
    }

    function _uploadFile(url) {
        file.localFilePath = url
        file.startUpload()
    }

    SystemPalette { id: systemPalette }

    id: dialog
    title: qsTr("Remote files")

    contentItem: Rectangle {
        id: root
        color: systemPalette.window

    ColumnLayout {
        anchors.fill: parent
        anchors.margins: Screen.pixelDensity

        TableView {
            id: tableView
            Layout.fillHeight: true
            Layout.fillWidth: true
{'fraction_non_alphanumeric': 0.10698519864970138, 'fraction_numerical': 0.007270838743183588, 'mean_word_length': 2.485972850678733, 'pattern_counts': {'":': 12, '<': 7, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2492287', 'n_tokens_mistral': 1096, 'n_tokens_neox': 1057, 'n_words': 267}