11 #ifndef CXREPLACABLECONTENTWIDGET_H 12 #define CXREPLACABLECONTENTWIDGET_H 15 #include <QVBoxLayout> 16 #include <boost/shared_ptr.hpp> 31 mLayout =
new QVBoxLayout(
this);
32 mLayout->setMargin(0);
36 this->
setWidget(boost::shared_ptr<QWidget>());
41 this->setWidgetDontDeleteOld(widget.get());
42 mWidgetBoostPointer = widget;
46 QWidget* oldwidget = mWidget;
47 this->setWidgetDontDeleteOld(widget);
59 boost::shared_ptr<QWidget> mWidgetBoostPointer;
61 void setWidgetDontDeleteOld(QWidget* widget)
67 mWidget->setParent(NULL);
72 mLayout->addWidget(mWidget);
80 #endif // CXREPLACABLECONTENTWIDGET_H ReplacableContentWidget(QWidget *parent)
void setWidget(boost::shared_ptr< QWidget > widget)
void setWidgetDeleteOld(QWidget *widget)
~ReplacableContentWidget()
Namespace for all CustusX production code.