2
* Copyright 2011 Marco Martin <mart@kde.org>
4
* This program is free software; you can redistribute it and/or modify
5
* it under the terms of the GNU Library General Public License as
6
* published by the Free Software Foundation; either version 2 or
7
* (at your option) any later version.
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 Library General Public License for more details
14
* You should have received a copy of the GNU Library General Public
15
* License along with this program; if not, write to the
16
* Free Software Foundation, Inc.,
17
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21
import org.kde.plasma.core 0.1 as PlasmaCore
22
import org.kde.plasma.extras 0.1 as PlasmaExtras
27
property string resourceUrl
28
property string sourceName
30
implicitHeight: itemLoader.height
31
implicitWidth: itemLoader.width
33
PlasmaExtras.FallbackComponent {
36
candidates: ["slcmenuitems/" + providerId, "slcmenuitems/Default"]
41
width: item ? Math.max(item.implicitWidth, serviceMenu.width) : 0
42
height: item ? item.implicitHeight : 0
44
source: fallback.filePath("Item.qml")
49
menuItem.run(mouse.x, mouse.y)
55
target: itemLoader.item
56
onOperationCompleted: {
57
dialog.visible = false
63
itemLoader.item.run(x, y)
64
if (itemLoader.item.operationCompleted === undefined) {
65
dialog.visible = false