~ralsina/ubuntu-system-settings/notification-plugin

« back to all changes in this revision

Viewing changes to plugins/phone/PageComponent.qml

  • Committer: Roberto Alsina
  • Date: 2014-07-31 18:32:54 UTC
  • mfrom: (779.1.70 ubuntu-system-settings)
  • Revision ID: roberto.alsina@canonical.com-20140731183254-0dgi0dfspshtolbb
merged trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
import SystemSettings 1.0
23
23
import Ubuntu.Components 0.1
24
24
import Ubuntu.Components.ListItems 0.1 as ListItem
25
 
import Ubuntu.SystemSettings.Phone 1.0
 
25
import MeeGo.QOfono 0.2
26
26
 
27
27
ItemPage {
28
28
    title: i18n.tr("Phone")
29
29
    property string carrierName: netop.name
30
30
    property string carrierString: carrierName ? carrierName : i18n.tr("SIM")
31
31
 
32
 
    NetworkRegistration {
 
32
    OfonoManager {
 
33
        id: manager
 
34
    }
 
35
 
 
36
    OfonoNetworkRegistration {
33
37
        id: netop;
34
 
        onNameChanged:
35
 
            carrierName = netop.name
 
38
        modemPath: manager.modems[0]
 
39
        onNameChanged: carrierName = netop.name
36
40
    }
37
41
 
38
 
    SimManager {
 
42
    OfonoSimManager {
39
43
        id: sim
 
44
        modemPath: manager.modems[0]
40
45
    }
41
46
 
42
47
    Column {
45
50
        ListItem.Standard {
46
51
            text: i18n.tr("Call forwarding")
47
52
            progression: true
48
 
            onClicked: pageStack.push(Qt.resolvedUrl("CallForwarding.qml"))
 
53
            onClicked: pageStack.push(Qt.resolvedUrl("CallForwarding.qml"), {modem: manager.modems[0]})
49
54
        }
50
55
 
51
56
        ListItem.Standard {
52
 
            text: i18n.tr("Call waiting")
 
57
            text: i18n.tr("Call waiting")            
53
58
            progression: true
54
 
            onClicked: pageStack.push(Qt.resolvedUrl("CallWaiting.qml"))
 
59
            onClicked: pageStack.push(Qt.resolvedUrl("CallWaiting.qml"), {modem: manager.modems[0]})
 
60
            showDivider: false
55
61
        }
56
62
 
57
63
        ListItem.Divider {}
61
67
            text: i18n.tr("%1 Services").arg(carrierString)
62
68
            progression: true
63
69
            enabled: sim.present
64
 
            onClicked: pageStack.push(Qt.resolvedUrl("Services.qml"), {carrierString: carrierString, sim: sim})
 
70
            onClicked: pageStack.push(Qt.resolvedUrl("Services.qml"),
 
71
                                      {carrierString: carrierString, sim: sim})
65
72
        }
66
73
    }
67
74
}