|
QBarcode
|
QBarcode is a Qt library allowing to generate barcodes.
main branch. 1.0.x: branch dev/1.01.1.x: branch dev/1.1Table of contents :
This cross platform library allow to generate multiple types of barcodes and render those in different format.
We have three "main" classes:
qbar::Payload: This class store only datas to use, representing what we have to encode.qbar::Barcode: This is the base class of all barcodes types, responsible of building the barcode matrix. It don't manage encoding and don't manage appearance.qbar::Renderer: This class allow to render barcodes (size, margins, colors, etc...) and only responsible of how does it look ?What types of barcodes are currently supported:
| Type of barcode | Barcode class | Rendering class | Supported payloads |
|---|---|---|---|
| QrCode | qbar::QrCode | qbar::RendererQrCode | - String - URL - Wifi |
This library requires at least C++ 17 standard
Below, list of required dependencies:
| Dependencies | VCPKG package | Comments |
|---|---|---|
| Qt | / | Compatible with Qt6.x Compatible with Qt5.15.x |
| Google Test | gtest | Only needed to run unit-tests |
| libqrencode | libqrencode | / |
This library can be use as an embedded library in a subdirectory of your project (like a git submodule for example) :
This library provide some CMake build options:
QBAR_BUILD_TESTS (default: ON): Use to enable/disable unit-tests buildPlease refer to the list of classes documentation for more details.
This library use the PImpl Idiom in order to preserve ABI compatibility (Qt wiki also have a great tutorial on the PImpl idiom).
So only major release (this project use the semantic versioning) should break the ABI.
In order to easily check at compilation time library version (to manage compatibility between multiple versions for example), macro QBAR_VERSION_ENCODE (defined inside library_global.h file) can be used:
Since library header used during final application build could differ from the actual library version, it is recommended to use the method:
All classes/methods has been documented with Doxygen utility and automatically generated at online website documentation.
docs/fragments/Doxyfile-public-api.indocs/fragments/Doxyfile-internal.inTo generate documentation locally, we can use:
This library is licensed under MIT license.