KWin
TestWidget Class Reference
#include <testwidget.h>

Detailed Description
Definition at line 37 of file testwidget.h.
Public Member Functions | |
| TestWidget () | |
Protected Member Functions | |
| void | initializeGL () |
| virtual void | keyPressEvent (QKeyEvent *e) |
| virtual void | keyReleaseEvent (QKeyEvent *e) |
| virtual void | mouseMoveEvent (QMouseEvent *e) |
| virtual void | mousePressEvent (QMouseEvent *e) |
| void | processInput () |
| void | processMovement () |
| void | render () |
Constructor & Destructor Documentation
| TestWidget::TestWidget | ( | ) |
Definition at line 42 of file testwidget.cpp.
Member Function Documentation
| void TestWidget::initializeGL | ( | ) | [protected, virtual] |
Initializes OpenGL.
Base implementation:
- calls KGLLib::init() to initialize KGLLib
- creates camera and fpsCounter objects
- sets OpenGL clear color to clearColor
- initializes camera to look from (0, 0, 5) at (0, 0, 0) with depth range [1, 100]
- enables depth testing (if depth buffer is used)
- sets OpenGL shade model to GL_SMOOTH
- sets primary color to white
Reimplemented from KGLLib::GLWidget.
Definition at line 102 of file testwidget.cpp.
| void TestWidget::keyPressEvent | ( | QKeyEvent * | e | ) | [protected, virtual] |
Definition at line 66 of file testwidget.cpp.
| void TestWidget::keyReleaseEvent | ( | QKeyEvent * | e | ) | [protected, virtual] |
Definition at line 97 of file testwidget.cpp.
| void TestWidget::mouseMoveEvent | ( | QMouseEvent * | e | ) | [protected, virtual] |
Definition at line 55 of file testwidget.cpp.
| void TestWidget::mousePressEvent | ( | QMouseEvent * | e | ) | [protected, virtual] |
Definition at line 50 of file testwidget.cpp.
| void TestWidget::processInput | ( | ) | [protected] |
Definition at line 79 of file testwidget.cpp.
| void TestWidget::processMovement | ( | ) | [protected] |
Definition at line 145 of file testwidget.cpp.
| void TestWidget::render | ( | ) | [protected, virtual] |
Called from paintGL() when the widget needs to be painted.
This is the method that you should reimplement to do your rendering. Base implementation does nothing, so you needn't call it from your implementation.
Reimplemented from KGLLib::GLWidget.
Definition at line 164 of file testwidget.cpp.
The documentation for this class was generated from the following files:
KDE 4.2 API Reference