2
* Copyright (C) 2013 ~ 2014 National University of Defense Technology(NUDT) & Kylin Ltd.
4
* This program is free software; you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License as published by
6
* the Free Software Foundation; version 3.
8
* This program is distributed in the hope that it will be useful,
9
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
* GNU General Public License for more details.
13
* You should have received a copy of the GNU General Public License
14
* along with this program. If not, see <http://www.gnu.org/licenses/>.
18
import "../common" as Common
19
import "../bars" as Bars
20
import "../common/InfoGroup.js" as InfoGroup
23
id: home; width: parent.width; height: 476
25
property int fontSize: 14
26
property string homepath
27
Component.onCompleted: {
28
home.homepath = sessiondispatcher.getHomePath();
31
// Component.onCompleted: {
32
function init_data() {
33
systemdispatcher.get_networkcard_info_qt();//获取详细信息
34
var netName = systemdispatcher.getHWSingleInfo("NetVendor", "networkcard");
35
logo.source = InfoGroup.judgeName(netName.toUpperCase()) ? (home.homepath + "/.cache/youker-assistant/uk-img/Manufacturer/" + netName.toUpperCase() + ".jpg") : ("../../img/toolWidget/ubuntukylin.png");
37
modelText.text = systemdispatcher.getHWSingleInfo("NetProduct", "networkcard");
38
vendorText.text = netName;
39
driverText.text = systemdispatcher.getHWSingleInfo("NetDrive", "networkcard");
40
busText.text = systemdispatcher.getHWSingleInfo("NetBusinfo", "networkcard");
41
deviceText.text = systemdispatcher.getHWSingleInfo("NetLogicalname", "networkcard");
42
ipText.text = systemdispatcher.getHWSingleInfo("NetIp", "networkcard");
43
macText.text = systemdispatcher.getHWSingleInfo("NetSerial", "networkcard");
44
linkText.text = systemdispatcher.getHWSingleInfo("NetLink", "networkcard");
45
maxText.text = systemdispatcher.getHWSingleInfo("NetCapacity", "networkcard") + " Mbit/s";
47
var wnetName = systemdispatcher.getHWSingleInfo("WlanVendor", "networkcard");
48
wlogo.source = InfoGroup.judgeName(wnetName.toUpperCase()) ? (home.homepath + "/.cache/youker-assistant/uk-img/Manufacturer/" + wnetName.toUpperCase() + ".jpg") : ("../../img/toolWidget/ubuntukylin.png");
49
wdriverText.text = systemdispatcher.getHWSingleInfo("WlanDrive", "networkcard");
50
wvendorText.text = wnetName;
51
wmodelText.text = systemdispatcher.getHWSingleInfo("WlanProduct", "networkcard");
52
wbusText.text = systemdispatcher.getHWSingleInfo("WlanBusinfo", "networkcard");
53
wdeviceText.text = systemdispatcher.getHWSingleInfo("WlanLogicalname", "networkcard");
54
wmacText.text = systemdispatcher.getHWSingleInfo("WlanSerial", "networkcard");
55
wipText.text = systemdispatcher.getHWSingleInfo("WlanIp", "networkcard");
60
target: sessiondispatcher
61
onTellDetailPageUpdateData: {
62
if (infoFlag == "networkcard") {
70
anchors.left: parent.left
71
anchors.top: parent.top
73
height: parent.height - 40
87
text: qsTr("NIC Info")//有线网卡信息
93
anchors.verticalCenter: parent.verticalCenter
94
width: home.width - basictitle.width - 30 * 2
99
anchors.left: parent.left
100
anchors.leftMargin: 20
105
text: qsTr("NIC Model:")//有线网卡型号:
106
font.pixelSize: home.fontSize
113
wrapMode: Text.WordWrap
114
text: ""//systemdispatcher.getHWSingleInfo("NetProduct")
115
font.pixelSize: home.fontSize
122
text: qsTr("Vendor:")//制造商:
123
font.pixelSize: home.fontSize
130
font.pixelSize: home.fontSize
137
text: qsTr("NIC Driver:")//有线网卡驱动:
138
font.pixelSize: home.fontSize
145
font.pixelSize: home.fontSize
152
text: qsTr("Bus Address:")//总线地址:
153
font.pixelSize: home.fontSize
160
font.pixelSize: home.fontSize
167
text: qsTr("Device Name:")//设备名称:
168
font.pixelSize: home.fontSize
175
font.pixelSize: home.fontSize
182
text: qsTr("IP Address:")//IP地址:
183
font.pixelSize: home.fontSize
190
font.pixelSize: home.fontSize
197
text: qsTr("Mac Address:")//MAC地址:
198
font.pixelSize: home.fontSize
205
font.pixelSize: home.fontSize
212
text: qsTr("Connection Status: ")//连接状态:
213
font.pixelSize: home.fontSize
220
font.pixelSize: home.fontSize
227
text: qsTr("Max Bandwidth: ")//最大带宽:
228
font.pixelSize: home.fontSize
235
font.pixelSize: home.fontSize
241
visible: (wmodelText.text != "" && wvendorText.text != "") ? true:false
244
text: qsTr("WLan NIC Info")//无线网卡信息
251
anchors.verticalCenter: parent.verticalCenter
252
width: home.width - biostitle.width - 30 * 2
256
anchors.left: parent.left
257
anchors.leftMargin: 20
261
visible: wmodelText.text ? true:false
263
text: qsTr("WLan NIC Model:")//网卡型号:
264
font.pixelSize: home.fontSize
271
wrapMode: Text.WordWrap
273
font.pixelSize: home.fontSize
279
visible: wvendorText.text ? true:false
281
text: qsTr("Vendor:")//制造商:
282
font.pixelSize: home.fontSize
289
font.pixelSize: home.fontSize
295
visible: wdriverText.text ? true:false
297
text: qsTr("WLan NIC Driver:")//无线网卡驱动:
298
font.pixelSize: home.fontSize
305
font.pixelSize: home.fontSize
311
visible: wbusText.text ? true:false
313
text: qsTr("Bus Address:")//总线地址:
314
font.pixelSize: home.fontSize
321
font.pixelSize: home.fontSize
327
visible: wdeviceText.text ? true:false
329
text: qsTr("Device Name:")//设备名称:
330
font.pixelSize: home.fontSize
337
font.pixelSize: home.fontSize
344
visible: wipText.text ? true:false
346
text: qsTr("IP Address:")//IP地址:
347
font.pixelSize: home.fontSize
354
font.pixelSize: home.fontSize
361
visible: wmacText.text ? true:false
363
text: qsTr("Serial Number: ")//序列号:
364
font.pixelSize: home.fontSize
371
font.pixelSize: home.fontSize
392
visible: (wmodelText.text != "" && wvendorText.text != "") ? true:false
397
topMargin: (wmodelText.text != "" && wvendorText.text != "") ? 385 : 0