-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Added the QRtextarea * Added the QrLabel from designs * Should use the right camera and resolution when wasm * Added normal cmake when using qml * Added foo namespace to force linking * Updated the readmes * Only build shared libraries on actions * Use 6.5.0 because of aqt-install not finding 6.6.0
- Loading branch information
Showing
14 changed files
with
355 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -59,6 +59,8 @@ Item | |
timer.start(); | ||
startcamera.visible=false; | ||
} | ||
width:100 | ||
height:width*0.5 | ||
} | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
import QtQuick 2.0 | ||
import QtQuick.Controls | ||
import QtQuick.Layouts | ||
import MyDesigns | ||
import QtQrDec | ||
Popup | ||
{ | ||
id:popup_ | ||
property string description; | ||
property string placeholder; | ||
signal clicked(); | ||
|
||
onClosed: qrscanner.stop(); | ||
background: Rectangle | ||
{ | ||
id:bck | ||
color:CustomStyle.backColor1 | ||
border.width:1 | ||
border.color:CustomStyle.frontColor1 | ||
radius:Math.min(width,height)*0.05 | ||
} | ||
ColumnLayout | ||
{ | ||
anchors.fill: parent | ||
MyTextArea | ||
{ | ||
id:recaddress | ||
label.text: (popup_.description)?popup_.description:"" | ||
textarea.placeholderText: (popup_.placeholder)?popup_.placeholder:"" | ||
Layout.alignment: Qt.AlignHCenter | ||
Layout.margins: 20 | ||
Layout.fillWidth: true | ||
Layout.fillHeight: true | ||
Layout.maximumWidth:400 | ||
Layout.maximumHeight: 200 | ||
Layout.minimumHeight: 100 | ||
focus:true | ||
} | ||
QrQmlCamera | ||
{ | ||
id:qrscanner | ||
Layout.alignment: Qt.AlignCenter | ||
Layout.margins: 5 | ||
Layout.fillHeight: true | ||
Layout.fillWidth: true | ||
Layout.minimumWidth:100 | ||
Layout.minimumHeight: 200 | ||
onGotdata: (data)=> { | ||
qrscanner.stop(); | ||
recaddress.textarea.text=data; | ||
} | ||
} | ||
MyButton | ||
{ | ||
id:send | ||
Layout.alignment: Qt.AlignRight | ||
Layout.margins: 15 | ||
enabled: recaddress.textarea.text!=="" | ||
onClicked: | ||
{ | ||
popup_.close(); | ||
popup_.clicked(); | ||
} | ||
text:qsTr("Ok") | ||
} | ||
|
||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
import QtQuick.Controls | ||
import QtQuick | ||
import MyDesigns | ||
|
||
Rectangle { | ||
id:root | ||
required property string address | ||
property string url | ||
radius: 10 | ||
|
||
TextClipboard | ||
{ | ||
id:tclip | ||
text:root.address | ||
} | ||
|
||
Image { | ||
id:img | ||
anchors.centerIn:parent | ||
sourceSize.width: root.width-10 | ||
source: "image://qrcodeblack/"+root.address | ||
MouseArea { | ||
anchors.fill: img | ||
hoverEnabled :true | ||
onEntered: tooltip.visible=!tooltip.visible | ||
onExited: tooltip.visible=!tooltip.visible | ||
onClicked: | ||
{ | ||
|
||
tclip.copy(); | ||
if(root.url) | ||
{ | ||
Qt.openUrlExternally(root.url) | ||
} | ||
} | ||
} | ||
} | ||
ToolTip | ||
{ | ||
id:tooltip | ||
visible: false | ||
text:qsTr("Copy") | ||
} | ||
|
||
|
||
} |
Oops, something went wrong.