This file is indexed.

/usr/lib/kde4/imports/org/kde/BreadcrumbNavigationView.qml is in kdepim-runtime 4:4.8.2a-0ubuntu2.

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
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
/*
    Copyright (C) 2010 Klarälvdalens Datakonsult AB,
        a KDAB Group company, info@kdab.net,
        author Stephen Kelly <stephen@kdab.com>

    This library 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 of the License, or (at your
    option) any later version.

    This library 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 library; see the file COPYING.LIB.  If not, write to the
    Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
*/

import Qt 4.7

Item {
  id: breadcrumbTopLevel
  clip : true

  property variant breadcrumbComponentFactory

  property alias topDelegate :  topButton.sourceComponent
  property alias breadcrumbDelegate :  breadcrumbsView.delegate
  property alias selectedItemDelegate :  selectedItemView.delegate
  property alias childItemsDelegate :  childItemsView.delegate
  property alias multipleSelectionText : multipleSelectionMessage.text

  property int itemHeight : height / 7
  property int _transitionSelect : -1

  property bool hasChildren :  childItemsView.count > 0
  property bool hasSelection :  selectedItemView.count > 0
  property bool hasBreadcrumbs :  breadcrumbsView.count > 0

  property alias numBreadcrumbs : breadcrumbsView.count
  property alias numSelected : selectedItemView.count

  property variant breadcrumbSelectionModel : breadcrumbComponentFactory.qmlBreadcrumbSelectionModel();
  property variant selectedItemSelectionModel : breadcrumbComponentFactory.qmlSelectionModel();
  property variant childSelectionModel : breadcrumbComponentFactory.qmlChildSelectionModel();

  signal childCollectionSelected(int row)
  signal breadcrumbCollectionSelected(int row)
  signal homeClicked()

  SystemPalette { id: palette; colorGroup: "Active" }

  Loader {
    id : topButton
    height : itemHeight

    anchors.top : parent.top

    anchors.left : parent.left
    anchors.right : parent.right

    Image {
      id : topRightDivider
      source : "dividing-line.png"
      anchors.top : parent.top
      anchors.right : parent.right
      anchors.bottom : parent.bottom
      anchors.bottomMargin : breadcrumbTopLevel.hasBreadcrumbs ? 0 : 8
      fillMode : Image.TileVertically
      opacity : breadcrumbTopLevel.hasSelection ? 1 : 0
    }
  }

  ListView {
    id : breadcrumbsView
    model : breadcrumbComponentFactory.qmlBreadcrumbsModel();
    interactive : false
    height : breadcrumbsView.count > 0 ? itemHeight : 0

    property int selectedIndex : -1
    anchors.top : topButton.bottom
    anchors.left : parent.left
    anchors.right : parent.right
    highlightFollowsCurrentItem : true
    highlightRangeMode : ListView.StrictlyEnforceRange
    preferredHighlightBegin : 0
    preferredHighlightEnd : height
    onCountChanged : {
      positionViewAtIndex(count - 1, ListView.Beginning)
    }
    Component.onCompleted : {
      positionViewAtIndex(count - 1, ListView.Beginning)
    }
  }

  Item {
    id : breadcrumbPlaceHolder
    height : breadcrumbTopLevel.hasBreadcrumbs ? itemHeight : 0
    anchors.top : topButton.bottom
    anchors.left : parent.left
    anchors.right : parent.right
  }
  Image {
    id : breadcrumbRightDivider
    source : "dividing-line.png"
    anchors.top : breadcrumbPlaceHolder.top
    anchors.right : breadcrumbPlaceHolder.right
    height : breadcrumbTopLevel.hasBreadcrumbs ? (itemHeight -8) : 0
    fillMode : Image.TileVertically
    opacity : breadcrumbTopLevel.hasBreadcrumbs ? 1 : 0
  }

  ListView {
    id : selectedItemView
    interactive : false

    model : breadcrumbComponentFactory.qmlSelectedItemModel();
    height : itemHeight * selectedItemView.count
    anchors.top : breadcrumbsView.bottom
    anchors.left : parent.left
    anchors.right : parent.right

    onCountChanged : {
      if (selectedItemView.count > 1)
      {
        breadcrumbsView.visible = false;
        breadcrumbPlaceHolder.visible = false;
        selectedItemView.visible = false;
        selectedItemPlaceHolder.visible = false;
        childItemsView.visible = false;
        favinfoOverlay.visible = true;
      }
      else
      {
        breadcrumbsView.visible = true;
        breadcrumbPlaceHolder.visible = true;
        selectedItemView.visible = true;
        selectedItemPlaceHolder.visible = true;
        childItemsView.visible = true;
        favinfoOverlay.visible = false;
      }
    }
  }

  Item {
    id : selectedItemPlaceHolder
    height : selectedItemView.count > 0 ? itemHeight : 0
    anchors.top : breadcrumbPlaceHolder.bottom
    anchors.left : parent.left
    anchors.right : parent.right
    Item {
      id : selectedPlaceHolderImages
      anchors.fill : parent
      opacity : (selectedItemView.count > 0) ? 1 : 0
      Image {
        source : "dividing-line-horizontal.png"
        fillMode : Image.TileHorizontally
        anchors.top : parent.top
        anchors.topMargin : -3
        anchors.right : topLine.left
        anchors.left : parent.left
      }
      Image {
        id : topLine
        source : "list-line-top.png"
        anchors.right : parent.right
        anchors.top : parent.top
        anchors.topMargin : -8
      }
    }
  }

  ListView {
    id : childItemsView
    clip : true
    model : breadcrumbComponentFactory.qmlChildItemsModel();
    property bool shouldBeFlickable

    anchors.top : selectedItemPlaceHolder.bottom
    anchors.bottom : breadcrumbTopLevel.bottom
    anchors.left : parent.left
    anchors.right : parent.right

    shouldBeFlickable : childItemsView.height < (itemHeight * childItemsView.count)
    interactive : shouldBeFlickable
  }

  Item {
    id : childItemsViewPlaceHolder
    anchors.top : selectedItemPlaceHolder.bottom
    anchors.bottom : breadcrumbTopLevel.bottom
    anchors.left : parent.left
    anchors.right : parent.right


    Image {
      source : "dividing-line-horizontal.png"
      fillMode : Image.TileHorizontally
      anchors.right : parent.right
      anchors.left : parent.left
      anchors.top : parent.top
      visible : selectedItemView.count > 1 ? false : true
    }

    Image {
      source : "dividing-line.png"
      anchors.top : parent.top
      anchors.right : parent.right
      anchors.bottom : parent.bottom
      fillMode : Image.TileVertically
    }
    Image {
      source : "scrollable-top.png"
      anchors.top : parent.top
      anchors.right : parent.right
      anchors.left : parent.left
      fillMode : Image.TileHorizontally
      opacity : childItemsView.shouldBeFlickable ? 1 : 0
      visible : selectedItemView.count > 1 ? false : true
    }
    Image {
      source : "scrollable-bottom.png"
      anchors.bottom : parent.bottom
      anchors.right : parent.right
      anchors.left : parent.left
      fillMode : Image.TileHorizontally
      opacity : childItemsView.shouldBeFlickable ? 1 : 0
      visible : selectedItemView.count > 1 ? false : true
    }
  }

  Item {
    id : favinfoOverlay
    anchors.top : topButton.bottom
    anchors.bottom : parent.bottom
    anchors.left : parent.left
    anchors.right : parent.right
    visible : false

    Text {
      id : multipleSelectionMessage
      font.italic : true
      horizontalAlignment : Text.AlignHCenter
      anchors.horizontalCenter : parent.horizontalCenter

      height : 30
      x : 20
      y : 50
    }

    Image {
      source : "dividing-line-horizontal.png"
      fillMode : Image.TileHorizontally
      anchors.top : parent.top
      anchors.right : parent.right
      anchors.left : parent.left
    }

    Image {
      source : "dividing-line.png"
      fillMode : Image.TileVertically
      anchors.top : parent.top
      anchors.right : parent.right
      anchors.bottom : parent.bottom
    }

  }

  function completeHomeSelection() {
    selectedItemSelectionModel.clearSelection();
    homeClicked()
    // TODO: Remove:
    breadcrumbCollectionSelected(breadcrumbTopLevel._transitionSelect);
    breadcrumbTopLevel._transitionSelect = -1;
    breadcrumbTopLevel.state = "after_select_breadcrumb";
    breadcrumbTopLevel.state = "";
  }

  function completeChildSelection() {
    childSelectionModel.select(breadcrumbTopLevel._transitionSelect, 3)
    // TODO: Remove:
    childCollectionSelected(breadcrumbTopLevel._transitionSelect);
    breadcrumbTopLevel._transitionSelect = -1;
    breadcrumbTopLevel.state = "after_select_child";
    breadcrumbTopLevel.state = "";
  }

  function completeBreadcrumbSelection() {
    breadcrumbSelectionModel.select(breadcrumbTopLevel._transitionSelect, 3)
    // TODO: Remove:
    breadcrumbCollectionSelected(breadcrumbTopLevel._transitionSelect);
    breadcrumbTopLevel._transitionSelect = -1;
    breadcrumbTopLevel.state = "after_select_breadcrumb";
    breadcrumbTopLevel.state = "";
  }

  states : [
    State {
      name : "before_select_home"
      PropertyChanges {
        target : breadcrumbsView
        opacity : 0
        height : 0
      }
      PropertyChanges {
        target : breadcrumbPlaceHolder
        opacity : 0
        height : 0
      }
      PropertyChanges {
        target : selectedItemView
        opacity : 0
        height : 0
      }
      PropertyChanges {
        target : selectedItemPlaceHolder
        opacity : 0
        height : 0
      }
      PropertyChanges {
        target : childItemsView
        opacity : 0
      }
    },
    State {
      name : "before_select_child"
      PropertyChanges {
        target : topRightDivider
        anchors.bottomMargin : 0
        opacity : 1
      }
      PropertyChanges {
        target : breadcrumbsView
        height : itemHeight
        anchors.topMargin : -itemHeight
        opacity : 0
      }
      PropertyChanges {
        target : breadcrumbRightDivider
        anchors.topMargin : -8
        height : 67
        opacity : 0 // { 1 } // selectedItemView.count > 0 ? 1 : 0
      }
      PropertyChanges {
        target : selectedItemPlaceHolder
        anchors.topMargin : (breadcrumbsView.count == 0 && selectedItemView.count > 0) ? (itemHeight) : (breadcrumbsView.count == 0) ? 8 : 0
        height : itemHeight
        opacity : 1
      }

      PropertyChanges {
        target : selectedPlaceHolderImages
        opacity : 1
      }
      PropertyChanges {
        target : childItemsView
        opacity : 0
      }
    },
    State {
      name : "after_select_child"
      PropertyChanges {
        target : childItemsView
        opacity : 0
      }
    },
    State {
      name : "before_select_breadcrumb"
      PropertyChanges {
        target : breadcrumbsView
        height : { if (breadcrumbTopLevel._transitionSelect >= 0) itemHeight * ( breadcrumbTopLevel._transitionSelect + 1 ) }
        anchors.bottomMargin : -itemHeight
        opacity : 0.5
      }
      PropertyChanges {
        target : selectedItemView
        anchors.topMargin : (application.selectedCollectionRow() + breadcrumbsView.count) * itemHeight;
        opacity : 0
      }
      PropertyChanges {
        target : childItemsView
        opacity : 0
      }
    },
    State {
      name : "after_select_breadcrumb"
      PropertyChanges {
        target : breadcrumbsView
        contentY : breadcrumbsView.count > 1 ? itemHeight : 0
      }
      PropertyChanges {
        target : childItemsView
        opacity : 0
      }
    }
  ]

  transitions : [
    Transition {
      from : "*"
      to : "before_select_home"
      SequentialAnimation {
        ParallelAnimation {
          PropertyAnimation {
            target : breadcrumbPlaceHolder
            duration: 500
            easing.type: "OutQuad"
            properties : "opacity,height"
          }
          PropertyAnimation {
            target : breadcrumbsView
            duration: 500
            easing.type: "OutQuad"
            properties : "opacity,height"
          }
          PropertyAnimation {
            target : selectedItemView
            duration: 500
            easing.type: "OutQuad"
            properties : "opacity,height"
          }
          PropertyAnimation {
            target : selectedItemPlaceHolder
            duration: 500
            easing.type: "OutQuad"
            properties : "opacity,height"
          }
          PropertyAnimation {
            target : childItemsView
            duration: 500
            easing.type: "OutQuad"
            properties : "height"
          }
        }
        ScriptAction {
          script: { completeHomeSelection(); }
        }
      }
    },
    Transition {
      from : "*"
      to : "before_select_child"
      SequentialAnimation {
        ParallelAnimation {
          PropertyAnimation {
            duration: 500
            easing.type: "OutQuad"
            target: topRightDivider
            properties: "opacity,anchors.bottomMargin"
          }
          PropertyAnimation {
            duration: 500
            easing.type: "OutQuad"
            target: breadcrumbsView
            properties: "height,anchors.topMargin,opacity"
          }
          PropertyAnimation {
            duration: 500
            easing.type: "OutQuad"
            target: breadcrumbRightDivider
            properties: "height"
          }
          PropertyAnimation {
            target : selectedItemPlaceHolder
            duration: 500
            easing.type: "OutQuad"
            properties : "anchors.topMargin,height,opacity"
          }
          PropertyAnimation {
            target : selectedPlaceHolderImages
            duration: 500
            easing.type: "OutQuad"
            properties : "opacity"
          }
          PropertyAnimation {
            duration: 500
            easing.type: "OutQuad"
            target: childItemsView
            properties: "opacity"
          }
          PropertyAnimation {
            duration: 500
            easing.type: "OutQuad"
            target: childItemsDelegate
            properties: "itemBackground"
          }
        }
        ScriptAction {
         script: { completeChildSelection(); }
        }
      }
    },
    Transition {
      from : "after_select_child"
      to : ""
      NumberAnimation {
        target: childItemsView
        properties: "opacity"
      }
      NumberAnimation {
        target: selectedItemView
        properties: "opacity"
      }
    },
    Transition {
      from : "*"
      to : "before_select_breadcrumb"
      SequentialAnimation {
        ParallelAnimation {
          PropertyAnimation {
            duration: 500
            easing.type: "OutQuad"
            target: breadcrumbsView
            properties: "height,opacity"
          }
          PropertyAnimation {
            duration: 500
            easing.type: "OutQuad"
            target: selectedItemView
            properties: "opacity,anchors.topMargin"
          }
          PropertyAnimation {
            duration: 500
            easing.type: "OutQuad"
            target: childItemsView
            properties: "opacity"
          }
        }
        ScriptAction {
         script: { completeBreadcrumbSelection(); }
        }
      }
    },
    Transition {
      from : "after_select_breadcrumb"
      to : ""
      NumberAnimation {
        duration: 500
        easing.type: "OutQuad"
        target: childItemsView
        properties: "opacity"
      }
    }
  ]
}