~kobe24-lixiang/i-help-you/trunk

« back to all changes in this revision

Viewing changes to qml/func/HomePage.qml

  • Committer: kobe
  • Date: 2013-06-04 06:03:32 UTC
  • Revision ID: kobe24_lixiang@126.com-20130604060332-9iv62g3jwn68ewem
initial version

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright (C) 2013 National University of Defense Technology(NUDT) & Kylin Ltd.
 
3
 *
 
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.
 
7
 *
 
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.
 
12
 *
 
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/>.
 
15
 */
 
16
 
 
17
import QtQuick 2.0
 
18
import Ubuntu.Components 0.1
 
19
import RegisterMyType 0.1
 
20
/*
 
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'}
 
27
*/
 
28
Rectangle {
 
29
    width: units.gu(parent.width)
 
30
    height: 460
 
31
    property Dispatcher dis: mydispather
 
32
 
 
33
    Column {
 
34
        anchors.fill: parent
 
35
        Row {
 
36
            id: lineLayout
 
37
            Image {
 
38
                id: refreshArrow
 
39
                source: "../img/toolWidget/hardware.png"
 
40
                anchors { top: lineLayout.top; topMargin: 10; left: parent.left; leftMargin: 45 }
 
41
                width: 47; height: 47
 
42
                Behavior on rotation { NumberAnimation { duration: 200 } }
 
43
            }
 
44
            Text {
 
45
                id: text0
 
46
                width: 69
 
47
                text: qsTr("硬件信息:")
 
48
                font.bold: true
 
49
                font.pointSize: 13
 
50
                font.pixelSize: 12
 
51
                anchors { top: lineLayout.top; topMargin: refreshArrow.height/2; left: parent.left; leftMargin: 45 + refreshArrow.width }
 
52
            }
 
53
            Column {
 
54
                anchors { top: lineLayout.top; topMargin: 10; left: parent.left; leftMargin: 45 + refreshArrow.width + text0.width }
 
55
                spacing: 10
 
56
                Text {
 
57
                    text: qsTr("CPU: "+ mydispather.get_value("cpu"))
 
58
                }
 
59
                Text {
 
60
                    text: qsTr("内存: " + mydispather.get_value("ram"))
 
61
                }
 
62
            }
 
63
        }
 
64
 
 
65
        Row {
 
66
            id: lineLayout1
 
67
            y: 110
 
68
            Image {
 
69
                id: refreshArrow1
 
70
                anchors { left: parent.left; leftMargin: 45}
 
71
                width: 47; height: 47
 
72
                source: "../img/toolWidget/desktop.png"
 
73
                Behavior on rotation { NumberAnimation { duration: 200 } }
 
74
            }
 
75
            Text {
 
76
                id: text1
 
77
                width: 69
 
78
                anchors { top: lineLayout1.top; topMargin: 15; left: parent.left; leftMargin: 45 + refreshArrow1.width }
 
79
                text: qsTr("桌面信息:")
 
80
                font.bold: true
 
81
                font.pointSize: 13
 
82
                font.pixelSize: 12
 
83
            }
 
84
            Column {
 
85
                anchors { top: lineLayout1.top; topMargin: -20; left: parent.left; leftMargin: 45 + refreshArrow1.width + text1.width }
 
86
                spacing: 10
 
87
                Text {
 
88
                    text: qsTr("主机名: " + mydispather.get_value("hostname"))
 
89
                }
 
90
                Text {
 
91
                    text: qsTr("平台: " + mydispather.get_value("platform"))
 
92
                }
 
93
                Text {
 
94
                    text: qsTr("发行版: " + mydispather.get_value("distribution"))
 
95
                }
 
96
                Text {
 
97
                    text: qsTr("桌面环境: " + mydispather.get_value("desktopenvironment"))
 
98
                }
 
99
            }
 
100
 
 
101
        }
 
102
 
 
103
        Row {
 
104
            id: lineLayout2
 
105
            y: 220
 
106
            Image {
 
107
                id: refreshArrow2
 
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 } }
 
112
            }
 
113
            Text {
 
114
                id: text2
 
115
                width: 69
 
116
                text: qsTr("缓存信息:")
 
117
                font.bold: true
 
118
                font.pointSize: 13
 
119
                font.pixelSize: 12
 
120
                anchors { top: lineLayout2.top; topMargin: 15; left: parent.left; leftMargin: 45 + refreshArrow2.width }
 
121
            }
 
122
            Column {
 
123
                anchors { top: lineLayout2.top; topMargin: -10; left: parent.left; leftMargin: 45 + refreshArrow2.width + text2.width }
 
124
                spacing: 10
 
125
                Text {
 
126
                    text: qsTr("可以清除一些缓存以便释放您的磁盘空间")
 
127
                }
 
128
                Text {
 
129
                    text: qsTr(mydispather.get_value("cache_packages"))
 
130
                }
 
131
                Text {
 
132
                    text: qsTr(mydispather.get_value("cache_size"))
 
133
                }
 
134
            }
 
135
        }
 
136
 
 
137
        Row {
 
138
            id: lineLayout3
 
139
            y: 330
 
140
            Image {
 
141
                id: refreshArrow3
 
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 } }
 
146
            }
 
147
            Text {
 
148
                id: text3
 
149
                width: 69
 
150
                text: qsTr("软件包信息:")
 
151
                font.bold: true
 
152
                font.pointSize: 13
 
153
                font.pixelSize: 12
 
154
                anchors { top: lineLayout3.top; topMargin: 15; left: parent.left; leftMargin: 45 + refreshArrow3.width }
 
155
            }
 
156
            Column {
 
157
                anchors { top: lineLayout3.top; topMargin: 5; left: parent.left; leftMargin: 45 + refreshArrow3.width + text3.width }
 
158
                spacing: 10
 
159
                Text {
 
160
                    text: qsTr("您的系统已经为最新")
 
161
                }
 
162
                Text {
 
163
                    text: qsTr("更新时间: "+ mydispather.get_value("update_time"))
 
164
                }
 
165
            }
 
166
        }
 
167
    }
 
168
}