Ktam3874/pitx software guide – Kontron KTAM3874-pITX User Manual

Page 201

Advertising
background image

KTD-S0057-I

Page 197 Linux® Programming Examples (DebianTM)


KTAM3874/pITX Software Guide


glEnd

();

glEndList

();

return

list;

}


void GLWidget::drawGear (GLuint gear, GLdouble dx, GLdouble dy, GLdouble dz, GLdouble angle)
{
glPushMatrix

();

glTranslated (dx, dy, dz);

glRotated (angle, 0.0, 0.0, 1.0);

glCallList

(gear);

glPopMatrix

();

}


void GLWidget::normalizeAngle (int *angle)
{

while (*angle < 0)

*angle += 360 * 16;

while (*angle > 360 * 16)

*angle -= 360 * 16;

}


File mainwindow.h (header with Qt

TM

license see 'main.cpp'):

#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QtGui/QMainWindow>


class QAction;
class QLabel;
class QMenu;
class QScrollArea;
class QSlider;
class GLWidget;

class MainWindow : public QMainWindow
{
Q_OBJECT

public:
MainWindow

();

private slots:

void renderIntoPixmap ();

void grabFrameBuffer ();

void clearPixmap ();

void about ();

Advertising
This manual is related to the following products: