1 // Copyright (C) 2014-2017 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
18 // email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
21 #include <ModuleBase_PageGroupBox.h>
22 #include <ModuleBase_ModelWidget.h>
23 #include <ModuleBase_Tools.h>
25 #include <QGridLayout>
27 ModuleBase_PageGroupBox::ModuleBase_PageGroupBox(QWidget* theParent)
28 : QGroupBox(theParent)
30 myMainLayout = new QGridLayout(this);
31 ModuleBase_Tools::adjustMargins(myMainLayout);
32 setLayout(myMainLayout);
35 ModuleBase_PageGroupBox::~ModuleBase_PageGroupBox()
39 void ModuleBase_PageGroupBox::addPageStretch()
43 void ModuleBase_PageGroupBox::placeModelWidget(ModuleBase_ModelWidget* theWidget)
46 const int kRow = myMainLayout->count();
47 // it seems, that the align on left is not necessary here, but leads to widgets, which are
48 // not extended on full width of the parent page. The case is grouped widgets in
49 // the sketch translation operation
50 myMainLayout->addWidget(theWidget, kRow, kCol, Qt::AlignTop);// | Qt::AlignLeft);
51 myMainLayout->setRowStretch(kRow, 0);
55 void ModuleBase_PageGroupBox::placeWidget(QWidget* theWidget)
59 std::cout << "ModuleBase_PageGroupBox::placePageWidget: can not cast page" << std::endl;
64 const int kRow = myMainLayout->count();
65 myMainLayout->addWidget(theWidget, kRow, kCol);
66 myMainLayout->setRowStretch(kRow, 0);
69 QLayout* ModuleBase_PageGroupBox::pageLayout()