Name | Type | Default | Description |
---|---|---|---|
text | string | "" | Text embedded in the QRCode |
width | int | 256 | QRCode's width |
height | int | 256 | QRCode's height |
colorDark | string | "#000000" | HTML color (black/#ffffff) of the dark part of the QRCode |
colorLight | string | "#ffffff" | HTML color (white/#ffffff) of the dark part of the QRCode |
correctLevel | int | 2 | Text embedded in the QRCode |
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
{ | |
"name": "openui5-qrcode", | |
"description": "An openui5 custom control to render a QR Code", | |
"main": "index.js", | |
"authors": [ | |
"Emanuele Ricci <stermi@gmail.com>" | |
], | |
"license": "Apache-2.0", | |
"keywords": [ |
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
module.exports = function(grunt) { | |
grunt.initConfig({ | |
dir: { | |
src: 'src', | |
src_qrcode: 'node_modules/qrcodejs', | |
dest: 'dist', | |
demo: 'demo', | |
bower_components: 'bower_components' |
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
"sap.ui5": { | |
... | |
"dependencies": { | |
"minUI5Version": "1.30.0", | |
"libs": { | |
... | |
"it.designfuture.qrcode": {} | |
} | |
}, | |
"resourceRoots": { |
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
<lab:QRCode | |
id="customQRCode" | |
text="UI5 Rocks!" | |
width="256" | |
height="256" | |
colorDark="#000" | |
colorLight="#FFF" | |
correctLevel="2" | |
/> |
Name | Description |
---|---|
reDraw | Draw the QRCode. If the QR Code does not exist it creates a new one, if it already exist it just refresh it |
clear | Clear the QR Code |
getText | Return the text of the QR Code |
setText | Set a new text of the QR Code |
getWidth | Return the width of the QR Code |
setWidth | Set the width of the QR Code |
getHeight | Return the height of the QR Code |
setHeight | Set the height of the QR Code |
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
sap.ui.define([ | |
"sap/ui/core/Control" | |
], function (Control) { | |
"use strict"; | |
return Control.extend("it.designfuture.qrcode.QRCode", { | |
metadata : { | |
properties : {}, | |
aggregations : {}, | |
events : {} | |
}, |
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
<?xml version="1.0" encoding="UTF-8" ?> | |
<library xmlns="http://www.sap.com/sap.ui.library.xsd" > | |
<name>it.designfuture.qrcode</name> | |
<vendor>OpenUI5 QRCode</vendor> | |
<documentation>Custom Control to render a QRCode</documentation> | |
<dependencies> | |
<dependency> |
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
/** | |
* Initialization Code and shared classes of library it.designfuture.qrcode. | |
*/ | |
sap.ui.define([ | |
'jquery.sap.global', | |
'sap/ui/core/library' // library dependency | |
], function(jQuery, library) { | |
"use strict"; |
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
sap.ui.define(['jquery.sap.global'], | |
function(jQuery) { | |
"use strict"; | |
/** | |
* QRCode renderer. | |
* @static | |
* @namespace | |
*/ |