2 * ModuleBase_PageWidget.cpp
4 * Created on: Mar 4, 2015
8 #include <ModuleBase_PageWidget.h>
9 #include <ModuleBase_ModelWidget.h>
10 #include <ModuleBase_Tools.h>
12 #include <QGridLayout>
14 ModuleBase_PageWidget::ModuleBase_PageWidget(QWidget* theParent)
17 myMainLayout = new QGridLayout(this);
18 ModuleBase_Tools::adjustMargins(myMainLayout);
19 setLayout(myMainLayout);
22 ModuleBase_PageWidget::~ModuleBase_PageWidget()
26 void ModuleBase_PageWidget::placeModelWidget(ModuleBase_ModelWidget* theWidget)
29 const int kRow = myMainLayout->count();
30 myMainLayout->addWidget(theWidget, kRow, kCol, Qt::AlignTop | Qt::AlignLeft);
33 void ModuleBase_PageWidget::placePageWidget(ModuleBase_PageBase* theWidget)
35 QWidget* aWidget = dynamic_cast<QWidget*>(theWidget);
38 std::cout << "ModuleBase_PageWidget::placePageWidget: can not cast page" << std::endl;
43 const int kRow = myMainLayout->count();
44 myMainLayout->addWidget(aWidget, kRow, kCol, Qt::AlignTop | Qt::AlignLeft);
47 QLayout* ModuleBase_PageWidget::pageLayout()