Do some refactoring for public api logic

This commit is contained in:
mfreiholz
2016-02-15 11:13:58 +01:00
parent 77d05431c6
commit 9b09ae2fa6
9 changed files with 172 additions and 165 deletions

View File

@@ -95,29 +95,7 @@ MainWindow::MainWindow(QWidget *parent) :
_container->setOrientation(Qt::Vertical);
setCentralWidget(_container);
// Test #1: Use low-level API
// if (true)
// {
// ADS_NS::SectionWidget* section = NULL;
// section = new ADS_NS::SectionWidget(_container);
// section->addContent(createLongTextLabelSC());
// _container->addSection(section);
// section = new ADS_NS::SectionWidget(_container);
// section->addContent(createCalendarSC());
// _container->addSection(section);
// section = new ADS_NS::SectionWidget(_container);
// section->addContent(createFileSystemTreeSC());
// _container->addSection(section);
// section = new ADS_NS::SectionWidget(_container);
// section->addContent(createCalendarSC());
// _container->addSection(section);
// }
// Test #2: Use high-level public API
// Test #1: Use high-level public API
if (true)
{
ADS_NS::SectionWidget* sw1 = _container->addSectionContent(createLongTextLabelSC());
@@ -130,8 +108,8 @@ MainWindow::MainWindow(QWidget *parent) :
resize(800, 600);
// Restore window geometry and ContainerWidget state from last session
// restoreGeometry(loadDataHelper("MainWindow"));
// _container->restoreState(loadDataHelper("ContainerWidget"));
restoreGeometry(loadDataHelper("MainWindow"));
_container->restoreState(loadDataHelper("ContainerWidget"));
}
MainWindow::~MainWindow()