Warning, /office/klevernotes/src/contents/ui/dialogs/LinkDialog.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 import QtQuick.Layouts 1.15
0006 
0007 import org.kde.kirigami 2.19 as Kirigami
0008 import org.kde.kirigamiaddons.formcard 1.0 as FormCard
0009 
0010 Kirigami.PromptDialog {
0011     id: textPromptDialog
0012 
0013     property alias urlText: urlTextField.text
0014     property alias linkText: linkTextField.text
0015 
0016     title: i18nc("@title:dialog", "Create your link")
0017 
0018     standardButtons: Kirigami.Dialog.Ok | Kirigami.Dialog.Cancel
0019 
0020     onOpened: {
0021         urlTextField.forceActiveFocus()
0022     }
0023     onClosed: {
0024         urlText = ""
0025         linkText = ""
0026     }
0027 
0028     ColumnLayout {
0029         FormCard.FormTextFieldDelegate {
0030             id: urlTextField
0031 
0032             label: i18nc("@label:textbox, link URL, like the 'href' of an html <a> ", "URL:")
0033             Layout.fillWidth: true
0034         }
0035 
0036         FormCard.FormTextFieldDelegate {
0037             id: linkTextField
0038 
0039             label: i18nc("@label:textbox, the displayed text of a link, in html: <a>This text</a> ", "Link text:")
0040             Layout.fillWidth: true
0041         }
0042     }
0043 }