aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/src-glwidgets/gltest
diff options
context:
space:
mode:
Diffstat (limited to 'src-qt5/src-glwidgets/gltest')
-rw-r--r--src-qt5/src-glwidgets/gltest/colorchange.h30
-rw-r--r--src-qt5/src-glwidgets/gltest/main.cpp52
-rwxr-xr-xsrc-qt5/src-glwidgets/gltest/testbin58272 -> 0 bytes
-rw-r--r--src-qt5/src-glwidgets/gltest/test.pro9
4 files changed, 0 insertions, 91 deletions
diff --git a/src-qt5/src-glwidgets/gltest/colorchange.h b/src-qt5/src-glwidgets/gltest/colorchange.h
deleted file mode 100644
index aad01f05..00000000
--- a/src-qt5/src-glwidgets/gltest/colorchange.h
+++ /dev/null
@@ -1,30 +0,0 @@
-#include <QDebug>
-#include <QApplication>
-#include <QTimer>
-#include <QColor>
-
-#include "../glw-base.h"
-
-class colorchange : public QObject{
- Q_OBJECT
-private:
- GLW_Base *base;
- QTimer *timer;
-
-public slots:
- void toggle(){
- static bool current = false;
- base->setBackgroundColor( current ? QColor(Qt::blue) : QColor(Qt::red));
- current = !current;
- }
-
-public:
- colorchange(GLW_Base *parent) : QObject(){
- base = parent;
- timer = new QTimer(this);
- timer->setInterval(5000);
- connect(timer, SIGNAL(timeout()), this, SLOT(toggle()) );
- timer->start();
- }
-
-};
diff --git a/src-qt5/src-glwidgets/gltest/main.cpp b/src-qt5/src-glwidgets/gltest/main.cpp
deleted file mode 100644
index efcebea1..00000000
--- a/src-qt5/src-glwidgets/gltest/main.cpp
+++ /dev/null
@@ -1,52 +0,0 @@
-#include <QDebug>
-#include <QApplication>
-#include <QTimer>
-#include <QColor>
-#include <QPropertyAnimation>
-#include "../glw-base.h"
-#include "../glw-widget.h"
-
-#include "colorchange.h"
-
-int main(int argc, char** argv){
-
- QSurfaceFormat fmt;
- fmt.setRenderableType(QSurfaceFormat::OpenGL); //OpenGL, OpenGLES, OpenVG
- fmt.setSwapBehavior(QSurfaceFormat::DoubleBuffer);
- QSurfaceFormat::setDefaultFormat(fmt);
-
- QApplication A(argc,argv);
-
- qDebug() << "Creating base widget";
- GLW_Base base;
- qDebug() << "Resize base widget";
- base.resize(1024,768);
- qDebug() << "Create Other widgets";
- GLW_Widget wgt1(&base);
- wgt1.setGLBase(&base);
- wgt1.setGeometry(50,50,50,50);
- wgt1.setDraggable(true);
- GLW_Widget wgt(&base);
- wgt.setGLBase(&base);
- wgt.setGeometry(75,50,50,50);
- QPropertyAnimation anim(&wgt);
- anim.setTargetObject(&wgt);
- anim.setPropertyName("geometry");
- //anim.setStartValue(QRect(-50,-50,50,50));
- //anim.setEndValue(QRect(200,200,50,50));
- anim.setStartValue(QRect(base.width()/2,base.height()/2,0,0));
- anim.setEndValue(QRect(0,0,base.width(),base.height()));
- anim.setDuration(1500);
- anim.setLoopCount(-1);
- anim.start();
- /*QPushButton but(&base);
- but.setText("button");
- but.setGeometry(100,100,50,50);
- but.setStyleSheet("background: rgba(0,150,0,125)");*/
- colorchange CC(&base);
- qDebug() << "Start Event loop";
- base.show();
- int ret = A.exec();
- qDebug() << " - Finished";
- return ret;
-}
diff --git a/src-qt5/src-glwidgets/gltest/test b/src-qt5/src-glwidgets/gltest/test
deleted file mode 100755
index 3ba6f8db..00000000
--- a/src-qt5/src-glwidgets/gltest/test
+++ /dev/null
Binary files differ
diff --git a/src-qt5/src-glwidgets/gltest/test.pro b/src-qt5/src-glwidgets/gltest/test.pro
deleted file mode 100644
index cba315c3..00000000
--- a/src-qt5/src-glwidgets/gltest/test.pro
+++ /dev/null
@@ -1,9 +0,0 @@
-QT = core gui widgets
-
-TARGET = test
-
-SOURCES += main.cpp
-
-HEADERS += colorchange.h
-
-include(../glwidgets.pri);
bgstack15