~ubuntu-branches/ubuntu/vivid/youker-assistant/vivid

« back to all changes in this revision

Viewing changes to qml/func/common/TipLabel.qml

  • Committer: Package Import Robot
  • Author(s): Aron Xu
  • Date: 2014-03-24 15:52:37 UTC
  • mfrom: (1.1.6)
  • Revision ID: package-import@ubuntu.com-20140324155237-3kod0m3wr2a2ag39
Tags: 1.0.1-0ubuntu1
* New upstream release (LP: #1294936).
* Modify display mode of weather forecast and system settings.
* Add file manager and font style settings.
* Improve system settings and restoring default settings.
* Cache user account (not password).
* Change the position of window control buttons.
* Add configuration for Kingsoft KuaiPan cloud client.
* Add the instruction of Youker Assistant.
* Open related folders when scanning items got double-clicked.
* Notify users when operating the Kingsoft disk cloud configuration.
* Modify Dbus starting method.

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
 *
 
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 1.1
 
18
 
 
19
Item {
 
20
    id: btn
 
21
    property string showImage
 
22
    property string kflag
 
23
    width: 19
 
24
    height: 13
 
25
 
 
26
    Image {
 
27
        id: buttonImage
 
28
        source: btn.showImage
 
29
        width: btn.width; height: btn.height
 
30
    }
 
31
 
 
32
    ToolTip {
 
33
        id: toolTip
 
34
        visible: false//mouseArea.pressed
 
35
    }
 
36
 
 
37
    MouseArea {
 
38
        id: mouseArea
 
39
        anchors.fill: parent//buttonImage
 
40
        hoverEnabled: true
 
41
        onEntered: {
 
42
            if (kflag == "yes") {
 
43
                toolTip.showText = qsTr("Support cloud conf");
 
44
                toolTip.visible = true;
 
45
            }
 
46
            else if (kflag == "no") {
 
47
                toolTip.showText = qsTr("No support cloud conf");
 
48
                toolTip.visible = true;
 
49
            }
 
50
        }
 
51
        onReleased: {
 
52
            toolTip.visible = false;
 
53
        }
 
54
        onExited: {
 
55
            toolTip.visible = false;
 
56
        }
 
57
    }
 
58
}