<commit_before>import QtQuick 2.1
import QtQuick.Controls 1.1
import QtQuick.Layouts 1.1
import QtQuick.Controls.Styles 1.1
import UIContextModel 1.0
import LayerManager 1.0
import LayersView 1.0
import "../../workbench/propertyform" as MetaData
import "../../controls" as Controls
import "../../Global.js" as Global
import "../.." as Base

Item {
    id : metatdata
    width : 210
    height : parent.height
    property alias coverage : overview
    property LayerManager manager
    property bool drawerActive : false

    onDrawerActiveChanged: {
        overview.active = drawerActive
    }

    signal zoomEnded(string envelope)

    function iconSource(name) {
        if ( name === "")
            name = "redbuttonr.png"
         var iconP = "../../images/" + name
         return iconP

     }

    function addDataSource(filter, sourceName, sourceType){
        if ( coverage){
            coverage.addCommand("adddrawer(" + coverage.viewerId + ","+ sourceName + "," + filter + "," + sourceType + ")")
            coverage.update()
        }
    }

    function transfer(datapanel){
        var layers = datapanel.manager.layers;
        for(var i =1; i < layers.length; i++){  // start at 1 because the first layer is always the global layer, is there by default so we skip it
            var expr = "adddrawer(" + coverage.viewerId + ","+ layers[i].name + ",\"itemid=" + layers[i].id + "\"," + layers[i].typeName + ")"
            coverage.addCommand(expr)
        }
        coverage.update()
    }

    function newZoomExtent(newenvelope){
        console.debug("b")
        var env = {envelope : newenvelope, preserveaspectration : false}
        overview.setAttribute("selectiondrawer", env )
        mdspatialinfo.zoomEnvelope(newenvelope)
        overview.update()
    }

    function entireMap() {
        if ( metatdata.manager && layerview.manager){
            console.debug("a")
            var envelope = renderer.attributeOfDrawer("rootdrawer","coverageenvelope")
            var env = {envelope : envelope, preserveaspectration : false}
            overview.setAttribute("selectiondrawer", env )
            mdspatialinfo.zoomEnvelope(envelope)
            overview.update()
        }
    }

    Connections {
        target: mouseActions
        onZoomEnded :{
            layersmeta.endZoom(envelope)
        }
    }

    Rectangle {
        id : layersLabel
        width : parent.width + 10
        height : 18
        color : Global.alternatecolor3
        Text{<commit_msg>removed some debugging code<commit_after>import QtQuick 2.1
import QtQuick.Controls 1.1
import QtQuick.Layouts 1.1
import QtQuick.Controls.Styles 1.1
import UIContextModel 1.0
import LayerManager 1.0
import LayersView 1.0
import "../../workbench/propertyform" as MetaData
import "../../controls" as Controls
import "../../Global.js" as Global
import "../.." as Base

Item {
    id : metatdata
    width : 210
    height : parent.height
    property alias coverage : overview
    property LayerManager manager
    property bool drawerActive : false

    onDrawerActiveChanged: {
        overview.active = drawerActive
    }

    signal zoomEnded(string envelope)

    function iconSource(name) {
        if ( name === "")
            name = "redbuttonr.png"
         var iconP = "../../images/" + name
         return iconP

     }

    function addDataSource(filter, sourceName, sourceType){
        if ( coverage){
            coverage.addCommand("adddrawer(" + coverage.viewerId + ","+ sourceName + "," + filter + "," + sourceType + ")")
            coverage.update()
        }
    }

    function transfer(datapanel){
        var layers = datapanel.manager.layers;
        for(var i =1; i < layers.length; i++){  // start at 1 because the first layer is always the global layer, is there by default so we skip it
            var expr = "adddrawer(" + coverage.viewerId + ","+ layers[i].name + ",\"itemid=" + layers[i].id + "\"," + layers[i].typeName + ")"
            coverage.addCommand(expr)
        }
        coverage.update()
    }

    function newZoomExtent(newenvelope){
        var env = {envelope : newenvelope, preserveaspectration : false}
        overview.setAttribute("selectiondrawer", env )
        mdspatialinfo.zoomEnvelope(newenvelope)
        overview.update()
    }

    function entireMap() {
        if ( metatdata.manager && layerview.manager){
            var envelope = renderer.attributeOfDrawer("rootdrawer","coverageenvelope")
            var env = {envelope : envelope, preserveaspectration : false}
            overview.setAttribute("selectiondrawer", env )
            mdspatialinfo.zoomEnvelope(envelope)
            overview.update()
        }
    }

    Connections {
        target: mouseActions
        onZoomEnded :{
            layersmeta.endZoom(envelope)
        }
    }

    Rectangle {
        id : layersLabel
        width : parent.width + 10
        height : 18
        color : Global.alternatecolor3
        Text{
{'fraction_non_alphanumeric': 0.11191626409017713, 'fraction_numerical': 0.00966183574879227, 'mean_word_length': 2.2777044854881265, 'pattern_counts': {'":': 0, '<': 5, '<?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': '3430980', 'n_tokens_mistral': 1415, 'n_tokens_neox': 1374, 'n_words': 346}