~ubuntu-branches/ubuntu/vivid/lightdm-kde/vivid

« back to all changes in this revision

Viewing changes to themes/classic/ScreenManager.qml

  • Committer: Package Import Robot
  • Author(s): Michal Zajac
  • Date: 2012-07-22 19:44:44 UTC
  • mfrom: (1.1.3)
  • Revision ID: package-import@ubuntu.com-20120722194444-aaueaylu3ddnqcth
Tags: 0.2.1-0ubuntu1
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// import QtQuick 1.0 // to target S60 5th Edition or Maemo 5
 
2
import QtQuick 1.1
 
3
 
 
4
Item {
 
5
    id: manager
 
6
    property Item activeScreen
 
7
    property Component delegate
 
8
 
 
9
    Repeater {
 
10
        id: repeater
 
11
        model: screensModel
 
12
        delegate : delegateItem
 
13
    }
 
14
 
 
15
    Component.onCompleted: {
 
16
        activeScreen = manager.children[0]
 
17
    }
 
18
 
 
19
    Component {
 
20
        id: delegateItem
 
21
 
 
22
        Item {
 
23
            x: geometry.x
 
24
            width: geometry.width
 
25
            y: geometry.y
 
26
            height: geometry.height
 
27
            
 
28
            MouseArea {
 
29
                id: mouseArea
 
30
                anchors.fill: parent
 
31
                hoverEnabled: true
 
32
                onEntered: {
 
33
                    screenManager.activeScreen = parent
 
34
                }
 
35
            }
 
36
 
 
37
            Loader {
 
38
                sourceComponent: manager.delegate
 
39
                anchors.fill: parent
 
40
            }
 
41
        }
 
42
    }
 
43
}