<commit_before>import QtQuick 2.0
import QtQuick.XmlListModel 2.0
import Ubuntu.Components 1.1
import Ubuntu.Components.ListItems 0.1
import Ubuntu.Components.Popups 0.1


/*!
    \brief MainView with a Label and Button elements.
*/

MainView {
    // objectName for functional testing purposes (autopilot-qt5)
    objectName: "mainView"

    // Note! applicationName needs to match the "name" field of the click manifest
    applicationName: "xxeduleqml.eliwan"

    /*
     This property enables the application to change orientation
     when the device is rotated. The default is false.
    */
    //automaticOrientation: true

    // Removes the old toolbar and enables new features of the new header.
    useDeprecatedToolbar: false

    width: units.gu(50)
    height: units.gu(75)

    Cache {
        id: jsonCache
        maxItems: -1
    }

    function getPresentationTitle(entry) {
        if (entry.talk && entry.talk.title) return entry.talk.title
        if (entry["break"]) return entry["break"].nameEN
        return ''
    }

    function getPresentationSummary(entry) {
        if (entry.talk && entry.talk.summary) return entry.talk.summary
        return ''
    }

    function getPresentationSpeakers(entry) {
        var res = ''
        if (entry.talk && entry.talk.speakers) {
            var speakers = entry.talk.speakers
            if (speakers) {
                for (var index = 0; index < speakers.length; ++index) {
                    var speaker = speakers[index];
                    if (res) {
                        res = res + '\r\n' + speaker.link.title
                    } else {
                        res = speaker.link.title
                    }
                }
            }
        }
        return res
    }

    property real spacing: units.gu(1)
    property real margins: units.gu(2)
    property real buttonWidth: units.gu(9)
    PageStack {
        id: pageStack
        anchors.fill: parent

        Component.onCompleted: {
            pageStack.push(conferences)
        }

        Page {
            id: schedule
            title: 'Schedule'
            visible: false

            property string scheduleHref

            ListModel {
                id: scheduleItems

                function getFromTime(idx) {
                    return (idx >= 0 && idx < count) ? get(idx).fromTime: ""
                }
                function getToTime(idx) {
                    return (idx >= 0 && idx < count) ? get(idx).toTime: ""
                }
                function getRoom(idx) {
                    return (idx >= 0 && idx < count) ? get(idx).roomName: ""
                }
                function getTitle(idx) {                    
                    if (idx >= 0 && idx < count) {
                        var entry = get(idx)
                        return getPresentationTitle(entry)
                    }
                    return ""
                }
            }

            ActivityIndicator {
                id: scheduleActivityIndicator
                anchors.right: parent.right
            }

            JsonListModel {
                    id: scheduleJsonItems
                    model: scheduleItems
                    query: "$.slots"
                    activityIndicator: scheduleActivityIndicator
                    cache: jsonCache
                }

            onScheduleHrefChanged: scheduleJsonItems.source = scheduleHref

            Column {
                id: scheduleLayout

                anchors {
                    fill: parent
                    margins: units.gu(2)<commit_msg>put day on schedule page title<commit_after>import QtQuick 2.0
import QtQuick.XmlListModel 2.0
import Ubuntu.Components 1.1
import Ubuntu.Components.ListItems 0.1
import Ubuntu.Components.Popups 0.1


/*!
    \brief MainView with a Label and Button elements.
*/

MainView {
    // objectName for functional testing purposes (autopilot-qt5)
    objectName: "mainView"

    // Note! applicationName needs to match the "name" field of the click manifest
    applicationName: "xxeduleqml.eliwan"

    /*
     This property enables the application to change orientation
     when the device is rotated. The default is false.
    */
    //automaticOrientation: true

    // Removes the old toolbar and enables new features of the new header.
    useDeprecatedToolbar: false

    width: units.gu(50)
    height: units.gu(75)

    Cache {
        id: jsonCache
        maxItems: -1
    }

    function getPresentationTitle(entry) {
        if (entry.talk && entry.talk.title) return entry.talk.title
        if (entry["break"]) return entry["break"].nameEN
        return ''
    }

    function getPresentationSummary(entry) {
        if (entry.talk && entry.talk.summary) return entry.talk.summary
        return ''
    }

    function getPresentationSpeakers(entry) {
        var res = ''
        if (entry.talk && entry.talk.speakers) {
            var speakers = entry.talk.speakers
            if (speakers) {
                for (var index = 0; index < speakers.length; ++index) {
                    var speaker = speakers[index];
                    if (res) {
                        res = res + '\r\n' + speaker.link.title
                    } else {
                        res = speaker.link.title
                    }
                }
            }
        }
        return res
    }

    property real spacing: units.gu(1)
    property real margins: units.gu(2)
    property real buttonWidth: units.gu(9)
    PageStack {
        id: pageStack
        anchors.fill: parent

        Component.onCompleted: {
            pageStack.push(conferences)
        }

        Page {
            id: schedule
            title: 'Schedule'
            visible: false

            property string scheduleHref

            ListModel {
                id: scheduleItems

                function getFromTime(idx) {
                    updateTitle()
                    return (idx >= 0 && idx < count) ? get(idx).fromTime: ""
                }
                function getToTime(idx) {
                    return (idx >= 0 && idx < count) ? get(idx).toTime: ""
                }
                function getRoom(idx) {
                    return (idx >= 0 && idx < count) ? get(idx).roomName: ""
                }
                function getTitle(idx) {                    
                    if (idx >= 0 && idx < count) {
                        var entry = get(idx)
                        return getPresentationTitle(entry)
                    }
                    return ""
                }

                function updateTitle() {
                    console.log("++++++ onDataChanged")
                    console.log('Schedule' + count)
                    console.log('Schedule' + (count > 0 ? ' - ' + get(0).day : ''))
                    console.log('Schedule' + get(0).day)
                    schedule.title = 'Schedule' + (count > 0 ? ' - ' + get(0).day : '')
                }
            }

            ActivityIndicator {
                id: scheduleActivityIndicator
                anchors.right: parent.right
            }

            JsonListModel {
                    id: scheduleJsonItems
                    model: scheduleItems
                    query: "$.slots"
                    activityIndicator: scheduleActivityIndicator
                    cache: jsonCache                    
                }

            onScheduleHrefChanged: scheduleJsonItems.source = scheduleHref

            Column {
                id: scheduleLayout

                anchors {
                    fill: parent
                    margins: units.gu(2)
{'fraction_non_alphanumeric': 0.08655352480417755, 'fraction_numerical': 0.007180156657963447, 'mean_word_length': 1.3173018753781005, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, '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': '2900846', 'n_tokens_mistral': 2012, 'n_tokens_neox': 1836, 'n_words': 496}