X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2FModuleBase%2FModuleBase_PageWidget.cpp;h=c351d0af404ae7b599281d618bc3bfb7fc784402;hb=854902e275b0daab546cbe4517b8bb71badad4a1;hp=a75a6cfba22b3dc5ca8ba4057730b7cca8a0bc73;hpb=2734393c7c19899fca7e7c36577b31317887a9c9;p=modules%2Fshaper.git diff --git a/src/ModuleBase/ModuleBase_PageWidget.cpp b/src/ModuleBase/ModuleBase_PageWidget.cpp index a75a6cfba..c351d0af4 100644 --- a/src/ModuleBase/ModuleBase_PageWidget.cpp +++ b/src/ModuleBase/ModuleBase_PageWidget.cpp @@ -9,12 +9,14 @@ #include #include -#include +#include + +#include ModuleBase_PageWidget::ModuleBase_PageWidget(QWidget* theParent) : QFrame(theParent) { - myMainLayout = new QGridLayout(this); + myMainLayout = new QVBoxLayout(this); ModuleBase_Tools::adjustMargins(myMainLayout); setLayout(myMainLayout); } @@ -23,25 +25,25 @@ ModuleBase_PageWidget::~ModuleBase_PageWidget() { } +void ModuleBase_PageWidget::addPageStretch() +{ + myMainLayout->addStretch(1); +} + void ModuleBase_PageWidget::placeModelWidget(ModuleBase_ModelWidget* theWidget) { - const int kCol = 0; - const int kRow = myMainLayout->count(); - myMainLayout->addWidget(theWidget, kRow, kCol, Qt::AlignTop | Qt::AlignLeft); + myMainLayout->addWidget(theWidget, 0); } -void ModuleBase_PageWidget::placePageWidget(ModuleBase_PageBase* theWidget) +void ModuleBase_PageWidget::placeWidget(QWidget* theWidget) { - QWidget* aWidget = dynamic_cast(theWidget); - if (!aWidget) { + if (!theWidget) { #ifdef _DEBUG std::cout << "ModuleBase_PageWidget::placePageWidget: can not cast page" << std::endl; #endif return; } - const int kCol = 0; - const int kRow = myMainLayout->count(); - myMainLayout->addWidget(aWidget, kRow, kCol, Qt::AlignTop | Qt::AlignLeft); + myMainLayout->addWidget(theWidget, 0); } QLayout* ModuleBase_PageWidget::pageLayout()