QBarcode
Loading...
Searching...
No Matches
renderer.h
1#ifndef QBARCODE_RENDERER_H
2#define QBARCODE_RENDERER_H
3
4#include "qbarcode/datas/barcode.h"
5
6#include <QImage>
7
8/*****************************/
9/* Namespace instructions */
10/*****************************/
11
12namespace qbar
13{
14
15/*****************************/
16/* Class definitions */
17/*****************************/
18
19class RendererPrivate;
20class QBAR_EXPORT Renderer
21{
22 QBAR_DISABLE_COPY(Renderer)
23
24public:
25 Renderer(Renderer &&other) noexcept;
26 Renderer &operator=(Renderer &&) noexcept;
27
28 virtual ~Renderer();
29
30public:
31 QSize getSizeRequested() const;
32 QMargins getMargins() const;
33 QColor getColorBackground() const;
34 QColor getColorForeground() const;
35
36public:
37 void setSizeRequested(const QSize &size);
38 void setMargins(const QMargins &margins);
39 void setColorBackground(const QColor &color);
40 void setColorForeground(const QColor &color);
41
42public:
43 QImage toImage(const Barcode &barcode);
44
47protected:
48 explicit Renderer(std::unique_ptr<RendererPrivate> impl);
49
50protected:
51 std::unique_ptr<RendererPrivate> d_ptr;
52 Q_DECLARE_PRIVATE(Renderer)
53
54
56};
57
58/*****************************/
59/* Qt specific methods */
60/*****************************/
61
62QBAR_EXPORT QDebug operator<<(QDebug debug, const Renderer &renderer);
63
64/*****************************/
65/* Alias for related types */
66/*****************************/
67
68/*****************************/
69/* End namespaces */
70/*****************************/
71
72} // namespace qbar
73
74/*****************************/
75/* Qt specific meta-system */
76/*****************************/
77
78#endif // QBARCODE_RENDERER_H
Represent a barcode entity.
Definition barcode.h:23
Allow to render a barcode.
Definition renderer.h:21
Namespace used for QWlanManager library.
Definition barcode.h:15