<|start_filename|>demo/controller/Main.controller.js<|end_filename|>
sap.ui.define([
	"sap/ui/core/mvc/Controller"
], function(Controller) {
	"use strict";

	return Controller.extend("com.penninkhof.qrcode.controller.Main", {

		onInit: function() {
			this.view = this.getView();
			this.model = new sap.ui.model.json.JSONModel({
				code: "https://jpenninkhof.github.io/openui5-qrcode/",
				color: "#000000"
			});
			this.view.setModel(this.model);
		},

		onColorSelect: function(event) {
			switch (event.getParameter("selectedIndex")) {
				case 0: this.model.setProperty("/color", "#000000"); break;
				case 1: this.model.setProperty("/color", "#ff0000"); break;
				case 2: this.model.setProperty("/color", "#00ff00"); break;
				case 3: this.model.setProperty("/color", "#0000ff"); break;
			}
		}

	});

});


<|start_filename|>bower.json<|end_filename|>
{
  "name": "ui5-qrcode",
  "description": "A UI5 control for displaying QR Codes",
  "main": "control/QRCode.js",
  "authors": [
    "<NAME> <<EMAIL>>"
  ],
  "license": "MIT",
  "keywords": [
    "sap",
    "ui5",
    "qr",
    "qr_code"
  ],
  "moduleType": ["amd"],
  "homepage": "https://jpenninkhof.github.io/openui5-qrcode/",
  "ignore": [
    "**/.*",
    "node_modules",
    "bower_components",
    "test",
    "demo"
  ]
}


<|start_filename|>Gruntfile.js<|end_filename|>
module.exports = function (grunt) {

    var ui5version = ''
    var uirepo = 'openui5.hana.ondemand.com'

    grunt.initConfig({
        connect: {
            server: {
                options: {
                    port: 8000,
                    hostname: 'localhost',
                    base: {
                        path: '.',
                        index: 'index.html',
                    },
                    keepalive: true,
                    open: true,
                    middleware: function (connect, options, defaultMiddleware) {
                        return [require('grunt-connect-proxy/lib/utils').proxyRequest].concat(defaultMiddleware);
                    }
                },
                proxies: [
                    {
                        context: '/resources',
                        host: 'sapui5.hana.ondemand.com',
                        changeOrigin: true,
                        port: 443,
                        https: true,
                        rewrite: {
                            '^/resources': '/' + ui5version + '/resources'
                        }
                    }
                ]
            }
        }
    });

    grunt.loadNpmTasks('grunt-connect-proxy');
    grunt.loadNpmTasks('grunt-contrib-connect');

    grunt.registerTask('default', [
        'configureProxies:server',
        'connect:server']);

};
