teapots.h

来自「QT4 gui programming的随书光盘」· C头文件 代码 · 共 41 行

H
41
字号
#ifndef TEAPOTS_H#define TEAPOTS_H#include <QGLFramebufferObject>#include <QGLWidget>class Teapots : public QGLWidget{    Q_OBJECTpublic:    Teapots(QWidget *parent = 0);    ~Teapots();protected:    void initializeGL();    void resizeGL(int width, int height);    void paintGL();    void mousePressEvent(QMouseEvent *event);    void mouseMoveEvent(QMouseEvent *event);    void mouseReleaseEvent(QMouseEvent *event);private:    void createGLTeapotObject();    void drawTeapot(GLfloat x, GLfloat y, GLfloat ambientR,                    GLfloat ambientG, GLfloat ambientB,                    GLfloat diffuseR, GLfloat diffuseG,                    GLfloat diffuseB, GLfloat specularR,                    GLfloat specularG, GLfloat specularB,                    GLfloat shininess);    void drawTeapots();    QGLFramebufferObject *fbObject;    GLuint glTeapotObject;    QPoint rubberBandCorner1;    QPoint rubberBandCorner2;    bool rubberBandIsShown;};#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?