<commit_before>import QtQuick 2.0
import QtQuick.Controls 1.0
import QtQuick.Controls.Styles 1.0

ApplicationWindow {
    id: window;
    width: 800; height: 600;
    menuBar: MenuBar {
        id: menu;
        Menu {
            title: "Hello"
            MenuItem { text: "World" }
        }
    }
    SplitView {
        anchors.fill: parent;
        TabView {
            id: tabs;
            anchors.fill: parent;
            Tab {
                anchors.fill: parent;
                title: editor.activeWindow().activeView().buffer().fileName();
                Item {
                    id: viewItem;
                    property var myView: editor.activeWindow().activeView()
                    property var viewLines: myView.buffer().rowCol(myView.buffer().size())[0]
                    Rectangle  {
                        color: frontend.defaultBg();
                        anchors.fill: parent
                    }
                    ListView {
                        id: view;
                        anchors.fill: parent;
                        model: viewLines
                        delegate: Text {
                            text: frontend.formatLine(myView, index)
                            textFormat: TextEdit.RichText
                            color: "white"
                        }
                        states: State {
                            name: "ShowBars"
                            when: view.movingVertically || view.movingHorizontally
                            PropertyChanges { target: verticalScrollBar; opacity: 0.5 }
                        }
                        Rectangle {
                            id: verticalScrollBar
                            y: view.visibleArea.yPosition * view.height;
                            width: 10;
                            radius: width;
                            height: view.visibleArea.heightRatio * view.height
                            anchors.right: view.right
                            opacity: 0
                            Behavior on opacity { PropertyAnimation {} }
                        }
                    }
                }
            }
        }
    }
}
<commit_msg>frontend/qml: Display console view (only changes in the qml file!)<commit_after>import QtQuick 2.0
import QtQuick.Controls 1.0
import QtQuick.Controls.Styles 1.0
import QtQuick.Layouts 1.0

ApplicationWindow {
    id: window;
    width: 800; height: 600;
    menuBar: MenuBar {
        id: menu;
        Menu {
            title: "Hello"
            MenuItem { text: "World" }
        }
    }
    Item {
        anchors.fill: parent;
        SplitView {
            anchors.fill: parent
            orientation: Qt.Vertical
            TabView {
                Layout.fillHeight: true
                id: tabs;
                Tab {
                    anchors.fill: parent;
                    title: editor.activeWindow().activeView().buffer().fileName();
                    Item {
                        id: viewItem;
                        property var myView: editor.activeWindow().activeView()
                        property var viewLines: myView.buffer().rowCol(myView.buffer().size())[0]
                        Rectangle  {
                            color: frontend.defaultBg();
                            anchors.fill: parent
                        }
                        ListView {
                            id: view;
                            anchors.fill: parent;
                            model: viewLines
                            delegate: Text {
                                text: frontend.formatLine(myView, index)
                                textFormat: TextEdit.RichText
                                color: "white"
                            }
                            states: State {
                                name: "ShowBars"
                                when: view.movingVertically || view.movingHorizontally
                                PropertyChanges { target: verticalScrollBar; opacity: 0.5 }
                            }
                            Rectangle {
                                id: verticalScrollBar
                                y: view.visibleArea.yPosition * view.height;
                                width: 10;
                                radius: width;
                                height: view.visibleArea.heightRatio * view.height
                                anchors.right: view.right
                                opacity: 0
                                Behavior on opacity { PropertyAnimation {} }
                            }
                        }
                    }
                }
            }
            Item {
                id: consoleView
                height: 100
                property var myView: editor.console()
                property var viewLines: myView.buffer().rowCol(myView.buffer().size())[0]
                Rectangle {
                    color: frontend.defaultBg();
                    anchors.fill: parent
                }
                ListView {
                    anchors.fill: parent;
                    model: consoleView.viewLines
                    delegate: Text {
                        text: frontend.formatLine(consoleView.myView, index)
                        textFormat: TextEdit.RichText
                        color: "white"
                    }
                }
            }
        }
    }
}

{'fraction_non_alphanumeric': 0.07086901074877026, 'fraction_numerical': 0.007651666970304245, 'mean_word_length': 0.8379645128891865, 'pattern_counts': {'":': 0, '<': 3, '<?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': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7620317', 'n_tokens_mistral': 1263, 'n_tokens_neox': 1150, 'n_words': 257}