Warning, /utilities/vail/src/ui/PageHeader.qml is written in an unsupported language. File is not indexed.

0001 // SPDX-FileCopyrightText: 2022 Felipe Kinoshita <kinofhek@gmail.com>
0002 // SPDX-License-Identifier: GPL-3.0-or-later
0003 
0004 import QtQuick 2.15
0005 import QtQuick.Controls 2.15 as QQC2
0006 import QtQuick.Layouts 1.15
0007 import org.kde.kirigami 2.19 as Kirigami
0008 
0009 import org.kde.vail 1.0
0010 
0011 RowLayout {
0012     id: pageHeader
0013 
0014     Layout.fillWidth: true
0015     spacing: 0
0016 
0017     QQC2.ToolButton {
0018         action: Kirigami.Action {
0019             text: i18n("Copy Morse to Clipboard")
0020             icon.name: "edit-copy"
0021             shortcut: StandardKey.Copy
0022             onTriggered: {
0023                 morseTextarea.selectAll()
0024                 morseTextarea.copy()
0025                 morseTextarea.moveCursorSelection(0, TextEdit.SelectCharacters)
0026                 morseTextarea.deselect()
0027             }
0028         }
0029 
0030         QQC2.ToolTip.visible: hovered
0031         QQC2.ToolTip.text: "Ctrl+C"
0032         QQC2.ToolTip.delay: Kirigami.Units.toolTipDelay
0033     }
0034 
0035     Item {
0036         Layout.fillWidth: true
0037     }
0038 
0039     QQC2.ToolButton {
0040         display: QQC2.AbstractButton.IconOnly
0041         action: Kirigami.Action {
0042             text: i18n("About Vail")
0043             icon.name: "help-about"
0044             shortcut: StandardKey.HelpContents
0045             onTriggered: pageStack.layers.push("About.qml")
0046             enabled: pageStack.layers.depth <= 1
0047         }
0048 
0049         QQC2.ToolTip.visible: hovered
0050         QQC2.ToolTip.text: text
0051         QQC2.ToolTip.delay: Kirigami.Units.toolTipDelay
0052     }
0053 }