10 #ifndef OGLPLUS_EXAMPLE_QT4GL_MAIN_HPP
11 #define OGLPLUS_EXAMPLE_QT4GL_MAIN_HPP
27 class OGLplusExampleGLWidget
33 static QGLFormat getGLFormat(
void);
37 const char* screenshot_path;
41 std::shared_ptr<oglplus::Example> example;
43 void initializeGL(
void);
45 void resizeGL(
int width,
int height);
46 void mousePressEvent(QMouseEvent *event);
47 void mouseMoveEvent(QMouseEvent *event);
51 void mouseMoved(
int,
int);
52 void timeUpdated(
double,
double);
53 void exampleFinished(
void);
58 OGLplusExampleGLWidget(QWidget *parent,
int,
char**,
const char*);
59 ~OGLplusExampleGLWidget(
void);
61 QSize minimumSizeHint(
void)
const;
62 QSize sizeHint(
void)
const;
66 class OGLplusExampleWindow
72 OGLplusExampleGLWidget* gl_widget;
74 QLabel* info_gl_vendor;
75 QLabel* info_gl_renderer;
76 QLabel* info_gl_version;
78 QLabel* info_gl_width;
79 QLabel* info_gl_height;
84 QLabel* info_sim_time;
85 QLabel* info_real_time;
87 QStatusBar* status_bar;
89 void keyPressEvent(QKeyEvent *event);
92 void updateGLInfo(
void);
93 void updateMouseInfo(
int,
int);
94 void updateTimeInfo(
double,
double);
97 OGLplusExampleWindow(
int,
char**,
const char*);
Declares a common base class for examples.
Class measuring the simulation time of an Example.
Definition: example.hpp:135