Add QR code scanner

This commit is contained in:
Tobias Fella
2023-12-16 16:46:30 +01:00
parent fbb4b962fa
commit c3fd2428a2
12 changed files with 319 additions and 41 deletions

View File

@@ -68,6 +68,16 @@ RowLayout {
}
}
property Kirigami.Action scanAction: Kirigami.Action {
text: i18n("Scan a QR Code")
icon.name: "view-barcode-qr"
onTriggered: pageStack.pushDialogLayer(Qt.createComponent("org.kde.neochat", "QrScannerPage.qml"), {
connection: root.connection
}, {
title: i18nc("@title", "Scan a QR Code")
})
}
/**
* @brief Emitted when the text is changed in the search field.
*/
@@ -130,6 +140,9 @@ RowLayout {
QQC2.MenuItem {
action: spaceAction
}
QQC2.MenuItem {
action: scanAction
}
}
}
Component {
@@ -177,6 +190,11 @@ RowLayout {
onClicked: menuRoot.close()
Layout.fillWidth: true
}
Delegates.RoundedItemDelegate {
action: scanAction
onClicked: menuRoot.close()
Layout.fillWidth: true
}
}
}
}