-
Notifications
You must be signed in to change notification settings - Fork 30
/
Copy pathwork.h
56 lines (46 loc) · 990 Bytes
/
work.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
52
53
54
55
56
#ifndef WORK_H
#define WORK_H
#include <QImage>
#include <QPixmap>
#include <QDebug>
#include <QPainter>
#include <QDateTime>
#include <QMutex>
#include <QWaitCondition>
#include <QList>
#include <vector>
#include "DynamsoftCommon.h"
#include "DynamsoftBarcodeReader.h"
#include "myvideosurface.h"
#include "barcodeinfo.h"
class MyVideoSurface;
class BarcodeInfo;
QT_BEGIN_NAMESPACE
namespace Ui
{
class MainWindow;
}
QT_END_NAMESPACE
class Work: public QObject
{
Q_OBJECT
private:
Ui::MainWindow *ui;
void *reader;
MyVideoSurface *surface;
QMutex m_mutex;
QWaitCondition m_listIsEmpty;
QList<QImage> queue;
bool m_bIsRunning;
public:
Work(Ui::MainWindow *ui, void *reader, MyVideoSurface *surface);
virtual ~Work(){};
void appendFrame(const QImage &frame);
void stop();
void updateUI(QString results);
public slots:
void detectBarcode();
signals:
void update(QString results);
};
#endif // WORK_H