7#ifndef PRISON_ABSTRACTBARCODE_H
8#define PRISON_ABSTRACTBARCODE_H
13#include "prison_export.h"
35#if PRISON_ENABLE_DEPRECATED_SINCE(5, 69)
40 PRISON_DEPRECATED_VERSION(5, 69,
"Use Prison::createBarcode()")
86#if PRISON_ENABLE_DEPRECATED_SINCE(5, 72)
93 PRISON_DEPRECATED_VERSION_BELATED(5, 72, 5, 69,
"Use preferredSize() or trueMinimumSize()")
94 QSizeF minimumSize() const;
157#if PRISON_ENABLE_DEPRECATED_SINCE(5, 69)
164 PRISON_DEPRECATED_VERSION(5, 69,
"no need to call this anymore")
165 void setMinimumSize(const QSizeF &minimumSize);
177 friend class AbstractBarcodePrivate;
181 std::unique_ptr<class AbstractBarcodePrivate>
const d;
base class for barcode generators To add your own barcode generator, subclass this class and reimplem...
Definition abstractbarcode.h:33
QSizeF trueMinimumSize() const
The minimal amount of pixels needed to represent this barcode without loss of information.
Dimensions dimensions() const
Returns the amount of dimensions of the barcode.
QString data() const
Textual content encoded in this barcode.
const QColor & foregroundColor() const
void setBackgroundColor(const QColor &backgroundcolor)
sets the background color
const QColor & backgroundColor() const
void setForegroundColor(const QColor &foregroundcolor)
sets the foreground color
virtual QImage paintImage(const QSizeF &size)=0
Doing the actual painting of the image.
QSizeF preferredSize(qreal devicePixelRatio) const
The recommended size for this barcode when shown on a screen.
void setData(const QByteArray &data)
Sets binary data to be drawn as a barcode.
QByteArray byteArrayData() const
Binary data encoded in this barcode.
Dimensions
Dimensions of the barcode.
Definition abstractbarcode.h:141
@ NoDimensions
Null barcode.
Definition abstractbarcode.h:142
@ OneDimension
One-dimensional barcode.
Definition abstractbarcode.h:143
@ TwoDimensions
2D matrix code.
Definition abstractbarcode.h:144
QImage toImage(const QSizeF &size)
Creates a image with a barcode on.
void setData(const QString &data)
Sets textual data to be drawn as a barcode.
Provides classes and methods for generating barcodes.
Definition abstractbarcode.h:20