Initial commit
This commit is contained in:
commit
b7d90b9afe
16245 files changed
+3396666
No files matched your search
@@ -0,0 +1,35 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by Philipp Last, NLSE, 2018-03-29
|
||||
*/
|
||||
#include "bdv_bgviewer_widget_container.h"
|
||||
#include <QGridLayout>
|
||||
|
||||
namespace BuildingViewer
|
||||
{
|
||||
BgViewerWidgetContainer::BgViewerWidgetContainer(QWidget *pBgViewerWidget)
|
||||
: QWidget()
|
||||
, m_pBgViewerWidget(pBgViewerWidget)
|
||||
{
|
||||
auto gl = new QGridLayout(this);
|
||||
gl->setContentsMargins(QMargins());
|
||||
gl->setSpacing(0);
|
||||
if (m_pBgViewerWidget)
|
||||
gl->addWidget(m_pBgViewerWidget);
|
||||
}
|
||||
|
||||
|
||||
BgViewerWidgetContainer::~BgViewerWidgetContainer()
|
||||
{
|
||||
if (m_pBgViewerWidget)
|
||||
{
|
||||
layout()->removeWidget(m_pBgViewerWidget);
|
||||
m_pBgViewerWidget->setParent(nullptr); // Removing is not sufficient, we also have to reset the parent to prevent deletion
|
||||
emit signalWidgetReleased();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user