forked from magnocube/POV-Globe
-
Notifications
You must be signed in to change notification settings - Fork 0
/
slidecontrol.h
101 lines (67 loc) · 1.84 KB
/
slidecontrol.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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
#ifndef SLIDECONTROL_H
#define SLIDECONTROL_H
#include <QWidget>
#include <QScrollArea>
#include <QApplication>
#include "slide.h"
#include "myudp.h"
#include <QFileDialog>
#include <QBuffer>
#include <QMatrix>
#include <QTimer>
#include <QProcess>
#include <QScreen>
namespace Ui {
class SlideControl;
}
class SlideControl : public QWidget
{
Q_OBJECT
public:
explicit SlideControl(QWidget *parent = 0);
~SlideControl();
void setCurrentImage(Slide *theSlide);
void setUpUdpLeds(QString ipstring);
void setResolution(int x,int y);
private slots:
void on_pushButton_clicked();
void on_addImageButton_clicked();
void on_sendToGlobeButton_clicked();
void on_safeToPc_clicked();
void sendRotationSettings(uint8_t rotation);
void sendBrighnessSettings(uint8_t brigness);
void sendGamma(int gamma);
void handleVideo();
void handleScreen();
void on_gammaSlider_valueChanged(int value);
void on_rotatieSlider_valueChanged(int value);
void on_brightnessSlider_valueChanged(int value);
void on_startVideo_clicked();
void on_pushButton_2_clicked();
void on_pushButton_3_clicked();
void on_contrastSlider_valueChanged(int value);
private:
Ui::SlideControl *ui;
Slide *myCurrentSlide = nullptr;
MyUDP *udpToLedsConnection;
QTimer *videoTimer;
QTimer *screenTimer;
bool screenStarted = false;
const int PACKETSIZE=1460;
const int DATALENGTH=1455;
QImage PrepreImageForSending(QImage image);
void sendImage(QImage image);
char flowLabel=0;
int currentVideoFrame;
int numVideoFrames;
bool videoIsRunning = false;
QString fileName;
int xResolution;
int yResolution;
int degrees=360;
int oldDegrees=360;
QScreen *screen;
signals:
void NewSlide(QString type, QString param);
};
#endif // SLIDECONTROL_H