Encoder for QR code. More...
#include <bpsqrcode.h>
Public Types | |
| enum | Level { LevelL = 0 , LevelM = 1 , LevelQ = 2 , LevelH = 3 } |
| Error correction levels. More... | |
Public Member Functions | |
| BpsQrCode () | |
| Default constructor. | |
| QVector< QVector< bool > > | encode (const QString &aText, int aVersion, Level aLevel, bool aGS1) |
| Encode a text into a matrix. More... | |
Encoder for QR code.
Encoding happens according to ISO/IEC 18004 international standard for QR Code 2005.
Unsupported Features:
GS1 QR Code is supported where a FNC1 mode is added as first data element. ASCII GS (hex 1D) may be used as terminator for variable application data fields.
| enum BpsQrCode::Level |
| QVector<QVector<bool> > BpsQrCode::encode | ( | const QString & | aText, |
| int | aVersion, | ||
| Level | aLevel, | ||
| bool | aGS1 | ||
| ) |
Encode a text into a matrix.
In case of error a empty matrix is returned. Possible errors are invalid version, or text too large to be encoded.
| aText | The text to encode. |
| aVersion | The QR code version (1...40) to use, or 0 to automatically use the smallest possible version for the given text and error correction level. |
| aLevel | The error correction level to use. |
| aGS1 | True to create GS1 QR Code, false to create generic QR Code. |