Getting rid of Qt3D. FTM.

parent bda557d8
......@@ -82,7 +82,7 @@ include(GenerateExportHeader)
## Dependencies - external
## #################################################################
find_package(Qt5 REQUIRED COMPONENTS Core 3DCore 3DExtras 3DRender 3DInput Widgets)
find_package(Qt5 REQUIRED COMPONENTS Core Widgets)
find_package(dtkFonts REQUIRED)
......
......@@ -28,9 +28,6 @@ add_executable(${PROJECT_NAME}
${${PROJECT_NAME}_SOURCES})
target_link_libraries(${PROJECT_NAME} Qt5::Core)
target_link_libraries(${PROJECT_NAME} Qt5::3DCore)
target_link_libraries(${PROJECT_NAME} Qt5::3DExtras)
target_link_libraries(${PROJECT_NAME} Qt5::3DRender)
target_link_libraries(${PROJECT_NAME} Qt5::Widgets)
target_link_libraries(${PROJECT_NAME} dtkWidgets)
......
......@@ -15,17 +15,6 @@
#include <QtCore>
#include <QtWidgets>
#include <Qt3DCore/QEntity>
#include <Qt3DCore/QTransform>
#include <Qt3DRender/QCamera>
#include <Qt3DRender/QMaterial>
#include <Qt3DExtras/Qt3DWindow>
#include <Qt3DExtras/QTorusMesh>
#include <Qt3DExtras/QPhongMaterial>
#include <Qt3DExtras/QOrbitCameraController>
#include <dtkFonts>
#include <dtkWidgets>
......@@ -278,52 +267,6 @@ void dtkWidgetsScroller::wheelEvent(QWheelEvent *event)
//
// ///////////////////////////////////////////////////////////////////
class dummyWindow : public Qt3DExtras::Qt3DWindow
{
Q_OBJECT
public:
dummyWindow(QScreen *target = nullptr);
};
dummyWindow::dummyWindow(QScreen *target) : Qt3DExtras::Qt3DWindow(target)
{
Qt3DCore::QEntity *root = new Qt3DCore::QEntity;
Qt3DExtras::QTorusMesh *mesh = new Qt3DExtras::QTorusMesh;
mesh->setRadius(5);
mesh->setMinorRadius(1);
mesh->setRings(100);
mesh->setSlices(20);
Qt3DCore::QTransform *transform = new Qt3DCore::QTransform;
transform->setRotation(QQuaternion::fromAxisAndAngle(QVector3D(1,0,0), 45.f ));
Qt3DExtras::QPhongMaterial *material = new Qt3DExtras::QPhongMaterial(root);
material->setAmbient(Qt::red);
Qt3DCore::QEntity *torus = new Qt3DCore::QEntity(root);
torus->addComponent(mesh);
torus->addComponent(transform);
torus->addComponent(material);
Qt3DRender::QCamera *camera = this->camera();
camera->lens()->setPerspectiveProjection(45.0f, 16.0f/9.0f, 0.1f, 1000.0f);
camera->setPosition(QVector3D(0, 0, 40.0f));
camera->setViewCenter(QVector3D(0, 0, 0));
Qt3DExtras::QOrbitCameraController* manipulator = new Qt3DExtras::QOrbitCameraController(root);
manipulator->setLinearSpeed(50.f);
manipulator->setLookSpeed(180.f);
manipulator->setCamera(camera);
this->setRootEntity(root);
}
// ///////////////////////////////////////////////////////////////////
//
// ///////////////////////////////////////////////////////////////////
class dummy : public QFrame
{
Q_OBJECT
......@@ -341,10 +284,6 @@ private:
dummy::dummy(QWidget *parent) : QFrame(parent)
{
dummyWindow *window1 = new dummyWindow;
window1->show();
window1->raise();
dtkWidgetsScrollerPage *page1 = new dtkWidgetsScrollerPage("Page 1", this);
page1->setFixedHeight(480);
page1->setStyleSheet("QFrame { background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #26aae5, stop: 1.0 #1e5fa7); } QLabel { background: none; }");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment