-
Notifications
You must be signed in to change notification settings - Fork 2
/
client.h
73 lines (54 loc) · 1.46 KB
/
client.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
#ifndef CLIENT_H
#define CLIENT_H
#include <QMainWindow>
#include <QObject>
#include <QTcpServer>
#include <QTcpSocket>
#include <QDebug>
#include <QFileDialog>
#include <QDateTime>
#include <QPushButton>
#include "UFScanner.h"
#include "opencv2/world.hpp"
#include "opencv2/core.hpp"
#include "opencv2/imgproc.hpp"
#include "opencv2/highgui.hpp"
// Suprema BioMini Slim image size in bytes
#define SUPREMA_IMG_SIZE 153600
// Suprema BioMini Slim image size in pixels
#define SUPREMA_IMG_WIDTH 320
#define SUPREMA_IMG_HEIGHT 480
// control data size in bytes
#define CONTROL_DATA_SIZE 16
namespace Ui {
class Client;
}
class Client : public QMainWindow
{
Q_OBJECT
public:
explicit Client(QWidget *parent = 0);
~Client();
bool scannerInit(HUFScanner& hscanner);
unsigned char *scannerCapture(int& width, int& height);
public slots:
void connectedSlot();
void readSlot();
void errorSlot(QAbstractSocket::SocketError);
void disconnectedSlot();
void changedSlot(QAbstractSocket::SocketState);
private slots:
void on_connect_button_clicked();
void on_disconnect_button_clicked();
void on_suprema_scan_button_clicked();
void on_save_image_button_clicked();
void on_suprema_scan_button2_clicked();
void on_save_image_button2_clicked();
void on_load_image_button_clicked();
void on_load_image_button2_clicked();
private:
Ui::Client *ui;
QTcpSocket socket;
HUFScanner hscanner;
};
#endif // CLIENT_H