Warning, /office/klevernotes/src/contents/ui/dialogs/URLDialog.qml is written in an unsupported language. File is not indexed.
0001 // SPDX-License-Identifier: GPL-2.0-or-later 0002 // SPDX-FileCopyrightText: 2023 Louis Schul <schul9louis@gmail.com> 0003 0004 import QtQuick 2.15 0005 0006 import org.kde.kirigami 2.19 as Kirigami 0007 import org.kde.kirigamiaddons.formcard 1.0 as FormCard 0008 0009 Kirigami.PromptDialog { 0010 id: textPromptDialog 0011 0012 property QtObject caller 0013 0014 title: i18nc("@title:dialog", "Choose an URL") 0015 0016 standardButtons: Kirigami.Dialog.Ok | Kirigami.Dialog.Cancel 0017 0018 onAccepted: { 0019 caller.path = urlField.text 0020 } 0021 0022 FormCard.FormTextFieldDelegate { 0023 id: urlField 0024 0025 label: i18nc("@label:textbox, link URL, like the 'href' of an html <a> ", "URL:") 0026 0027 Keys.onPressed: if ((event.key === Qt.Key_Return) || (event.key === Qt.Key_Enter)) { 0028 textPromptDialog.accept() 0029 } 0030 } 0031 }