- QGroupBox* GroupC1 = new QGroupBox( this, "GroupC1" );
- GroupC1->setColumnLayout(0, Qt::Vertical );
- GroupC1->layout()->setSpacing( 0 );
- GroupC1->layout()->setMargin( 0 );
- QGridLayout* GroupC1Layout = new QGridLayout( GroupC1->layout() );
- GroupC1Layout->setAlignment( Qt::AlignTop );
- GroupC1Layout->setSpacing( 6 );
- GroupC1Layout->setMargin( 11 );
-
- TextLabelOpaque = new QLabel( GroupC1, "TextLabelOpaque" );
- TextLabelOpaque->setText( tr( "SMESH_TRANSPARENCY_OPAQUE" ) );
- TextLabelOpaque->setAlignment( int( QLabel::AlignLeft ) );
- GroupC1Layout->addWidget( TextLabelOpaque, 0, 0 );
- GroupC1Layout->addItem( new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum ), 0, 1 );
-
- TextLabelTransparent = new QLabel( GroupC1, "TextLabelTransparent" );
- TextLabelTransparent->setText( tr( "SMESH_TRANSPARENCY_TRANSPARENT" ) );
- TextLabelTransparent->setAlignment( int( QLabel::AlignRight ) );
- GroupC1Layout->addWidget( TextLabelTransparent, 0, 2 );
-
- Slider1 = new QSlider( 0, 10, 1, 5, Horizontal, GroupC1, "Slider1" );
- Slider1->setMinimumSize( 300, 0 );
- Slider1->setTickmarks( QSlider::Left );
- GroupC1Layout->addMultiCellWidget( Slider1, 1, 1, 0, 2 );
-
- SMESHGUI_TransparencyDlgLayout->addWidget( GroupC1, 0, 0 );
- SMESHGUI_TransparencyDlgLayout->addWidget( GroupButtons, 1, 0 );
-
- /* Initialisations */
- this->mySMESHGUI = SMESHGUI::GetSMESHGUI() ;
- this->mySel = Sel ;
-
- /* First call valueChanged() method for initialisation */
- /* The default value of transparency will change with the selection */
- this->myFirstInit = true ;
-// Slider1->setMaxValue( 10 );
-// Slider1->setValue( 5 ) ;
-
-
- this->ValueHasChanged( Slider1->value() ) ;
-
+ QGroupBox* GroupButtons = new QGroupBox(this, "GroupButtons");
+ GroupButtons->setColumnLayout(0, Qt::Vertical);
+ GroupButtons->layout()->setSpacing(0);
+ GroupButtons->layout()->setMargin(0);
+ QGridLayout* GroupButtonsLayout = new QGridLayout(GroupButtons->layout());
+ GroupButtonsLayout->setAlignment(Qt::AlignTop);
+ GroupButtonsLayout->setSpacing(6);
+ GroupButtonsLayout->setMargin(11);
+
+ buttonOk = new QPushButton(GroupButtons, "buttonOk");
+ buttonOk->setText(tr("SMESH_BUT_CLOSE"));
+ buttonOk->setAutoDefault(TRUE);
+ buttonOk->setDefault(TRUE);
+ GroupButtonsLayout->addItem(new QSpacerItem(20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum), 0, 0);
+ GroupButtonsLayout->addWidget(buttonOk, 0, 1);
+ GroupButtonsLayout->addItem(new QSpacerItem(20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum), 0, 2);
+
+ SMESHGUI_TransparencyDlgLayout->addWidget(GroupC1, 0, 0);
+ SMESHGUI_TransparencyDlgLayout->addWidget(GroupButtons, 1, 0);
+
+ // Initial state
+ this->onSelectionChanged();
+