1
// -*- coding: iso-8859-1 -*-
3
* Author: Marco Martin <mart@kde.org>
4
* Date: Sun Nov 7 2010, 18:51:24
6
* This program is free software; you can redistribute it and/or modify
7
* it under the terms of the GNU Library General Public License as
8
* published by the Free Software Foundation; either version 2 or
9
* (at your option) any later version.
11
* This program is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
* GNU Library General Public License for more details
16
* You should have received a copy of the GNU Library General Public
17
* License along with this program; if not, write to the
18
* Free Software Foundation, Inc.,
19
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
23
import org.kde.plasma.core 0.1 as PlasmaCore
24
import org.kde.plasma.components 0.1 as PlasmaComponents
25
import org.kde.plasma.mobilecomponents 0.1 as MobileComponents
26
import org.kde.qtextracomponents 0.1
31
//space for the close button
32
width: height*1.6 + 48
35
positionsTimer.restart()
37
property string winId: DataEngineSource
45
anchors.centerIn: parent
51
PlasmaComponents.Label {
53
anchors.bottom: parent.bottom
54
anchors.horizontalCenter: parent.horizontalCenter;
57
text: model["visibleName"]
58
elide: Text.ElideRight
59
color: theme.textColor
60
width: parent.width - 40
61
horizontalAlignment: Text.AlignHCenter
68
var service = tasksSource.serviceForSource(winId)
69
var operation = service.operationDescription("activate")
71
service.startOperationCall(operation)
75
PlasmaCore.FrameSvgItem {
76
imagePath: "widgets/button"
78
width: closeButton.width + margins.left + margins.right
79
height: closeButton.height + margins.top + margins.bottom
80
visible: model["actionClose"] && (model["className"] != shellName)
87
PlasmaCore.FrameSvgItem {
89
imagePath: "widgets/button"
91
//a bit more left margin
92
width: closeButtonSvg.width + margins.left + margins.right + 16
93
height: closeButtonSvg.height + margins.top + margins.bottom
94
x: parent.margins.left
97
MobileComponents.ActionButton {
101
backgroundVisible: false
105
verticalCenter: parent.verticalCenter
107
rightMargin: parent.margins.right
111
var service = tasksSource.serviceForSource(winId)
112
var operation = service.operationDescription("close")
114
service.startOperationCall(operation)