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
24
width: parent.width; height: 476
26
property string homepath
27
Component.onCompleted: {
28
home.homepath = sessiondispatcher.getHomePath();
32
function init_data() {
33
systemdispatcher.get_cpu_info_qt();//获取详细信息
34
var cpuName = systemdispatcher.getHWSingleInfo("CpuVendor", "cpu");
35
logo.source = InfoGroup.judgeName(cpuName.toUpperCase()) ? (home.homepath + "/.cache/youker-assistant/uk-img/Manufacturer/" + cpuName.toUpperCase() + ".jpg") : ("../../img/toolWidget/ubuntukylin.png");
36
cpuversionText.text = systemdispatcher.getHWSingleInfo("CpuVersion", "cpu");
37
cpuverdorText.text = cpuName;
38
cpuserialText.text = systemdispatcher.getHWSingleInfo("CpuSerial", "cpu");
39
slotText.text = systemdispatcher.getHWSingleInfo("CpuSlot", "cpu");
40
maxText.text = systemdispatcher.getHWSingleInfo("CpuCapacity", "cpu");// + "MHz";
41
curText.text = systemdispatcher.getHWSingleInfo("CpuSize", "cpu");// + "MHz";
42
frontText.text = systemdispatcher.getHWSingleInfo("CpuClock", "cpu");// + "MHz";
43
coresText.text = systemdispatcher.getHWSingleInfo("cpu_cores", "cpu") + qsTr("cores") + "/" + systemdispatcher.getHWSingleInfo("cpu_siblings", "cpu") + qsTr("thread");//核//线程
44
cache1.text = systemdispatcher.getHWSingleInfo("clflush_size", "cpu") + "KB";
45
cache2.text = systemdispatcher.getHWSingleInfo("cache_size", "cpu") + "KB";
50
target: sessiondispatcher
51
onTellDetailPageUpdateData: {
52
if (infoFlag == "cpu") {
70
text: qsTr("CPU Info")//处理器信息
76
anchors.verticalCenter: parent.verticalCenter
77
width: home.width - bartitle.width - 30 * 2
81
anchors.left: parent.left
82
anchors.leftMargin: 20
87
text: qsTr("CPU: ")//处理器:
102
text: qsTr("Vendor: ")//制造商:
117
text: qsTr("Serial Number: ")//序列号:
132
text: qsTr("Socket/Slot: ")//插座/插槽:
147
text: qsTr("Maximum Frequency: ")//最大主频:
162
text: qsTr("Current Frequency: ")//当前主频:
177
text: qsTr("FSB: ")//前端总线:
192
text: qsTr("Core Number: ")//核心数目:
207
text: qsTr("L1 Cache: ")//一级缓存:
222
text: qsTr("L2 Cache: ")//二级缓存: