-
Notifications
You must be signed in to change notification settings - Fork 0
/
DepthForgeWin.h
111 lines (72 loc) · 1.88 KB
/
DepthForgeWin.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
102
103
104
105
106
107
108
109
110
111
//
// Created by jwc on 1/28/19.
//
#ifndef DEPTHFORGE_DEPTHFORGEWIN_H
#define DEPTHFORGE_DEPTHFORGEWIN_H
#include <QOpenGLWindow>
#include <QAbstractEventDispatcher>
#include <QtOpenGL/QGLWidget>
#include <QMainWindow>
#include <QTimer>
#include "Image/Image.h"
#include "UI/UI.h"
#include "UI/MainUI.h"
#include "FpsMonitor.h"
extern "C"
{
#include "PixelGfx/JWC_PixelGfx.h"
}
class MainUI;
class DepthForgeWin : public QOpenGLWindow//QGLWidget
{
Q_OBJECT
public:
int Width;
int Height;
int oldWidth=-1;
int oldHeight=-1;
FpsMonitor fps;
PixType RenderBufferType;
QMainWindow *parent;
QImage *rend;
Image *UI_Image;
bool anaglyph;
bool forceAnaglyph;
bool SBSHalf;
bool real_stereo;
Image *UI_ImageMono;
Image *UI_ImageLeft;
Image *UI_ImageRight;
BGRA *obuf;
bool showFPS;
bool showMouse = true;
QAbstractEventDispatcher *dispatcher;
bool hasMouse;
UI *ui;
UI *mouseCapture;
int lastMouseX;
int lastMouseY;
QTimer idleTimer;
virtual void initializeGL();
virtual void paintGL();
virtual void resizeGL(int w,int h);
virtual void closeEvent(QCloseEvent *event);
virtual void mouseMoveEvent(QMouseEvent *eventMove);
virtual void mousePressEvent(QMouseEvent *eventPress);
virtual void mouseReleaseEvent(QMouseEvent *releaseEvent);
void giveMouse(UI *element);
void freeMouse(UI *element);
void takeMouse();
bool checkRelinquishMouse(int x, int y);
DepthForgeWin(QMainWindow *appWindow, QWindow *parent);
virtual void MouseButtonDown();
virtual void OnIdle(void);
void checkResize();
void setShowFPS(bool state);
void take_picture_jps(UI *sender, void *arg);
void take_picture_ana(UI *sender, void *arg);
private slots:
void aboutToBlock();
void idleCallback();
};
#endif //DEPTHFORGE_DEPTHFORGEWIN_H