summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--ftnoir_posewidget/glwidget.cpp10
-rw-r--r--ftnoir_posewidget/glwidget.h4
2 files changed, 8 insertions, 6 deletions
diff --git a/ftnoir_posewidget/glwidget.cpp b/ftnoir_posewidget/glwidget.cpp
index 26803385..2cd94f62 100644
--- a/ftnoir_posewidget/glwidget.cpp
+++ b/ftnoir_posewidget/glwidget.cpp
@@ -5,14 +5,17 @@
* copyright notice and this permission notice appear in all copies.
*/
-#include <QtGui>
#include "glwidget.h"
-#include <QWidget>
#include <cmath>
#include <algorithm>
+#include <QPainter>
+#include <QPaintEvent>
+
GLWidget::GLWidget(QWidget *parent) : QWidget(parent)
{
+ Q_INIT_RESOURCE(posewidget);
+
front = QImage(QString(":/images/side1.png"));
back = QImage(QString(":/images/side6.png"));
rotateBy(0, 0, 0);
@@ -23,7 +26,6 @@ GLWidget::~GLWidget()
}
void GLWidget::paintEvent ( QPaintEvent * event ) {
- QWidget::paintEvent(event);
QPainter p(this);
project_quad_texture();
p.drawImage(event->rect(), texture);
@@ -31,7 +33,7 @@ void GLWidget::paintEvent ( QPaintEvent * event ) {
void GLWidget::rotateBy(double xAngle, double yAngle, double zAngle)
{
-
+
double ch = cos(xAngle / 57.295781);
double sh = sin(xAngle / 57.295781);
double ca = cos(yAngle / 57.295781);
diff --git a/ftnoir_posewidget/glwidget.h b/ftnoir_posewidget/glwidget.h
index 6ac12fbf..43a0f853 100644
--- a/ftnoir_posewidget/glwidget.h
+++ b/ftnoir_posewidget/glwidget.h
@@ -7,7 +7,7 @@
#pragma once
-#include <QtGui>
+#include <QWidget>
#include <QPixmap>
#include "opentrack/plugin-api.hpp"
@@ -47,7 +47,7 @@ struct Vec2f {
}
};
-class OPENTRACK_EXPORT GLWidget : public QWidget
+class GLWidget : public QWidget
{
public:
GLWidget(QWidget *parent);