Commit e2c093e4 authored by Jonah Brüchert's avatar Jonah Brüchert 🌳

Add QR code scanner page

parent 4b65ae7a
Pipeline #3959 passed with stages
in 25 minutes and 16 seconds
......@@ -7,10 +7,12 @@
<file alias="qml/AboutDialog.qml">src/qml/AboutDialog.qml</file>
<file alias="qml/GlobalDrawer.qml">src/qml/GlobalDrawer.qml</file>
<file alias="qml/EmptyChatPage.qml">src/qml/EmptyChatPage.qml</file>
<file alias="qml/QrScannerPage.qml">src/qml/QrScannerPage.qml</file>
<file alias="qml/elements/SubRequestAcceptSheet.qml">src/qml/elements/SubRequestAcceptSheet.qml</file>
<file alias="qml/elements/RosterAddContactSheet.qml">src/qml/elements/RosterAddContactSheet.qml</file>
<file alias="qml/elements/RosterRemoveContactSheet.qml">src/qml/elements/RosterRemoveContactSheet.qml</file>
<file alias="qml/elements/RosterListItem.qml">src/qml/elements/RosterListItem.qml</file>
<file alias="qml/elements/MessageCounter.qml">src/qml/elements/MessageCounter.qml</file>
<file alias="qml/elements/ChatMessage.qml">src/qml/elements/ChatMessage.qml</file>
......
......@@ -38,6 +38,14 @@ import im.kaidan.kaidan 1.0
Kirigami.Page {
title: qsTr("Log in")
actions.contextualActions: [
Kirigami.Action {
text: qsTr("Log in using a QR-Code")
icon.name: "view-barcode"
onTriggered: pageStack.layers.push(qrScannerPage)
}
]
ColumnLayout {
anchors.fill: parent
......
import QtQuick 2.0
import org.kde.kirigami 2.2 as Kirigami
import QtMultimedia 5.9
Kirigami.Page {
leftPadding: 0
rightPadding: 0
topPadding: 0
bottomPadding: 0
title: qsTr("Scan QR code")
VideoOutput {
id: viewfinder
anchors.fill: parent
source: camera
}
Camera {
id: camera
captureMode: Camera.CaptureVideo
}
}
......@@ -71,6 +71,7 @@ Kirigami.ApplicationWindow {
Component {id: rosterPage; RosterPage {}}
Component {id: emptyChatPage; EmptyChatPage {}}
Component {id: settingsPage; SettingsPage {}}
Component {id: qrScannerPage; QrScannerPage {}}
function passiveNotification(text) {
showPassiveNotification(text, "long")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment