1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D -->
3 * ModuleBase_PageGroupBox.cpp
5 * Created on: Mar 4, 2015
9 #include <ModuleBase_PageGroupBox.h>
10 #include <ModuleBase_ModelWidget.h>
11 #include <ModuleBase_Tools.h>
13 #include <QGridLayout>
15 ModuleBase_PageGroupBox::ModuleBase_PageGroupBox(QWidget* theParent)
16 : QGroupBox(theParent)
18 myMainLayout = new QGridLayout(this);
19 ModuleBase_Tools::adjustMargins(myMainLayout);
20 setLayout(myMainLayout);
23 ModuleBase_PageGroupBox::~ModuleBase_PageGroupBox()
27 void ModuleBase_PageGroupBox::addPageStretch()
31 void ModuleBase_PageGroupBox::placeModelWidget(ModuleBase_ModelWidget* theWidget)
34 const int kRow = myMainLayout->count();
35 // it seems, that the align on left is not necessary here, but leads to widgets, which are
36 // not extended on full width of the parent page. The case is grouped widgets in
37 // the sketch translation operation
38 myMainLayout->addWidget(theWidget, kRow, kCol, Qt::AlignTop);// | Qt::AlignLeft);
39 myMainLayout->setRowStretch(kRow, 0);
43 void ModuleBase_PageGroupBox::placeWidget(QWidget* theWidget)
47 std::cout << "ModuleBase_PageGroupBox::placePageWidget: can not cast page" << std::endl;
52 const int kRow = myMainLayout->count();
53 myMainLayout->addWidget(theWidget, kRow, kCol);
54 myMainLayout->setRowStretch(kRow, 0);
57 QLayout* ModuleBase_PageGroupBox::pageLayout()