-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbqrcodegen.h
51 lines (36 loc) · 1.01 KB
/
bqrcodegen.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#ifndef BQRCODEGEN_H
#define BQRCODEGEN_H
#include "bqrencode_global.h"
#include <QObject>
#include <QVariant>
#include <QByteArray>
#include "bqrcode.h"
namespace BQREncode {
/*!
* BQRCode generator.
*
* We can create BQRCodes using this class.
*/
class BQRENCODESHARED_EXPORT BQRCodeGen : public QObject
{
Q_OBJECT
public:
/*!
* Constructor
*/
explicit BQRCodeGen(QObject *parent = 0);
/*!
Generate a BQRCode object encoding the data.
It uses the QRcode_encodeData function internally. The data has to be converted to QString.
@param data Data we wish to encode
@param version Version number (check Fukuchi's libqrencode doc at https://fukuchi.org/works/qrencode/manual/index.html)
@param level Level of error correction
@return A BQRCode object
@note Doesnt' modifies the object's state
*/
BQRCode *encode(QVariant data=QVariant(),int version=0,QRecLevel level=QR_ECLEVEL_M);
signals:
public slots:
};
}
#endif // BQRCODEGEN_H