Prison::QRCodeBarcode

Search for usage in LXR

Prison::QRCodeBarcode Class Reference

#include <qrcodebarcode.h>

Inheritance diagram for Prison::QRCodeBarcode:

Public Member Functions

 QRCodeBarcode ()
 
QImage paintImage (const QSizeF &size) override
 
- Public Member Functions inherited from Prison::AbstractBarcode
 AbstractBarcode ()
 
const QColorbackgroundColor () const
 
QByteArray byteArrayData () const
 
QString data () const
 
Dimensions dimensions () const
 
const QColorforegroundColor () const
 
QSizeF minimumSize () const
 
QSizeF preferredSize (qreal devicePixelRatio) const
 
void setBackgroundColor (const QColor &backgroundcolor)
 
void setData (const QByteArray &data)
 
void setData (const QString &data)
 
void setForegroundColor (const QColor &foregroundcolor)
 
QImage toImage (const QSizeF &size)
 
QSizeF trueMinimumSize () const
 

Additional Inherited Members

- Public Types inherited from Prison::AbstractBarcode
enum  Dimensions : uint8_t { NoDimensions, OneDimension, TwoDimensions }
 
- Protected Member Functions inherited from Prison::AbstractBarcode
void setMinimumSize (const QSizeF &minimumSize)
 

Detailed Description

QRCode Barcode generator ; uses libqrencode to do the actual encoding of the barcode.

Definition at line 18 of file qrcodebarcode.h.

Constructor & Destructor Documentation

◆ QRCodeBarcode()

QRCodeBarcode::QRCodeBarcode ( )

creates a QRCode generator

Definition at line 17 of file qrcodebarcode.cpp.

Member Function Documentation

◆ paintImage()

QImage QRCodeBarcode::paintImage ( const QSizeF size)
overridevirtual

This is the function doing the actual work in generating the barcode.

Returns
QImage containing a QRCode, trying to approximate the requested sizes
Parameters
sizeThe 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

Implements Prison::AbstractBarcode.

Definition at line 34 of file qrcodebarcode.cpp.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Sat Sep 30 2023 04:06:04 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.