qr-tools_1.4~bzr21.orig/0000755000175000017500000000000012270640441014534 5ustar koichikoichiqr-tools_1.4~bzr21.orig/qrtools.py0000644000175000017500000002363012270640373016621 0ustar koichikoichi#!/usr/bin/env python # Authors: # David Green # Ramiro Algozino # # qrtools.py: Library for encoding/decoding QR Codes (2D barcodes). # Copyright (C) 2011 David Green # # `qrtools.py` is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free # Software Foundation, either version 3 of the License, or (at your option) any # later version. # # `qrtools.py` is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more # details. # # You should have received a copy of the GNU General Public License along # with `qrtools.py`. If not, see . import subprocess import os import time import shutil import hashlib import zbar try: from PIL import Image except ImportError: import Image import re from codecs import BOM_UTF8 class QR(object): def encode_url(data): data_lower = data.lower() if data_lower.startswith(u"http://"): return ('http://' + re.compile( r'^http://', re.IGNORECASE ).sub('', data)) elif data_lower.startswith(u"https://"): return ('https://' + re.compile( r'^https://', re.IGNORECASE ).sub('', data)) #use these for custom data formats eg. url, phone number, VCARD #data should be an unicode object or a list of unicode objects data_encode = { 'text' : lambda data: data, 'url' : encode_url, 'email' :lambda data: 'mailto:' + re.compile( r'^mailto:', re.IGNORECASE ).sub('', data), 'emailmessage' : lambda data : 'MATMSG:TO:' + data[0] + ';SUB:' + data[1] + ';BODY:' + data[2] + ';;', 'telephone' : lambda data: 'tel:' + re.compile( r'^tel:', re.IGNORECASE ).sub('', data), 'sms' : lambda data : 'SMSTO:' + data[0] + ':' + data[1], 'mms' : lambda data : 'MMSTO:' + data[0] + ':' + data[1], 'geo' : lambda data : 'geo:' + data[0] + ',' + data[1], 'bookmark': lambda data : "MEBKM:TITLE:" + data[0] + ";URL:" + data[1] + ";;", # phonebook or meCard should be a list of tuples like this: # [('N','Name'),('TEL', '231698890'), ...] 'phonebook': lambda data: "MECARD:" + ";".join([":".join(i) for i in data]) + ";", 'wifi': lambda data: "WIFI:S:" + data[0] + ";T:" + data[1] + ";P:" + data[2] +";;", } data_decode = { 'text': lambda data: data, 'url': lambda data: data, 'email': lambda data: data.replace(u"mailto:",u"").replace(u"MAILTO:",u""), 'emailmessage': lambda data: re.findall(u"MATMSG:TO:(.*);SUB:(.*);BODY:(.*);;", data, re.IGNORECASE)[0], 'telephone': lambda data: data.replace(u"tel:",u"").replace(u"TEL:",u""), 'sms': lambda data: re.findall(u"SMSTO:(.*):(.*)", data, re.IGNORECASE)[0], 'mms': lambda data: re.findall(u"MMSTO:(.*):(.*)", data, re.IGNORECASE)[0], 'geo': lambda data: re.findall(u"GEO:(.*),(.*)", data, re.IGNORECASE)[0], 'bookmark': lambda data: re.findall(u"MEBKM:TITLE:(.*);URL:(.*);;", data, re.IGNORECASE)[0], 'phonebook': lambda data: dict(re.findall("(.*?):(.*?);", data.replace("MECARD:",""), re.IGNORECASE)), 'wifi' : lambda data: re.findall(u"WIFI:S:(.*);T:(.*);P:(.*);;", data, re.IGNORECASE)[0], } def data_recognise(self, data = None): """Returns an unicode string indicating the data type of the data paramater""" data = data or self.data data_lower = data.lower() if data_lower.startswith(u"http://") or data_lower.startswith(u"https://"): return u'url' elif data_lower.startswith(u"mailto:"): return u'email' elif data_lower.startswith(u"matmsg:to:"): return u'emailmessage' elif data_lower.startswith(u"tel:"): return u'telephone' elif data_lower.startswith(u"smsto:"): return u'sms' elif data_lower.startswith(u"mmsto:"): return u'mms' elif data_lower.startswith(u"geo:"): return u'geo' elif data_lower.startswith(u"mebkm:title:"): return u'bookmark' elif data_lower.startswith(u"mecard:"): return u'phonebook' elif data_lower.startswith(u"wifi:"): return u'wifi' else: return u'text' def __init__( self, data=u'NULL', pixel_size=3, level='L', margin_size=4, data_type=u'text', filename=None ): self.pixel_size = pixel_size self.level = level self.margin_size = margin_size self.data_type = data_type #you should pass data as a unicode object or a list/tuple of unicode objects. self.data = data #get a temp directory self.directory = os.path.join('/tmp', 'qr-%f' % time.time()) self.filename = filename os.makedirs(self.directory) self.qrencode_version = self.get_qrencode_version() self.qrencode_types = self.get_qrencode_types() def data_to_string(self): """Returns a UTF8 string with the QR Code's data""" # FIX-ME: if we don't add the BOM_UTF8 char, QtQR doesn't decode # correctly; but if we add it, mobile apps don't.- # /Apparently/ Confirmed that is a zbar bug. # See: https://bugs.launchpad.net/qr-tools/+bug/796387 if self.data_type == 'text': return BOM_UTF8 + self.__class__.data_encode[self.data_type](self.data).encode('utf-8') else: return self.__class__.data_encode[self.data_type](self.data).encode('utf-8') def get_tmp_file(self): return os.path.join( self.directory, #filename is hash of data hashlib.sha256(self.data_to_string()).hexdigest() + '.png' ) def encode(self, filename=None): self.filename = filename or self.get_tmp_file() ext = os.path.splitext(self.filename)[1].replace('.', '').upper() if ext != 'PNG' \ and ext != 'EPS' \ and ext != 'SVG' \ and ext != 'ANSI' \ and ext != 'ANSI256' \ and ext != 'ASCII' \ and ext != 'ASCIII' \ and ext != 'UTF8' \ and ext != 'ANSIUTF8': self.filename += '.png' ext = 'PNG' if self.qrencode_version > '3.1.1': command = [ 'qrencode', '-o', self.filename, '-s', unicode(self.pixel_size), '-m', unicode(self.margin_size), '-l', self.level, '-t', ext, self.data_to_string() ] else: command = [ 'qrencode', '-o', self.filename, '-s', unicode(self.pixel_size), '-m', unicode(self.margin_size), '-l', self.level, #'-t', ext, self.data_to_string() ] return subprocess.Popen(command).wait() def decode(self, filename=None): self.filename = filename or self.filename if self.filename: scanner = zbar.ImageScanner() # configure the reader scanner.parse_config('enable') # obtain image data pil = Image.open(self.filename).convert('L') width, height = pil.size raw = pil.tostring() # wrap image data image = zbar.Image(width, height, 'Y800', raw) # scan the image for barcodes result = scanner.scan(image) # extract results if result == 0: return False else: for symbol in image: pass # clean up del(image) #Assuming data is encoded in utf8 self.data = symbol.data.decode(u'utf-8') self.data_type = self.data_recognise() return True else: return False def decode_webcam(self, callback=lambda s:None, device='/dev/video0'): # create a Processor proc = zbar.Processor() # configure the Processor proc.parse_config('enable') # initialize the Processor proc.init(device) # setup a callback def my_handler(proc, image, closure): # extract results for symbol in image: if not symbol.count: self.data = symbol.data self.data_type = self.data_recognise() callback(symbol.data) proc.set_data_handler(my_handler) # enable the preview window proc.visible = True # initiate scanning proc.active = True try: proc.user_wait() except zbar.WindowClosed: pass def destroy(self): shutil.rmtree(self.directory) def get_qrencode_version(self): #Somehow qerencode writes this to stderr instead of stdout :-/ #FIXME: Probably a future bug in newer versions. p = subprocess.Popen(['qrencode','-V'], stdout=subprocess.PIPE, stderr=subprocess.PIPE) version_text = p.communicate()[1] version = re.search('version\s([\d.]*)',version_text) if version: version_number = version.group(1) else: version_number = -1 #print "Using qrencode version:", version_number return version_number def get_qrencode_types(self): p = subprocess.Popen(['qrencode','-h'], stdout=subprocess.PIPE, stderr=subprocess.PIPE) help_text = p.communicate()[1] types_text = re.search('-t {([\w,]*)}', help_text) if types_text: types = types_text.group(1).split(',') #print "The following format types have been found!:", types else: types = ['png'] #print "Help text for format types not found. Using:", types return typesqr-tools_1.4~bzr21.orig/qtqr_fr.ts0000644000175000017500000004674212270640373016603 0ustar koichikoichi MainWindow QtQR: QR Code Generator QtQR: Générateur des Codes QR Text Texte URL URL Bookmark Signet E-Mail E-Mail Telephone Number Numéro Téléphonique Contact Information (PhoneBook) Information de Contact (Répertoire) SMS SMS MMS MMS Geolocalization Géolocalisation Text to be encoded: Texte pour encodage: URL to be encoded: URL pour encodage: Title: Titre: URL: URL: E-Mail address: Adresse électronique: Subject: Sujet: Message Body: Corps du Message: Telephone Number: Numéro Téléphonique: Name: Nom: Telephone: Téléphone: E-Mail: E-Mail: Message: Message: characters count: 0 compte de caracteres: 0 Content: Teneur: Latitude: Latitude: Longitude: Longitude: Parameters: Paramètres: &Pixel Size: Taille du &Pixel: &Error Correction: Correction d'&Erreur: Lowest Minimale Medium Moyen QuiteGood AssezBon Highest Maximale &Margin Size: Taille de la &Marge: Start typing to create QR Code or drop here image files for decoding. Commencer taper pour créer un code QR ou laisser ici les fichiers pour décoder. &Save QRCode &Sauvegarder le Code QR &Decode &Décoder Decode from &File Décoder du &Fichier Decode from &Webcam Décoder du &Webcam E&xit &Sortir &About &A propos Error Correction Level Niveau du Correction d'Erreur Select data type: Sélectionnez le type des données: ERROR: Something went wrong while trying to generate the QR Code. ERREUR: Quelque chose s'est mal avec le génération du code QR. Save QRCode Sauvegarder le Code QR PNG Images (*.png);; All Files (*.*) Images PNG (*.png);;Toutes les Fichiers (*.*) Save QR Code Sauvegarder le Code QR Open QRCode Ouvrir un Code QR Images (*.png *.jpg);; All Files (*.*) Images (*.png *.jpg);;Toutes les Fichiers (*.*) Decode File Décoder un Fichier Do you want to Est ce que vous voulez open it in a browser? ouvrir dans un navigateur? send an e-mail to the address? Envoyer un e-mail à l'address? send the e-mail? Envoyer l'e-mail? open it in Google Maps? ouvrir dans Google Maps? Decode QRCode Décoder Code QR &Edit &Editer Decoding Failed Echec de Décodage About QtQR A propros QtQR QR Code succesfully saved to %s Code QR etait sauvegardé à %s QRCode succesfully saved to <b>%s</b>. Code QR etait sauvegardé à <b>%s</b>. No QRCode could be found in file: <b>%s</b>. Unsure about the tense and person here Ne peux pas trouver un Code QR dans le fichier <b>%s</b>. QRCode contains the following text: %s Le Code QR contient le texte suivant: %s QRCode contains the following url address: %s Le Code QR contient le URL suivant: %s QRCode contains a bookmark: Title: %s URL: %s Le Code QR contient un signet: Titre: %s URL: %s QRCode contains the following e-mail address: %s Le Code QR contient l'adresse électronique suivant: %s QRCode contains an e-mail message: To: %s Subject: %s Message: %s Le Code QR contient un adresse électronique: A: %s Sujet: %s Message: %s QRCode contains a telephone number: Le Code QR contient un numéro téléphonique: QRCode contains a phonebook entry: Name: %s Tel: %s E-Mail: %s El código QR contiene el siguiente entrada de agenda: Nombre: %s Teléfono: %s E-Mail: %s QRCode contains the following SMS message: To: %s Message: %s Le Code QR contient le SMS suivant: A: %s Message: %s QRCode contains the following MMS message: To: %s Message: %s Le Code QR contient le MMS suivant:: A: %s Message: %s QRCode contains the following coordinates: Latitude: %s Longitude:%s Le Code QR contient les coordonnées suivant:: Latitude: %s Longitude: %s characters count: %s - %d message(s) compte de caracteres:%s - %d message(s) <p>Oops! no code was found.<br /> Maybe your webcam didn't focus.</p> <p>Houp! pas de code etait trouvait <br />Peut-être le webcam n'a pas cadré.</p> <h1>QtQR %s</h1><p>A simple software for creating and decoding QR Codes that uses <a href="https://code.launchpad.net/~qr-tools-developers/qr-tools/python-qrtools-trunk">python-qrtools</a> as backend. Both are part of the <a href="https://launchpad.net/qr-tools">QR Tools</a> project.</p><p></p><p>This is Free Software: GNU-GPLv3</p><p></p><p>Please visit our website for more information and to check out the code:<br /><a href="https://launchpad.net/~qr-tools-developers/qtqr">https://launchpad.net/~qr-tools-developers/qtqr</p><p>copyright &copy; Ramiro Algozino &lt;<a href="mailto:algozino@gmail.com">algozino@gmail.com</a>&gt;</p> <h1>QtQR %s</h1><p>Un logiciels simple pour la création et décodage des codes QR que utilise <a href="https://code.launchpad.net/~qr-tools-developers/qr-tools/python-qrtools-trunk">python-qrtools</a> comme un backend. Tous les deux sont partie du <a href="https://launchpad.net/qr-tools">QR Tools</a> .</p> <p></p><p>Ce logiciel est gratuit: GNU-GPLv3</p> <p></p><p>Visitez notre site web pour plus de l'information et pour voir le code:<br /><a href="https://launchpad.net/~qr-tools-developers/qtqr">https://launchpad.net/~qr-tools-developers/qtqr</p> <p>Droit d'auteur &copy; Ramiro Algozino &lt;<a href="mailto:algozino@gmail.com">algozino@gmail.com</a>&gt;</p> Note: Note: Birthday: Anniversaire: Address: Adresse: QRCode contains a phonebook entry: Name: %s Tel: %s E-Mail: %s Note: %s Birthday: %s Address: %s URL: %s Le Code QR contient un entrée du répertoire: Numéro: %s Téléphone: %s E-Mail: %s Notes: %s Anniversaire: %s Adresse: %s URL: %s Insert separated by commas the PO Box, room number, house number, city, prefecture, zip code and country in order Insérez, séparé par virgules,le boîte postale, numéro de chambre, numéro de la maison, la ville, préfecture, code postal, et pays arrangé VideoDevices Decode from Webcam Décoder avec le Webcam You are about to decode from your webcam. Please put the code in front of your camera with a good light source and keep it steady. Once you see a green rectangle you can close the window by pressing any key. Please select the video device you want to use for decoding: Vous allez décoder avec votre webcam. Tenez le code en face de votre caméra avec une bon source de lumière et assurer sa stabilité s'il vous plaît. Quand vous voyez un rectangle vert, vous pouvez fermer la fenêtre en appuyant sur quelconque clé. Sélectionnez le périphérique vidéo que vous voulez utiliser pour décoder s'il vous plaît: qr-tools_1.4~bzr21.orig/qtqr_es.ts0000644000175000017500000004402412270640373016572 0ustar koichikoichi MainWindow QtQR: QR Code Generator QtQR: Generador de Códigos QR Text Texto URL URL Bookmark Marcador E-Mail E-Mail Telephone Number Número Telefónico Contact Information (PhoneBook) Información de Contacto (Agenda) SMS SMS MMS MMS Geolocalization Geolocalización Text to be encoded: Texto a ser codificado: URL to be encoded: URL a ser codificada: Title: Título: URL: URL: E-Mail address: Dirección de E-Mail: Subject: Asunto: Message Body: Cuerpo del Mensaje: Telephone Number: Número de Teléfono: Name: Nombre: Telephone: Teléfono: E-Mail: E-Mail: Message: Mensaje: characters count: 0 Cantidad de caracteres: 0 Content: Contenido: Latitude: Latitud: Longitude: Longitud: Parameters: Parámetros: &Pixel Size: Tamaño de &Píxel: &Error Correction: Corrección de &Error: Lowest Mínima Medium Medio QuiteGood Buena Highest Máxima &Margin Size: Tamaño del &Márgen: Start typing to create QR Code or drop here image files for decoding. Comience a escribir para generar el Código QR o suelte un archivo imagen con el código aquí. &Save QRCode &Guardar Código QR &Decode &Decodificar Decode from &File Decodificar desde &Archivo Decode from &Webcam Decodificar desde la &Webcam E&xit &Salir &About &Acerca de Error Correction Level Nivel de Corrección de Erorres Select data type: Seleccioná el tipo de datos: ERROR: Something went wrong while trying to generate the QR Code. ERROR: Algo salió mal tratando de generar el código QR. Save QRCode Guardar Código QR PNG Images (*.png);; All Files (*.*) Imágenes PNG (*.png);;Todos los archivos (*.*) Save QR Code Guardar Código QR Open QRCode Abrir Código QR Images (*.png *.jpg);; All Files (*.*) Imágenes (*.png *.jpg);;Todos los Archivos (*.*) Decode File Decodificar archivo Do you want to ¿Quiere open it in a browser? abrirlo en su navegador? send an e-mail to the address? manda un e-mail a la dirección? send the e-mail? mandar el e-mail? open it in Google Maps? abrirlo en Google Maps? Decode QRCode Decodificar Código QR &Edit &Editar Decoding Failed Falló la Decodificación About QtQR Acerca de QtQR QR Code succesfully saved to %s El código QR se guardó satisfactoriamente en %s QRCode succesfully saved to <b>%s</b>. El código QR se guardó satisfactoriamente en <b>%s</b>. No QRCode could be found in file: <b>%s</b>. No se pudo encontrar un código QR en el archivo <b>%s</b>. QRCode contains the following text: %s El código QR contiene el siguiente texto: %s QRCode contains the following url address: %s El código QR contiene la siguiente URL: %s QRCode contains a bookmark: Title: %s URL: %s El código QR contiene el marcador: Título: %s URL: %s QRCode contains the following e-mail address: %s El código QR contiene la siguiente dirección de e-mail: %s QRCode contains an e-mail message: To: %s Subject: %s Message: %s El código QR contiene el siguiente e-mail: Para: %s Asunto: %s Mensaje: %s QRCode contains a telephone number: El código QR contiene el siguiente número telefónico: QRCode contains a phonebook entry: Name: %s Tel: %s E-Mail: %s El código QR contiene el siguiente entrada de agenda: Nombre: %s Teléfono: %s E-Mail: %s QRCode contains the following SMS message: To: %s Message: %s El código QR contiene el siguiente SMS: Para: %s Mensaje: %s QRCode contains the following MMS message: To: %s Message: %s El código QR contiene el siguiente MMS: Para: %s Mensaje: %s QRCode contains the following coordinates: Latitude: %s Longitude:%s El código QR contiene las siguientes coordenadas: Latitud: %s Longitud: %s characters count: %s - %d message(s) cantidad de caracteres: %s - %d mensaje(s) <p>Oops! no code was found.<br /> Maybe your webcam didn't focus.</p> <p>Caray! no encontramos ningún código.<br />Talvez la webcam no hizo foco.</p> <h1>QtQR %s</h1><p>A simple software for creating and decoding QR Codes that uses <a href="https://code.launchpad.net/~qr-tools-developers/qr-tools/python-qrtools-trunk">python-qrtools</a> as backend. Both are part of the <a href="https://launchpad.net/qr-tools">QR Tools</a> project.</p><p></p><p>This is Free Software: GNU-GPLv3</p><p></p><p>Please visit our website for more information and to check out the code:<br /><a href="https://launchpad.net/~qr-tools-developers/qtqr">https://launchpad.net/~qr-tools-developers/qtqr</p><p>copyright &copy; Ramiro Algozino &lt;<a href="mailto:algozino@gmail.com">algozino@gmail.com</a>&gt;</p> <h1>QtQR %s</h1> <p>Un simple software para crear y decodificar códigos QR que utiliza <a href="https://code.launchpad.net/~qr-tools-developers/qr-tools/python-qrtools-trunk">python-qrtools</a> como backend. Ambos son parte del proyecto <a href="https://launchpad.net/qr-tools">QR Tools</a> .</p> <p></p> <p>Estos es software gratuito: GNU-GPLv3</p> <p></p> <p>Por favor, visite nuestro sitio web para más información y para obtener el códio fuente:<br /> <a href="https://launchpad.net/~qr-tools-developers/qtqr"> https://launchpad.net/~qr-tools-developers/qtqr</p> <p>copyright &copy; Ramiro Algozino &lt;<a href="mailto:algozino@gmail.com">algozino@gmail.com</a>&gt;</p> Note: Notas: Birthday: Fecha de Nacimiento: Address: Dirección: QRCode contains a phonebook entry: Name: %s Tel: %s E-Mail: %s Note: %s Birthday: %s Address: %s URL: %s El código QR contiene el siguiente entrada de agenda: Nombre: %s Teléfono: %s E-Mail: %s Notas: %s Fecha de Nacimiento: %s Dirección: %s URL: %s Insert separated by commas the PO Box, room number, house number, city, prefecture, zip code and country in order Inserte, separado por comas, el Buzón, número de habitación, número de puerta, ciudad, estado, código postal y país en orden VideoDevices Decode from Webcam Decodificar desde la Webcam You are about to decode from your webcam. Please put the code in front of your camera with a good light source and keep it steady. Once you see a green rectangle you can close the window by pressing any key. Please select the video device you want to use for decoding: Estás a punto de decodificar desde la webcam. Por favor, poné el código QR en frente de tu cámara con una buena fuente de luz y mantenelo quieto. Una vez que veas un recuadro verde alrededor del código podés cerrar la ventana presionando cualquier tecla. Por favor seleccioná el dispositivo de video que querés utilizar: qr-tools_1.4~bzr21.orig/qtqr_en_GB.ts0000644000175000017500000004275612270640373017147 0ustar koichikoichi MainWindow QtQR: QR Code Generator QtQR: QR Code Generator Text Text URL URL Bookmark Bookmark E-Mail E-Mail Telephone Number Telephone Number Contact Information (PhoneBook) Contact Information (PhoneBook) SMS SMS MMS MMS Geolocalization Geolocalisation Text to be encoded: Text to be encoded: URL to be encoded: URL to be encoded: Title: Title: URL: URL: E-Mail address: E-Mail address: Subject: Subject: Message Body: Message Body: Telephone Number: Telephone Number: Name: Name: Telephone: Telephone: E-Mail: E-Mail: Message: Message: characters count: 0 characters count: 0 Content: Content: Latitude: Latitude: Longitude: Longitude: Parameters: Parameters: &Pixel Size: &Pixel Size: &Error Correction: &Error Correction: Lowest Lowest Medium Medium QuiteGood QuiteGood Highest Highest &Margin Size: &Margin Size: Start typing to create QR Code or drop here image files for decoding. Start typing to create QR Code or drop here image files for decoding. &Save QRCode &Save QRCode &Decode &Decode Decode from &File Decode from &File Decode from &Webcam Decode from &Webcam E&xit E&xit &About &About Error Correction Level Error Correction Level Select data type: Select data type: ERROR: Something went wrong while trying to generate the QR Code. ERROR: Something went wrong while trying to generate the QR Code. Save QRCode Save QRCode PNG Images (*.png);; All Files (*.*) PNG Images (*.png);; All Files (*.*) Save QR Code Save QR Code Open QRCode Open QRCode Images (*.png *.jpg);; All Files (*.*) Images (*.png *.jpg);; All Files (*.*) Decode File Decode File Do you want to Do you want to open it in a browser? open it in a browser? send an e-mail to the address? send an e-mail to the address? send the e-mail? send the e-mail? open it in Google Maps? open it in Google Maps? Decode QRCode Decode QRCode &Edit &Edit Decoding Failed Decoding Failed About QtQR About QtQR QR Code succesfully saved to %s QR Code succesfully saved to %s QRCode succesfully saved to <b>%s</b>. QRCode succesfully saved to <b>%s</b>. No QRCode could be found in file: <b>%s</b>. No QRCode could be found in file: <b>%s</b>. QRCode contains the following text: %s QRCode contains the following text: %s QRCode contains the following url address: %s QRCode contains the following url address: %s QRCode contains a bookmark: Title: %s URL: %s QRCode contains a bookmark: Title: %s URL: %s QRCode contains the following e-mail address: %s QRCode contains the following e-mail address: %s QRCode contains an e-mail message: To: %s Subject: %s Message: %s QRCode contains an e-mail message: To: %s Subject: %s Message: %s QRCode contains a telephone number: QRCode contains a telephone number: QRCode contains a phonebook entry: Name: %s Tel: %s E-Mail: %s QRCode contains a phonebook entry: Name: %s Tel: %s E-Mail: %s QRCode contains the following SMS message: To: %s Message: %s QRCode contains the following SMS message: To: %s Message: %s QRCode contains the following MMS message: To: %s Message: %s QRCode contains the following MMS message: To: %s Message: %s QRCode contains the following coordinates: Latitude: %s Longitude:%s QRCode contains the following coordinates: Latitude: %s Longitude:%s characters count: %s - %d message(s) characters count: %s - %d message(s) <p>Oops! no code was found.<br /> Maybe your webcam didn't focus.</p> <p>Oops! no code was found.<br /> Maybe your webcam didn't focus.</p> <h1>QtQR %s</h1><p>A simple software for creating and decoding QR Codes that uses <a href="https://code.launchpad.net/~qr-tools-developers/qr-tools/python-qrtools-trunk">python-qrtools</a> as backend. Both are part of the <a href="https://launchpad.net/qr-tools">QR Tools</a> project.</p><p></p><p>This is Free Software: GNU-GPLv3</p><p></p><p>Please visit our website for more information and to check out the code:<br /><a href="https://launchpad.net/~qr-tools-developers/qtqr">https://launchpad.net/~qr-tools-developers/qtqr</p><p>copyright &copy; Ramiro Algozino &lt;<a href="mailto:algozino@gmail.com">algozino@gmail.com</a>&gt;</p> <h1>QtQR %s</h1><p>A simple software for creating and decoding QR Codes that uses <a href="https://code.launchpad.net/~qr-tools-developers/qr-tools/python-qrtools-trunk">python-qrtools</a> as backend. Both are part of the <a href="https://launchpad.net/qr-tools">QR Tools</a> project.</p><p></p><p>This is Free Software: GNU-GPLv3</p><p></p><p>Please visit our website for more information and to check out the code:<br /><a href="https://launchpad.net/~qr-tools-developers/qtqr">https://launchpad.net/~qr-tools-developers/qtqr</p><p>copyright &copy; Ramiro Algozino &lt;<a href="mailto:algozino@gmail.com">algozino@gmail.com</a>&gt;</p> Note: Note: Birthday: Birthday: Address: Address: QRCode contains a phonebook entry: Name: %s Tel: %s E-Mail: %s Note: %s Birthday: %s Address: %s URL: %s QRCode contains a phonebook entry: Name: %s Tel: %s E-Mail: %s Note: %s Birthday: %s Address: %s URL: %s Insert separated by commas the PO Box, room number, house number, city, prefecture, zip code and country in order Insert separated by commas the PO Box, room number, house number, city, county, postal code and country in order VideoDevices Decode from Webcam Decode from Webcam You are about to decode from your webcam. Please put the code in front of your camera with a good light source and keep it steady. Once you see a green rectangle you can close the window by pressing any key. Please select the video device you want to use for decoding: You are about to decode from your webcam. Please put the code in front of your camera with a good light source and keep it steady. Once you see a green rectangle you can close the window by pressing any key. Please select the video device you want to use for decoding: qr-tools_1.4~bzr21.orig/logo_a_la_faenza.svg0000644000175000017500000005604612270640373020534 0ustar koichikoichi image/svg+xml qr-tools_1.4~bzr21.orig/samples/0000755000175000017500000000000012270640373016204 5ustar koichikoichiqr-tools_1.4~bzr21.orig/samples/url.png0000644000175000017500000000117312270640373017516 0ustar koichikoichiPNG  IHDRccY)sBITO pHYs+IDATxKn! Qɮ7HVhe, y>Ϗ~o/kP)JQTRE(*EQ)JQGtx8OI# E((^R% "ȯj堩)JQr6?Iy$Qj+ So P$ (*E9}s_}t+SdTt =EQ)sr׌)JQfn E(~jZ !ֺ5E(')Z6r6qE(c;Z >NW dO(*EAG|O!p.)JQ6vRf_#~ꬪ(*EP;sՂ.U 5mA('}͌S؎^T/U',Ls =EQ).maL0-Tղa*f=mA(G߶2]s+[&@OQTrm:`e=ӨT6k>bAOQTrmԿ;K^COQTrm{S)JQmon`=EQ)~W(*EQ)JQTRE(*EQ)?t3IENDB`qr-tools_1.4~bzr21.orig/samples/email-message.png0000644000175000017500000000237212270640373021427 0ustar koichikoichiPNG  IHDRBsBITO pHYs+IDATxˎ@  ˛.d%-&iC@~{ r\*( ʥr\*( ʥr\*:}>3hyMIт~N:tl KRiy __܋u:N?;TP.C;]uγ.u:,l.KEv@sӖ']KRAT-QvZIͥrRs B(\zQ&s6 ʥ2Ro0;rq}łvTP.WrnWgo(6 ʥe{gi =k]Fbs\*bβlw"Q%hNͥrv'Ǖ]ԺF,;TP.$'3j7/O뚯RATnhem:'WKRwuF u<*IvbKVa5*ʝGhĖR,Qyzʠ]jRAT[vb8ܦl.K-GGN׭tޮz6 ʥb{5NNܗ*Mn,8OLJQqW9R'=xK~c4@QqW9`}/gVg[NiTU(VqW "RP:gqiz8z禔du2zh4*NS*I/ZT3ީrmFi>r \ y2AӨ8M_2ABYnqIy2=xh4*NS[ ^;\%\FQqZ?2X\i (yfmFiֺ2 g[zե=k4*NS_IBoVВAQq{z0(mFi]p^pr viv06[jTfwa-^ʩ8Lk@"!̮ވӤwKqٯNnptKOqIeR8=4L_`Ө8M-n}y&dFXJ_`Ө8M3rHgJa[4*Nf\JScFiY7/A gW 4*NS*?`p_jӨ8 ̓9`Ө8~-Дlt 8ӬULJEtv2Ә*UpoDi*[h{B(cFinm5scFijp&t9Ti[}L}dzT^cӨ8MsrܘùʰҘKcFiRYeXNPZڤ+qi֫'E@%N cFijʰT[jIENDB`qr-tools_1.4~bzr21.orig/samples/text-plain.png0000644000175000017500000000122312270640373020775 0ustar koichikoichiPNG  IHDRccY)sBITO pHYs+6IDATxK0 '=;o 􉓆e桇, | *EQ)JQTRE(*EQ)y躮\CA1EQ) r"E;b%``ݪS3 0(*EɹoJL3YLל1EQ)J}5vg5WSSu_TE(E5{A jÔOSw2oE(}N6R[5)JQT3nQ? "[E)y`LQTb;h+|D c}W$ zts-<΃66I5(*Eɝ>R.px`LQT}θcLQTR}ccRb[HK흦et}S`dts-%)/)JQr=pD$E(GגNzmb }噻!Ҝ1EQ)[n4=Q)3, U^mZ=Lc50(*EyZ#>[lnS}5E(*EQ)JQTRE(*E/IENDB`qr-tools_1.4~bzr21.orig/samples/geo.png0000644000175000017500000000121112270640373017457 0ustar koichikoichiPNG  IHDRccY)sBITO pHYs+,IDATxAn0 rzE1\1v\XbdTRE(*EQ)JQTR?u]'czl?ao:i%POQTK0,{XSq^)JQMQİxE((p5%L_xe6QS7#E]NE(׳˹=,١ )JQ}-:IymPOQT~+O-E(gYIJMb1zk(*EA;<$Yd+bfKkQSSւlUy8=EQ)ؾCne1S_/nW[K&Q)iMC;}IEPOQT2k)cZ6=EQ)ʭw]Z7Q+COQT־]xSwA]yބJQnmϚjzRgz۳_1VOQTpwmkWp zRO;SAS^E(mE(/̾ezR{ۿ=EQ)JQTRE(*EQ)JQ_ whIENDB`qr-tools_1.4~bzr21.orig/samples/mms.png0000644000175000017500000000140612270640373017507 0ustar koichikoichiPNG  IHDRoom 7sBITO pHYs+IDATxn0 M3Fz|I$I$I$I$I$FL֝m2-&j(y-peM;&jԜ2fɼ=zo`l&I=}_  `l&Q_$It0FR x_5dl&Iá3S%+y8&j<'WJwNI$)sY6;~&jLƩL29j4W^K*&j>LK[?_2~$I2eG}g8qVs&j4wLGMorӨ& =RJ A7ӯ$+qqLhTr ê>Ί$|>=3 4gl&I-{d(=Oj4+r"[/ 8_C5IjlԹLÙ#Jݠ&j0&j9v뤷m &j\>6x5˶߹k&ѳa3msiw̎I$r6p> &jup.h\E3{?j9?tQMg2 pLjOzM$QM$QM$QM$QM$QMCD*jIENDB`qr-tools_1.4~bzr21.orig/samples/sms.png0000644000175000017500000000142012270640373017511 0ustar koichikoichiPNG  IHDRoom 7sBITO pHYs+IDATx͎ 7}W޸ YBUOvpz~*TD5ITD5ITD5ITD5ITD5I2l;cI\=2Sh$IEiny|k/M$y".wά*;6IT=W--h&jy_/D$QMLݛ˽I$5OJ|޷k$I\ɆZ)^mD5IR><+?ImD5I^:n8wM$I߂^5pI$̙w*s&gEQMZ+p̥}JBmI$o^rs F$QM rf"޿6IT{S^K^NI$Ӽ^ijA G5I9^6L&j`lkxҘmD5IN[0m:A$QMj5l|'xb\)K_h$Ir>dm&ްT:+)5Thoa̝6&j ;<9pZk&юR\*4j̜jUD mD5I ˷R㨎7&j\ K] {h$Ir7췢m&j&j&j&j&jycjIENDB`qr-tools_1.4~bzr21.orig/samples/bookmark.png0000644000175000017500000000166012270640373020522 0ustar koichikoichiPNG  IHDR{{ۥh(sBITO pHYs+SIDATxn0 ž+wo[1%͐d>???PqQqQqQqQq[iz6c$wϭ64Z_q)y7nCgl4~L&Uqy7}TfallmFi^eFޯD)~*h4*Nz$'JҜJv\,Ө8Ы,[J<4nUt+.iTUo3~h4*NS*@١RwM>$m -qyꮭ!~f2|qzfVi-8OmFiJ^66U~*NӋUZrM+"T#8 ceOh4*N;]~ں_YY(ѯmFiVͶ٩Yiw"8 w6'RY smFiW#RHjQqUV,,=O`QmFi+%^uRs="AQqy|9?FQqskgV~1 Ώ+FfWi4*N;'ZsNڴPqo<]x1*YIiTf{pҒL2hӨ8Ps{4nqi4*NӋU*~ke'iTwVaB8Ӡ.\U`[Nqy݅I?3'pcmFi~؛Y!wy( 6N4ϼͬqU4Ѩ8 e2}|W4*N̻ lgol;:͔Ө8 _E>qQqQqQqQqQq-v/IENDB`qr-tools_1.4~bzr21.orig/samples/telephone.png0000644000175000017500000000101612270640373020673 0ustar koichikoichiPNG  IHDRWWN;sBITO pHYs+IDATxK0ʙmBjr`B:j}ÿhZZ--@ wqsr`tZSXvI{O`0 VAvl,B"jS`8Y-1 fq5znZkOuVf sBY3K%f@ a"n~DP+Z#j׻Z!4h!LUD`Vᛅ0 vifhWo3f:ZjٞYθ(5-4k,k{h!ZPݵX`@ 廯A6h!sӯOrU},;Ϭ#h}9Pkf2Z/uMVfG|-fZZ--@ A +GZIENDB`qr-tools_1.4~bzr21.orig/qtqr_ru.ts0000644000175000017500000005017712270640373016617 0ustar koichikoichi MainWindow QtQR: QR Code Generator QtQR: Генератор QR-кодов Text Текст URL URL Bookmark Закладка E-Mail E-Mail Telephone Number Телефон Contact Information (PhoneBook) Контактная информация (телефонная книга) SMS SMS MMS MMS Geolocalization Координаты Text to be encoded: Кодируемый текст: URL to be encoded: Кодируемый URL: Title: Заголовок: URL: URL: E-Mail address: Адрес электронной почты: Subject: Тема: Message Body: Текст сообщения: Telephone Number: Номер телефона: Name: Имя: Telephone: Телефон: E-Mail: E-Mail: Note: Комментарий: Birthday: День рождения: Address: Адрес: Insert separated by commas the PO Box, room number, house number, city, prefecture, zip code and country in order Добавьте в следующем порядке разделённые запятыми поля: номер абонентского ящика, номер офиса, номер дома, город, префектура, почтовый индекс, страна Message: Сообщение: characters count: 0 количество символов: 0 Content: Содержание: Latitude: Широта: Longitude: Долгота: Parameters: Свойства: &Pixel Size: Размер &точки: &Error Correction: Коррекция &ошибок: Lowest Минимальная Medium Средняя QuiteGood Достаточная Highest Максимальная &Margin Size: Размер &рамки: Start typing to create QR Code or drop here image files for decoding. Для создания QR-кода введите текст в поле слева. Для распознавания QR-кода можно перетащить изображение сюда. &Save QRCode &Сохранить QR-код &Decode &Декодировать Decode from &File Декодировать содержимое &файла Decode from &Webcam Декодировать данные с &веб-камеры E&xit В&ыход &About &О QtQR Error Correction Level Уровень коррекции ошибок Select data type: Выберите тип данных для кодирования: characters count: %s - %d message(s) количество символов: %s, сообщений: %d ERROR: Something went wrong while trying to generate the QR Code. ОШИБКА: генерация QR-кода завершилась неуспешно. Save QRCode Сохранить QR-код PNG Images (*.png);; All Files (*.*) Изображения PNG (*.png);; Все файлы (*.*) Save QR Code Сохранить QR-код QR Code succesfully saved to %s QR-код успешно сохранён в файл %s QRCode succesfully saved to <b>%s</b>. QR-код успешно сохранён в файл <b>%s</b>. Open QRCode Открыть файл с QR-кодом Images (*.png *.jpg);; All Files (*.*) Изображения (*.png, *.jpg, *.jpeg);; Все файлы (*.*) Decode File Декодировать файл No QRCode could be found in file: <b>%s</b>. QR-код не найден в файле<b>%s</b>. QRCode contains the following text: %s QR-код содержит следующий текст: %s QRCode contains the following url address: %s QR-код содержит следующий адрес: %s QRCode contains a bookmark: Title: %s URL: %s QR-код содержит закладку: Заголовок: %s URL: %s QRCode contains the following e-mail address: %s QR-код содержит следующий адрес электронной почты: %s QRCode contains an e-mail message: To: %s Subject: %s Message: %s QR-код содержит сообщение электронной почты: Кому: %s Тема: %s Содержание: %s QRCode contains a telephone number: QR-код содержит номер телефона: QRCode contains a phonebook entry: Name: %s Tel: %s E-Mail: %s Note: %s Birthday: %s Address: %s URL: %s QR-код содержит запись телефонной книги: Имя: %s Телефон: %s E-Mail: %s Комментарий: %s День рождения: %s Адрес: %s URL: %s QRCode contains the following SMS message: To: %s Message: %s QR-код содержит следующий SMS: Кому: %s Сообщение: %s QRCode contains the following MMS message: To: %s Message: %s QR-код содержит следующий MMS: Кому: %s Содержимое: %s QRCode contains the following coordinates: Latitude: %s Longitude:%s QR-код содержит следующие координаты:: Широта: %s Долгота: %s Do you want to open it in a browser? Открыть в браузере? send an e-mail to the address? Послать сообщение по этому адресу? send the e-mail? Послать этот e-mail? open it in Google Maps? Открыть в Google Maps? Decode QRCode Декодировать QR-код &Edit &Редактировать Decoding Failed Декодировать не удалось <p>Oops! no code was found.<br /> Maybe your webcam didn't focus.</p> <p>QR-код не найден.<br /> Возможно, веб-камера расфокусирована.</p> About QtQR О QtQR <h1>QtQR %s</h1><p>A simple software for creating and decoding QR Codes that uses <a href="https://code.launchpad.net/~qr-tools-developers/qr-tools/python-qrtools-trunk">python-qrtools</a> as backend. Both are part of the <a href="https://launchpad.net/qr-tools">QR Tools</a> project.</p><p></p><p>This is Free Software: GNU-GPLv3</p><p></p><p>Please visit our website for more information and to check out the code:<br /><a href="https://launchpad.net/~qr-tools-developers/qtqr">https://launchpad.net/~qr-tools-developers/qtqr</p><p>copyright &copy; Ramiro Algozino &lt;<a href="mailto:algozino@gmail.com">algozino@gmail.com</a>&gt;</p> <h1>QtQR %s</h1><p>Простая программа для создания и распознавания QR-кодов, использующая в качестве системы распознавания <a href="https://code.launchpad.net/~qr-tools-developers/qr-tools/python-qrtools-trunk">python-qrtools</a>. QtQR и python-qrtools — части проекта <a href="https://launchpad.net/qr-tools">QR Tools</a>.</p><p></p><p>Проект распространяется под свободной лицензией GNU-GPLv3</p><p></p><p>Чтобы узнать больше и поучаствовать в разработке, посетите наш сайт:<br /><a href="https://launchpad.net/~qr-tools-developers/qtqr">https://launchpad.net/~qr-tools-developers/qtqr</p><p>copyright &copy; Ramiro Algozino &lt;<a href="mailto:algozino@gmail.com">algozino@gmail.com</a>&gt;</p> VideoDevices Decode from Webcam Декодировать данные с веб-камеры You are about to decode from your webcam. Please put the code in front of your camera with a good light source and keep it steady. Once you see a green rectangle you can close the window by pressing any key. Please select the video device you want to use for decoding: Чтобы получить QR-код с веб-камеры, неподвижно поместите перед ней хорошо освещённое изображение с кодом. После того, как произойдёт распознавание, появится зелёный прямоугольник, и окно веб-камеры можно закрыть нажатием на любую клавишу. Выберите видеоустройство, с которого будет происходить распознавание: qr-tools_1.4~bzr21.orig/qtqr_ja.ts0000644000175000017500000004434612270640373016564 0ustar koichikoichi MainWindow QtQR: QR Code Generator QtQR: QRコード生成器 Text テキスト URL URL Bookmark ブックマーク E-Mail Eメール Telephone Number 電話番号 Contact Information (PhoneBook) 連絡先情報 (電話帳) SMS SMS MMS MMS Geolocalization 位置情報 Text to be encoded: エンコードするテキスト: URL to be encoded: エンコードするURL: Title: タイトル: URL: URL: E-Mail address: Eメールアドレス: Subject: 件名: Message Body: メッセージ本文: Telephone Number: 電話番号: Name: 名前: Telephone: 電話: E-Mail: Eメール: Message: 本文: characters count: 0 文字数: 0 Content: 内容: Latitude: 緯度: Longitude: 経度: Parameters: パラメーター: &Pixel Size: ピクセルサイズ(&P): &Error Correction: エラー訂正(&E): Lowest 最低 Medium QuiteGood まあまあ Highest 最高 &Margin Size: 余白(&M): Start typing to create QR Code or drop here image files for decoding. 文字列を入力してQRコードを生成するか、 ここに画像ファイルをドロップしてデコードします。 &Save QRCode QRコードを保存(&S) &Decode デコード(&D) Decode from &File ファイルからデコード(&F) Decode from &Webcam Webカメラからデコード(&W) E&xit 終了(&X) &About 情報(&A) Error Correction Level エラー訂正レベル Select data type: データの形式を選択してください: ERROR: Something went wrong while trying to generate the QR Code. エラー: QRコードの生成中に何らかの問題が発生しました。 Save QRCode QRコードを保存 PNG Images (*.png);; All Files (*.*) PNG画像 (*.png);;すべてのファイル (*.*) Save QR Code QRコードを保存 Open QRCode QRコードを開く Images (*.png *.jpg);; All Files (*.*) 画像 (*.png *.jpg);; すべてのファイル (*.*) Decode File ファイルをデコード Do you want to open it in a browser? Webブラウザーで開きますか? send an e-mail to the address? 宛先にEメールを送りますか? send the e-mail? Eメールを送信しますか? open it in Google Maps? Google マップで開きますか? Decode QRCode QRコードをデコード &Edit 編集(&E) Decoding Failed デコードに失敗しました About QtQR QtQR について QR Code succesfully saved to %s QRコードは %s に正しく保存されました QRCode succesfully saved to <b>%s</b>. QRコードは <b>%s</b> に正しく保存されました。 No QRCode could be found in file: <b>%s</b>. <b>%s</b> の中にQRコードは見つかりませんでした。 QRCode contains the following text: %s QRコードには次のテキストが含まれています: %s QRCode contains the following url address: %s QRコードには次のURLアドレスが含まれています: %s QRCode contains a bookmark: Title: %s URL: %s QRコードにはブックマークが含まれています: タイトル: %s URL: %s QRCode contains the following e-mail address: %s QRコードには次のEメールアドレスが含まれています: %s QRCode contains an e-mail message: To: %s Subject: %s Message: %s QRコードにはEメールメッセージが含まれています: 宛先: %s 件名: %s 本文: %s QRCode contains a telephone number: QRコードには電話番号が含まれています: QRCode contains the following SMS message: To: %s Message: %s QRコードには次のSMSメッセージが含まれています: 宛先: %s 本文: %s QRCode contains the following MMS message: To: %s Message: %s QRコードには次のMMSメッセージが含まれています: 宛先: %s 本文: %s QRCode contains the following coordinates: Latitude: %s Longitude:%s QRコードには次の座標が含まれています: 緯度: %s 経度: %s characters count: %s - %d message(s) 文字数: %s - %d メッセージ <p>Oops! no code was found.<br /> Maybe your webcam didn't focus.</p> <p>おっと!コードが見つかりませんでした。<br />おそらくWebカメラのフォーカスが合っていません。</p> <h1>QtQR %s</h1><p>A simple software for creating and decoding QR Codes that uses <a href="https://code.launchpad.net/~qr-tools-developers/qr-tools/python-qrtools-trunk">python-qrtools</a> as backend. Both are part of the <a href="https://launchpad.net/qr-tools">QR Tools</a> project.</p><p></p><p>This is Free Software: GNU-GPLv3</p><p></p><p>Please visit our website for more information and to check out the code:<br /><a href="https://launchpad.net/~qr-tools-developers/qtqr">https://launchpad.net/~qr-tools-developers/qtqr</p><p>copyright &copy; Ramiro Algozino &lt;<a href="mailto:algozino@gmail.com">algozino@gmail.com</a>&gt;</p> <h1>QtQR %s</h1><p>QRコードを生成・読み込みするためのシンプルなソフトウェアで、バックエンドに <a href="https://code.launchpad.net/~qr-tools-developers/qr-tools/python-qrtools-trunk">python-qrtools</a> を使用しています。これら2つは <a href="https://launchpad.net/qr-tools">QR Tools</a> プロジェクトの一部です。</p><p></p><p>これはフリーソフトウェアです: GNU-GPLv3</p><p></p><p>詳細な情報を得たりソースコードを取得するには、Webサイトにアクセスしてください:<br /><a href="https://launchpad.net/~qr-tools-developers/qtqr">https://launchpad.net/~qr-tools-developers/qtqr</p><p>copyright &copy; Ramiro Algozino &lt;<a href="mailto:algozino@gmail.com">algozino@gmail.com</a>&gt;</p> Note: メモ: Birthday: 誕生日: Address: 住所: QRCode contains a phonebook entry: Name: %s Tel: %s E-Mail: %s Note: %s Birthday: %s Address: %s URL: %s QRコードには電話帳の情報が含まれています: 名前: %s 電話: %s Eメール: %s メモ: %s 誕生日: %s 住所: %s URL: %s Insert separated by commas the PO Box, room number, house number, city, prefecture, zip code and country in order カンマ区切りで順に、私書箱、部屋番号、番地、町名、都道府県、郵便番号、国名を入力してください VideoDevices Decode from Webcam Webカメラからデコード You are about to decode from your webcam. Please put the code in front of your camera with a good light source and keep it steady. Once you see a green rectangle you can close the window by pressing any key. Please select the video device you want to use for decoding: Webカメラからデコードします。明るい場所でQRコードをカメラの前に置き、あまり動かないようにしてください。 緑色の四角形が表示されたら、何らかのキーを押して画面を閉じることができます。 デコードに使いたいビデオデバイスを選択してください: qr-tools_1.4~bzr21.orig/icon.png0000644000175000017500000001021412270640373016174 0ustar koichikoichiPNG  IHDR``w8sBIT|d pHYs B(xtEXtSoftwarewww.inkscape.org< IDATx]i$Ecz{fwVY WȤ |T}k.(Lͮ/Fz;|Vۿӯ6$!o@(|~ώ|rϮ WXRBy>/=x)mJi_Tvfƃbbڨ0OG:9[AJe[w|ΛzM-9POimt)_.}X>pOge쓠KGQ.;> WIc@ T)Q]<)4x0sʥ `60o$*Ba3=~HŘ8u6IH*3rT*O[M֭ j"J; cؘ_S+^EgB 4h!Ri, ZS3سNI!<G NǷL@7IGE qde•U.MAnAx~nhhdC(M B{,80΋H2Q*5QK M6gOn|¤V:= r pDtu2^i痙JX TB .R0:dm'7:28 Y<>v-g(X<_zv[b lP °fAޜؗSH!:I5saH3vBӅ Cvڍ AY%b Q,iJڸE٢Gӵ1YaqZ+7}FvK-Ǐ:@2iRNsBgM|(qZtDZ$P&$[/ fTA;Tw.taA+u&TFnOfR֠8 32>%m|Oˡ<#o J9ˉqDz #+~TMOfwp㕘Ӿ7_ה=tL4M{+Ο}=IL6Y,+aM[eǡ׍^00N/qAp"T4(v6ueI٭0hj>o rti +;,a(X[(7d&Ԇd*wnA8J\wdN-k4JW񳇞Nn,Õ0@H`ܤ1nչ AX :!s="l1] 1oZW8vDQ bsI֪W:Ԇ y|x%Q// yz \ ؿyaޫ[ 糑?q$ugA2|U%]W0w.*瓿}<(YV0~L@C[ϻ2l g#T TSBS"8Yi>Z**`oߞWy箋=p_;w~Of_(Z<^(qALnC4g--c$?yɳ,[HfOAY+վK #KXx}{|3hv۲32VcHCAdV5N=@Е04q2`>[s ƝP>ƷP܊2ms.R Nd|Rx{†8*[FˬWp,=c)F8CWUp֪~Gཁ.dk(pWe\졉Uz <]i~{4p?`@nG[4QN ؠ̬GR ·^ZOiac5a CNg|uֺó]I~LOrht>[mXv1_z A`*EJXs X [F=|9 ݽ<=oC[o~ u@l`ݼDļuȊ!cbbC9Qi>UwG?4t]}+XEDUD^ kɠ(T3U 52y9|"JkAݲڣAسT6'\.<Q2f'BFz9 M(֪޲|b?~K;te8- e4D8>xXAó%9рI`W#x/׻T%q]M3vik-603SmY']qcCФwN6/QTɈygAiCz6gu9vhgGl.h\&ïM BDdY]C5zPF ce&+OZHW"4Om\U])osͶ-هle[{YԠ;KUsr  :M}cbDCeߎ%#fZ /*yh?b@6(9/:zNI' "aJX[13G[Ȣz`X+aa8oNT\Zqey w5{y6(7+HJ{yf_ִp!V"s?3_9;E6:Y][/(*/llHhaUڣ3 xʈفTEu9Ӗr?υ aD+/`E<vJ8gGlI_P"dMka<›Y,1zE!h ^Xr (b5!hm{:IubhD5+@`elQ{,>ߞ-mB* : x H*$fR`oh8TI2D:_ͣӏH2Kp?h'gSb^p'\=r I༆6ߞHgI2zpս%ci/z/jRSvT@08|vyof7ӥR"a]94E:є$]Si}V^>p~LFiXV`{|˔MoNvuW [lzy >`-(EGRJ.!!eӏ؊` 9 z3E|Lh8 \.`2:X6!mw44X…wJ+sV>ɂ MainWindow QtQR: QR Code Generator QtQR: QR Code Generator Text Text URL URL Bookmark Lesezeichen E-Mail E-Mail Telephone Number Telefonnummer Contact Information (PhoneBook) Kontakt (Telefonbuch) SMS SMS MMS MMS Geolocalization Geographischer Standort Text to be encoded: Zu kodierender Text: URL to be encoded: Zu kodierende URL: Title: Titel: URL: URL: E-Mail address: E-Mail Adresse: Subject: Betreff: Message Body: Nachrichtentext: Telephone Number: Telefonnummer: Name: Name: Telephone: Telefon: E-Mail: E-Mail: Message: Nachricht: characters count: 0 Zeichen Zähler: 0 Content: Inhalt: Latitude: Breitengrad: Longitude: Längengrad: Parameters: Parameter: &Pixel Size: &Punktgröße: &Error Correction: &Fehlerkorrektur: Lowest Niedrigste Medium Mittel QuiteGood Recht gut Highest Höchste &Margin Size: &Randgröße: Start typing to create QR Code or drop here image files for decoding. Beginne zu tippen um QR Code zu erstellen oder ziehe Bilddateien zum Dekodieren in dieses Fenster. &Save QRCode &QRCode Speichern &Decode &Dekodieren Decode from &File Dekodiere von einer &Datei Decode from &Webcam Dekodiere von &Webcam E&xit &Verlassen &About &Über Error Correction Level Grad der Fehlerkorrektur Select data type: Datentyp wählen: ERROR: Something went wrong while trying to generate the QR Code. FEHLER: Beim Versuch den QR Code zu generieren ist etwas schiefgegangen. Save QRCode QRCode Speichern PNG Images (*.png);; All Files (*.*) PNG Bilder (*.png);; Alle Dateien (*.*) Save QR Code QR Code Speichern Open QRCode QRCode Öffnen Images (*.png *.jpg);; All Files (*.*) Bilder (*.png *.jpg);; Alle Dateien (*.*) Decode File Dekodiere Datei Do you want to Wollen Sie open it in a browser? sie im Browser öffnen? send an e-mail to the address? eine E-Mail zu der Adresse senden? send the e-mail? die E-Mail senden? open it in Google Maps? in Google Maps öffnen? Decode QRCode Dekodiere QRCode &Edit &Bearbeiten Decoding Failed Dekodieren fehlgeschlagen About QtQR Über QtQR QR Code succesfully saved to %s QR Code erfolgreich gespeichert unter %s QRCode succesfully saved to <b>%s</b>. QR Code erfolgreich gespeichert unter <b>%s</b>. No QRCode could be found in file: <b>%s</b>. Es konnte kein QRCode gefunden werden in Datei: <b>%s</b>. QRCode contains the following text: %s QRCode enthält folgenden Text: %s QRCode contains the following url address: %s QRCode enthält folgende url Adresse: %s QRCode contains a bookmark: Title: %s URL: %s QRCode enthält ein Lesezeichen: Titel: %s URL: %s QRCode contains the following e-mail address: %s QRCode enthält folgenden E-Mail Adresse: %s QRCode contains an e-mail message: To: %s Subject: %s Message: %s QRCode enthält eine E-Mail Nachricht: An: %s Betreff: %s Nachricht: %s QRCode contains a telephone number: QRCode enthält eine Telefonnummer: QRCode contains a phonebook entry: Name: %s Tel: %s E-Mail: %s QRCode contains a phonebook entry: Name: %s Tel: %s E-Mail: %s QRCode contains the following SMS message: To: %s Message: %s QRCode enthält folgende SMS Nachricht: An: %s Nachricht: %s QRCode contains the following MMS message: To: %s Message: %s QRCode enthält folgende MMS Nachricht: Ab: %s Nachricht: %s QRCode contains the following coordinates: Latitude: %s Longitude:%s QRCode enthält folgende Koordinaten: Breitengrad: %s Längengrad:%s characters count: %s - %d message(s) Zeichen Zähler: %s - %d Nachricht(en) <p>Oops! no code was found.<br /> Maybe your webcam didn't focus.</p> <p>Oops! Kein code gefunden.<br /> Vielleicht hat Ihre Webcam nicht fokusiert.</p> <h1>QtQR %s</h1><p>A simple software for creating and decoding QR Codes that uses <a href="https://code.launchpad.net/~qr-tools-developers/qr-tools/python-qrtools-trunk">python-qrtools</a> as backend. Both are part of the <a href="https://launchpad.net/qr-tools">QR Tools</a> project.</p><p></p><p>This is Free Software: GNU-GPLv3</p><p></p><p>Please visit our website for more information and to check out the code:<br /><a href="https://launchpad.net/~qr-tools-developers/qtqr">https://launchpad.net/~qr-tools-developers/qtqr</p><p>copyright &copy; Ramiro Algozino &lt;<a href="mailto:algozino@gmail.com">algozino@gmail.com</a>&gt;</p> <h1>QtQR %s</h1><p>A simple software for creating and decoding QR Codes that uses <a href="https://code.launchpad.net/~qr-tools-developers/qr-tools/python-qrtools-trunk">python-qrtools</a> as backend. Both are part of the <a href="https://launchpad.net/qr-tools">QR Tools</a> project.</p><p></p><p>This is Free Software: GNU-GPLv3</p><p></p><p>Please visit our website for more information and to check out the code:<br /><a href="https://launchpad.net/~qr-tools-developers/qtqr">https://launchpad.net/~qr-tools-developers/qtqr</p><p>copyright &copy; Ramiro Algozino &lt;<a href="mailto:algozino@gmail.com">algozino@gmail.com</a>&gt;</p> Note: Bemerkung: Birthday: Geburtsdatum: Address: Adresse: QRCode contains a phonebook entry: Name: %s Tel: %s E-Mail: %s Note: %s Birthday: %s Address: %s URL: %s QRCode enthält einen Telefonbuch-Eintrag: Name: %s Tel: %s E-Mail: %s Bemerkung: %s Geburtsdatum: %s Adresse: %s URL: %s Insert separated by commas the PO Box, room number, house number, city, prefecture, zip code and country in order Füge durch Kommas getrennt die PO Box, Raum-Nummer, Hausnummer, Ort, Land, Postleitzahl und country in order VideoDevices Decode from Webcam Dekodiere von Webcam You are about to decode from your webcam. Please put the code in front of your camera with a good light source and keep it steady. Once you see a green rectangle you can close the window by pressing any key. Please select the video device you want to use for decoding: Sie sind dabei von Ihrer Webcam zu dekodieren. Bitte bringen Sie den Code vor Ihre Kamera mit guten Lichtverhältnissen und halten Sie ihn ruhig. Sobald Sie ein grünes Rechteck sehen können Sie das Fester mit Drücken einer beliebigen Taste schließen. Bitte wählen Sie das Videogerät welches sie zum dekodieren benutzen wollen: qr-tools_1.4~bzr21.orig/qtqr_is_IS.ts0000644000175000017500000004435112270640373017174 0ustar koichikoichi MainWindow QtQR: QR Code Generator QtQR: QR-kóðari Text Texti URL URL Bookmark Bókmerki E-Mail Tölvupóstfang Telephone Number Símanúmer Contact Information (PhoneBook) Tengiliðaskrá (Símaskrá) SMS SMS MMS MMS Geolocalization Hnattstaðsetning Text to be encoded: Texti sem á að kóða: URL to be encoded: Slóð/URL sem á að kóða: Title: Titill: URL: Slóð/URL: E-Mail address: Tölvupóstfang: Subject: Efni: Message Body: Meginhluti bréfs: Telephone Number: Símanúmer: Name: Nafn: Telephone: Sími: E-Mail: Tölvupóstur: Message: Skilaboð: characters count: 0 Stafafjöldi: 0 Content: Innihald: Latitude: Breiddargráða: Longitude: Lengdargráða: Parameters: Viðföng: &Pixel Size: Stærð &mynddíla: &Error Correction: Villuleiðrétting: Lowest Lægst Medium Miðlungs QuiteGood Góð Highest Hæst &Margin Size: Stærð s&pássíu: Start typing to create QR Code or drop here image files for decoding. Byrjaðu innslátt til að útbúa QR-kóða eða slepptu myndskrá hingað til að afkóða hana. &Save QRCode &Vista QR-kóða &Decode A&fkóða Decode from &File Afkóða frá &skrá Decode from &Webcam Afkóða frá &vefmyndavél E&xit &Hætta &About &Upplýsingar Error Correction Level Stig villuleiðréttingar Select data type: Veldu gerð gagna: ERROR: Something went wrong while trying to generate the QR Code. VILLA: Eitthvað fór úrskeiðis við að útbúa QR-kóðann. Save QRCode Vista QR-kóða PNG Images (*.png);; All Files (*.*) PNG myndir (*.png);; Allar skrár (*.*) Save QR Code Vista QR-kóða Open QRCode Opna QR-kóða Images (*.png *.jpg);; All Files (*.*) Myndir (*.png *.jpg);; Allar skrár (*.*) Decode File Afkóða skrá Do you want to Viltu open it in a browser? opna það í vafra? send an e-mail to the address? send an e-mail to the address? send the e-mail? send the e-mail? open it in Google Maps? opna það í Google Maps? Decode QRCode Afkóða QR-kóða &Edit Br&eyta Decoding Failed Afkóðun mistókst About QtQR Um QtQR QR Code succesfully saved to %s QR-kóði vistaður í %s QRCode succesfully saved to <b>%s</b>. QR-kóði vistaður í <b>%s</b>. No QRCode could be found in file: <b>%s</b>. Enginn QR-kóði fannst í skránni: <b>%s</b>. QRCode contains the following text: %s QR-kóðinn inniheldur eftirfarandi texta: %s QRCode contains the following url address: %s QR-kóðinn inniheldur eftirfarandi slóð/URL: %s QRCode contains a bookmark: Title: %s URL: %s QR-kóðinn inniheldur bókmerki: Titill: %s URL: %s QRCode contains the following e-mail address: %s QR-kóðinn inniheldur eftirfarandi tölvupóstfang: %s QRCode contains an e-mail message: To: %s Subject: %s Message: %s QR-kóðinn inniheldur tölvupóstskilaboð: Til: %s Efni: %s Skilaboð: %s QRCode contains a telephone number: QR-kóðinn inniheldur símanúmer: QRCode contains a phonebook entry: Name: %s Tel: %s E-Mail: %s QR-kóðinn inniheldur símaskrárfærslu: Nafn: %s Sími: %s Netfang: %s QRCode contains the following SMS message: To: %s Message: %s QR-kóðinn inniheldur eftirfarandi SMS skilaboð: Til: %s Skilaboð: %s QRCode contains the following MMS message: To: %s Message: %s QR-kóðinn inniheldur eftirfarandi MMS skilaboð: Til: %s Skilaboð: %s QRCode contains the following coordinates: Latitude: %s Longitude:%s QR-kóðinn inniheldur eftirfarandi staðsetningarhnit: Breiddargráða: %s Lengdargráða: %s characters count: %s - %d message(s) stafafjöldi: %s - %d skilaboð <p>Oops! no code was found.<br /> Maybe your webcam didn't focus.</p> <p>Úbbs! enginn kóði fannst.<br /> Hugsanlega fókuseraði vefmyndavélin ekki rétt.</p> <h1>QtQR %s</h1><p>A simple software for creating and decoding QR Codes that uses <a href="https://code.launchpad.net/~qr-tools-developers/qr-tools/python-qrtools-trunk">python-qrtools</a> as backend. Both are part of the <a href="https://launchpad.net/qr-tools">QR Tools</a> project.</p><p></p><p>This is Free Software: GNU-GPLv3</p><p></p><p>Please visit our website for more information and to check out the code:<br /><a href="https://launchpad.net/~qr-tools-developers/qtqr">https://launchpad.net/~qr-tools-developers/qtqr</p><p>copyright &copy; Ramiro Algozino &lt;<a href="mailto:algozino@gmail.com">algozino@gmail.com</a>&gt;</p> <h1>QtQR %s</h1><p>Einfaldur hugbúnaður til að búa til og afkóða QR-kóða, stuðst er við <a href="https://code.launchpad.net/~qr-tools-developers/qr-tools/python-qrtools-trunk">python-qrtools</a> sem bakenda. Hvort tveggja er hluti af <a href="https://launchpad.net/qr-tools">QR Tools</a> verkefninu.</p><p></p><p>Þetta er frjáls hugbúnaður: GNU-GPLv3</p><p></p><p>Farðu á vefsvæðið okkar til að skoða ítarlegri upplýsingar og til að sjá kóðann:<br /><a href="https://launchpad.net/~qr-tools-developers/qtqr">https://launchpad.net/~qr-tools-developers/qtqr</p><p>Höfundarréttur &copy; Ramiro Algozino &lt;<a href="mailto:algozino@gmail.com">algozino@gmail.com</a>&gt;</p> Note: Athugið: Birthday: Afmælisdagur: Address: Heimilisfang: QRCode contains a phonebook entry: Name: %s Tel: %s E-Mail: %s Note: %s Birthday: %s Address: %s URL: %s QR-kóðinn inniheldur færslu í tengiliðaskrá: Nafn: %s Sími: %s Netfang: %s Aths: %s Afmælisdagur: %s Heimilisfang: %s URL: %s Insert separated by commas the PO Box, room number, house number, city, county, postal code and country in order Settu inn eftirfarandi atriði, aðskilin með kommum; pósthólf, herbergisnúmer, húsnúmer, borg, hérað, póstnúmer og land, í þessari röð VideoDevices Decode from Webcam Afkóða frá vefmyndavél You are about to decode from your webcam. Please put the code in front of your camera with a good light source and keep it steady. Once you see a green rectangle you can close the window by pressing any key. Please select the video device you want to use for decoding: Þú ert að fara að afkóða frá vefmyndavél. Settu QR-kóðann fyrir framan myndavélina í góðri lýsingu og haltu kóðanum stöðugum. Þegar þú sérð grænan ferhyrning geturðu lokað glugganum með því að ýta á einhvern lykil. Veldu myndatökutækið sem þú vilt nota við afkóðunina: qr-tools_1.4~bzr21.orig/qtqr_es_AR.ts0000644000175000017500000004403112270640373017152 0ustar koichikoichi MainWindow QtQR: QR Code Generator QtQR: Generador de Códigos QR Text Texto URL URL Bookmark Marcador E-Mail E-Mail Telephone Number Número Telefónico Contact Information (PhoneBook) Información de Contacto (Agenda) SMS SMS MMS MMS Geolocalization Geolocalización Text to be encoded: Texto a ser codificado: URL to be encoded: URL a ser codificada: Title: Título: URL: URL: E-Mail address: Dirección de E-Mail: Subject: Asunto: Message Body: Cuerpo del Mensaje: Telephone Number: Número de Teléfono: Name: Nombre: Telephone: Teléfono: E-Mail: E-Mail: Message: Mensaje: characters count: 0 Cantidad de caracteres: 0 Content: Contenido: Latitude: Latitud: Longitude: Longitud: Parameters: Parámetros: &Pixel Size: Tamaño de &Píxel: &Error Correction: Corrección de &Error: Lowest Mínima Medium Medio QuiteGood Buena Highest Máxima &Margin Size: Tamaño del &Márgen: Start typing to create QR Code or drop here image files for decoding. Comenzá a escribir para generar el Código QR o soltá un archivo imagen con el código acá. &Save QRCode &Guardar Código QR &Decode &Decodificar Decode from &File Decodificar desde &Archivo Decode from &Webcam Decodificar desde la &Webcam E&xit &Salir &About &Acerca de Error Correction Level Nivel de Corrección de Erorres Select data type: Seleccioná el tipo de datos: ERROR: Something went wrong while trying to generate the QR Code. ERROR: Algo salió mal tratando de generar el código QR. Save QRCode Guardar Código QR PNG Images (*.png);; All Files (*.*) Imágenes PNG (*.png);;Todos los archivos (*.*) Save QR Code Guardar Código QR Open QRCode Abrir Código QR Images (*.png *.jpg);; All Files (*.*) Imágenes (*.png *.jpg);;Todos los Archivos (*.*) Decode File Decodificar archivo Do you want to ¿Querés open it in a browser? abrirlo en tu navegador? send an e-mail to the address? manda un e-mail a la dirección? send the e-mail? mandar el e-mail? open it in Google Maps? abrirlo en Google Maps? Decode QRCode Decodificar Código QR &Edit &Editar Decoding Failed Falló la Decodificación About QtQR Acerca de QtQR QR Code succesfully saved to %s El código QR se guardó satisfactoriamente en %s QRCode succesfully saved to <b>%s</b>. El código QR se guardó satisfactoriamente en <b>%s</b>. No QRCode could be found in file: <b>%s</b>. No se pudo encontrar un código QR en el archivo <b>%s</b>. QRCode contains the following text: %s El código QR contiene el siguiente texto: %s QRCode contains the following url address: %s El código QR contiene la siguiente URL: %s QRCode contains a bookmark: Title: %s URL: %s El código QR contiene el marcador: Título: %s URL: %s QRCode contains the following e-mail address: %s El código QR contiene la siguiente dirección de e-mail: %s QRCode contains an e-mail message: To: %s Subject: %s Message: %s El código QR contiene el siguiente e-mail: Para: %s Asunto: %s Mensaje: %s QRCode contains a telephone number: El código QR contiene el siguiente número telefónico: QRCode contains a phonebook entry: Name: %s Tel: %s E-Mail: %s El código QR contiene el siguiente entrada de agenda: Nombre: %s Teléfono: %s E-Mail: %s QRCode contains the following SMS message: To: %s Message: %s El código QR contiene el siguiente SMS: Para: %s Mensaje: %s QRCode contains the following MMS message: To: %s Message: %s El código QR contiene el siguiente MMS: Para: %s Mensaje: %s QRCode contains the following coordinates: Latitude: %s Longitude:%s El código QR contiene las siguientes coordenadas: Latitud: %s Longitud: %s characters count: %s - %d message(s) cantidad de caracteres: %s - %d mensaje(s) <p>Oops! no code was found.<br /> Maybe your webcam didn't focus.</p> <p>Caray! no encontramos ningún código.<br />Talvez la webcam no hizo foco.</p> <h1>QtQR %s</h1><p>A simple software for creating and decoding QR Codes that uses <a href="https://code.launchpad.net/~qr-tools-developers/qr-tools/python-qrtools-trunk">python-qrtools</a> as backend. Both are part of the <a href="https://launchpad.net/qr-tools">QR Tools</a> project.</p><p></p><p>This is Free Software: GNU-GPLv3</p><p></p><p>Please visit our website for more information and to check out the code:<br /><a href="https://launchpad.net/~qr-tools-developers/qtqr">https://launchpad.net/~qr-tools-developers/qtqr</p><p>copyright &copy; Ramiro Algozino &lt;<a href="mailto:algozino@gmail.com">algozino@gmail.com</a>&gt;</p> <h1>QtQR %s</h1> <p>Un simple software para crear y decodificar códigos QR que utiliza <a href="https://code.launchpad.net/~qr-tools-developers/qr-tools/python-qrtools-trunk">python-qrtools</a> como backend. Ambos son parte del proyecto <a href="https://launchpad.net/qr-tools">QR Tools</a> .</p> <p></p> <p>Estos es software gratuito: GNU-GPLv3</p> <p></p> <p>Por favor, visitá nuestro sitio web para más información y para obtener el códio fuente:<br /> <a href="https://launchpad.net/~qr-tools-developers/qtqr"> https://launchpad.net/~qr-tools-developers/qtqr</p> <p>copyright &copy; Ramiro Algozino &lt;<a href="mailto:algozino@gmail.com">algozino@gmail.com</a>&gt;</p> Note: Notas: Birthday: Fecha de Nacimiento: Address: Dirección: QRCode contains a phonebook entry: Name: %s Tel: %s E-Mail: %s Note: %s Birthday: %s Address: %s URL: %s El código QR contiene el siguiente entrada de agenda: Nombre: %s Teléfono: %s E-Mail: %s Notas: %s Fecha de Nacimiento: %s Dirección: %s URL: %s Insert separated by commas the PO Box, room number, house number, city, prefecture, zip code and country in order Insertá, separado por comas, el Buzón, número de habitación, número de puerta, ciudad, estado, código postal y país en orden VideoDevices Decode from Webcam Decodificar desde la Webcam You are about to decode from your webcam. Please put the code in front of your camera with a good light source and keep it steady. Once you see a green rectangle you can close the window by pressing any key. Please select the video device you want to use for decoding: Estás a punto de decodificar desde la webcam. Por favor, poné el código QR en frente de tu cámara con una buena fuente de luz y mantenelo quieto. Una vez que veas un recuadro verde alrededor del código podés cerrar la ventana presionando cualquier tecla. Por favor seleccioná el dispositivo de video que querés utilizar: qr-tools_1.4~bzr21.orig/qtqr.py0000644000175000017500000011260212270640373016103 0ustar koichikoichi#!/usr/bin/env python #-*- encoding: utf-8 -*- """ GUI front end for qrencode based on the work of David Green: https://launchpad.net/qr-code-creator/ and inspired by http://www.omgubuntu.co.uk/2011/03/how-to-create-qr-codes-in-ubuntu/ uses python-zbar for decoding from files and webcam """ import sys, os from math import ceil from PyQt4 import QtCore, QtGui, QtNetwork from qrtools import QR try: # import pynotify if not pynotify.init("QtQR"): print "DEBUG: There was a problem initializing the pynotify module" NOTIFY = True except: NOTIFY = False __author__ = "Ramiro Algozino" __email__ = "algozino@gmail.com" __copyright__ = "copyright (C) 2011 Ramiro Algozino" __credits__ = "David Green" __license__ = "GPLv3" __version__ = "1.4" class MainWindow(QtGui.QMainWindow): def __init__(self): QtGui.QMainWindow.__init__(self) self.setWindowTitle(self.trUtf8("QtQR: QR Code Generator")) icon = os.path.join(os.path.dirname(__file__), u'icon.png') if not QtCore.QFile(icon).exists(): icon = u'/usr/share/pixmaps/qtqr.png' self.setWindowIcon(QtGui.QIcon(icon)) self.w = QtGui.QWidget() self.setCentralWidget(self.w) self.setAcceptDrops(True) # Templates for creating QRCodes supported by qrtools self.templates = { "text": unicode(self.trUtf8("Text")), "url": unicode(self.trUtf8("URL")), "bookmark": unicode(self.trUtf8("Bookmark")), "emailmessage": unicode(self.trUtf8("E-Mail")), "telephone": unicode(self.trUtf8("Telephone Number")), "phonebook": unicode(self.trUtf8("Contact Information (PhoneBook)")), "sms": unicode(self.trUtf8("SMS")), "mms": unicode(self.trUtf8("MMS")), "geo": unicode(self.trUtf8("Geolocalization")), "wifi": unicode(self.trUtf8("WiFi Network")), } # With this we make the dict bidirectional self.templates.update( dict((self.templates[k], k) for k in self.templates)) # Tabs # We use this to put the tabs in a desired order. self.templateNames = ( self.templates["text"], self.templates["url"], self.templates["bookmark"], self.templates["emailmessage"], self.templates["telephone"], self.templates["phonebook"], self.templates["sms"], self.templates["mms"], self.templates["geo"], self.templates["wifi"], ) self.selector = QtGui.QComboBox() self.selector.addItems(self.templateNames) self.tabs = QtGui.QStackedWidget() self.textTab = QtGui.QWidget() self.urlTab = QtGui.QWidget() self.bookmarkTab = QtGui.QWidget() self.emailTab = QtGui.QWidget() self.telTab = QtGui.QWidget() self.phonebookTab = QtGui.QWidget() self.smsTab = QtGui.QWidget() self.mmsTab = QtGui.QWidget() self.geoTab = QtGui.QWidget() self.wifiTab = QtGui.QWidget() self.tabs.addWidget(self.textTab) self.tabs.addWidget(self.urlTab) self.tabs.addWidget(self.bookmarkTab) self.tabs.addWidget(self.emailTab) self.tabs.addWidget(self.telTab) self.tabs.addWidget(self.phonebookTab) self.tabs.addWidget(self.smsTab) self.tabs.addWidget(self.mmsTab) self.tabs.addWidget(self.geoTab) self.tabs.addWidget(self.wifiTab) #Widgets for Text Tab self.l1 = QtGui.QLabel(self.trUtf8('Text to be encoded:')) self.textEdit = QtGui.QPlainTextEdit() #Widgets for URL Tab self.urlLabel = QtGui.QLabel(self.trUtf8('URL to be encoded:')) self.urlEdit = QtGui.QLineEdit(u'http://') #Widgets for BookMark Tab self.bookmarkTitleLabel = QtGui.QLabel(self.trUtf8("Title:")) self.bookmarkTitleEdit = QtGui.QLineEdit() self.bookmarkUrlLabel = QtGui.QLabel(self.trUtf8("URL:")) self.bookmarkUrlEdit = QtGui.QLineEdit() #Widgets for EMail Tab self.emailLabel = QtGui.QLabel(self.trUtf8('E-Mail address:')) self.emailEdit = QtGui.QLineEdit("@.com") self.emailSubLabel = QtGui.QLabel(self.trUtf8('Subject:')) self.emailSubjectEdit = QtGui.QLineEdit() self.emailBodyLabel = QtGui.QLabel(self.trUtf8('Message Body:')) self.emailBodyEdit = QtGui.QPlainTextEdit() #Widgets for Telephone Tab self.telephoneLabel = QtGui.QLabel(self.trUtf8('Telephone Number:')) self.telephoneEdit = QtGui.QLineEdit() #Widgets for Contact Information Tab self.phonebookNameLabel = QtGui.QLabel(self.trUtf8("Name:")) self.phonebookNameEdit = QtGui.QLineEdit() self.phonebookTelLabel = QtGui.QLabel(self.trUtf8("Telephone:")) self.phonebookTelEdit = QtGui.QLineEdit() self.phonebookEMailLabel = QtGui.QLabel(self.trUtf8("E-Mail:")) self.phonebookEMailEdit = QtGui.QLineEdit() self.phonebookNoteLabel = QtGui.QLabel(self.trUtf8("Note:")) self.phonebookNoteEdit = QtGui.QLineEdit() self.phonebookBirthdayLabel = QtGui.QCheckBox(self.trUtf8("Birthday:")) self.phonebookBirthdayEdit = QtGui.QDateEdit() self.phonebookBirthdayEdit.setCalendarPopup(True) self.phonebookAddressLabel = QtGui.QLabel(self.trUtf8("Address:")) self.phonebookAddressEdit = QtGui.QLineEdit() self.phonebookAddressEdit.setToolTip(self.trUtf8("Insert separated by commas the PO Box, room number, house number, city, prefecture, zip code and country in order")) self.phonebookUrlLabel = QtGui.QLabel(self.trUtf8("URL:")) self.phonebookUrlEdit = QtGui.QLineEdit() #Widgets for SMS Tab self.smsNumberLabel = QtGui.QLabel(self.trUtf8('Telephone Number:')) self.smsNumberEdit = QtGui.QLineEdit() self.smsBodyLabel = QtGui.QLabel(self.trUtf8('Message:')) self.smsBodyEdit = QtGui.QPlainTextEdit() self.smsCharCount = QtGui.QLabel(self.trUtf8("characters count: 0")) #Widgets for MMS Tab self.mmsNumberLabel = QtGui.QLabel(self.trUtf8('Telephone Number:')) self.mmsNumberEdit = QtGui.QLineEdit() self.mmsBodyLabel = QtGui.QLabel(self.trUtf8('Content:')) self.mmsBodyEdit = QtGui.QPlainTextEdit() #Widgets for GEO Tab self.geoLatLabel = QtGui.QLabel(self.trUtf8("Latitude:")) self.geoLatEdit = QtGui.QLineEdit() self.geoLongLabel = QtGui.QLabel(self.trUtf8("Longitude:")) self.geoLongEdit = QtGui.QLineEdit() #Widgets for WiFi Tab self.wifiSSIDLabel = QtGui.QLabel(self.trUtf8("SSID:")) self.wifiSSIDEdit = QtGui.QLineEdit() self.wifiPasswordLabel = QtGui.QLabel(self.trUtf8("Password:")) self.wifiPasswordEdit = QtGui.QLineEdit() self.wifiEncriptionLabel = QtGui.QLabel(self.trUtf8("Encription:")) self.wifiEncriptionType = QtGui.QComboBox() self.wifiEncriptionType.addItems( ( self.trUtf8('WEP'), self.trUtf8('WPA/WPA2'), self.trUtf8('No Encription'), ) ) #Widgets for QREncode Parameters Configuration self.optionsGroup = QtGui.QGroupBox(self.trUtf8('Parameters:')) self.l2 = QtGui.QLabel(self.trUtf8('&Pixel Size:')) self.pixelSize = QtGui.QSpinBox() self.l3 = QtGui.QLabel(self.trUtf8('&Error Correction:')) self.ecLevel = QtGui.QComboBox() self.ecLevel.addItems( ( self.trUtf8('Lowest'), self.trUtf8('Medium'), self.trUtf8('QuiteGood'), self.trUtf8('Highest') ) ) self.l4 = QtGui.QLabel(self.trUtf8('&Margin Size:')) self.marginSize = QtGui.QSpinBox() #QLabel for displaying the Generated QRCode self.qrcode = QtGui.QLabel(self.trUtf8('Start typing to create QR Code\n or drop here image files for decoding.')) self.qrcode.setAlignment(QtCore.Qt.AlignVCenter | QtCore.Qt.AlignHCenter) self.scroll = QtGui.QScrollArea() self.scroll.setWidgetResizable(True) self.scroll.setWidget(self.qrcode) #Save and Decode Buttons self.saveButton = QtGui.QPushButton(QtGui.QIcon.fromTheme(u'document-save'), self.trUtf8('&Save QRCode')) self.decodeButton = QtGui.QPushButton(QtGui.QIcon.fromTheme(u'preview-file'), self.trUtf8('&Decode')) self.decodeMenu = QtGui.QMenu() self.decodeFileAction = self.decodeMenu.addAction(QtGui.QIcon.fromTheme(u'document-open'), self.trUtf8('Decode from &File')) self.decodeWebcamAction = self.decodeMenu.addAction(QtGui.QIcon.fromTheme(u'image-png'), self.trUtf8('Decode from &Webcam')) self.decodeButton.setMenu(self.decodeMenu) self.exitAction = QtGui.QAction(QtGui.QIcon.fromTheme(u'application-exit'), self.trUtf8('E&xit'), self) self.addAction(self.exitAction) self.aboutAction = QtGui.QAction(QtGui.QIcon.fromTheme(u"help-about"), self.trUtf8("&About"), self) self.addAction(self.aboutAction) # UI Tunning self.saveButton.setEnabled(False) self.pixelSize.setValue(3) self.pixelSize.setMinimum(1) self.marginSize.setValue(4) self.l1.setBuddy(self.textEdit) self.l2.setBuddy(self.pixelSize) self.l3.setBuddy(self.ecLevel) self.l4.setBuddy(self.marginSize) self.ecLevel.setToolTip(self.trUtf8('Error Correction Level')) self.l3.setToolTip(self.trUtf8('Error Correction Level')) self.decodeFileAction.setShortcut(u"Ctrl+O") self.decodeWebcamAction.setShortcut(u"Ctrl+W") self.saveButton.setShortcut(u"Ctrl+S") self.exitAction.setShortcut(u"Ctrl+Q") self.aboutAction.setShortcut(u"F1") self.buttons = QtGui.QHBoxLayout() self.buttons.addWidget(self.saveButton) self.buttons.addWidget(self.decodeButton) #Text Tab self.codeControls = QtGui.QVBoxLayout() self.codeControls.addWidget(self.l1) self.codeControls.addWidget(self.textEdit, 1) self.textTab.setLayout(self.codeControls) #URL Tab self.urlTabLayout = QtGui.QVBoxLayout() self.urlTabLayout.addWidget(self.urlLabel) self.urlTabLayout.addWidget(self.urlEdit) self.urlTabLayout.addStretch() self.urlTab.setLayout(self.urlTabLayout) #Bookmark Tab self.bookmarkTabLayout = QtGui.QVBoxLayout() self.bookmarkTabLayout.addWidget(self.bookmarkTitleLabel) self.bookmarkTabLayout.addWidget(self.bookmarkTitleEdit) self.bookmarkTabLayout.addWidget(self.bookmarkUrlLabel) self.bookmarkTabLayout.addWidget(self.bookmarkUrlEdit) self.bookmarkTabLayout.addStretch() self.bookmarkTab.setLayout(self.bookmarkTabLayout) #Email Tab self.emailTabLayout = QtGui.QVBoxLayout() self.emailTabLayout.addWidget(self.emailLabel) self.emailTabLayout.addWidget(self.emailEdit) self.emailTabLayout.addWidget(self.emailSubLabel) self.emailTabLayout.addWidget(self.emailSubjectEdit) self.emailTabLayout.addWidget(self.emailBodyLabel) self.emailTabLayout.addWidget(self.emailBodyEdit, 1) self.emailTabLayout.addStretch() self.emailTab.setLayout(self.emailTabLayout) #Telephone Tab self.telTabLayout = QtGui.QVBoxLayout() self.telTabLayout.addWidget(self.telephoneLabel) self.telTabLayout.addWidget(self.telephoneEdit) self.telTabLayout.addStretch() self.telTab.setLayout(self.telTabLayout) #Contact Tab self.phonebookTabLayout = QtGui.QVBoxLayout() self.phonebookTabLayout.addWidget(self.phonebookNameLabel) self.phonebookTabLayout.addWidget(self.phonebookNameEdit) self.phonebookTabLayout.addWidget(self.phonebookTelLabel) self.phonebookTabLayout.addWidget(self.phonebookTelEdit) self.phonebookTabLayout.addWidget(self.phonebookEMailLabel) self.phonebookTabLayout.addWidget(self.phonebookEMailEdit) self.phonebookTabLayout.addWidget(self.phonebookNoteLabel) self.phonebookTabLayout.addWidget(self.phonebookNoteEdit) self.phonebookTabLayout.addWidget(self.phonebookBirthdayLabel) self.phonebookTabLayout.addWidget(self.phonebookBirthdayEdit) self.phonebookTabLayout.addWidget(self.phonebookAddressLabel) self.phonebookTabLayout.addWidget(self.phonebookAddressEdit) self.phonebookTabLayout.addWidget(self.phonebookUrlLabel) self.phonebookTabLayout.addWidget(self.phonebookUrlEdit) self.phonebookTabLayout.addStretch() self.phonebookTab.setLayout(self.phonebookTabLayout) #SMS Tab self.smsTabLayout = QtGui.QVBoxLayout() self.smsTabLayout.addWidget(self.smsNumberLabel) self.smsTabLayout.addWidget(self.smsNumberEdit) self.smsTabLayout.addWidget(self.smsBodyLabel) self.smsTabLayout.addWidget(self.smsBodyEdit, 1) self.smsTabLayout.addWidget(self.smsCharCount) self.smsTabLayout.addStretch() self.smsTab.setLayout(self.smsTabLayout) #MMS Tab self.mmsTabLayout = QtGui.QVBoxLayout() self.mmsTabLayout.addWidget(self.mmsNumberLabel) self.mmsTabLayout.addWidget(self.mmsNumberEdit) self.mmsTabLayout.addWidget(self.mmsBodyLabel) self.mmsTabLayout.addWidget(self.mmsBodyEdit, 1) self.mmsTabLayout.addStretch() self.mmsTab.setLayout(self.mmsTabLayout) #Geolocalization Tab self.geoTabLayout = QtGui.QVBoxLayout() self.geoTabLayout.addWidget(self.geoLatLabel) self.geoTabLayout.addWidget(self.geoLatEdit) self.geoTabLayout.addWidget(self.geoLongLabel) self.geoTabLayout.addWidget(self.geoLongEdit) self.geoTabLayout.addStretch() self.geoTab.setLayout(self.geoTabLayout) #WiFi Network Tab self.wifiTabLayout = QtGui.QVBoxLayout() self.wifiTabLayout.addWidget(self.wifiSSIDLabel) self.wifiTabLayout.addWidget(self.wifiSSIDEdit) self.wifiTabLayout.addWidget(self.wifiPasswordLabel) self.wifiTabLayout.addWidget(self.wifiPasswordEdit) self.wifiTabLayout.addWidget(self.wifiEncriptionLabel) self.wifiTabLayout.addWidget(self.wifiEncriptionType) self.wifiTabLayout.addStretch() self.wifiTab.setLayout(self.wifiTabLayout) #Pixel Size Controls self.pixControls = QtGui.QVBoxLayout() self.pixControls.addWidget(self.l2) self.pixControls.addWidget(self.pixelSize) #Error Correction Level Controls self.levelControls = QtGui.QVBoxLayout() self.levelControls.addWidget(self.l3) self.levelControls.addWidget(self.ecLevel) #Margin Size Controls self.marginControls = QtGui.QVBoxLayout() self.marginControls.addWidget(self.l4) self.marginControls.addWidget(self.marginSize) #Controls Layout self.controls = QtGui.QHBoxLayout() self.controls.addLayout(self.pixControls) self.controls.addSpacing(10) self.controls.addLayout(self.levelControls) self.controls.addSpacing(10) self.controls.addLayout(self.marginControls) self.controls.addStretch() self.optionsGroup.setLayout(self.controls) #Main Window Layout self.selectorBox = QtGui.QGroupBox(self.trUtf8("Select data type:")) self.vlayout1 = QtGui.QVBoxLayout() self.vlayout1.addWidget(self.selector) self.vlayout1.addWidget(self.tabs, 1) self.vlayout2 = QtGui.QVBoxLayout() self.vlayout2.addWidget(self.optionsGroup) self.vlayout2.addWidget(self.scroll, 1) self.vlayout2.addLayout(self.buttons) self.layout = QtGui.QHBoxLayout(self.w) self.selectorBox.setLayout(self.vlayout1) self.layout.addWidget(self.selectorBox) self.layout.addLayout(self.vlayout2, 1) #Signals self.selector.currentIndexChanged.connect(self.tabs.setCurrentIndex) self.tabs.currentChanged.connect(self.selector.setCurrentIndex) self.textEdit.textChanged.connect(self.qrencode) self.urlEdit.textChanged.connect(self.qrencode) self.bookmarkTitleEdit.textChanged.connect(self.qrencode) self.bookmarkUrlEdit.textChanged.connect(self.qrencode) self.emailEdit.textChanged.connect(self.qrencode) self.emailSubjectEdit.textChanged.connect(self.qrencode) self.emailBodyEdit.textChanged.connect(self.qrencode) self.phonebookNameEdit.textChanged.connect(self.qrencode) self.phonebookTelEdit.textChanged.connect(self.qrencode) self.phonebookEMailEdit.textChanged.connect(self.qrencode) self.phonebookNoteEdit.textChanged.connect(self.qrencode) self.phonebookAddressEdit.textChanged.connect(self.qrencode) self.phonebookBirthdayLabel.stateChanged.connect(self.qrencode) self.phonebookBirthdayEdit.dateChanged.connect(self.qrencode) self.phonebookUrlEdit.textChanged.connect(self.qrencode) self.smsNumberEdit.textChanged.connect(self.qrencode) self.smsBodyEdit.textChanged.connect(self.qrencode) self.smsBodyEdit.textChanged.connect( lambda: self.smsCharCount.setText( unicode(self.trUtf8("characters count: %s - %d message(s)")) % ( len(self.smsBodyEdit.toPlainText()), ceil(len(self.smsBodyEdit.toPlainText()) / 160.0) ) ) ) self.mmsNumberEdit.textChanged.connect(self.qrencode) self.mmsBodyEdit.textChanged.connect(self.qrencode) self.telephoneEdit.textChanged.connect(self.qrencode) self.geoLatEdit.textChanged.connect(self.qrencode) self.geoLongEdit.textChanged.connect(self.qrencode) self.wifiSSIDEdit.textChanged.connect(self.qrencode) self.wifiPasswordEdit.textChanged.connect(self.qrencode) self.wifiEncriptionType.currentIndexChanged.connect(self.qrencode) self.pixelSize.valueChanged.connect(self.qrencode) self.ecLevel.currentIndexChanged.connect(self.qrencode) self.marginSize.valueChanged.connect(self.qrencode) self.saveButton.clicked.connect(self.saveCode) self.exitAction.triggered.connect(self.close) self.aboutAction.triggered.connect(self.about) self.decodeFileAction.triggered.connect(self.decodeFile) self.decodeWebcamAction.triggered.connect(self.decodeWebcam) self.qrcode.setAcceptDrops(True) self.qrcode.__class__.dragEnterEvent = self.dragEnterEvent self.qrcode.__class__.dropEvent = self.dropEvent # Network acces for remote images drag&drop support self.NetAccessMgr = QtNetwork.QNetworkAccessManager() self.NetAccessMgr.finished.connect(self.handleNetworkData) def qrencode(self, fileName=None): #Functions to get the correct data data_fields = { "text": unicode(self.textEdit.toPlainText()), "url": unicode(self.urlEdit.text()), "bookmark": ( unicode(self.bookmarkTitleEdit.text()), unicode(self.bookmarkUrlEdit.text()) ), "email": unicode(self.emailEdit.text()), "emailmessage": ( unicode(self.emailEdit.text()), unicode(self.emailSubjectEdit.text()), unicode(self.emailBodyEdit.toPlainText()) ), "telephone": unicode(self.telephoneEdit.text()), "phonebook": (('N',unicode(self.phonebookNameEdit.text())), ('TEL', unicode(self.phonebookTelEdit.text())), ('EMAIL',unicode(self.phonebookEMailEdit.text())), ('NOTE', unicode(self.phonebookNoteEdit.text())), ('BDAY', unicode(self.phonebookBirthdayEdit.date().toString("yyyyMMdd")) if self.phonebookBirthdayLabel.isChecked() else ""), #YYYYMMDD ('ADR', unicode(self.phonebookAddressEdit.text())), #The fields divided by commas (,) denote PO box, room number, house number, city, prefecture, zip code and country, in order. ('URL', unicode(self.phonebookUrlEdit.text())), # ('NICKNAME', ''), ), "sms": ( unicode(self.smsNumberEdit.text()), unicode(self.smsBodyEdit.toPlainText()) ), "mms": ( unicode(self.mmsNumberEdit.text()), unicode(self.mmsBodyEdit.toPlainText()) ), "geo": ( unicode(self.geoLatEdit.text()), unicode(self.geoLongEdit.text()) ), "wifi": ( unicode(self.wifiSSIDEdit.text()), (u"WEP",u"WPA",u"nopass")[self.wifiEncriptionType.currentIndex()], unicode(self.wifiPasswordEdit.text())) } data_type = unicode(self.templates[unicode(self.selector.currentText())]) data = data_fields[data_type] level = (u'L',u'M',u'Q',u'H') if data: if data_type == 'emailmessage' and data[1] == '' and data[2] == '': data_type = 'email' data = data_fields[data_type] qr = QR(pixel_size = unicode(self.pixelSize.value()), data = data, level = unicode(level[self.ecLevel.currentIndex()]), margin_size = unicode(self.marginSize.value()), data_type = data_type, ) error = 1 if type(fileName) is not unicode: error = qr.encode() else: error = qr.encode(fileName) if error == 0: self.qrcode.setPixmap(QtGui.QPixmap(qr.filename)) self.saveButton.setEnabled(True) else: if NOTIFY: n = pynotify.Notification( "QtQR", unicode(self.trUtf8("ERROR: Something went wrong while trying to generate the QR Code.")), "qtqr" ) n.show() else: print "Something went wrong while trying to generate the QR Code" qr.destroy() else: self.saveButton.setEnabled(False) def saveCode(self): filterStr = "" for saveType in QR().get_qrencode_types(): filterStr += ( saveType + "(*." + saveType.lower() + ");;") #print filterStr fn = QtGui.QFileDialog.getSaveFileName( self, self.trUtf8('Save QRCode'), filter=filterStr ) if fn: if not fn.toLower().endsWith(u".png") \ and not fn.toLower().endsWith(u".eps") \ and not fn.toLower().endsWith(u".svg") \ and not fn.toLower().endsWith(u".ansi") \ and not fn.toLower().endsWith(u".ansi256") \ and not fn.toLower().endsWith(u".ascii") \ and not fn.toLower().endsWith(u".asciii") \ and not fn.toLower().endsWith(u".utf8") \ and not fn.toLower().endsWith(u".ansiutf8"): fn += u".png" self.qrencode(unicode(fn)) if NOTIFY: n = pynotify.Notification( unicode(self.trUtf8("Save QR Code")), unicode(self.trUtf8("QR Code succesfully saved to %s")) % fn, "qtqr" ) n.show() else: QtGui.QMessageBox.information( self, unicode(self.trUtf8('Save QRCode')), unicode(self.trUtf8('QRCode succesfully saved to %s.')) % fn ) def decodeFile(self, fn=None): if not fn: fn = unicode(QtGui.QFileDialog.getOpenFileName( self, self.trUtf8('Open QRCode'), filter=self.trUtf8('Images (*.png *.jpg);; All Files (*.*)') ) ) if os.path.isfile(fn): qr = QR(filename=fn) if qr.decode(): self.showInfo(qr) else: QtGui.QMessageBox.information( self, self.trUtf8('Decode File'), unicode(self.trUtf8('No QRCode could be found in file: %s.')) % fn ) qr.destroy() # else: # QtGui.QMessageBox.information( # self, # u"Decode from file", # u"The file %s doesn't exist." % # os.path.abspath(fn), # QtGui.QMessageBox.Ok # ) def showInfo(self, qr): dt = qr.data_type print dt.encode(u"utf-8") + ':', data = qr.data_decode[dt](qr.data) if type(data) == tuple: for d in data: print d.encode(u"utf-8") elif type(data) == dict: # FIX-ME: Print the decoded symbols print "Dict" print data.keys() print data.values() else: print data.encode(u"utf-8") msg = { 'text': lambda : unicode(self.trUtf8("QRCode contains the following text:\n\n%s")) % (data), 'url': lambda : unicode(self.trUtf8("QRCode contains the following url address:\n\n%s")) % (data), 'bookmark': lambda: unicode(self.trUtf8("QRCode contains a bookmark:\n\nTitle: %s\nURL: %s")) % (data), 'email': lambda : unicode(self.trUtf8("QRCode contains the following e-mail address:\n\n%s")) % (data), 'emailmessage': lambda : unicode(self.trUtf8("QRCode contains an e-mail message:\n\nTo: %s\nSubject: %s\nMessage: %s")) % (data), 'telephone': lambda : unicode(self.trUtf8("QRCode contains a telephone number: ")) + (data), 'phonebook': lambda : unicode(self.trUtf8("QRCode contains a phonebook entry:\n\nName: %s\nTel: %s\nE-Mail: %s\nNote: %s\nBirthday: %s\nAddress: %s\nURL: %s")) % (data.get('N') or "", data.get('TEL') or "", data.get('EMAIL') or "", data.get('NOTE') or "", QtCore.QDate.fromString(data.get('BDAY') or "",'yyyyMMdd').toString(), data.get('ADR') or "", data.get('URL') or ""), 'sms': lambda : unicode(self.trUtf8("QRCode contains the following SMS message:\n\nTo: %s\nMessage: %s")) % (data), 'mms': lambda : unicode(self.trUtf8("QRCode contains the following MMS message:\n\nTo: %s\nMessage: %s")) % (data), 'geo': lambda : unicode(self.trUtf8("QRCode contains the following coordinates:\n\nLatitude: %s\nLongitude:%s")) % (data), 'wifi': lambda : unicode(self.trUtf8("QRCode contains the following WiFi Network Configuration:\n\nSSID: %s\nEncription Type: %s\nPassword: %s")) % (data) } wanna = self.trUtf8("\n\nDo you want to ") action = { 'text': u"", 'url': wanna + self.trUtf8("open it in a browser?"), 'bookmark': wanna + self.trUtf8("open it in a browser?"), 'email': wanna + self.trUtf8("send an e-mail to the address?"), 'emailmessage': wanna + self.trUtf8("send the e-mail?"), 'telephone': u"", 'phonebook': u"", 'sms': u"", 'mms': u"", 'geo': wanna + self.trUtf8("open it in Google Maps?"), 'wifi': u"" } if action[qr.data_type] != u"": msgBox = QtGui.QMessageBox( QtGui.QMessageBox.Question, self.trUtf8('Decode QRCode'), msg[qr.data_type]() + action[qr.data_type], QtGui.QMessageBox.No | QtGui.QMessageBox.Yes, self ) msgBox.addButton(self.trUtf8("&Edit"), QtGui.QMessageBox.ApplyRole) msgBox.setDefaultButton(QtGui.QMessageBox.Yes) rsp = msgBox.exec_() else: msgBox = QtGui.QMessageBox( QtGui.QMessageBox.Information, self.trUtf8("Decode QRCode"), msg[qr.data_type]() + action[qr.data_type], QtGui.QMessageBox.Ok, self ) msgBox.addButton(self.trUtf8("&Edit"), QtGui.QMessageBox.ApplyRole) msgBox.setDefaultButton(QtGui.QMessageBox.Ok) rsp = msgBox.exec_() if rsp == QtGui.QMessageBox.Yes: #Open Link if qr.data_type == 'email': link = 'mailto:'+ data elif qr.data_type == 'emailmessage': link = 'mailto:%s?subject=%s&body=%s' % (data) elif qr.data_type == 'geo': link = 'http://maps.google.com/maps?q=%s,%s' % data elif qr.data_type == 'bookmark': link = data[1] else: link = qr.data_decode[qr.data_type](qr.data) print u"Opening " + link QtGui.QDesktopServices.openUrl(QtCore.QUrl(link)) elif rsp == 0: #Edit the code data = qr.data_decode[qr.data_type](qr.data) try: tabIndex = self.templateNames.index(self.templates[qr.data_type]) except KeyError: if qr.data_type == 'email': #We have to use the same tab index as EMail Message tabIndex = self.templateNames.index(self.templates["emailmessage"]) if qr.data_type == 'text': self.tabs.setCurrentIndex(tabIndex) self.textEdit.setPlainText(data) elif qr.data_type == 'url': self.tabs.setCurrentIndex(tabIndex) self.urlEdit.setText(data) elif qr.data_type == 'bookmark': self.bookmarkTitleEdit.setText(data[0]) self.bookmarkUrlEdit.setText(data[1]) self.tabs.setCurrentIndex(tabIndex) elif qr.data_type == 'emailmessage': self.emailEdit.setText(data[0]) self.emailSubjectEdit.setText(data[1]) self.emailBodyEdit.setPlainText(data[2]) self.tabs.setCurrentIndex(tabIndex) elif qr.data_type == 'email': self.emailEdit.setText(data) self.emailSubjectEdit.setText("") self.emailBodyEdit.setPlainText("") self.tabs.setCurrentIndex(tabIndex) elif qr.data_type == 'telephone': self.telephoneEdit.setText(data) self.tabs.setCurrentIndex(tabIndex) elif qr.data_type == 'phonebook': self.phonebookNameEdit.setText(data.get("N") or "") self.phonebookTelEdit.setText(data.get("TEL") or "") self.phonebookEMailEdit.setText(data.get("EMAIL") or "") self.phonebookNoteEdit.setText(data.get("NOTE") or "") self.phonebookBirthdayEdit.setDate(QtCore.QDate.fromString(data.get("BDAY") or "", "yyyyMMdd")) self.phonebookAddressEdit.setText(data.get("ADR") or "") self.phonebookUrlEdit.setText(data.get("URL") or "") self.tabs.setCurrentIndex(tabIndex) elif qr.data_type == 'sms': self.smsNumberEdit.setText(data[0]) self.smsBodyEdit.setPlainText(data[1]) self.tabs.setCurrentIndex(tabIndex) elif qr.data_type == 'mms': self.mmsNumberEdit.setText(data[0]) self.mmsBodyEdit.setPlainText(data[1]) self.tabs.setCurrentIndex(tabIndex) elif qr.data_type == 'geo': self.geoLatEdit.setText(data[0]) self.geoLongEdit.setText(data[1]) self.tabs.setCurrentIndex(tabIndex) elif qr.data_type == 'wifi': self.wifiSSIDEdit.setText(data[0] or "") self.wifiEncriptionType.setCurrentIndex({u"WEP":0,u"WPA":1,u"nopass":2}.get(data[1]) or 0) self.wifiPasswordEdit.setText(data[2] or "") self.tabs.setCurrentIndex(tabIndex) def decodeWebcam(self): vdDialog = VideoDevices() if vdDialog.exec_(): if len(vdDialog.videoDevices) > 0: device = vdDialog.videoDevices[vdDialog.videoDevice.currentIndex()][1] qr = QR() qr.decode_webcam(device=device) if qr.data_decode[qr.data_type](qr.data) == 'NULL': QtGui.QMessageBox.warning( self, self.trUtf8("Decoding Failed"), self.trUtf8("

Oops! no code was found.
Maybe your webcam didn't focus.

"), QtGui.QMessageBox.Ok ) else: self.showInfo(qr) qr.destroy() def about(self): QtGui.QMessageBox.about( self, self.trUtf8("About QtQR"), unicode(self.trUtf8('

QtQR %s

A simple software for creating and decoding QR Codes that uses python-qrtools as backend. Both are part of the QR Tools project.

This is Free Software: GNU-GPLv3

Please visit our website for more information and to check out the code:
https://launchpad.net/~qr-tools-developers/qtqr

copyright © Ramiro Algozino <algozino@gmail.com>

')) % __version__, ) def dragEnterEvent(self, event): if event.mimeData().hasUrls(): event.acceptProposedAction() def dropEvent(self, event): for url in event.mimeData().urls(): fn = url.toLocalFile() if fn: self.decodeFile(unicode(fn)) else: print "DEBUG: Downloading dropped file from %s" % url.toString() self.NetAccessMgr.get(QtNetwork.QNetworkRequest(url)) # FIX-ME: We should check if the download gets timeout. # and notify that we are downloading, the download could # take some seconds to complete. def handleNetworkData(self, QNetReply): print "DEBUG: Finished downloading file." tmpfn = '/tmp/qrtemp.png' fn = open(tmpfn,"w") fn.write(QNetReply.readAll()) fn.close() self.decodeFile(tmpfn) class VideoDevices(QtGui.QDialog): def __init__(self): QtGui.QDialog.__init__(self) self.videoDevices = [] for vd in self.getVideoDevices(): self.videoDevices.append(vd) self.setWindowTitle(self.tr('Decode from Webcam')) self.cameraIcon = QtGui.QIcon.fromTheme("camera") self.icon = QtGui.QLabel() self.icon.setPixmap(self.cameraIcon.pixmap(64,64).scaled(64,64)) self.videoDevice = QtGui.QComboBox() self.videoDevice.addItems([vd[0] for vd in self.videoDevices]) self.label = QtGui.QLabel(self.tr("You are about to decode from your webcam. Please put the code in front of your camera with a good light source and keep it steady.\nOnce you see a green rectangle you can close the window by pressing any key.\n\nPlease select the video device you want to use for decoding:")) self.label.setWordWrap(True) self.Buttons = QtGui.QDialogButtonBox(QtGui.QDialogButtonBox.Ok | QtGui.QDialogButtonBox.Cancel) self.Buttons.accepted.connect(self.accept) self.Buttons.rejected.connect(self.reject) self.layout = QtGui.QVBoxLayout() self.hlayout = QtGui.QHBoxLayout() self.vlayout = QtGui.QVBoxLayout() self.hlayout.addWidget(self.icon, 0, QtCore.Qt.AlignTop) self.vlayout.addWidget(self.label) self.vlayout.addWidget(self.videoDevice) self.hlayout.addLayout(self.vlayout) self.layout.addLayout(self.hlayout) self.layout.addStretch() self.layout.addWidget(self.Buttons) self.setLayout(self.layout) def getVideoDevices(self): if os.path.exists("/dev/v4l/by-id"): for dev in os.listdir("/dev/v4l/by-id"): try: yield([ " ".join(dev.split("-")[1].split("_")), os.path.join("/dev/v4l/by-id", dev) ]) except: yield([ dev, os.path.join("/dev/v4l/by-id", dev) ]) if __name__ == '__main__': app = QtGui.QApplication(sys.argv) # This is to make Qt use locale configuration; i.e. Standard Buttons # in your system's language. locale = unicode(QtCore.QLocale.system().name()) translator=QtCore.QTranslator() # translator.load(os.path.join(os.path.abspath( # os.path.dirname(__file__)), # "qtqr_" + locale)) # We load from standard location the translations translator.load("qtqr_" + locale, QtCore.QLibraryInfo.location( QtCore.QLibraryInfo.TranslationsPath) ) app.installTranslator(translator) qtTranslator=QtCore.QTranslator() qtTranslator.load("qt_" + locale, QtCore.QLibraryInfo.location( QtCore.QLibraryInfo.TranslationsPath) ) app.installTranslator(qtTranslator); mw = MainWindow() mw.show() if len(app.argv())>1: #Open the file and try to decode it for fn in app.argv()[1:]: # We should check if the file exists. mw.decodeFile(fn) sys.exit(app.exec_()) qr-tools_1.4~bzr21.orig/LICENCE0000644000175000017500000010451412270640373015532 0ustar koichikoichi GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: Copyright (C) This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see . The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read .