File: qgl_example.h

package info (click to toggle)
mathgl 8.0.3-2
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 248,044 kB
  • sloc: cpp: 87,365; ansic: 3,299; javascript: 3,284; pascal: 1,562; python: 52; sh: 51; makefile: 47; f90: 22
file content (26 lines) | stat: -rw-r--r-- 603 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <mgl2/mgl.h>
#include <QtGlobal>

#if (QT_VERSION_MAJOR>5)
#include <QOpenGLWidget>
class MainWindow : public QOpenGLWidget
#else
#include <QGLWidget>
class MainWindow : public QGLWidget
#endif
{
	Q_OBJECT
protected:
	mglGraph *gr;			// pointer to MathGL core class
	void resizeGL(int nWidth, int nHeight);	// Method called after each window resize
	void paintGL();			// Method to display the image on the screen
	void initializeGL();	// Method to initialize OpenGL
public:
	MainWindow(QWidget *parent = 0);
	~MainWindow();
};

#endif // MAINWINDOW_H