~ubuntu-branches/ubuntu/quantal/kde-workspace/quantal

« back to all changes in this revision

Viewing changes to libs/plasmagenericshell/widgetsexplorer/package/contents/ui/Tooltip.qml

  • Committer: Package Import Robot
  • Author(s): Jonathan Riddell
  • Date: 2012-07-26 17:32:34 UTC
  • mfrom: (1.1.15)
  • Revision ID: package-import@ubuntu.com-20120726173234-bsn4gwllpbcwu2r4
Tags: 4:4.9.0-0ubuntu1
* Use direct build-depends versions rather than kde-sc-dev-latest
* Remove patches/kubuntu_revert_1554ba408633397066d31c3d565c217b5a385fb8.diff fixed upstream
* Remove debian/patches/kubuntu_fix_batterymonitor_panel_minsize.diff fix upstream
* New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
    onEntered: toolTipHideTimer.running = false
30
30
    onExited: toolTipHideTimer.running = true
31
31
 
32
 
    width: 250
 
32
    width: childrenRect.width
33
33
    height: 200
34
34
 
35
 
    property variant icon: tooltipDialog.appletDelegate.icon
36
 
    property string title: tooltipDialog.appletDelegate.title
37
 
    property string description: tooltipDialog.appletDelegate.description
38
 
    property string author: tooltipDialog.appletDelegate.author
39
 
    property string email: tooltipDialog.appletDelegate.email
40
 
    property string license: tooltipDialog.appletDelegate.license
41
 
    property string pluginName: tooltipDialog.appletDelegate.pluginName
42
 
    property bool local: tooltipDialog.appletDelegate.local
 
35
    property variant icon
 
36
    property string title
 
37
    property string description
 
38
    property string author
 
39
    property string email
 
40
    property string license
 
41
    property string pluginName
 
42
    property bool local
43
43
 
 
44
    onClicked: tooltipDialog.visible = false
 
45
    Connections {
 
46
        target: tooltipDialog
 
47
        onAppletDelegateChanged: {
 
48
            if (!tooltipDialog.appletDelegate) {
 
49
                return
 
50
            }
 
51
            icon = tooltipDialog.appletDelegate.icon
 
52
            title = tooltipDialog.appletDelegate.title
 
53
            description = tooltipDialog.appletDelegate.description
 
54
            author = tooltipDialog.appletDelegate.author
 
55
            email = tooltipDialog.appletDelegate.email
 
56
            license = tooltipDialog.appletDelegate.license
 
57
            pluginName = tooltipDialog.appletDelegate.pluginName
 
58
            local = tooltipDialog.appletDelegate.local
 
59
        }
 
60
    }
44
61
    QIconItem {
45
62
        id: tooltipIconWidget
46
63
        anchors.left: parent.left
59
76
            right: parent.right
60
77
        }
61
78
 
62
 
        Text {
63
 
            color: theme.textColor
 
79
        PlasmaComponents.Label {
64
80
            text: title
65
81
            font.bold:true
66
82
            anchors.left: parent.left
68
84
            height: paintedHeight
69
85
            wrapMode: Text.Wrap
70
86
        }
71
 
        Text {
 
87
        PlasmaComponents.Label {
72
88
            text: description
73
 
            color: theme.textColor
74
89
            anchors.left: parent.left
75
90
            anchors.right: parent.right
76
91
            wrapMode: Text.Wrap
79
94
    Grid {
80
95
        anchors.top: tooltipIconWidget.bottom
81
96
        anchors.topMargin: 16
 
97
        anchors.bottom: uninstallButton.top
 
98
        anchors.bottomMargin: 4
82
99
        rows: 2
83
100
        columns: 2
84
 
        Text {
85
 
            text: "License:"
86
 
            color: theme.textColor
87
 
            anchors.right: licenseText.left
 
101
        spacing: 4
 
102
        PlasmaComponents.Label {
 
103
            text: i18n("License: ")
88
104
            wrapMode: Text.Wrap
89
105
        }
90
 
        Text {
 
106
        PlasmaComponents.Label {
91
107
            id: licenseText
92
108
            text: license
93
 
            color: theme.textColor
94
 
            wrapMode: Text.Wrap
95
 
        }
96
 
        Text {
97
 
            text: "Author:"
98
 
            color: theme.textColor
99
 
            anchors.right: authorText.left
100
 
            wrapMode: Text.Wrap
101
 
        }
102
 
        Text {
103
 
            id: authorText
 
109
            wrapMode: Text.Wrap
 
110
        }
 
111
        PlasmaComponents.Label {
 
112
            text: i18n("Author: ")
 
113
            wrapMode: Text.Wrap
 
114
        }
 
115
        PlasmaComponents.Label {
104
116
            text: author
105
 
            color: theme.textColor
106
117
            wrapMode: Text.Wrap
107
118
        }
108
119
    }
109
120
 
110
121
    PlasmaComponents.Button {
 
122
        id: uninstallButton
111
123
        anchors {
112
124
            horizontalCenter: parent.horizontalCenter
113
125
            bottom: parent.bottom
118
130
        }
119
131
        iconSource: "application-exit"
120
132
        text: i18n("Uninstall")
121
 
        onClicked: widgetExplorer.uninstall(pluginName)
 
133
        onClicked: {
 
134
            widgetExplorer.uninstall(pluginName)
 
135
            tooltipDialog.visible = false
 
136
        }
122
137
    }
123
138
}