From f8ed84b9f9a13d8f227f4bff38d8af551116eb5c Mon Sep 17 00:00:00 2001 From: Treeki Date: Mon, 13 Aug 2012 02:12:27 +0200 Subject: preview/renderer window now shown alongside LayoutWindow --- lslayoutwindow.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'lslayoutwindow.cpp') diff --git a/lslayoutwindow.cpp b/lslayoutwindow.cpp index 7360dcb..d137400 100644 --- a/lslayoutwindow.cpp +++ b/lslayoutwindow.cpp @@ -1,5 +1,6 @@ #include "lslayoutwindow.h" #include "lsscenemodel.h" +#include "layoutgl/widget.h" #include #include #include @@ -83,9 +84,25 @@ LSLayoutWindow::LSLayoutWindow(LYTPackageBase *pkg, const QString &layoutName, Q m_sceneGraph->expandAll(); setWindowTitle(m_layoutName); + + + // finally make the widget + m_renderer = new LGLWidget(); + m_renderer->setLayout(m_layout); + m_renderer->setWindowTitle(QString("Preview: %1").arg(m_layoutName)); + m_renderer->setWindowFlags( + Qt::CustomizeWindowHint | + Qt::WindowTitleHint | + Qt::WindowMinimizeButtonHint); + m_renderer->show(); + + // clean up here + setAttribute(Qt::WA_DeleteOnClose); } LSLayoutWindow::~LSLayoutWindow() { + m_renderer->close(); + delete m_renderer; delete m_layout; } -- cgit v1.2.3