vowelcube.h
来自「QT4 gui programming的随书光盘」· C头文件 代码 · 共 38 行
H
38 行
#ifndef VOWELCUBE_H#define VOWELCUBE_H#include <QGLWidget>#include <QRadialGradient>class VowelCube : public QGLWidget{ Q_OBJECTpublic: VowelCube(QWidget *parent = 0); ~VowelCube();protected: void paintEvent(QPaintEvent *event); void mousePressEvent(QMouseEvent *event); void mouseMoveEvent(QMouseEvent *event); void wheelEvent(QWheelEvent *event);private: void createGradient(); void createGLObject(); void drawBackground(QPainter *painter); void drawCube(); void drawLegend(QPainter *painter); GLuint glObject; QRadialGradient gradient; GLfloat rotationX; GLfloat rotationY; GLfloat rotationZ; GLfloat scaling; QPoint lastPos;};#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?