+ ModeStackedLayout = new QStackedLayout();
+
+ // Controls for defining plane parameters
+ /********************** Mode Absolute **********************/
+ /* Controls for absolute mode of clipping plane:
+ X, Y, Z - coordinates of the intersection of cutting plane and the three axes
+ Dx, Dy, Dz - components of normal to the cutting plane
+ Orientation - direction of cutting plane
+ */
+ const double min = -1e+7;
+ const double max = 1e+7;
+ const double step = 5;
+ const int precision = -7;
+
+ // Croup Point
+ QGroupBox* GroupAbsolutePoint = new QGroupBox( this );
+ GroupAbsolutePoint->setObjectName( "GroupPoint" );
+ GroupAbsolutePoint->setTitle( tr("BASE_POINT") );
+ QGridLayout* GroupPointLayout = new QGridLayout( GroupAbsolutePoint );
+ GroupPointLayout->setAlignment( Qt::AlignTop );
+ GroupPointLayout->setSpacing( 6 ); GroupPointLayout->setMargin( 11 );
+
+ TextLabelX = new QLabel( GroupAbsolutePoint );
+ TextLabelX->setObjectName( "TextLabelX" );
+ TextLabelX->setText( tr("X:") );
+ GroupPointLayout->addWidget( TextLabelX, 0, 0 );
+
+ SpinBox_X = new QtxDoubleSpinBox( min, max, step, GroupAbsolutePoint );
+ SpinBox_X->setObjectName("SpinBox_X" );
+ SpinBox_X->setPrecision( precision );
+ GroupPointLayout->addWidget( SpinBox_X, 0, 1 );
+
+ TextLabelY = new QLabel( GroupAbsolutePoint );
+ TextLabelY->setObjectName( "TextLabelY" );
+ TextLabelY->setText( tr("Y:") );
+ GroupPointLayout->addWidget( TextLabelY, 0, 2 );
+
+ SpinBox_Y = new QtxDoubleSpinBox( min, max, step, GroupAbsolutePoint );
+ SpinBox_Y->setObjectName("SpinBox_Y" );
+ SpinBox_Y->setPrecision( precision );
+ GroupPointLayout->addWidget( SpinBox_Y, 0, 3 );
+
+ TextLabelZ = new QLabel( GroupAbsolutePoint );
+ TextLabelZ->setObjectName( "TextLabelZ" );
+ TextLabelZ->setText( tr("Z:") );
+ GroupPointLayout->addWidget( TextLabelZ, 0, 4 );
+
+ SpinBox_Z = new QtxDoubleSpinBox( min, max, step, GroupAbsolutePoint );
+ SpinBox_Z->setObjectName("SpinBox_Z" );
+ SpinBox_Z->setPrecision( precision );
+ GroupPointLayout->addWidget( SpinBox_Z, 0, 5 );
+
+ resetButton = new QPushButton( GroupAbsolutePoint );
+ resetButton->setObjectName( "resetButton" );
+ resetButton->setText( tr( "RESET" ) );
+ GroupPointLayout->addWidget( resetButton, 0, 6 );
+
+ // Group Direction
+ GroupAbsoluteDirection = new QGroupBox( this );
+ GroupAbsoluteDirection->setObjectName( "GroupDirection" );
+ GroupAbsoluteDirection->setTitle( tr("DIRECTION") );
+ QGridLayout* GroupDirectionLayout = new QGridLayout( GroupAbsoluteDirection );
+ GroupDirectionLayout->setAlignment( Qt::AlignTop );
+ GroupDirectionLayout->setSpacing( 6 );
+ GroupDirectionLayout->setMargin( 11 );
+
+ TextLabelDx = new QLabel( GroupAbsoluteDirection );
+ TextLabelDx->setObjectName( "TextLabelDx" );
+ TextLabelDx->setText( tr("Dx:") );
+ GroupDirectionLayout->addWidget( TextLabelDx, 0, 0 );
+
+ SpinBox_Dx = new QtxDoubleSpinBox( min, max, step, GroupAbsoluteDirection );
+ SpinBox_Dx->setObjectName("SpinBox_Dx" );
+ SpinBox_Dx->setPrecision( precision );
+ GroupDirectionLayout->addWidget( SpinBox_Dx, 0, 1 );
+
+ TextLabelDy = new QLabel( GroupAbsoluteDirection );
+ TextLabelDy->setObjectName( "TextLabelDy" );
+ TextLabelDy->setText( tr("Dy:") );
+ GroupDirectionLayout->addWidget( TextLabelDy, 0, 2 );
+
+ SpinBox_Dy = new QtxDoubleSpinBox( min, max, step, GroupAbsoluteDirection );
+ SpinBox_Dy->setObjectName("SpinBox_Dy" );
+ SpinBox_Dy->setPrecision( precision );
+ GroupDirectionLayout->addWidget( SpinBox_Dy, 0, 3 );
+
+ TextLabelDz = new QLabel( GroupAbsoluteDirection );
+ TextLabelDz->setObjectName( "TextLabelDz" );
+ TextLabelDz->setText( tr("Dz:") );
+ GroupDirectionLayout->addWidget( TextLabelDz, 0, 4 );
+
+ SpinBox_Dz = new QtxDoubleSpinBox( min, max, step, GroupAbsoluteDirection );
+ SpinBox_Dz->setObjectName("SpinBox_Dz" );
+ SpinBox_Dz->setPrecision( precision );
+ GroupDirectionLayout->addWidget( SpinBox_Dz, 0, 5 );
+
+ invertButton = new QPushButton( GroupAbsoluteDirection );
+ invertButton->setObjectName( "invertButton" );
+ invertButton->setText( tr( "INVERT" ) );
+ GroupDirectionLayout->addWidget( invertButton, 0, 6 );
+
+ CBAbsoluteOrientation = new QComboBox( GroupAbsoluteDirection );
+ CBAbsoluteOrientation->setObjectName( "AbsoluteOrientation" );
+ CBAbsoluteOrientation->insertItem( CBAbsoluteOrientation->count(), tr( "CUSTOM" ) );
+ CBAbsoluteOrientation->insertItem( CBAbsoluteOrientation->count(), tr( "||X-Y" ) );
+ CBAbsoluteOrientation->insertItem( CBAbsoluteOrientation->count(), tr( "||Y-Z" ) );
+ CBAbsoluteOrientation->insertItem( CBAbsoluteOrientation->count(), tr( "||Z-X" ) );
+ GroupDirectionLayout->addWidget( CBAbsoluteOrientation, 1, 0, 1, 6 );
+
+ QVBoxLayout* ModeActiveLayout = new QVBoxLayout();
+ ModeActiveLayout->setMargin( 11 ); ModeActiveLayout->setSpacing( 6 );
+ ModeActiveLayout->addWidget( GroupAbsolutePoint );
+ ModeActiveLayout->addWidget( GroupAbsoluteDirection );
+
+ QWidget* ModeActiveWidget = new QWidget( this );
+ ModeActiveWidget->setLayout( ModeActiveLayout );
+
+ /********************** Mode Relative **********************/
+ /* Controls for relative mode of clipping plane:
+ Distance - Value from 0 to 1.
+ Specifies the distance from the minimum value in a given direction of bounding box to the current position
+ Rotation1, Rotation2 - turn angles of cutting plane in given directions
+ Orientation - direction of cutting plane
+ */
+ QGroupBox* GroupParameters = new QGroupBox( tr("SMESH_PARAMETERS"), this );
+ QGridLayout* GroupParametersLayout = new QGridLayout( GroupParameters );
+ GroupParametersLayout->setMargin( 11 ); GroupParametersLayout->setSpacing( 6 );
+
+ TextLabelOrientation = new QLabel( tr("SMESH_ORIENTATION"), GroupParameters);
+ TextLabelOrientation->setObjectName( "TextLabelOrientation" );
+ GroupParametersLayout->addWidget( TextLabelOrientation, 0, 0 );
+
+ CBRelativeOrientation = new QComboBox(GroupParameters);
+ CBRelativeOrientation->setObjectName( "RelativeOrientation" );
+ CBRelativeOrientation->addItem( tr("ALONG_XY") );
+ CBRelativeOrientation->addItem( tr("ALONG_YZ") );
+ CBRelativeOrientation->addItem( tr("ALONG_ZX") );
+ GroupParametersLayout->addWidget( CBRelativeOrientation, 0, 1 );
+
+ TextLabelDistance = new QLabel( tr("SMESH_DISTANCE"), GroupParameters );
+ TextLabelDistance->setObjectName( "TextLabelDistance" );
+ GroupParametersLayout->addWidget( TextLabelDistance, 1, 0 );
+
+ SpinSliderDistance = new QtxDoubleSpinSlider( 0., 1., 0.01, GroupParameters );
+ SpinSliderDistance->setObjectName( "SpinSliderDistance" );
+ SpinSliderDistance->setPrecision( precision );
+ QFont fnt = SpinSliderDistance->font(); fnt.setBold( true ); SpinSliderDistance->setFont( fnt );
+ GroupParametersLayout->addWidget( SpinSliderDistance, 1, 1 );
+
+ QString aUnitRot = "\xB0";
+
+ TextLabelRotation1 = new QLabel( tr("ROTATION_AROUND_X_Y2Z"), GroupParameters );
+ TextLabelRotation1->setObjectName( "TextLabelRotation1" );
+ GroupParametersLayout->addWidget( TextLabelRotation1, 2, 0 );
+
+ SpinSliderRotation1 = new QtxIntSpinSlider( -180, 180, 1, GroupParameters );
+ SpinSliderRotation1->setObjectName( "SpinSliderRotation1" );
+ SpinSliderRotation1->setUnit( aUnitRot );
+ SpinSliderRotation1->setFont( fnt );
+ GroupParametersLayout->addWidget( SpinSliderRotation1, 2, 1 );
+
+ TextLabelRotation2 = new QLabel(tr("ROTATION_AROUND_Y_X2Z"), GroupParameters);
+ TextLabelRotation2->setObjectName( "TextLabelRotation2" );
+ TextLabelRotation2->setObjectName( "TextLabelRotation2" );
+ GroupParametersLayout->addWidget( TextLabelRotation2, 3, 0 );
+
+ SpinSliderRotation2 = new QtxIntSpinSlider( -180, 180, 1, GroupParameters );
+ SpinSliderRotation2->setObjectName( "SpinSliderRotation2" );
+ SpinSliderRotation2->setUnit( aUnitRot );
+ SpinSliderRotation2->setFont( fnt );
+ GroupParametersLayout->addWidget( SpinSliderRotation2, 3, 1 );
+
+ /***************************************************************/
+ QWidget* CheckBoxWidget = new QWidget( this );
+ QHBoxLayout* CheckBoxLayout = new QHBoxLayout( CheckBoxWidget );
+
+ PreviewCheckBox = new QCheckBox( tr("SHOW_PREVIEW"), CheckBoxWidget );
+ PreviewCheckBox->setObjectName( "PreviewCheckBox" );
+ PreviewCheckBox->setChecked( true );
+ CheckBoxLayout->addWidget( PreviewCheckBox, 0, Qt::AlignCenter );
+
+ AutoApplyCheckBox = new QCheckBox( tr("AUTO_APPLY"), CheckBoxWidget );
+ AutoApplyCheckBox->setObjectName( "AutoApplyCheckBox" );
+ CheckBoxLayout->addWidget( AutoApplyCheckBox, 0, Qt::AlignCenter );
+
+ /***************************************************************/