2
* Copyright (C) 2013 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 Ubuntu.Components 0.1
19
import RegisterMyType 0.1
21
{'desktopenvironment': 'Unity', 'update_time': 'The package information was last updated 4 hours ago.',
22
'hostname': 'kobe-3570R-370R-470R-450R-510R', 'language': 'zh_CN.UTF-8', 'platform': 'i686',
23
'cache_packages': '346 cache packages can be cleaned.', 'ram': '1.8 GB', 'currrent_user': 'kobe',
24
'cache_flag': True, 'shell': '/bin/bash', 'cache_size': '33.4 MB thumbnails cache can be cleaned.',
25
'distribution': 'Ubuntu 13.04 raring',
26
'home_path': '/home/kobe', 'cpu': 'Intel(R) Core(TM) i5-3210M CPU @ 2.50GHz'}
29
width: units.gu(parent.width)
31
property Dispatcher dis: mydispather
39
source: "../img/toolWidget/hardware.png"
40
anchors { top: lineLayout.top; topMargin: 10; left: parent.left; leftMargin: 45 }
42
Behavior on rotation { NumberAnimation { duration: 200 } }
51
anchors { top: lineLayout.top; topMargin: refreshArrow.height/2; left: parent.left; leftMargin: 45 + refreshArrow.width }
54
anchors { top: lineLayout.top; topMargin: 10; left: parent.left; leftMargin: 45 + refreshArrow.width + text0.width }
57
text: qsTr("CPU: "+ mydispather.get_value("cpu"))
60
text: qsTr("内存: " + mydispather.get_value("ram"))
70
anchors { left: parent.left; leftMargin: 45}
72
source: "../img/toolWidget/desktop.png"
73
Behavior on rotation { NumberAnimation { duration: 200 } }
78
anchors { top: lineLayout1.top; topMargin: 15; left: parent.left; leftMargin: 45 + refreshArrow1.width }
85
anchors { top: lineLayout1.top; topMargin: -20; left: parent.left; leftMargin: 45 + refreshArrow1.width + text1.width }
88
text: qsTr("主机名: " + mydispather.get_value("hostname"))
91
text: qsTr("平台: " + mydispather.get_value("platform"))
94
text: qsTr("发行版: " + mydispather.get_value("distribution"))
97
text: qsTr("桌面环境: " + mydispather.get_value("desktopenvironment"))
108
anchors { left: parent.left; leftMargin: 45}
109
width: 47; height: 47
110
source: "../img/toolWidget/cache.png"
111
Behavior on rotation { NumberAnimation { duration: 200 } }
120
anchors { top: lineLayout2.top; topMargin: 15; left: parent.left; leftMargin: 45 + refreshArrow2.width }
123
anchors { top: lineLayout2.top; topMargin: -10; left: parent.left; leftMargin: 45 + refreshArrow2.width + text2.width }
126
text: qsTr("可以清除一些缓存以便释放您的磁盘空间")
129
text: qsTr(mydispather.get_value("cache_packages"))
132
text: qsTr(mydispather.get_value("cache_size"))
142
anchors { left: parent.left; leftMargin: 45}
143
width: 47; height: 47
144
source: "../img/toolWidget/softpackage.png"
145
Behavior on rotation { NumberAnimation { duration: 200 } }
154
anchors { top: lineLayout3.top; topMargin: 15; left: parent.left; leftMargin: 45 + refreshArrow3.width }
157
anchors { top: lineLayout3.top; topMargin: 5; left: parent.left; leftMargin: 45 + refreshArrow3.width + text3.width }
160
text: qsTr("您的系统已经为最新")
163
text: qsTr("更新时间: "+ mydispather.get_value("update_time"))