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::addPageStretch()
28 myMainLayout->setRowStretch(myMainLayout->rowCount(), 1);
31 void ModuleBase_PageWidget::placeModelWidget(ModuleBase_ModelWidget* theWidget)
34 const int kRow = myMainLayout->count();
35 myMainLayout->addWidget(theWidget, kRow, kCol);
38 void ModuleBase_PageWidget::placePageWidget(ModuleBase_PageBase* theWidget)
40 QWidget* aWidget = dynamic_cast<QWidget*>(theWidget);
43 std::cout << "ModuleBase_PageWidget::placePageWidget: can not cast page" << std::endl;
48 const int kRow = myMainLayout->count();
49 myMainLayout->addWidget(aWidget, kRow, kCol);//, Qt::AlignTop | Qt::AlignLeft);
52 QLayout* ModuleBase_PageWidget::pageLayout()