Warning, /plasma/plasma-workspace/applets/clipboard/contents/ui/DelegateToolButtons.qml is written in an unsupported language. File is not indexed.

0001 /*
0002     SPDX-FileCopyrightText: 2014 Martin Gräßlin <mgraesslin@kde.org>
0003     SPDX-FileCopyrightText: 2014 Sebastian Kügler <sebas@kde.org>
0004 
0005     SPDX-License-Identifier: GPL-2.0-or-later
0006 */
0007 
0008 import QtQuick 2.0
0009 import QtQuick.Layouts 1.1
0010 
0011 import org.kde.plasma.components 3.0 as PlasmaComponents3
0012 
0013 RowLayout {
0014     id: toolButtonsLayout
0015     visible: menuItem.ListView.isCurrentItem
0016 
0017     // https://bugreports.qt.io/browse/QTBUG-108821
0018     readonly property bool hovered: actionToolButton.hovered || barcodeToolButton.hovered || editToolButton.hovered || deleteToolButton.hovered
0019 
0020     PlasmaComponents3.ToolButton {
0021         id: actionToolButton
0022         // TODO: only show for items supporting actions?
0023         icon.name: "system-run"
0024 
0025         display: PlasmaComponents3.AbstractButton.IconOnly
0026         text: i18n("Invoke action")
0027 
0028         onClicked: menuItem.triggerAction(UuidRole)
0029 
0030         PlasmaComponents3.ToolTip {
0031             text: parent.text
0032         }
0033         KeyNavigation.right: barcodeToolButton
0034     }
0035     PlasmaComponents3.ToolButton {
0036         id: barcodeToolButton
0037         icon.name: "view-barcode-qr"
0038         visible: supportsBarcodes
0039 
0040         display: PlasmaComponents3.AbstractButton.IconOnly
0041         text: i18n("Show QR code")
0042 
0043         onClicked: menuItem.barcode(DisplayRole)
0044 
0045         PlasmaComponents3.ToolTip {
0046             text: parent.text
0047         }
0048         KeyNavigation.right: editToolButton
0049     }
0050     PlasmaComponents3.ToolButton {
0051         id: editToolButton
0052         icon.name: "document-edit"
0053         enabled: !clipboardSource.editing
0054         visible: TypeRole === 0
0055 
0056         display: PlasmaComponents3.AbstractButton.IconOnly
0057         text: i18n("Edit contents")
0058 
0059         onClicked: menuItem.edit(UuidRole)
0060 
0061         PlasmaComponents3.ToolTip {
0062             text: parent.text
0063         }
0064         KeyNavigation.right: deleteToolButton
0065     }
0066     PlasmaComponents3.ToolButton {
0067         id: deleteToolButton
0068         icon.name: "edit-delete"
0069 
0070         display: PlasmaComponents3.AbstractButton.IconOnly
0071         text: i18n("Remove from history")
0072 
0073         onClicked: menuItem.remove(UuidRole)
0074 
0075         PlasmaComponents3.ToolTip {
0076             text: parent.text
0077         }
0078     }
0079 }