• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

KWin

TestWidget Class Reference

#include <testwidget.h>

Inheritance diagram for TestWidget:

Inheritance graph
[legend]

List of all members.


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:
  • testwidget.h
  • testwidget.cpp

KWin

Skip menu "KWin"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

API Reference

Skip menu "API Reference"
  • KWin
Generated for API Reference by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal