1 // Copyright (C) 2014-2019 CEA/DEN, EDF R&D
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License, or (at your option) any later version.
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 #include <ModuleBase_PageGroupBox.h>
21 #include <ModuleBase_ModelWidget.h>
22 #include <ModuleBase_Tools.h>
24 #include <QGridLayout>
26 ModuleBase_PageGroupBox::ModuleBase_PageGroupBox(QWidget* theParent)
27 : QGroupBox(theParent)
29 myMainLayout = new QGridLayout(this);
30 ModuleBase_Tools::adjustMargins(myMainLayout);
31 setLayout(myMainLayout);
34 ModuleBase_PageGroupBox::~ModuleBase_PageGroupBox()
38 void ModuleBase_PageGroupBox::addPageStretch()
42 void ModuleBase_PageGroupBox::placeModelWidget(ModuleBase_ModelWidget* theWidget)
45 const int kRow = myMainLayout->count();
46 // it seems, that the align on left is not necessary here, but leads to widgets, which are
47 // not extended on full width of the parent page. The case is grouped widgets in
48 // the sketch translation operation
49 myMainLayout->addWidget(theWidget, kRow, kCol, Qt::AlignTop);// | Qt::AlignLeft);
50 myMainLayout->setRowStretch(kRow, 0);
54 void ModuleBase_PageGroupBox::placeWidget(QWidget* theWidget)
58 std::cout << "ModuleBase_PageGroupBox::placePageWidget: can not cast page" << std::endl;
63 const int kRow = myMainLayout->count();
64 myMainLayout->addWidget(theWidget, kRow, kCol);
65 myMainLayout->setRowStretch(kRow, 0);
68 QLayout* ModuleBase_PageGroupBox::pageLayout()