File indexing completed on 2024-05-12 04:43:19
0001 /* This file is part of the KDE project 0002 * Copyright (C) 2001-2007 by OpenMFG, LLC (info@openmfg.com) 0003 * Copyright (C) 2007-2008 by Adam Pigg (adam@piggz.co.uk) 0004 * Copyright (C) 2015 Jarosław Staniek <staniek@kde.org> 0005 * 0006 * This library is free software; you can redistribute it and/or 0007 * modify it under the terms of the GNU Lesser General Public 0008 * License as published by the Free Software Foundation; either 0009 * version 2.1 of the License, or (at your option) any later version. 0010 * 0011 * This library is distributed in the hope that it will be useful, 0012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 0013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 0014 * Lesser General Public License for more details. 0015 * 0016 * You should have received a copy of the GNU Lesser General Public 0017 * License along with this library. If not, see <http://www.gnu.org/licenses/>. 0018 */ 0019 0020 /* 0021 * This file contains the code that will render the extended 3of9 barcode. 0022 * This code will parse a string and build a compliant 3of9 string and then 0023 * call the 3of9 renderer to do the actual drawing. 0024 */ 0025 0026 #include <QString> 0027 #include <QRect> 0028 #include <QPainter> 0029 0030 #include "barcodepaint.h" 0031 0032 QString convertTo3of9(const QString &str); 0033 0034 void renderExtended3of9(const QRect & r, const QString & str, Qt::Alignment align, QPainter * pPainter) 0035 { 0036 render3of9(r, convertTo3of9(str), align, pPainter); 0037 }