-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathBarcodeView.h
More file actions
49 lines (39 loc) · 1.18 KB
/
BarcodeView.h
File metadata and controls
49 lines (39 loc) · 1.18 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
#ifndef BARCODEVIEW_H
#define BARCODEVIEW_H
#include <QWidget>
#include <QTimer>
#include <QDateTime>
#include "Lib/CLVLib/CLVProtocol.h"
namespace Ui {
class BarcodeView;
}
class BarcodeView : public QWidget
{
Q_OBJECT
public:
explicit BarcodeView(QWidget *parent = nullptr);
~BarcodeView();
public:
bool Initialize(QString comPort, int serSpeed = 9600, int waitAfterReadDone = 5000, int delayProcessImage = 200, bool restartComm = false);
void BarcodeClose();
private:
void OnValueChanged(CLVProtocol *sender, const char* barcode, UINT64 barcodeLen);
private slots:
void on_pushButton_pressed();
void barcode_read(QString barcode);
void checkTimer_timeout();
signals:
void addTrace(QString text, QColor color = QColor("black"));
void processImages(QString barcode);
private:
Ui::BarcodeView *ui;
CLVProtocol *clv;
QTimer *checkTimer;
QString m_lastBarcode;
UINT32 m_waitAfterReadDone;
UINT32 m_delayProcessImage;
QDateTime m_lastReadTime;
QString m_comPort;
int m_comSpeed;
};
#endif // BARCODEVIEW_H