QBarcode
Loading...
Searching...
No Matches
payload.h
1#ifndef QBARCODE_PAYLOAD_H
2#define QBARCODE_PAYLOAD_H
3
4#include "qbarcode/qbartypes.h"
5
6#include <memory>
7
8#include <QDebug>
9
10/*****************************/
11/* Namespace instructions */
12/*****************************/
13
14namespace qbar
15{
16
17/*****************************/
18/* Class definitions */
19/*****************************/
20
21class PayloadPrivate;
22class QBAR_EXPORT Payload
23{
24public:
25 Payload(const Payload &other);
26 Payload &operator=(const Payload &other);
27
28 Payload(Payload &&other) noexcept;
29 Payload &operator=(Payload &&) noexcept;
30
31 virtual ~Payload();
32
33public:
34 bool isValid() const;
35
36 PayloadType getType() const;
37
38 QByteArray getData() const;
39 QString getString() const;
40 BarError getLastError() const;
41
42public:
43 void clear();
44
47protected:
48 explicit Payload(std::unique_ptr<PayloadPrivate> impl);
49
50protected:
51 std::unique_ptr<PayloadPrivate> d_ptr;
52 Q_DECLARE_PRIVATE(Payload)
53
54
56};
57
58/*****************************/
59/* Qt specific methods */
60/*****************************/
61
62QBAR_EXPORT QDebug operator<<(QDebug debug, const Payload &payload);
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_PAYLOAD_H
Store data of a Barcode.
Definition payload.h:23
Namespace used for QWlanManager library.
Definition barcode.h:15
PayloadType
List of all types of payload.
Definition qbartypes.h:74
BarError
List of all barcode related errors.
Definition qbartypes.h:41