This file is indexed.

/usr/share/kde4/apps/plasma/plasmoids/org.kde.windowstrip/WindowStrip.qml is in plasma-widgets-active 2.0+git2012021101-0ubuntu4~ppa3.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
// -*- coding: iso-8859-1 -*-
/*
 *   Author: Marco Martin <mart@kde.org>
 *   Date: Sun Nov 7 2010, 18:51:24
 *
 *   This program is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU Library General Public License as
 *   published by the Free Software Foundation; either version 2 or
 *   (at your option) any later version.
 *
 *   This program is distributed in the hope that it will be useful,
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *   GNU Library General Public License for more details
 *
 *   You should have received a copy of the GNU Library General Public
 *   License along with this program; if not, write to the
 *   Free Software Foundation, Inc.,
 *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 */

import QtQuick 1.0
import org.kde.plasma.core 0.1 as PlasmaCore
import org.kde.plasma.mobilecomponents 0.1 as MobileComponents
import org.kde.qtextracomponents 0.1

Item {
    id: main
    width: 500
    height: 150

    property int iconSize: 22


    PlasmaCore.DataSource {
        id: tasksSource
        engine: "tasks"
        interval: 0
        onSourceAdded: {
            print("SOURCE added: " + source);
            connectSource(source)
        }
        Component.onCompleted: {
            connectedSources = sources
        }
        onDataChanged: {
            positionsTimer.restart()
        }
    }

    function windowProperties(item)
    {
        var itemPos = item.mapToItem(mainRow, 0, 0)
        var properties = new Object()

        properties.winId = item.winId
        //FIXME: why those hardoced numbers?
        properties.x = itemPos.x + 10
        properties.y = itemPos.y + 20
        properties.width = item.width - 20
        properties.height = item.height - 48

        return properties
    }

    Timer {
        id: positionsTimer
        interval: 300
        repeat: false
        onTriggered: {
            var childrenPositions = Array()

            childrenPositions[0] = windowProperties(homeScreenThumbnail)
            for (var i = 0; i < windowsRow.children.length; i++) {
                if (!windowsRow.children[i].visible) {
                    continue
                }
                childrenPositions[i+1] = windowProperties(windowsRow.children[i])
            }
            windowFlicker.childrenPositions = childrenPositions
        }
    }

    PlasmaCore.Theme {
        id: theme
    }

    PlasmaCore.Svg {
        id: iconsSvg
        imagePath: "widgets/configuration-icons"
    }

    // connect from C++ to update
    // - position of the windows, relative to window element
    // - actual position of the row
    // -> calculate screen coordinates from these

    Flickable {
        id: windowFlicker
        objectName: "windowFlicker"

        interactive: true
        contentWidth: mainRow.width
        anchors.fill: parent
        property variant childrenPositions

        onMovementEnded: NumberAnimation {
            target: windowFlicker
            properties: "contentX"
            to: {
                //align to the cell
                var width = windowFlicker.height * 1.6
                var cells = Math.round(windowFlicker.contentX/width)
                return ((cells-1) * 10) + (width * cells)
            }
            duration: 250
        }

        Row {
            id: mainRow
            spacing: 10
            WindowThumbnail {
                id: homeScreenThumbnail
                property variant model
                visible: false
            }
            Row {
                id: windowsRow
                objectName: "windowsRow"
                spacing: 10

                Repeater {

                    model: PlasmaCore.SortFilterModel {
                        sourceModel: PlasmaCore.DataModel {
                            dataSource: tasksSource
                        }
                        filterRole: "onCurrentActivity"
                        filterRegExp: "true"
                        onModelReset: positionsTimer.restart()
                    }

                    onChildrenChanged: {
                        print(" someone changed something");
                        for (var ch in children) {
                            print("Child:" + ch.x)
                        }
                    }

                    delegate: WindowThumbnail {
                        id: windowThumbnail

                        Component.onCompleted: {
                            if (className == shellName) {
                                homeScreenThumbnail.visible = true
                                homeScreenThumbnail.model = model
                                homeScreenThumbnail.winId = DataEngineSource
                                windowThumbnail.visible = false
                            }
                        }
                    }
                }
                //purely a spacer
                Item {
                    width: height*1.6 + 32
                    height: main.height
                }
            }
        }
    }
}