-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathQR_BarCodeEncoderDecoder.h
More file actions
91 lines (71 loc) · 1.67 KB
/
QR_BarCodeEncoderDecoder.h
File metadata and controls
91 lines (71 loc) · 1.67 KB
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
/**
* @file QR_BarCodeEncoderDecoder.h
* @author Anil Kumar
* @date 11Dec2021
* @brief This is header QR_BarCodeEncoderDecoder class.
*/
#ifndef BARCODEENCODERDECODER_H
#define BARCODEENCODERDECODER_H
#include <QMainWindow>
#include "code128.h"
#include <stdio.h>
#include <err.h>
#include <stdlib.h>
#include <string.h> // needed for memset()
#include <png.h>
#include <QMessageBox>
#include <QPixmap>
#include <QBitmap>
#include <QDir>
#include <QFile>
#include <QDateTime>
#include <QDebug>
#include "qrcodegen.h"
#include "QZqrDecode.h"
#include <QFileDialog>
#include "QString"
#define SW_MAJOR_VER 1
#define SW_MINOR_VER 0
#define SW_BUILD_VER 3
extern QString BUILD_VER;
#define SOFTWARE_VERSION QString::number(SW_MAJOR_VER)+"."+QString::number(SW_MINOR_VER)+"."+BUILD_VER
using qrcodegen::QrCode;
using qrcodegen::QrSegment;
namespace IMG_FORMAT {
enum
{
PNG,
JPG
};
}
namespace CODE_TYPE {
enum
{
BAR,
QR
};
}
namespace Ui {
class QR_BarCodeEncoderDecoder;
}
class QR_BarCodeEncoderDecoder : public QMainWindow
{
Q_OBJECT
public:
explicit QR_BarCodeEncoderDecoder(QWidget *parent = 0);
~QR_BarCodeEncoderDecoder();
bool m_CreateBarcode(QString str_Barcode, QString fileName);
private slots:
void on_pushButton_Encode_clicked();
void on_pushButton_about_clicked();
void on_pushButton_Browse_clicked();
void on_pushButton_Decode_clicked();
void on_tabWidget_currentChanged(int index);
private:
Ui::QR_BarCodeEncoderDecoder *ui;
QZqrDecode obj_qrdec;
QString str_BrowsePath = QDir::homePath();
QString str_selected_fileName = "";
void m_decode_BarCode();
};
#endif // BARCODEENCODERDECODER_H