aboutsummaryrefslogtreecommitdiffstats
path: root/mobility/servicebrowser/qml/ServicesPage.qml
blob: 4bcf85cd4f3ae4bb37f0e854048cac6d6657a5a3 (plain)
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


import QtQuick 1.1
import com.nokia.meego 1.0
import com.nokia.extras 1.1

Page {
    id: servicePage
    anchors.margins: UiConstants.DefaultMargin
    //orientationLock: PageOrientation.LockPortrait

    Label {
        id: titleLabel
        anchors.top: parent.top
        anchors.horizontalCenter: parent.horizontalCenter
        text: "Services available"
    }

    Flickable {
        anchors.top: titleLabel.bottom
        anchors.horizontalCenter: parent.horizontalCenter
        width: parent.width
        contentHeight: servicesButtons.height

        ButtonColumn {
            id: servicesButtons
            width: parent.width
            anchors.horizontalCenter: parent.horizontalCenter
            Repeater {
                model: manager.servicesNames
                Button {
                    text: modelData
                    onClicked: {
                        console.log("Selecting service")
                        pageStack.push(Qt.createComponent("ServiceImplementations.qml"),
                                                            { serviceName: modelData,
                                                              serviceIndex: index })
                    }
                }
            }
        }
    }

    /*tools: ToolBarLayout {
        id: mainTools
        ToolButton {
            text: "Add..."
            onClicked: {
                console.log("Add new contact")
                pageStack.push(Qt.createComponent("ContactEdit.qml"))
            }
        }
        ToolButton {
            text: "Select backend..."
            onClicked: {
                pageStack.push(Qt.createComponent("SelectBackend.qml"))
            }
        }
    }*/

}