-
Notifications
You must be signed in to change notification settings - Fork 1
/
axisglwidget.h
54 lines (40 loc) · 1.53 KB
/
axisglwidget.h
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
// Copyright (c) 2014 Andranik Abrahamyan
#ifndef AXISGLWIDGET_H
#define AXISGLWIDGET_H
#include <QtGui/QGroupBox>
#include <QtOpenGL/QGLWidget>
#include "stlfile.h"
class AxisGLWidget;
/*! \brief The AxisGLWidget window shows axis rotations.
*
*/
class AxisGLWidget : public QGLWidget {
Q_OBJECT
public:
AxisGLWidget(QWidget *parent = 0);
~AxisGLWidget();
void reset(); //!< reset the axis window
void rotateAxis(); //!< rotate the axis window
QSize minimumSizeHint() const; //!< set minimum size Hint for the axis window
QSize sizeHint() const; //!< set size Hint for the axis window
public slots:
void setXRotation(const int angle); //!< set the x Rotation angle
void setYRotation(const int angle); //!< set the y Rotation angle
void setZRotation(const int angle); //!< set the z Rotation angle
signals:
void xRotationChanged(int angle) const; //!< the x Rotation Changed signal
void yRotationChanged(int angle) const; //!< the y Rotation Changed signal
void zRotationChanged(int angle) const; //!< the z Rotation Changed signal
protected:
void initializeGL(); //!< initialize the axises window
void paintGL(); //!< paint the axises window
void resizeGL(int width, int height); //!< resize the axises window
private:
void drawAxes(); //!< draw the axises
int xRot; //!< axis rotation x position
int yRot; //!< axis rotation y position
int zRot; //!< axis rotation y position
QColor black; //!< black color for drawing
QColor purple; //!< purple color for drawing
};
#endif // AXISGLWIDGET_H