~mterry/ubuntu-system-settings/wizard-introspection-rtm

« back to all changes in this revision

Viewing changes to plugins/cellular/Components/SimEditor.qml

refactor simeditor, removing settings

Show diffs side-by-side

added added

removed removed

Lines of Context:
66
66
        text: i18n.tr("Edit SIM Name")
67
67
    }
68
68
 
69
 
    Column {
70
 
 
71
 
        width: parent.width
72
 
        spacing: units.gu(2)
73
 
 
74
 
        ListItem.Standard {
75
 
            id: sim1Item
76
 
            text: sim1.title
77
 
            objectName: "editSim1"
78
 
            progression: true
79
 
            onClicked: {
80
 
                simList.state = "editingSim1";
81
 
            }
82
 
        }
83
 
 
84
 
        Column {
85
 
            id: sim1Placeholder
86
 
        }
87
 
    }
88
 
 
89
 
    Column {
90
 
 
91
 
        anchors.left: parent.left
92
 
        anchors.right: parent.right
93
 
        spacing: units.gu(2)
94
 
 
95
 
        ListItem.Standard {
96
 
            id: sim2Item
97
 
            text: sim2.title
98
 
            objectName: "editSim2"
99
 
            progression: true
100
 
            onClicked: {
101
 
                simList.state = "editingSim2";
102
 
            }
103
 
        }
104
 
 
105
 
        Column {
106
 
            id: sim2Placeholder
107
 
        }
 
69
 
 
70
    ListItem.Standard {
 
71
        id: sim1Item
 
72
        text: sim1.title
 
73
        objectName: "editSim1"
 
74
        progression: true
 
75
        onClicked: {
 
76
            simList.state = "editingSim1";
 
77
            nameField.forceActiveFocus();
 
78
        }
 
79
    }
 
80
 
 
81
    Column {
 
82
        id: sim1Placeholder
 
83
    }
 
84
 
 
85
    ListItem.Standard {
 
86
        id: sim2Item
 
87
        text: sim2.title
 
88
        objectName: "editSim2"
 
89
        progression: true
 
90
        onClicked: {
 
91
            simList.state = "editingSim2";
 
92
            nameField.forceActiveFocus();
 
93
        }
 
94
    }
 
95
 
 
96
    Column {
 
97
        id: sim2Placeholder
108
98
    }
109
99
 
110
100
    Column {
117
107
            horizontalCenter: simList.horizontalCenter
118
108
        }
119
109
 
 
110
        Item {
 
111
            height: units.gu(0.1)
 
112
            width: parent.width
 
113
        }
 
114
 
120
115
        TextField {
121
116
            id: nameField
122
117
            objectName: "nameField"
123
118
            maximumLength: 30
124
119
            width: simList.width - units.gu(4)
 
120
            onTriggered: renameAction
125
121
        }
126
122
 
127
123
        Row {
153
149
            id: renameAction
154
150
            onTriggered: {
155
151
                if (simList.state === "editingSim1") {
156
 
                    ussS.sim1Name = nameField.text;
 
152
                    //ussS.sim1Name = nameField.text;
157
153
                } else if (simList.state === "editingSim2") {
158
 
                    ussS.sim2Name = nameField.text;
 
154
                    //ussS.sim2Name = nameField.text;
159
155
                }
160
156
                simList.state = "";
161
157
            }