~kobe24-lixiang/youker-assistant/trunk

« back to all changes in this revision

Viewing changes to qml/floatmain.qml

  • Committer: kobe
  • Date: 2013-08-27 01:42:37 UTC
  • Revision ID: kobe24_lixiang@126.com-20130827014237-lpjrwf24ptb9enih
add a round to display cpu used

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
            page.visible = true;
17
17
    }
18
18
 
19
 
    MouseArea {
20
 
        anchors.fill: parent
21
 
        acceptedButtons : Qt.RightButton
22
 
        onClicked: {
23
 
            if (page.visible == true)
24
 
                page.visible = false;
25
 
            page.focus = false;
26
 
        }
27
 
    }
28
 
    Style {
29
 
        color: "gray"
30
 
        transformOrigin: "Center"
31
 
        opacity: 0.97
32
 
        visible: true
33
 
        anchors.centerIn: parent
34
 
        width: 110; height: 150
35
 
    }
 
19
 
 
20
//    Column {
 
21
//        id: myco
 
22
//        Image {
 
23
//            id: refreshArrow
 
24
//            source: "./img/toolWidget/hardware.png"
 
25
////            anchors { top: lineLayout.top; topMargin: 10; left: parent.left; leftMargin: 45 }
 
26
//            width: 47; height: 47
 
27
//            Behavior on rotation { NumberAnimation { duration: 200 } }
 
28
//        }
 
29
//        Text {
 
30
//            id: text0
 
31
//            width: 69
 
32
//            text: qsTr("硬件信息:")
 
33
//            font.bold: true
 
34
//            font.pointSize: 13
 
35
//            font.pixelSize: 12
 
36
////            anchors { top: lineLayout.top; topMargin: refreshArrow.height/2; left: parent.left; leftMargin: 45 + refreshArrow.width }
 
37
//        }
 
38
//    }
 
39
 
 
40
//    MouseArea {
 
41
//        anchors.fill: parent
 
42
//        acceptedButtons : Qt.RightButton
 
43
//        onClicked: {
 
44
//            if (page.visible == true)
 
45
//                page.visible = false;
 
46
//            page.focus = false;
 
47
//        }
 
48
//    }
 
49
//    Style {
 
50
//        color: "gray"
 
51
//        transformOrigin: "Center"
 
52
//        opacity: 0.97
 
53
//        visible: true
 
54
//        anchors.centerIn: parent
 
55
//        width: 110; height: 150
 
56
//    }
36
57
    Contents {
37
 
        id: search;
 
58
        id: search
38
59
        visible: true
39
60
        opacity: 1
40
61
        anchors.centerIn: parent
41
62
    }
 
63
 
 
64
 
 
65
    //--------------------下边隐藏说明栏---------------------
 
66
    BorderImage {
 
67
        id: sidebar
 
68
        source: "./img/icons/unselect.png"
 
69
        anchors.top: search.bottom
 
70
        width: parent.width
 
71
        height:show ? 140 : 10
 
72
        Behavior on width { NumberAnimation { easing.type: Easing.OutSine ; duration: 250 } }
 
73
        property bool show: false
 
74
////        border.left: 0;
 
75
////        border.right: 26;
 
76
//        border.left: 26;
 
77
//        border.right: 0;
 
78
        MouseArea {
 
79
            id:mouseArea
 
80
            anchors.fill: parent
 
81
            onClicked: sidebar.show = !sidebar.show
 
82
        }
 
83
        Column {
 
84
            id: panel1
 
85
            opacity: sidebar.show ? 1 : 0
 
86
            Behavior on opacity { NumberAnimation { easing.type:Easing.InCubic; duration: 600} }
 
87
 
 
88
            scale: sidebar.show ? 1 : 0
 
89
            Behavior on scale { NumberAnimation { easing.type:Easing.InCubic; duration: 200 } }
 
90
            transformOrigin: Item.Top
 
91
 
 
92
            anchors.top: parent.top
 
93
            anchors.left: parent.left
 
94
            anchors.right: parent.right
 
95
            anchors.margins: 12
 
96
            spacing:12
 
97
 
 
98
            Image {
 
99
                width: 47
 
100
                height: 47
 
101
                source: "./img/icons/book.png"
 
102
            }
 
103
            Text {
 
104
                text: "UbuntuKylin Team"
 
105
                width: parent.width - 12
 
106
            }
 
107
            Text {
 
108
                text: qsTr("系统助手")
 
109
                width: parent.width - 12
 
110
            }
 
111
            Text {
 
112
                text: qsTr("第一期工程 20130601")
 
113
                width: parent.width - 12
 
114
            }
 
115
        }
 
116
    }
 
117
    //------------------------------------------------
42
118
}