|
QBarcode
|
Allow to render a barcode. More...

Public Member Functions | |
| Renderer (Renderer &&other) noexcept | |
| Renderer & | operator= (Renderer &&) noexcept |
| QSize | getSizeRequested () const |
| Retrieve requested size. | |
| QMargins | getMargins () const |
| Retrieve margins. | |
| QColor | getColorBackground () const |
| Retrieve color background. | |
| QColor | getColorForeground () const |
| Retrieve color foreground. | |
| void | setSizeRequested (const QSize &size) |
| Allow to set requested size. | |
| void | setMargins (const QMargins &margins) |
| Allow to set margins to use. | |
| void | setColorBackground (const QColor &color) |
| Allow to set background color. | |
| void | setColorForeground (const QColor &color) |
| Allow to set foreground color. | |
| QImage | toImage (const Barcode &barcode) |
| Use to render a barcode to an image. | |
Allow to render a barcode.
This class allow to share common properties/methods accross all renderer types.
A render entity represent how a barcode should "look", so only one renderer is generally used but can render multiples barcodes.
Each types of barcode can have their specific appearance customization, so each type will have a dedicated renderer.
| QSize qbar::Renderer::getSizeRequested | ( | ) | const |
Retrieve requested size.
| QMargins qbar::Renderer::getMargins | ( | ) | const |
Retrieve margins.
| QColor qbar::Renderer::getColorBackground | ( | ) | const |
Retrieve color background.
| QColor qbar::Renderer::getColorForeground | ( | ) | const |
Retrieve color foreground.
| void qbar::Renderer::setSizeRequested | ( | const QSize & | size | ) |
Allow to set requested size.
"Requested size" means that we will try to render barcode at this requested size.
But that is not always possible since it will depends of multiple factors:
| [in] | size | Requested size in pixels. |
| void qbar::Renderer::setMargins | ( | const QMargins & | margins | ) |
Allow to set margins to use.
| [in] | margins | Margins to use in pixels. |
| void qbar::Renderer::setColorBackground | ( | const QColor & | color | ) |
Allow to set background color.
| [in] | color | Background color to use. |
| void qbar::Renderer::setColorForeground | ( | const QColor & | color | ) |
Allow to set foreground color.
| [in] | color | foreground color to use. |
| QImage qbar::Renderer::toImage | ( | const Barcode & | barcode | ) |
Use to render a barcode to an image.
| [in] | barcode | Barcode to render. |
isNull() before using it.