File indexing completed on 2024-05-12 15:49:08

0001 /*
0002     SPDX-FileCopyrightText: 2010-2014 Sune Vuorela <sune@vuorela.dk>
0003 
0004     SPDX-License-Identifier: MIT
0005 */
0006 
0007 #ifndef PRISON_QRCODEBARCODE_H
0008 #define PRISON_QRCODEBARCODE_H
0009 
0010 #include "abstractbarcode.h"
0011 
0012 namespace Prison
0013 {
0014 /**
0015  * QRCode Barcode generator ; uses libqrencode to do the actual encoding
0016  * of the barcode.
0017  */
0018 class QRCodeBarcode : public Prison::AbstractBarcode
0019 {
0020 public:
0021     /**
0022      * creates a QRCode generator
0023      */
0024     QRCodeBarcode();
0025     ~QRCodeBarcode() override;
0026     /**
0027      * This is the function doing the actual work in generating the barcode
0028      * @return QImage containing a QRCode, trying to approximate the requested sizes
0029      * @param size The requested size of the barcode, approximate. if the barcode generator can't get the data to fit in there, it might be a null QImage
0030      */
0031     QImage paintImage(const QSizeF &size) override;
0032 };
0033 } // namespace
0034 
0035 #endif // PRISON_QRCODEBARCODE_H