@@ -1,7 +1,7 @@
/*
The MIT License (MIT)
-Copyright (c) 2021 Slava Monich
+Copyright (c) 2021-2022 Slava Monich
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@@ -25,8 +25,8 @@
.pragma library
// Value Sets for Digital Green Certificates
-// Version 1.0
-// 2021-04-21
+// Version 1.11
+// 2022-09-14
var diseaseDisplayNames = {
"840539006" : "COVID-19"
@@ -35,7 +35,10 @@
var vaccineTypeDisplayNames = {
"1119305005": "SARS-CoV-2 antigen vaccine",
"1119349007": "SARS-CoV-2 mRNA vaccine",
- "J07BX03": "COVID-19 vaccine"
+ "J07BX03": "COVID-19 vaccine",
+ "1162643001": "SARS-CoV-2 recombinant spike protein antigen vaccine",
+ "1157024006": "Inactivated whole SARS-CoV-2 antigen vaccine",
+ "29061000087103": "COVID-19 non-replicating viral vector vaccine"
}
var vaccineProductDisplayNames = {
@@ -51,7 +54,16 @@
"BBIBP-CorV": "BBIBP-CorV (Sinopharm)",
"Inactivated-SARS-CoV-2-Vero-Cell": "Inactivated SARS‑CoV‑2 (Sinopharm)",
"CoronaVac": "CoronaVac (Sinovac)",
- "Covaxin": "Covaxin (Bharat Biotech)"
+ "Covaxin": "Covaxin (Bharat Biotech)",
+ "Covid-19-recombinant": "Covid-19 (recombinant)",
+ "Sputnik-Light": "Sputnik Light",
+ "MVC-COV1901": "MVC COVID-19 vaccine",
+ "EU/1/21/1618": "Nuvaxovid",
+ "Sputnik-M": "Sputnik M",
+ "Covid-19-adsorvida-inativada": "Vacina adsorvida covid-19 (inativada)",
+ "Soberana-02": "Soberana 02",
+ "Soberana-Plus": "Soberana Plus",
+ "EU/1/21/1624": "COVID-19 Vaccine Valneva"
}
var vaccineManufacturerDisplayNames = {
@@ -68,7 +80,22 @@
"Gamaleya-Research-Institute": "Gamaleya Research Institute",
"Vector-Institute": "Vector Institute",
"Sinovac-Biotech": "Sinovac Biotech",
- "Bharat-Biotech": "Bharat Biotech"
+ "Bharat-Biotech": "Bharat Biotech",
+ "ORG-100001981": "Serum Institute Of India Private Limited",
+ "ORG-100007893": "R-Pharm CJSC",
+ "Chumakov-Federal-Scientific-Center": "Chumakov Federal Scientific Center for Research and Development of Immune-and-Biological Products",
+ "ORG-100023050": "Gulf Pharmaceutical Industries",
+ "CIGB": "Center for Genetic Engineering and Biotechnology (CIGB)",
+ "Sinopharm-WIBP": "Sinopharm - Wuhan Institute of Biological Products",
+ "ORG-100033914": "Medigen Vaccine Biologics Corporation",
+ "ORG-100000788": "Sanofi Pasteur",
+ "ORG-100036422": "Valneva France",
+ "Instituto-Butantan": "Instituto Butantan",
+ "NVSI": "National Vaccine and Serum Institute, China",
+ "Yisheng-Biopharma": "Yisheng Biopharma",
+ "ORG-100026614": "Sinocelltech Ltd.",
+ "ORG-100008549": "Medicago Inc.",
+ "Finlay-Institute": "Finlay Institute of Vaccines"
}
// Result of the test
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-barcode-1.0.50.tar.bz2/qml/pages/CodeItem.qml
^
|
@@ -65,7 +65,7 @@
onIsVCardChanged: {
if (isVCard && !vcard) {
- var component = Qt.createComponent("../components/VCard.qml");
+ var component = Qt.createComponent("../components/VCard.qml")
if (component.status === Component.Ready) {
vcard = component.createObject(codeItem, {
content: meCardConverter.vcard ? meCardConverter.vcard : normalizedText
@@ -305,18 +305,150 @@
}
}
- Image {
- id: image
-
- readonly property bool isPortrait: sourceSize.height > sourceSize.width
- readonly property bool rotate: image.isPortrait !== codeItem.isPortrait
+ SilicaFlickable {
+ id: imageFlickable
+ visible: image.status === Image.Ready
+ width: image.implicitWidth
+ height: image.implicitHeight
+ contentWidth: imagePinchArea.width
+ contentHeight: imagePinchArea.height
anchors.horizontalCenter: parent.horizontalCenter
- source: (hasImage && recordId.length && AppSettings.saveImages) ?
- ("image://scanner/saved/" + (codeItem.isPortrait ? "portrait/" : "landscape/") + recordId) : ""
- visible: status === Image.Ready
- asynchronous: true
- cache: false
+ flickableDirection: Flickable.HorizontalAndVerticalFlick
+ quickScrollEnabled: false
+ clip: true
+
+ PinchArea {
+ id: imagePinchArea
+
+ width: Math.max(image.width * image.scale, imageFlickable.width)
+ height: Math.max(image.height * image.scale, imageFlickable.height)
+
+ property int centerX
+ property int centerY
+ property real prevScale: 1
+
+ pinch {
+ target: image
+ minimumScale: 1
+ maximumScale: 4
+ }
+
+ onPinchStarted: prevScale = image.scale
+ onPinchUpdated: {
+ centerX = pinch.center.x
+ centerY = pinch.center.y
+ imageFlickable.returnToBounds()
+ }
+
+ Connections {
+ target: imagePinchArea.pinch.active ? image : null
+ onScaleChanged: {
+ var newWidth = image.width * image.scale
+ var newHeight = image.height * image.scale
+ var oldWidth = image.width * imagePinchArea.prevScale
+ var oldHeight = image.height * imagePinchArea.prevScale
+ var widthDifference = newWidth - oldWidth
+ var heightDifference = newHeight - oldHeight
+
+ if (oldWidth > imageFlickable.width || newWidth > imageFlickable.width) {
+ imageFlickable.contentX += imagePinchArea.centerX / newWidth * widthDifference
+ }
+ if (oldHeight > imageFlickable.height || newHeight > imageFlickable.height) {
+ imageFlickable.contentY += imagePinchArea.centerY / newHeight * heightDifference
+ }
+ imagePinchArea.prevScale = image.scale
+ }
+ }
+
+ Image {
+ id: image
+
+ anchors.centerIn: parent
+ source: (hasImage && recordId.length && AppSettings.saveImages) ?
+ ("image://scanner/saved/" + (codeItem.isPortrait ? "portrait/" : "landscape/") + recordId) : ""
+ fillMode: Image.PreserveAspectFit
+ asynchronous: true
+ cache: false
+ }
+
+
+ // Reset the zoom on double click with an animation
+ MouseArea {
+ anchors.fill: parent
+
+ enabled: image.scale !== 1
+ onClicked: {
+ // doubleClick never arrives on Sailfish OS 2.x
+ if (doubleClickTimer.running) {
+ doubleClickTimer.stop()
+ reset()
+ } else {
+ doubleClickTimer.start()
+ }
+ }
+
+ onDoubleClicked: {
+ doubleClickTimer.stop()
+ reset()
+ }
+
+ Timer {
+ id: doubleClickTimer
+
+ interval: 200
+ }
+
+ function reset() {
+ if (!resetAnimation.running) {
+ imageScaleAnimation.from = image.scale
+ flickableContentXAnimation.from = imageFlickable.contentX
+ flickableContentYAnimation.from = imageFlickable.contentY
+ resetAnimation.start()
+ }
+ }
+
+ ParallelAnimation {
+ id: resetAnimation
+
+ alwaysRunToEnd: true
+
+ readonly property int _duration: 200
+
+ NumberAnimation {
+ id: imageScaleAnimation
+
+ target: image
+ property: "scale"
+ easing.type: Easing.InOutQuad
+ duration: resetAnimation._duration
+ to: 1
+ }
+
+ NumberAnimation {
+ id: flickableContentXAnimation
+
+ target: imageFlickable
+ property: "contentX"
+ easing.type: Easing.InOutQuad
+ duration: resetAnimation._duration
+ to: 0
+ }
+
+ NumberAnimation {
+ id: flickableContentYAnimation
+
+ target: imageFlickable
+ property: "contentY"
+ easing.type: Easing.InOutQuad
+ duration: resetAnimation._duration
+ to: 0
+ }
+ }
+ }
+ }
+
+ ScrollDecorator { flickable: imageFlickable }
}
Item {
|