Started refactoring to improve code quality, overall designa nd to gain knowledge of the impolemented functionality

This commit is contained in:
Uwe Kindler
2017-01-17 07:57:24 +01:00
parent abc8468989
commit 68b93f6fa9
14 changed files with 276 additions and 188 deletions

View File

@@ -10,6 +10,7 @@
#include "ads/SectionTitleWidget.h"
#include "ads/SectionContentWidget.h"
#include "ads/Internal.h"
#include "ads/SectionWidget.h"
ADS_NAMESPACE_BEGIN
@@ -54,6 +55,18 @@ FloatingWidget::FloatingWidget(ContainerWidget* container, SectionContent::RefPt
// _container->_floatingWidgets.append(this);
}
FloatingWidget::FloatingWidget(SectionWidget* sectionWidget)
{
QBoxLayout* l = new QBoxLayout(QBoxLayout::TopToBottom);
l->setContentsMargins(0, 0, 0, 0);
l->setSpacing(0);
setLayout(l);
l->addWidget(sectionWidget);
}
FloatingWidget::~FloatingWidget()
{
_container->_floatings.removeAll(this); // Note: I don't like this here, but we have to remove it from list...
@@ -81,4 +94,5 @@ void FloatingWidget::onCloseButtonClicked()
_container->hideSectionContent(_content);
}
ADS_NAMESPACE_END