- // Pictures 2d and 3d
- for (int i = 0; i < 2; i++) {
- if (i == 0) {
- myPicture2d = new SMESHGUI_PatternWidget(aPatGrp),
- myPicture2d->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding));
- } else {
- myPicture3d = new QFrame(aPatGrp),
- myPreview3d = new QLabel(myPicture3d);
- myPreview3d->setPixmap(iconSample3d);
- QGridLayout* aLay = new QGridLayout(myPicture3d, 3, 3, 0, 0);
- QSpacerItem* aSpacerH1 = new QSpacerItem(0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum);
- QSpacerItem* aSpacerH2 = new QSpacerItem(0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum);
- QSpacerItem* aSpacerV1 = new QSpacerItem(0, 0, QSizePolicy::Minimum, QSizePolicy::Expanding);
- QSpacerItem* aSpacerV2 = new QSpacerItem(0, 0, QSizePolicy::Minimum, QSizePolicy::Expanding);
- aLay->addItem(aSpacerH1, 1, 0);
- aLay->addItem(aSpacerH2, 1, 2);
- aLay->addItem(aSpacerV1, 0, 1);
- aLay->addItem(aSpacerV2, 2, 1);
- aLay->addWidget(myPreview3d, 1, 1);
- }
- }
+ // ... Pictures 2d and 3d
+
+ myPicture2d = new SMESHGUI_PatternWidget( aPatGrp );
+ myPicture2d->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding ) );
+
+ myPicture3d = new QLabel( aPatGrp );
+ myPicture3d->setPixmap( iconSample3d );
+ myPicture3d->setScaledContents( false );
+ myPicture3d->setAlignment( Qt::AlignCenter );
+ myPicture3d->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding ) );
+
+ // ... preview check box
+
+ myPreviewChk = new QCheckBox( tr( "PREVIEW" ), aPatGrp );
+
+ // ... layout widgets
+
+ aPatGrpLayout->addWidget( aNameLab, 0, 0 );
+ aPatGrpLayout->addWidget( myName, 0, 1 );
+ aPatGrpLayout->addWidget( myOpenBtn, 0, 2 );
+ aPatGrpLayout->addWidget( myNewBtn, 0, 3 );
+ aPatGrpLayout->addWidget( myRefine, 1, 0, 1, 4 );
+ aPatGrpLayout->addWidget( myRefine, 1, 0, 1, 4 );
+ aPatGrpLayout->addWidget( myGeomGrp, 2, 0, 1, 4 );
+ aPatGrpLayout->addWidget( myRefineGrp, 3, 0, 1, 4 );
+ aPatGrpLayout->addWidget( myReverseChk, 4, 0, 1, 4 );
+ aPatGrpLayout->addWidget( myCreatePolygonsChk, 5, 0, 1, 4 );
+ aPatGrpLayout->addWidget( myCreatePolyedrsChk, 6, 0, 1, 4 );
+ aPatGrpLayout->addWidget( myPicture2d, 7, 0, 1, 4 );
+ aPatGrpLayout->addWidget( myPicture3d, 8, 0, 1, 4 );
+ aPatGrpLayout->addWidget( myPreviewChk, 9, 0, 1, 4 );