forked from asmwarrior/FactoryTestApp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
PrinterManager.h
47 lines (30 loc) · 812 Bytes
/
PrinterManager.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
#pragma once
#include <QSettings>
#include <QTimer>
#include <QQueue>
#include "Logger.h"
#include "Dut.h"
class PrinterManager : public QObject
{
Q_OBJECT
public:
explicit PrinterManager(const QSharedPointer<QSettings> &settings, QObject *parent = Q_NULLPTR);
virtual ~PrinterManager();
void setLogger(const QSharedPointer<Logger> &logger) {_logger = logger;}
public slots:
void addLabel(DutRecord dutRecord);
void sendLabeltoPrinter();
bool isQueueEmpty() const;
signals:
private:
QSharedPointer<QSettings> _settings;
QSharedPointer<Logger> _logger;
QTimer _timer;
QQueue<DutRecord> _labelQueue;
QString _fileName;
QString _labelName;
QString _quantity;
QString _printer;
QString _deviceName;
QString _deviceRevision;
};