<commit_before>/*
 * steamlink-qml-example
 * Copyright (c) 2016 <NAME>. See LICENSE for license details.
 */
import QtQuick 2.0
import org.e7m.steamlink 1.0

Rectangle {
    id: page
    width: 320; height: 480
    color: "lightgray"

    Text {
        id: helloText
        text: "Hello world!"
        y: 30
        anchors.horizontalCenter: page.horizontalCenter
        font.pointSize: 24; font.bold: true
    }

    Grid {
        id: colorPicker
        x: 4;
        anchors.top: helloText.bottom
        anchors.topMargin: 30
        anchors.rightMargin: 4
        anchors.bottom: page.bottom
        anchors.bottomMargin: 4
        anchors.right: page.right
        anchors.left: page.left
        rows: 2; columns: 3;
        focus: true

        Cell { cellColor: "red" }
        Cell { cellColor: "green" }
        Cell { cellColor: "blue" }
        Cell { cellColor: "yellow" }
        Cell { cellColor: "steelblue" }
        Cell { cellColor: "black" }

        Controller.onPressed: {
            console.log("Generic handler", event.type)
            event.accepted = event.type === 2
        }

        Controller.onReleased: {
            console.log("Button released")
        }

        Controller.onButtonAPressed: {
            console.log("Specific handler auto-accepts like Keys")
        }
    }
}<commit_msg>Exit when Steam button is pressed.<commit_after>/*
 * steamlink-qml-example
 * Copyright (c) 2016 <NAME>. See LICENSE for license details.
 */
import QtQuick 2.0
import org.e7m.steamlink 1.0

Rectangle {
    id: page
    width: 320; height: 480
    color: "lightgray"

    Text {
        id: helloText
        text: "Hello world!"
        y: 30
        anchors.horizontalCenter: page.horizontalCenter
        font.pointSize: 24; font.bold: true
    }

    Grid {
        id: colorPicker
        x: 4;
        anchors.top: helloText.bottom
        anchors.topMargin: 30
        anchors.rightMargin: 4
        anchors.bottom: page.bottom
        anchors.bottomMargin: 4
        anchors.right: page.right
        anchors.left: page.left
        rows: 2; columns: 3;
        focus: true

        Cell { cellColor: "red" }
        Cell { cellColor: "green" }
        Cell { cellColor: "blue" }
        Cell { cellColor: "yellow" }
        Cell { cellColor: "steelblue" }
        Cell { cellColor: "black" }

        Controller.onPressed: {
            console.log("Generic handler", event.type)
            event.accepted = event.type === 2
        }

        Controller.onReleased: {
            console.log("Button released")
        }

        Controller.onButtonAPressed: {
            console.log("Specific handler auto-accepts like Keys")
            helloText.text = "[A] button pressed."
        }

        Controller.onButtonGuidePressed: Qt.quit()
    }
}
{'fraction_non_alphanumeric': 0.10479256080114449, 'fraction_numerical': 0.019313304721030045, 'mean_word_length': 1.8453713123092574, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '3849138', 'n_tokens_mistral': 895, 'n_tokens_neox': 825, 'n_words': 209}