Changeset View
Changeset View
Standalone View
Standalone View
applets/clipboard/contents/ui/DelegateToolButtons.qml
- This file was added.
1 | /******************************************************************** | ||||
---|---|---|---|---|---|
2 | This file is part of the KDE project. | ||||
3 | | ||||
4 | Copyright (C) 2014 Martin Gräßlin <mgraesslin@kde.org> | ||||
5 | Copyright 2014 Sebastian Kügler <sebas@kde.org> | ||||
6 | | ||||
7 | This program is free software; you can redistribute it and/or modify | ||||
8 | it under the terms of the GNU General Public License as published by | ||||
9 | the Free Software Foundation; either version 2 of the License, or | ||||
10 | (at your option) any later version. | ||||
11 | | ||||
12 | This program is distributed in the hope that it will be useful, | ||||
13 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||||
15 | GNU General Public License for more details. | ||||
16 | | ||||
17 | You should have received a copy of the GNU General Public License | ||||
18 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||||
19 | *********************************************************************/ | ||||
20 | | ||||
21 | import QtQuick 2.0 | ||||
22 | | ||||
23 | import org.kde.plasma.components 2.0 as PlasmaComponents | ||||
24 | | ||||
25 | Row { | ||||
26 | id: toolButtonsLayout | ||||
27 | visible: menuItem.ListView.isCurrentItem | ||||
28 | | ||||
29 | PlasmaComponents.ToolButton { | ||||
30 | // TODO: only show for items supporting actions? | ||||
31 | iconSource: "system-run" | ||||
32 | tooltip: i18n("Invoke action") | ||||
33 | onClicked: menuItem.action(UuidRole) | ||||
34 | } | ||||
35 | PlasmaComponents.ToolButton { | ||||
36 | id: barcodeToolButton | ||||
37 | iconSource: "view-barcode" | ||||
38 | tooltip: i18n("Show barcode") | ||||
39 | onClicked: menuItem.barcode(UuidRole) | ||||
40 | } | ||||
41 | PlasmaComponents.ToolButton { | ||||
42 | iconSource: "document-edit" | ||||
43 | enabled: !clipboardSource.editing | ||||
44 | visible: TypeRole === 0 | ||||
45 | tooltip: i18n("Edit contents") | ||||
46 | onClicked: menuItem.edit(UuidRole) | ||||
47 | } | ||||
48 | PlasmaComponents.ToolButton { | ||||
49 | iconSource: "edit-delete" | ||||
50 | tooltip: i18n("Remove from history") | ||||
51 | onClicked: menuItem.remove(UuidRole) | ||||
52 | } | ||||
53 | } |