-
Notifications
You must be signed in to change notification settings - Fork 0
/
cloudtest.h
74 lines (57 loc) · 1.68 KB
/
cloudtest.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
#ifndef CLOUDTEST_H
#define CLOUDTEST_H
#include <QMainWindow>
#include <QWidget>
#include <QOpenGLWindow>
#include <QGLWidget>
#include <QScreen>
#include <QPixmap>
#include <QImage>
//OpenGL补充库,接口
#include <QOpenGLWidget>
#include <QOpenGLFunctions>
#include <QSurfaceFormat>
#include <QtOpenGL>
#include <GL/glu.h>
//Excel 文件读取库
#include <QFileDialog>
#include <QAxObject>
#include <QDebug>
#include <QProcess>
#include <QPushButton>
#include <math.h> //为了使用max函数
//定义一个空间使得定义数组的时候没有自由数
#define MAX_BUFFER 2048
class CloudTest : public QOpenGLWidget//QOpenGLWindow
{
Q_OBJECT
public:
explicit CloudTest(QWidget *parent = nullptr);
~CloudTest();
void setXRotation(int angle);
void setYRotation(int angle);
void setZRotation(int angle);
//建立槽函数接收需要读取的文件名
void dealCloudSentFilename(QString filename);
signals:
protected:
virtual void initializeGL() override;
virtual void resizeGL(int w, int h) override;
virtual void paintGL() override;
void resizeEvent(QResizeEvent *event) override;
void paintEvent(QPaintEvent *event) override;
void mousePressEvent(QMouseEvent *event) override;
void mouseMoveEvent(QMouseEvent *event) override;
private:
//印度教学,我后来才发现这个老师是西班牙人。。。
QOpenGLContext *m_context;
QOpenGLFunctions *m_function;
QStringList m_list;
QStringList m_list_y;
QString m_line;
QPoint m_lastpos;
int m_xrotation;
int m_yrotation;
int m_zrotation;
};
#endif // CLOUDTEST_H