-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscreen.h
49 lines (43 loc) · 1.02 KB
/
screen.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
#ifndef SCREEN_H
#define SCREEN_H
#include "displayableobject.h"
#include "point.h"
#include "line.h"
#include "rectangle.h"
#include "circle.h"
#include "const.h"
#include "mainwindow.h"
#include <QUdpSocket>
#include <iostream>
#include <math.h>
#undef UNICODE
#ifndef LINUX
#include <windows.h>
#endif
class MainWindow;
class Screen
{
public:
Screen(bool dac, MainWindow *ui);
~Screen();
void addObject(DisplayableObject* obj);
void refresh();
void fromNetwork(QByteArray datagram);
void toDAC(std::vector<Point> points);
void clearFrame();
void sendTestPattern();
bool connectDAC();
Point placePoint(Point p);
void updateTestPattern();
private:
unsigned short getUShort(QByteArray datagram, int offset);
bool dac;
bool test_pattern;
int dacHandle;
std::vector<DisplayableObject*> objects;
std::vector<Point> getPoints();
Point getNormalizedPoint(Point p);
Point addColor(Point base, QByteArray datagram, int offset);
MainWindow *ui;
};
#endif // SCREEN_H