~feng-kylin/youker-assistant/youker-assistant

« back to all changes in this revision

Viewing changes to qml/BottomBar.qml

  • Committer: kobe
  • Date: 2015-02-13 07:37:10 UTC
  • Revision ID: xiangli@ubuntukylin.com-20150213073710-0jyp02ilyi5njj10
Qt Version

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
 * Copyright (C) 2013 ~ 2014 National University of Defense Technology(NUDT) & Kylin Ltd.
3
 
 * Author: Kobe Lee
4
 
 *
5
 
 * This program is free software; you can redistribute it and/or modify
6
 
 * it under the terms of the GNU General Public License as published by
7
 
 * the Free Software Foundation; version 3.
8
 
 *
9
 
 * This program is distributed in the hope that it will be useful,
10
 
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
 
 * GNU General Public License for more details.
13
 
 *
14
 
 * You should have received a copy of the GNU General Public License
15
 
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
16
 
 */
17
 
 
18
 
import QtQuick 1.1
19
 
import CloundType 0.1
20
 
 
21
 
Rectangle {
22
 
    id: bottombar
23
 
    width: 850
24
 
    height: 26
25
 
    color: "transparent"
26
 
    property string version: "V1.3.3"
27
 
 
28
 
    CloundDispatcher {  id: clounddispatcher  }
29
 
 
30
 
    Connections
31
 
    {
32
 
        target: clounddispatcher
33
 
        onStartShowIPAddress: {
34
 
            if (ip_addr === '') {
35
 
                iprow.visible = false;
36
 
            }
37
 
            else {
38
 
                iprow.visible = true;
39
 
                ip.text = ip_addr;
40
 
            }
41
 
        }
42
 
    }
43
 
 
44
 
    Component.onCompleted: {
45
 
        clounddispatcher.get_ip_address_qt();//0104
46
 
    }
47
 
    Row {
48
 
        id: versionrow
49
 
        anchors {
50
 
            left: parent.left
51
 
            leftMargin: 10
52
 
            verticalCenter: parent.verticalCenter
53
 
        }
54
 
        spacing: 2
55
 
        Image {
56
 
            source: "./img/icons/arrowhead.png"
57
 
            width: 18; height: 18
58
 
        }
59
 
        Text {
60
 
            color: "white"
61
 
            font.pixelSize: 12
62
 
            text: qsTr("main version:") + bottombar.version//主版本:
63
 
        }
64
 
    }
65
 
 
66
 
    Row {
67
 
        id: iprow
68
 
        visible: false
69
 
        anchors {
70
 
            right: parent.right
71
 
            rightMargin: 5
72
 
            verticalCenter: parent.verticalCenter
73
 
        }
74
 
        spacing: 2
75
 
        Image {
76
 
            source: "./img/icons/ip.png"
77
 
            width: 18; height: 18
78
 
        }
79
 
        Text {
80
 
            id: ip
81
 
            anchors.verticalCenter: parent.verticalCenter
82
 
            color: "white"
83
 
            font.pixelSize: 12
84
 
            text: ""
85
 
        }
86
 
    }
87
 
}