62
63
PlasmaWidgets.Label {
64
text: i18n("Available Connections")
66
anchors { top: parent.top; left: parent.left; right: parent.right; }
64
anchors { top: parent.top; left: parent.left; right: parent.right }
66
text: i18n("<h2>Connect to the Internet</h2>")
72
anchors { top: header.bottom; left: parent.left; right: parent.right; bottom: parent.bottom; margins: 8}
74
anchors.top: titleLabel.bottom
75
anchors.left: parent.left
76
anchors.right: parent.right
77
anchors.bottom: statusText.top
78
//anchors.fill: parent
133
138
Component.onCompleted: {
135
140
//if (typeof networkEngineSource.data[DataEngineSource]["securityIcon"] != "undefined") {
136
//setIcon(networkEngineSource.data[DataEngineSource]["securityIcon"]);
137
setIcon(securityIcon);
141
setIcon(networkEngineSource.data[DataEngineSource]["securityIcon"]);
139
143
} catch (TypeError) {
141
145
print(" TypeError" + mainText.text);
143
print(" Exception ignored in " + mainText.text);
147
//print(" Exception ignored in " + mainText.text);
146
150
onClicked: citem.state = (citem.state == "expanded") ? "collapsed" : "expanded"
150
PlasmaWidgets.Label {
153
print(" Hmm ... " + activatableType);
154
if (activatableType != "" && isInterfaceConnection(activatableType)) {
155
print("ifaceconnnection :)");
156
if (connectionName) {
157
var t = connectionName;
158
//if (networkEngineSource.data[DataEngineSource]["activationState"] == "Activated") {
159
// t = t + " (Connected)";
157
if (isInterfaceConnection(activatableType)) {
158
//var t = networkEngineSource.data[DataEngineSource]["connectionName"];
159
var t = connectionName;
160
if (activationState == "Activated") {
161
t = t + " (Connected)";
165
164
} else if ("WirelessNetwork" == activatableType) {
169
return citem.activatableType;
167
return activatableType;
174
170
anchors.top: parent.top
175
171
anchors.left: strengthIconWidget.right
176
anchors.right: parent.right
177
172
//anchors.right: securityIconWidget.left
179
PlasmaWidgets.Label {
182
177
if (isInterfaceConnection(activatableType)) {
183
//var conType = networkEngineSource.data[DataEngineSource]["connectionType"];
185
var conType = connectionType;
186
// Wired, Wireless, Gsm, Cdma, Vpn or Pppoe
187
if (conType == "Wireless") {
188
return i18n("Remembered Wifi Connection");
189
} else if (conType == "Wired") {
190
return i18n("Wired Connection");
191
} else if (conType == "Gsm") {
192
return i18n("Mobile Broadband");
193
} else if (conType == "Cdma") {
194
return i18n("Mobile Internet");
195
} else if (conType == "Pppoe") {
196
return i18n("Modem Connection");
197
} else if (conType == "Vpn") {
198
return i18n("Virtual Private Network");
200
} catch (ReferenceError) {
201
print("Exception caught in infoText.Label connectionType");
178
// Wired, Wireless, Gsm, Cdma, Vpn or Pppoe
179
if (connectionType == "Wireless") {
180
return i18n("Remembered Wifi Connection");
181
} else if (connectionType == "Wired") {
182
return i18n("Wired Connection");
183
} else if (connectionType == "Gsm") {
184
return i18n("Mobile Broadband");
185
} else if (connectionType == "Cdma") {
186
return i18n("Mobile Internet");
187
} else if (connectionType == "Pppoe") {
188
return i18n("Modem Connection");
189
} else if (connectionType == "Vpn") {
190
return i18n("Virtual Private Network");
204
return "unknown type";
206
195
//text: connectionType
196
font.pixelSize: mainText.font.pixelSize - 2
209
198
anchors.top: mainText.bottom
210
199
anchors.left: mainText.left
211
anchors.right: parent.right
200
//anchors.bottom: parent.top
214
203
PlasmaWidgets.PushButton {
215
204
id: connectButton
205
text: i18n("Connect")
219
207
//setIcon("kmail")
220
208
anchors.top: infoText.bottom
307
295
return "network-wireless-connnected-00";
310
function isInterfaceConnection(myType) {
298
function isInterfaceConnection(activatableType) {
311
299
var cons = ["InterfaceConnection", "WirelessInterfaceConnection", "VpnInterfaceConnection", "GsmInterfaceConnection"];
312
//print("T:" + myType + " " + cons.indexOf(myType));
313
return cons.indexOf(myType) >= 0;
300
//print(activatableType);
301
return cons.indexOf(activatableType) >= 0;
308
color: theme.backgroundColor
312
border.color: theme.backgroundColor
313
//border.opacity: 0.1
319
316
PlasmaWidgets.Label {
321
text: "Connected to some.network."
322
anchors.top: list.bottom
318
text: "statuslabel ....."
319
//anchors.top: list.bottom
323
320
anchors.bottom: parent.bottom
324
321
anchors.left: parent.left
325
322
anchors.right: parent.right